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

com.xiaomi.infra.galaxy.emr.thrift.EMRSchedulerService Maven / Gradle / Ivy

/**
 * Autogenerated by Thrift Compiler (0.9.2)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package com.xiaomi.infra.galaxy.emr.thrift;

import libthrift091.scheme.IScheme;
import libthrift091.scheme.SchemeFactory;
import libthrift091.scheme.StandardScheme;

import libthrift091.scheme.TupleScheme;
import libthrift091.protocol.TTupleProtocol;
import libthrift091.protocol.TProtocolException;
import libthrift091.EncodingUtils;
import libthrift091.TException;
import libthrift091.async.AsyncMethodCallback;
import libthrift091.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-8-2")
public class EMRSchedulerService {

  public interface Iface extends com.xiaomi.infra.galaxy.rpc.thrift.BaseService.Iface {

    public CreateClusterResponse createCluster(CreateClusterRequest cluster) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public AddInstanceGroupResponse addInstanceGroup(AddInstanceGroupRequest instanceGroup) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public List addInstanceGroups(List instanceGroups) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public SubmitJobResponse submitJob(SubmitJobRequest job) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public List submitJobs(List jobs) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public String terminateCluster(TerminateClusterRequest terminateCluster) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public ModifyInstanceGroupResponse modifyInstanceGroup(ModifyInstanceGroupRequest instanceGroup) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public ClusterDetail describeCluster(String clusterId) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public InstanceGroupDetail describeInstanceGroup(String instanceGroupId) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public InstanceDetail describeInstance(String clusterId, String instanceId) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public JobDetail describeJob(String clusterId, String jobId) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public List listClusters(int createdAfter, int createdBefore) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public List listClustersWithPrefix(String prefix) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public List listInstanceGroups(String clusterId) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public List listInstancesInCluster(String clusterId) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public List listInstancesInGroup(String clusterId, String groupId, InstanceGroupRole groupRole) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public List listJobs(String clusterId) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public void setPermission(SetPermissionRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public void revokePermission(RevokePermissionRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public QueryPermissionResponse queryPermission(QueryPermissionRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public ListPermissionResponse listPermissions(ListPermissionRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public GetSSHPublicKeysResponse getSSHPublicKeys(GetSSHPublicKeysRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public void addSSHPublicKeys(AddSSHPublicKeysRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public void deleteSSHPublicKeys(DeleteSSHPublicKeysRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public GetQuotaResponse getQuota(GetQuotaRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public DeleteClusterResponse deleteCluster(DeleteClusterRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public GetEMRBasicConfigResponse getEMRBasicConfig() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public GetSoftwareConfigResponse getSoftwareConfig() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public GetHardwareConfigResponse getHardwareConfig() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public void addTags(AddTagsRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public GetTagsResponse getTags(GetTagsRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public void deleteTag(DeleteTagRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

    public ResizeInstanceGroupResponse resizeInstanceGroup(ResizeInstanceGroupRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException;

  }

  public interface AsyncIface extends com.xiaomi.infra.galaxy.rpc.thrift.BaseService .AsyncIface {

    public void createCluster(CreateClusterRequest cluster, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void addInstanceGroup(AddInstanceGroupRequest instanceGroup, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void addInstanceGroups(List instanceGroups, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void submitJob(SubmitJobRequest job, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void submitJobs(List jobs, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void terminateCluster(TerminateClusterRequest terminateCluster, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void modifyInstanceGroup(ModifyInstanceGroupRequest instanceGroup, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void describeCluster(String clusterId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void describeInstanceGroup(String instanceGroupId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void describeInstance(String clusterId, String instanceId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void describeJob(String clusterId, String jobId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void listClusters(int createdAfter, int createdBefore, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void listClustersWithPrefix(String prefix, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void listInstanceGroups(String clusterId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void listInstancesInCluster(String clusterId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void listInstancesInGroup(String clusterId, String groupId, InstanceGroupRole groupRole, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void listJobs(String clusterId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void setPermission(SetPermissionRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void revokePermission(RevokePermissionRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void queryPermission(QueryPermissionRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void listPermissions(ListPermissionRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void getSSHPublicKeys(GetSSHPublicKeysRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void addSSHPublicKeys(AddSSHPublicKeysRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void deleteSSHPublicKeys(DeleteSSHPublicKeysRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void getQuota(GetQuotaRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void deleteCluster(DeleteClusterRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void getEMRBasicConfig(libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void getSoftwareConfig(libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void getHardwareConfig(libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void addTags(AddTagsRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void getTags(GetTagsRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void deleteTag(DeleteTagRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void resizeInstanceGroup(ResizeInstanceGroupRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

  }

  public static class Client extends com.xiaomi.infra.galaxy.rpc.thrift.BaseService.Client implements Iface {
    public static class Factory implements libthrift091.TServiceClientFactory {
      public Factory() {}
      public Client getClient(libthrift091.protocol.TProtocol prot) {
        return new Client(prot);
      }
      public Client getClient(libthrift091.protocol.TProtocol iprot, libthrift091.protocol.TProtocol oprot) {
        return new Client(iprot, oprot);
      }
    }

    public Client(libthrift091.protocol.TProtocol prot)
    {
      super(prot, prot);
    }

    public Client(libthrift091.protocol.TProtocol iprot, libthrift091.protocol.TProtocol oprot) {
      super(iprot, oprot);
    }

    public CreateClusterResponse createCluster(CreateClusterRequest cluster) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_createCluster(cluster);
      return recv_createCluster();
    }

    public void send_createCluster(CreateClusterRequest cluster) throws libthrift091.TException
    {
      createCluster_args args = new createCluster_args();
      args.setCluster(cluster);
      sendBase("createCluster", args);
    }

    public CreateClusterResponse recv_createCluster() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      createCluster_result result = new createCluster_result();
      receiveBase(result, "createCluster");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "createCluster failed: unknown result");
    }

    public AddInstanceGroupResponse addInstanceGroup(AddInstanceGroupRequest instanceGroup) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_addInstanceGroup(instanceGroup);
      return recv_addInstanceGroup();
    }

    public void send_addInstanceGroup(AddInstanceGroupRequest instanceGroup) throws libthrift091.TException
    {
      addInstanceGroup_args args = new addInstanceGroup_args();
      args.setInstanceGroup(instanceGroup);
      sendBase("addInstanceGroup", args);
    }

    public AddInstanceGroupResponse recv_addInstanceGroup() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      addInstanceGroup_result result = new addInstanceGroup_result();
      receiveBase(result, "addInstanceGroup");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "addInstanceGroup failed: unknown result");
    }

    public List addInstanceGroups(List instanceGroups) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_addInstanceGroups(instanceGroups);
      return recv_addInstanceGroups();
    }

    public void send_addInstanceGroups(List instanceGroups) throws libthrift091.TException
    {
      addInstanceGroups_args args = new addInstanceGroups_args();
      args.setInstanceGroups(instanceGroups);
      sendBase("addInstanceGroups", args);
    }

    public List recv_addInstanceGroups() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      addInstanceGroups_result result = new addInstanceGroups_result();
      receiveBase(result, "addInstanceGroups");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "addInstanceGroups failed: unknown result");
    }

    public SubmitJobResponse submitJob(SubmitJobRequest job) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_submitJob(job);
      return recv_submitJob();
    }

    public void send_submitJob(SubmitJobRequest job) throws libthrift091.TException
    {
      submitJob_args args = new submitJob_args();
      args.setJob(job);
      sendBase("submitJob", args);
    }

    public SubmitJobResponse recv_submitJob() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      submitJob_result result = new submitJob_result();
      receiveBase(result, "submitJob");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "submitJob failed: unknown result");
    }

    public List submitJobs(List jobs) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_submitJobs(jobs);
      return recv_submitJobs();
    }

    public void send_submitJobs(List jobs) throws libthrift091.TException
    {
      submitJobs_args args = new submitJobs_args();
      args.setJobs(jobs);
      sendBase("submitJobs", args);
    }

    public List recv_submitJobs() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      submitJobs_result result = new submitJobs_result();
      receiveBase(result, "submitJobs");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "submitJobs failed: unknown result");
    }

    public String terminateCluster(TerminateClusterRequest terminateCluster) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_terminateCluster(terminateCluster);
      return recv_terminateCluster();
    }

    public void send_terminateCluster(TerminateClusterRequest terminateCluster) throws libthrift091.TException
    {
      terminateCluster_args args = new terminateCluster_args();
      args.setTerminateCluster(terminateCluster);
      sendBase("terminateCluster", args);
    }

    public String recv_terminateCluster() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      terminateCluster_result result = new terminateCluster_result();
      receiveBase(result, "terminateCluster");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "terminateCluster failed: unknown result");
    }

    public ModifyInstanceGroupResponse modifyInstanceGroup(ModifyInstanceGroupRequest instanceGroup) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_modifyInstanceGroup(instanceGroup);
      return recv_modifyInstanceGroup();
    }

    public void send_modifyInstanceGroup(ModifyInstanceGroupRequest instanceGroup) throws libthrift091.TException
    {
      modifyInstanceGroup_args args = new modifyInstanceGroup_args();
      args.setInstanceGroup(instanceGroup);
      sendBase("modifyInstanceGroup", args);
    }

    public ModifyInstanceGroupResponse recv_modifyInstanceGroup() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      modifyInstanceGroup_result result = new modifyInstanceGroup_result();
      receiveBase(result, "modifyInstanceGroup");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "modifyInstanceGroup failed: unknown result");
    }

    public ClusterDetail describeCluster(String clusterId) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_describeCluster(clusterId);
      return recv_describeCluster();
    }

    public void send_describeCluster(String clusterId) throws libthrift091.TException
    {
      describeCluster_args args = new describeCluster_args();
      args.setClusterId(clusterId);
      sendBase("describeCluster", args);
    }

    public ClusterDetail recv_describeCluster() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      describeCluster_result result = new describeCluster_result();
      receiveBase(result, "describeCluster");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "describeCluster failed: unknown result");
    }

    public InstanceGroupDetail describeInstanceGroup(String instanceGroupId) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_describeInstanceGroup(instanceGroupId);
      return recv_describeInstanceGroup();
    }

    public void send_describeInstanceGroup(String instanceGroupId) throws libthrift091.TException
    {
      describeInstanceGroup_args args = new describeInstanceGroup_args();
      args.setInstanceGroupId(instanceGroupId);
      sendBase("describeInstanceGroup", args);
    }

    public InstanceGroupDetail recv_describeInstanceGroup() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      describeInstanceGroup_result result = new describeInstanceGroup_result();
      receiveBase(result, "describeInstanceGroup");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "describeInstanceGroup failed: unknown result");
    }

    public InstanceDetail describeInstance(String clusterId, String instanceId) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_describeInstance(clusterId, instanceId);
      return recv_describeInstance();
    }

    public void send_describeInstance(String clusterId, String instanceId) throws libthrift091.TException
    {
      describeInstance_args args = new describeInstance_args();
      args.setClusterId(clusterId);
      args.setInstanceId(instanceId);
      sendBase("describeInstance", args);
    }

    public InstanceDetail recv_describeInstance() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      describeInstance_result result = new describeInstance_result();
      receiveBase(result, "describeInstance");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "describeInstance failed: unknown result");
    }

    public JobDetail describeJob(String clusterId, String jobId) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_describeJob(clusterId, jobId);
      return recv_describeJob();
    }

    public void send_describeJob(String clusterId, String jobId) throws libthrift091.TException
    {
      describeJob_args args = new describeJob_args();
      args.setClusterId(clusterId);
      args.setJobId(jobId);
      sendBase("describeJob", args);
    }

    public JobDetail recv_describeJob() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      describeJob_result result = new describeJob_result();
      receiveBase(result, "describeJob");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "describeJob failed: unknown result");
    }

    public List listClusters(int createdAfter, int createdBefore) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_listClusters(createdAfter, createdBefore);
      return recv_listClusters();
    }

    public void send_listClusters(int createdAfter, int createdBefore) throws libthrift091.TException
    {
      listClusters_args args = new listClusters_args();
      args.setCreatedAfter(createdAfter);
      args.setCreatedBefore(createdBefore);
      sendBase("listClusters", args);
    }

    public List recv_listClusters() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      listClusters_result result = new listClusters_result();
      receiveBase(result, "listClusters");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "listClusters failed: unknown result");
    }

    public List listClustersWithPrefix(String prefix) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_listClustersWithPrefix(prefix);
      return recv_listClustersWithPrefix();
    }

    public void send_listClustersWithPrefix(String prefix) throws libthrift091.TException
    {
      listClustersWithPrefix_args args = new listClustersWithPrefix_args();
      args.setPrefix(prefix);
      sendBase("listClustersWithPrefix", args);
    }

    public List recv_listClustersWithPrefix() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      listClustersWithPrefix_result result = new listClustersWithPrefix_result();
      receiveBase(result, "listClustersWithPrefix");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "listClustersWithPrefix failed: unknown result");
    }

    public List listInstanceGroups(String clusterId) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_listInstanceGroups(clusterId);
      return recv_listInstanceGroups();
    }

    public void send_listInstanceGroups(String clusterId) throws libthrift091.TException
    {
      listInstanceGroups_args args = new listInstanceGroups_args();
      args.setClusterId(clusterId);
      sendBase("listInstanceGroups", args);
    }

    public List recv_listInstanceGroups() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      listInstanceGroups_result result = new listInstanceGroups_result();
      receiveBase(result, "listInstanceGroups");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "listInstanceGroups failed: unknown result");
    }

    public List listInstancesInCluster(String clusterId) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_listInstancesInCluster(clusterId);
      return recv_listInstancesInCluster();
    }

    public void send_listInstancesInCluster(String clusterId) throws libthrift091.TException
    {
      listInstancesInCluster_args args = new listInstancesInCluster_args();
      args.setClusterId(clusterId);
      sendBase("listInstancesInCluster", args);
    }

    public List recv_listInstancesInCluster() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      listInstancesInCluster_result result = new listInstancesInCluster_result();
      receiveBase(result, "listInstancesInCluster");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "listInstancesInCluster failed: unknown result");
    }

    public List listInstancesInGroup(String clusterId, String groupId, InstanceGroupRole groupRole) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_listInstancesInGroup(clusterId, groupId, groupRole);
      return recv_listInstancesInGroup();
    }

    public void send_listInstancesInGroup(String clusterId, String groupId, InstanceGroupRole groupRole) throws libthrift091.TException
    {
      listInstancesInGroup_args args = new listInstancesInGroup_args();
      args.setClusterId(clusterId);
      args.setGroupId(groupId);
      args.setGroupRole(groupRole);
      sendBase("listInstancesInGroup", args);
    }

    public List recv_listInstancesInGroup() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      listInstancesInGroup_result result = new listInstancesInGroup_result();
      receiveBase(result, "listInstancesInGroup");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "listInstancesInGroup failed: unknown result");
    }

    public List listJobs(String clusterId) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_listJobs(clusterId);
      return recv_listJobs();
    }

    public void send_listJobs(String clusterId) throws libthrift091.TException
    {
      listJobs_args args = new listJobs_args();
      args.setClusterId(clusterId);
      sendBase("listJobs", args);
    }

    public List recv_listJobs() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      listJobs_result result = new listJobs_result();
      receiveBase(result, "listJobs");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "listJobs failed: unknown result");
    }

    public void setPermission(SetPermissionRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_setPermission(request);
      recv_setPermission();
    }

    public void send_setPermission(SetPermissionRequest request) throws libthrift091.TException
    {
      setPermission_args args = new setPermission_args();
      args.setRequest(request);
      sendBase("setPermission", args);
    }

    public void recv_setPermission() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      setPermission_result result = new setPermission_result();
      receiveBase(result, "setPermission");
      if (result.se != null) {
        throw result.se;
      }
      return;
    }

    public void revokePermission(RevokePermissionRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_revokePermission(request);
      recv_revokePermission();
    }

    public void send_revokePermission(RevokePermissionRequest request) throws libthrift091.TException
    {
      revokePermission_args args = new revokePermission_args();
      args.setRequest(request);
      sendBase("revokePermission", args);
    }

    public void recv_revokePermission() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      revokePermission_result result = new revokePermission_result();
      receiveBase(result, "revokePermission");
      if (result.se != null) {
        throw result.se;
      }
      return;
    }

    public QueryPermissionResponse queryPermission(QueryPermissionRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_queryPermission(request);
      return recv_queryPermission();
    }

    public void send_queryPermission(QueryPermissionRequest request) throws libthrift091.TException
    {
      queryPermission_args args = new queryPermission_args();
      args.setRequest(request);
      sendBase("queryPermission", args);
    }

    public QueryPermissionResponse recv_queryPermission() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      queryPermission_result result = new queryPermission_result();
      receiveBase(result, "queryPermission");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "queryPermission failed: unknown result");
    }

    public ListPermissionResponse listPermissions(ListPermissionRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_listPermissions(request);
      return recv_listPermissions();
    }

    public void send_listPermissions(ListPermissionRequest request) throws libthrift091.TException
    {
      listPermissions_args args = new listPermissions_args();
      args.setRequest(request);
      sendBase("listPermissions", args);
    }

    public ListPermissionResponse recv_listPermissions() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      listPermissions_result result = new listPermissions_result();
      receiveBase(result, "listPermissions");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "listPermissions failed: unknown result");
    }

    public GetSSHPublicKeysResponse getSSHPublicKeys(GetSSHPublicKeysRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_getSSHPublicKeys(request);
      return recv_getSSHPublicKeys();
    }

    public void send_getSSHPublicKeys(GetSSHPublicKeysRequest request) throws libthrift091.TException
    {
      getSSHPublicKeys_args args = new getSSHPublicKeys_args();
      args.setRequest(request);
      sendBase("getSSHPublicKeys", args);
    }

    public GetSSHPublicKeysResponse recv_getSSHPublicKeys() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      getSSHPublicKeys_result result = new getSSHPublicKeys_result();
      receiveBase(result, "getSSHPublicKeys");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "getSSHPublicKeys failed: unknown result");
    }

    public void addSSHPublicKeys(AddSSHPublicKeysRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_addSSHPublicKeys(request);
      recv_addSSHPublicKeys();
    }

    public void send_addSSHPublicKeys(AddSSHPublicKeysRequest request) throws libthrift091.TException
    {
      addSSHPublicKeys_args args = new addSSHPublicKeys_args();
      args.setRequest(request);
      sendBase("addSSHPublicKeys", args);
    }

    public void recv_addSSHPublicKeys() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      addSSHPublicKeys_result result = new addSSHPublicKeys_result();
      receiveBase(result, "addSSHPublicKeys");
      if (result.se != null) {
        throw result.se;
      }
      return;
    }

    public void deleteSSHPublicKeys(DeleteSSHPublicKeysRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_deleteSSHPublicKeys(request);
      recv_deleteSSHPublicKeys();
    }

    public void send_deleteSSHPublicKeys(DeleteSSHPublicKeysRequest request) throws libthrift091.TException
    {
      deleteSSHPublicKeys_args args = new deleteSSHPublicKeys_args();
      args.setRequest(request);
      sendBase("deleteSSHPublicKeys", args);
    }

    public void recv_deleteSSHPublicKeys() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      deleteSSHPublicKeys_result result = new deleteSSHPublicKeys_result();
      receiveBase(result, "deleteSSHPublicKeys");
      if (result.se != null) {
        throw result.se;
      }
      return;
    }

    public GetQuotaResponse getQuota(GetQuotaRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_getQuota(request);
      return recv_getQuota();
    }

    public void send_getQuota(GetQuotaRequest request) throws libthrift091.TException
    {
      getQuota_args args = new getQuota_args();
      args.setRequest(request);
      sendBase("getQuota", args);
    }

    public GetQuotaResponse recv_getQuota() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      getQuota_result result = new getQuota_result();
      receiveBase(result, "getQuota");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "getQuota failed: unknown result");
    }

    public DeleteClusterResponse deleteCluster(DeleteClusterRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_deleteCluster(request);
      return recv_deleteCluster();
    }

    public void send_deleteCluster(DeleteClusterRequest request) throws libthrift091.TException
    {
      deleteCluster_args args = new deleteCluster_args();
      args.setRequest(request);
      sendBase("deleteCluster", args);
    }

    public DeleteClusterResponse recv_deleteCluster() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      deleteCluster_result result = new deleteCluster_result();
      receiveBase(result, "deleteCluster");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "deleteCluster failed: unknown result");
    }

    public GetEMRBasicConfigResponse getEMRBasicConfig() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_getEMRBasicConfig();
      return recv_getEMRBasicConfig();
    }

    public void send_getEMRBasicConfig() throws libthrift091.TException
    {
      getEMRBasicConfig_args args = new getEMRBasicConfig_args();
      sendBase("getEMRBasicConfig", args);
    }

    public GetEMRBasicConfigResponse recv_getEMRBasicConfig() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      getEMRBasicConfig_result result = new getEMRBasicConfig_result();
      receiveBase(result, "getEMRBasicConfig");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "getEMRBasicConfig failed: unknown result");
    }

    public GetSoftwareConfigResponse getSoftwareConfig() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_getSoftwareConfig();
      return recv_getSoftwareConfig();
    }

    public void send_getSoftwareConfig() throws libthrift091.TException
    {
      getSoftwareConfig_args args = new getSoftwareConfig_args();
      sendBase("getSoftwareConfig", args);
    }

    public GetSoftwareConfigResponse recv_getSoftwareConfig() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      getSoftwareConfig_result result = new getSoftwareConfig_result();
      receiveBase(result, "getSoftwareConfig");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "getSoftwareConfig failed: unknown result");
    }

    public GetHardwareConfigResponse getHardwareConfig() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_getHardwareConfig();
      return recv_getHardwareConfig();
    }

    public void send_getHardwareConfig() throws libthrift091.TException
    {
      getHardwareConfig_args args = new getHardwareConfig_args();
      sendBase("getHardwareConfig", args);
    }

    public GetHardwareConfigResponse recv_getHardwareConfig() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      getHardwareConfig_result result = new getHardwareConfig_result();
      receiveBase(result, "getHardwareConfig");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "getHardwareConfig failed: unknown result");
    }

    public void addTags(AddTagsRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_addTags(request);
      recv_addTags();
    }

    public void send_addTags(AddTagsRequest request) throws libthrift091.TException
    {
      addTags_args args = new addTags_args();
      args.setRequest(request);
      sendBase("addTags", args);
    }

    public void recv_addTags() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      addTags_result result = new addTags_result();
      receiveBase(result, "addTags");
      if (result.se != null) {
        throw result.se;
      }
      return;
    }

    public GetTagsResponse getTags(GetTagsRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_getTags(request);
      return recv_getTags();
    }

    public void send_getTags(GetTagsRequest request) throws libthrift091.TException
    {
      getTags_args args = new getTags_args();
      args.setRequest(request);
      sendBase("getTags", args);
    }

    public GetTagsResponse recv_getTags() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      getTags_result result = new getTags_result();
      receiveBase(result, "getTags");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "getTags failed: unknown result");
    }

    public void deleteTag(DeleteTagRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_deleteTag(request);
      recv_deleteTag();
    }

    public void send_deleteTag(DeleteTagRequest request) throws libthrift091.TException
    {
      deleteTag_args args = new deleteTag_args();
      args.setRequest(request);
      sendBase("deleteTag", args);
    }

    public void recv_deleteTag() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      deleteTag_result result = new deleteTag_result();
      receiveBase(result, "deleteTag");
      if (result.se != null) {
        throw result.se;
      }
      return;
    }

    public ResizeInstanceGroupResponse resizeInstanceGroup(ResizeInstanceGroupRequest request) throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      send_resizeInstanceGroup(request);
      return recv_resizeInstanceGroup();
    }

    public void send_resizeInstanceGroup(ResizeInstanceGroupRequest request) throws libthrift091.TException
    {
      resizeInstanceGroup_args args = new resizeInstanceGroup_args();
      args.setRequest(request);
      sendBase("resizeInstanceGroup", args);
    }

    public ResizeInstanceGroupResponse recv_resizeInstanceGroup() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException
    {
      resizeInstanceGroup_result result = new resizeInstanceGroup_result();
      receiveBase(result, "resizeInstanceGroup");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "resizeInstanceGroup failed: unknown result");
    }

  }
  public static class AsyncClient extends com.xiaomi.infra.galaxy.rpc.thrift.BaseService.AsyncClient implements AsyncIface {
    public static class Factory implements libthrift091.async.TAsyncClientFactory {
      private libthrift091.async.TAsyncClientManager clientManager;
      private libthrift091.protocol.TProtocolFactory protocolFactory;
      public Factory(libthrift091.async.TAsyncClientManager clientManager, libthrift091.protocol.TProtocolFactory protocolFactory) {
        this.clientManager = clientManager;
        this.protocolFactory = protocolFactory;
      }
      public AsyncClient getAsyncClient(libthrift091.transport.TNonblockingTransport transport) {
        return new AsyncClient(protocolFactory, clientManager, transport);
      }
    }

    public AsyncClient(libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.async.TAsyncClientManager clientManager, libthrift091.transport.TNonblockingTransport transport) {
      super(protocolFactory, clientManager, transport);
    }

    public void createCluster(CreateClusterRequest cluster, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      createCluster_call method_call = new createCluster_call(cluster, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class createCluster_call extends libthrift091.async.TAsyncMethodCall {
      private CreateClusterRequest cluster;
      public createCluster_call(CreateClusterRequest cluster, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.cluster = cluster;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("createCluster", libthrift091.protocol.TMessageType.CALL, 0));
        createCluster_args args = new createCluster_args();
        args.setCluster(cluster);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public CreateClusterResponse getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_createCluster();
      }
    }

    public void addInstanceGroup(AddInstanceGroupRequest instanceGroup, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      addInstanceGroup_call method_call = new addInstanceGroup_call(instanceGroup, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addInstanceGroup_call extends libthrift091.async.TAsyncMethodCall {
      private AddInstanceGroupRequest instanceGroup;
      public addInstanceGroup_call(AddInstanceGroupRequest instanceGroup, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.instanceGroup = instanceGroup;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("addInstanceGroup", libthrift091.protocol.TMessageType.CALL, 0));
        addInstanceGroup_args args = new addInstanceGroup_args();
        args.setInstanceGroup(instanceGroup);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public AddInstanceGroupResponse getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_addInstanceGroup();
      }
    }

    public void addInstanceGroups(List instanceGroups, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      addInstanceGroups_call method_call = new addInstanceGroups_call(instanceGroups, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addInstanceGroups_call extends libthrift091.async.TAsyncMethodCall {
      private List instanceGroups;
      public addInstanceGroups_call(List instanceGroups, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.instanceGroups = instanceGroups;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("addInstanceGroups", libthrift091.protocol.TMessageType.CALL, 0));
        addInstanceGroups_args args = new addInstanceGroups_args();
        args.setInstanceGroups(instanceGroups);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_addInstanceGroups();
      }
    }

    public void submitJob(SubmitJobRequest job, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      submitJob_call method_call = new submitJob_call(job, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class submitJob_call extends libthrift091.async.TAsyncMethodCall {
      private SubmitJobRequest job;
      public submitJob_call(SubmitJobRequest job, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.job = job;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("submitJob", libthrift091.protocol.TMessageType.CALL, 0));
        submitJob_args args = new submitJob_args();
        args.setJob(job);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public SubmitJobResponse getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_submitJob();
      }
    }

    public void submitJobs(List jobs, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      submitJobs_call method_call = new submitJobs_call(jobs, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class submitJobs_call extends libthrift091.async.TAsyncMethodCall {
      private List jobs;
      public submitJobs_call(List jobs, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.jobs = jobs;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("submitJobs", libthrift091.protocol.TMessageType.CALL, 0));
        submitJobs_args args = new submitJobs_args();
        args.setJobs(jobs);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_submitJobs();
      }
    }

    public void terminateCluster(TerminateClusterRequest terminateCluster, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      terminateCluster_call method_call = new terminateCluster_call(terminateCluster, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class terminateCluster_call extends libthrift091.async.TAsyncMethodCall {
      private TerminateClusterRequest terminateCluster;
      public terminateCluster_call(TerminateClusterRequest terminateCluster, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.terminateCluster = terminateCluster;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("terminateCluster", libthrift091.protocol.TMessageType.CALL, 0));
        terminateCluster_args args = new terminateCluster_args();
        args.setTerminateCluster(terminateCluster);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public String getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_terminateCluster();
      }
    }

    public void modifyInstanceGroup(ModifyInstanceGroupRequest instanceGroup, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      modifyInstanceGroup_call method_call = new modifyInstanceGroup_call(instanceGroup, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class modifyInstanceGroup_call extends libthrift091.async.TAsyncMethodCall {
      private ModifyInstanceGroupRequest instanceGroup;
      public modifyInstanceGroup_call(ModifyInstanceGroupRequest instanceGroup, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.instanceGroup = instanceGroup;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("modifyInstanceGroup", libthrift091.protocol.TMessageType.CALL, 0));
        modifyInstanceGroup_args args = new modifyInstanceGroup_args();
        args.setInstanceGroup(instanceGroup);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public ModifyInstanceGroupResponse getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_modifyInstanceGroup();
      }
    }

    public void describeCluster(String clusterId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      describeCluster_call method_call = new describeCluster_call(clusterId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class describeCluster_call extends libthrift091.async.TAsyncMethodCall {
      private String clusterId;
      public describeCluster_call(String clusterId, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.clusterId = clusterId;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("describeCluster", libthrift091.protocol.TMessageType.CALL, 0));
        describeCluster_args args = new describeCluster_args();
        args.setClusterId(clusterId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public ClusterDetail getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_describeCluster();
      }
    }

    public void describeInstanceGroup(String instanceGroupId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      describeInstanceGroup_call method_call = new describeInstanceGroup_call(instanceGroupId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class describeInstanceGroup_call extends libthrift091.async.TAsyncMethodCall {
      private String instanceGroupId;
      public describeInstanceGroup_call(String instanceGroupId, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.instanceGroupId = instanceGroupId;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("describeInstanceGroup", libthrift091.protocol.TMessageType.CALL, 0));
        describeInstanceGroup_args args = new describeInstanceGroup_args();
        args.setInstanceGroupId(instanceGroupId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public InstanceGroupDetail getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_describeInstanceGroup();
      }
    }

    public void describeInstance(String clusterId, String instanceId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      describeInstance_call method_call = new describeInstance_call(clusterId, instanceId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class describeInstance_call extends libthrift091.async.TAsyncMethodCall {
      private String clusterId;
      private String instanceId;
      public describeInstance_call(String clusterId, String instanceId, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.clusterId = clusterId;
        this.instanceId = instanceId;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("describeInstance", libthrift091.protocol.TMessageType.CALL, 0));
        describeInstance_args args = new describeInstance_args();
        args.setClusterId(clusterId);
        args.setInstanceId(instanceId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public InstanceDetail getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_describeInstance();
      }
    }

    public void describeJob(String clusterId, String jobId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      describeJob_call method_call = new describeJob_call(clusterId, jobId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class describeJob_call extends libthrift091.async.TAsyncMethodCall {
      private String clusterId;
      private String jobId;
      public describeJob_call(String clusterId, String jobId, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.clusterId = clusterId;
        this.jobId = jobId;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("describeJob", libthrift091.protocol.TMessageType.CALL, 0));
        describeJob_args args = new describeJob_args();
        args.setClusterId(clusterId);
        args.setJobId(jobId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public JobDetail getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_describeJob();
      }
    }

    public void listClusters(int createdAfter, int createdBefore, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      listClusters_call method_call = new listClusters_call(createdAfter, createdBefore, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class listClusters_call extends libthrift091.async.TAsyncMethodCall {
      private int createdAfter;
      private int createdBefore;
      public listClusters_call(int createdAfter, int createdBefore, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.createdAfter = createdAfter;
        this.createdBefore = createdBefore;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("listClusters", libthrift091.protocol.TMessageType.CALL, 0));
        listClusters_args args = new listClusters_args();
        args.setCreatedAfter(createdAfter);
        args.setCreatedBefore(createdBefore);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_listClusters();
      }
    }

    public void listClustersWithPrefix(String prefix, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      listClustersWithPrefix_call method_call = new listClustersWithPrefix_call(prefix, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class listClustersWithPrefix_call extends libthrift091.async.TAsyncMethodCall {
      private String prefix;
      public listClustersWithPrefix_call(String prefix, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.prefix = prefix;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("listClustersWithPrefix", libthrift091.protocol.TMessageType.CALL, 0));
        listClustersWithPrefix_args args = new listClustersWithPrefix_args();
        args.setPrefix(prefix);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_listClustersWithPrefix();
      }
    }

    public void listInstanceGroups(String clusterId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      listInstanceGroups_call method_call = new listInstanceGroups_call(clusterId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class listInstanceGroups_call extends libthrift091.async.TAsyncMethodCall {
      private String clusterId;
      public listInstanceGroups_call(String clusterId, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.clusterId = clusterId;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("listInstanceGroups", libthrift091.protocol.TMessageType.CALL, 0));
        listInstanceGroups_args args = new listInstanceGroups_args();
        args.setClusterId(clusterId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_listInstanceGroups();
      }
    }

    public void listInstancesInCluster(String clusterId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      listInstancesInCluster_call method_call = new listInstancesInCluster_call(clusterId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class listInstancesInCluster_call extends libthrift091.async.TAsyncMethodCall {
      private String clusterId;
      public listInstancesInCluster_call(String clusterId, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.clusterId = clusterId;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("listInstancesInCluster", libthrift091.protocol.TMessageType.CALL, 0));
        listInstancesInCluster_args args = new listInstancesInCluster_args();
        args.setClusterId(clusterId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_listInstancesInCluster();
      }
    }

    public void listInstancesInGroup(String clusterId, String groupId, InstanceGroupRole groupRole, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      listInstancesInGroup_call method_call = new listInstancesInGroup_call(clusterId, groupId, groupRole, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class listInstancesInGroup_call extends libthrift091.async.TAsyncMethodCall {
      private String clusterId;
      private String groupId;
      private InstanceGroupRole groupRole;
      public listInstancesInGroup_call(String clusterId, String groupId, InstanceGroupRole groupRole, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.clusterId = clusterId;
        this.groupId = groupId;
        this.groupRole = groupRole;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("listInstancesInGroup", libthrift091.protocol.TMessageType.CALL, 0));
        listInstancesInGroup_args args = new listInstancesInGroup_args();
        args.setClusterId(clusterId);
        args.setGroupId(groupId);
        args.setGroupRole(groupRole);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_listInstancesInGroup();
      }
    }

    public void listJobs(String clusterId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      listJobs_call method_call = new listJobs_call(clusterId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class listJobs_call extends libthrift091.async.TAsyncMethodCall {
      private String clusterId;
      public listJobs_call(String clusterId, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.clusterId = clusterId;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("listJobs", libthrift091.protocol.TMessageType.CALL, 0));
        listJobs_args args = new listJobs_args();
        args.setClusterId(clusterId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_listJobs();
      }
    }

    public void setPermission(SetPermissionRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      setPermission_call method_call = new setPermission_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class setPermission_call extends libthrift091.async.TAsyncMethodCall {
      private SetPermissionRequest request;
      public setPermission_call(SetPermissionRequest request, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("setPermission", libthrift091.protocol.TMessageType.CALL, 0));
        setPermission_args args = new setPermission_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_setPermission();
      }
    }

    public void revokePermission(RevokePermissionRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      revokePermission_call method_call = new revokePermission_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class revokePermission_call extends libthrift091.async.TAsyncMethodCall {
      private RevokePermissionRequest request;
      public revokePermission_call(RevokePermissionRequest request, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("revokePermission", libthrift091.protocol.TMessageType.CALL, 0));
        revokePermission_args args = new revokePermission_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_revokePermission();
      }
    }

    public void queryPermission(QueryPermissionRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      queryPermission_call method_call = new queryPermission_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class queryPermission_call extends libthrift091.async.TAsyncMethodCall {
      private QueryPermissionRequest request;
      public queryPermission_call(QueryPermissionRequest request, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("queryPermission", libthrift091.protocol.TMessageType.CALL, 0));
        queryPermission_args args = new queryPermission_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public QueryPermissionResponse getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_queryPermission();
      }
    }

    public void listPermissions(ListPermissionRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      listPermissions_call method_call = new listPermissions_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class listPermissions_call extends libthrift091.async.TAsyncMethodCall {
      private ListPermissionRequest request;
      public listPermissions_call(ListPermissionRequest request, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("listPermissions", libthrift091.protocol.TMessageType.CALL, 0));
        listPermissions_args args = new listPermissions_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public ListPermissionResponse getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_listPermissions();
      }
    }

    public void getSSHPublicKeys(GetSSHPublicKeysRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      getSSHPublicKeys_call method_call = new getSSHPublicKeys_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getSSHPublicKeys_call extends libthrift091.async.TAsyncMethodCall {
      private GetSSHPublicKeysRequest request;
      public getSSHPublicKeys_call(GetSSHPublicKeysRequest request, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("getSSHPublicKeys", libthrift091.protocol.TMessageType.CALL, 0));
        getSSHPublicKeys_args args = new getSSHPublicKeys_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public GetSSHPublicKeysResponse getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getSSHPublicKeys();
      }
    }

    public void addSSHPublicKeys(AddSSHPublicKeysRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      addSSHPublicKeys_call method_call = new addSSHPublicKeys_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addSSHPublicKeys_call extends libthrift091.async.TAsyncMethodCall {
      private AddSSHPublicKeysRequest request;
      public addSSHPublicKeys_call(AddSSHPublicKeysRequest request, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("addSSHPublicKeys", libthrift091.protocol.TMessageType.CALL, 0));
        addSSHPublicKeys_args args = new addSSHPublicKeys_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_addSSHPublicKeys();
      }
    }

    public void deleteSSHPublicKeys(DeleteSSHPublicKeysRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      deleteSSHPublicKeys_call method_call = new deleteSSHPublicKeys_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class deleteSSHPublicKeys_call extends libthrift091.async.TAsyncMethodCall {
      private DeleteSSHPublicKeysRequest request;
      public deleteSSHPublicKeys_call(DeleteSSHPublicKeysRequest request, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("deleteSSHPublicKeys", libthrift091.protocol.TMessageType.CALL, 0));
        deleteSSHPublicKeys_args args = new deleteSSHPublicKeys_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_deleteSSHPublicKeys();
      }
    }

    public void getQuota(GetQuotaRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      getQuota_call method_call = new getQuota_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getQuota_call extends libthrift091.async.TAsyncMethodCall {
      private GetQuotaRequest request;
      public getQuota_call(GetQuotaRequest request, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("getQuota", libthrift091.protocol.TMessageType.CALL, 0));
        getQuota_args args = new getQuota_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public GetQuotaResponse getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getQuota();
      }
    }

    public void deleteCluster(DeleteClusterRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      deleteCluster_call method_call = new deleteCluster_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class deleteCluster_call extends libthrift091.async.TAsyncMethodCall {
      private DeleteClusterRequest request;
      public deleteCluster_call(DeleteClusterRequest request, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("deleteCluster", libthrift091.protocol.TMessageType.CALL, 0));
        deleteCluster_args args = new deleteCluster_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public DeleteClusterResponse getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_deleteCluster();
      }
    }

    public void getEMRBasicConfig(libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      getEMRBasicConfig_call method_call = new getEMRBasicConfig_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getEMRBasicConfig_call extends libthrift091.async.TAsyncMethodCall {
      public getEMRBasicConfig_call(libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("getEMRBasicConfig", libthrift091.protocol.TMessageType.CALL, 0));
        getEMRBasicConfig_args args = new getEMRBasicConfig_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public GetEMRBasicConfigResponse getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getEMRBasicConfig();
      }
    }

    public void getSoftwareConfig(libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      getSoftwareConfig_call method_call = new getSoftwareConfig_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getSoftwareConfig_call extends libthrift091.async.TAsyncMethodCall {
      public getSoftwareConfig_call(libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("getSoftwareConfig", libthrift091.protocol.TMessageType.CALL, 0));
        getSoftwareConfig_args args = new getSoftwareConfig_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public GetSoftwareConfigResponse getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getSoftwareConfig();
      }
    }

    public void getHardwareConfig(libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      getHardwareConfig_call method_call = new getHardwareConfig_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getHardwareConfig_call extends libthrift091.async.TAsyncMethodCall {
      public getHardwareConfig_call(libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("getHardwareConfig", libthrift091.protocol.TMessageType.CALL, 0));
        getHardwareConfig_args args = new getHardwareConfig_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public GetHardwareConfigResponse getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getHardwareConfig();
      }
    }

    public void addTags(AddTagsRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      addTags_call method_call = new addTags_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addTags_call extends libthrift091.async.TAsyncMethodCall {
      private AddTagsRequest request;
      public addTags_call(AddTagsRequest request, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("addTags", libthrift091.protocol.TMessageType.CALL, 0));
        addTags_args args = new addTags_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_addTags();
      }
    }

    public void getTags(GetTagsRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      getTags_call method_call = new getTags_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getTags_call extends libthrift091.async.TAsyncMethodCall {
      private GetTagsRequest request;
      public getTags_call(GetTagsRequest request, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("getTags", libthrift091.protocol.TMessageType.CALL, 0));
        getTags_args args = new getTags_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public GetTagsResponse getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getTags();
      }
    }

    public void deleteTag(DeleteTagRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      deleteTag_call method_call = new deleteTag_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class deleteTag_call extends libthrift091.async.TAsyncMethodCall {
      private DeleteTagRequest request;
      public deleteTag_call(DeleteTagRequest request, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("deleteTag", libthrift091.protocol.TMessageType.CALL, 0));
        deleteTag_args args = new deleteTag_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_deleteTag();
      }
    }

    public void resizeInstanceGroup(ResizeInstanceGroupRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      resizeInstanceGroup_call method_call = new resizeInstanceGroup_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class resizeInstanceGroup_call extends libthrift091.async.TAsyncMethodCall {
      private ResizeInstanceGroupRequest request;
      public resizeInstanceGroup_call(ResizeInstanceGroupRequest request, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("resizeInstanceGroup", libthrift091.protocol.TMessageType.CALL, 0));
        resizeInstanceGroup_args args = new resizeInstanceGroup_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public ResizeInstanceGroupResponse getResult() throws com.xiaomi.infra.galaxy.rpc.thrift.ServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_resizeInstanceGroup();
      }
    }

  }

  public static class Processor extends com.xiaomi.infra.galaxy.rpc.thrift.BaseService.Processor implements libthrift091.TProcessor {
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
    public Processor(I iface) {
      super(iface, getProcessMap(new HashMap>()));
    }

    protected Processor(I iface, Map> processMap) {
      super(iface, getProcessMap(processMap));
    }

    private static  Map> getProcessMap(Map> processMap) {
      processMap.put("createCluster", new createCluster());
      processMap.put("addInstanceGroup", new addInstanceGroup());
      processMap.put("addInstanceGroups", new addInstanceGroups());
      processMap.put("submitJob", new submitJob());
      processMap.put("submitJobs", new submitJobs());
      processMap.put("terminateCluster", new terminateCluster());
      processMap.put("modifyInstanceGroup", new modifyInstanceGroup());
      processMap.put("describeCluster", new describeCluster());
      processMap.put("describeInstanceGroup", new describeInstanceGroup());
      processMap.put("describeInstance", new describeInstance());
      processMap.put("describeJob", new describeJob());
      processMap.put("listClusters", new listClusters());
      processMap.put("listClustersWithPrefix", new listClustersWithPrefix());
      processMap.put("listInstanceGroups", new listInstanceGroups());
      processMap.put("listInstancesInCluster", new listInstancesInCluster());
      processMap.put("listInstancesInGroup", new listInstancesInGroup());
      processMap.put("listJobs", new listJobs());
      processMap.put("setPermission", new setPermission());
      processMap.put("revokePermission", new revokePermission());
      processMap.put("queryPermission", new queryPermission());
      processMap.put("listPermissions", new listPermissions());
      processMap.put("getSSHPublicKeys", new getSSHPublicKeys());
      processMap.put("addSSHPublicKeys", new addSSHPublicKeys());
      processMap.put("deleteSSHPublicKeys", new deleteSSHPublicKeys());
      processMap.put("getQuota", new getQuota());
      processMap.put("deleteCluster", new deleteCluster());
      processMap.put("getEMRBasicConfig", new getEMRBasicConfig());
      processMap.put("getSoftwareConfig", new getSoftwareConfig());
      processMap.put("getHardwareConfig", new getHardwareConfig());
      processMap.put("addTags", new addTags());
      processMap.put("getTags", new getTags());
      processMap.put("deleteTag", new deleteTag());
      processMap.put("resizeInstanceGroup", new resizeInstanceGroup());
      return processMap;
    }

    public static class createCluster extends libthrift091.ProcessFunction {
      public createCluster() {
        super("createCluster");
      }

      public createCluster_args getEmptyArgsInstance() {
        return new createCluster_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public createCluster_result getResult(I iface, createCluster_args args) throws libthrift091.TException {
        createCluster_result result = new createCluster_result();
        try {
          result.success = iface.createCluster(args.cluster);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class addInstanceGroup extends libthrift091.ProcessFunction {
      public addInstanceGroup() {
        super("addInstanceGroup");
      }

      public addInstanceGroup_args getEmptyArgsInstance() {
        return new addInstanceGroup_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public addInstanceGroup_result getResult(I iface, addInstanceGroup_args args) throws libthrift091.TException {
        addInstanceGroup_result result = new addInstanceGroup_result();
        try {
          result.success = iface.addInstanceGroup(args.instanceGroup);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class addInstanceGroups extends libthrift091.ProcessFunction {
      public addInstanceGroups() {
        super("addInstanceGroups");
      }

      public addInstanceGroups_args getEmptyArgsInstance() {
        return new addInstanceGroups_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public addInstanceGroups_result getResult(I iface, addInstanceGroups_args args) throws libthrift091.TException {
        addInstanceGroups_result result = new addInstanceGroups_result();
        try {
          result.success = iface.addInstanceGroups(args.instanceGroups);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class submitJob extends libthrift091.ProcessFunction {
      public submitJob() {
        super("submitJob");
      }

      public submitJob_args getEmptyArgsInstance() {
        return new submitJob_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public submitJob_result getResult(I iface, submitJob_args args) throws libthrift091.TException {
        submitJob_result result = new submitJob_result();
        try {
          result.success = iface.submitJob(args.job);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class submitJobs extends libthrift091.ProcessFunction {
      public submitJobs() {
        super("submitJobs");
      }

      public submitJobs_args getEmptyArgsInstance() {
        return new submitJobs_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public submitJobs_result getResult(I iface, submitJobs_args args) throws libthrift091.TException {
        submitJobs_result result = new submitJobs_result();
        try {
          result.success = iface.submitJobs(args.jobs);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class terminateCluster extends libthrift091.ProcessFunction {
      public terminateCluster() {
        super("terminateCluster");
      }

      public terminateCluster_args getEmptyArgsInstance() {
        return new terminateCluster_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public terminateCluster_result getResult(I iface, terminateCluster_args args) throws libthrift091.TException {
        terminateCluster_result result = new terminateCluster_result();
        try {
          result.success = iface.terminateCluster(args.terminateCluster);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class modifyInstanceGroup extends libthrift091.ProcessFunction {
      public modifyInstanceGroup() {
        super("modifyInstanceGroup");
      }

      public modifyInstanceGroup_args getEmptyArgsInstance() {
        return new modifyInstanceGroup_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public modifyInstanceGroup_result getResult(I iface, modifyInstanceGroup_args args) throws libthrift091.TException {
        modifyInstanceGroup_result result = new modifyInstanceGroup_result();
        try {
          result.success = iface.modifyInstanceGroup(args.instanceGroup);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class describeCluster extends libthrift091.ProcessFunction {
      public describeCluster() {
        super("describeCluster");
      }

      public describeCluster_args getEmptyArgsInstance() {
        return new describeCluster_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public describeCluster_result getResult(I iface, describeCluster_args args) throws libthrift091.TException {
        describeCluster_result result = new describeCluster_result();
        try {
          result.success = iface.describeCluster(args.clusterId);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class describeInstanceGroup extends libthrift091.ProcessFunction {
      public describeInstanceGroup() {
        super("describeInstanceGroup");
      }

      public describeInstanceGroup_args getEmptyArgsInstance() {
        return new describeInstanceGroup_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public describeInstanceGroup_result getResult(I iface, describeInstanceGroup_args args) throws libthrift091.TException {
        describeInstanceGroup_result result = new describeInstanceGroup_result();
        try {
          result.success = iface.describeInstanceGroup(args.instanceGroupId);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class describeInstance extends libthrift091.ProcessFunction {
      public describeInstance() {
        super("describeInstance");
      }

      public describeInstance_args getEmptyArgsInstance() {
        return new describeInstance_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public describeInstance_result getResult(I iface, describeInstance_args args) throws libthrift091.TException {
        describeInstance_result result = new describeInstance_result();
        try {
          result.success = iface.describeInstance(args.clusterId, args.instanceId);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class describeJob extends libthrift091.ProcessFunction {
      public describeJob() {
        super("describeJob");
      }

      public describeJob_args getEmptyArgsInstance() {
        return new describeJob_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public describeJob_result getResult(I iface, describeJob_args args) throws libthrift091.TException {
        describeJob_result result = new describeJob_result();
        try {
          result.success = iface.describeJob(args.clusterId, args.jobId);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class listClusters extends libthrift091.ProcessFunction {
      public listClusters() {
        super("listClusters");
      }

      public listClusters_args getEmptyArgsInstance() {
        return new listClusters_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public listClusters_result getResult(I iface, listClusters_args args) throws libthrift091.TException {
        listClusters_result result = new listClusters_result();
        try {
          result.success = iface.listClusters(args.createdAfter, args.createdBefore);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class listClustersWithPrefix extends libthrift091.ProcessFunction {
      public listClustersWithPrefix() {
        super("listClustersWithPrefix");
      }

      public listClustersWithPrefix_args getEmptyArgsInstance() {
        return new listClustersWithPrefix_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public listClustersWithPrefix_result getResult(I iface, listClustersWithPrefix_args args) throws libthrift091.TException {
        listClustersWithPrefix_result result = new listClustersWithPrefix_result();
        try {
          result.success = iface.listClustersWithPrefix(args.prefix);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class listInstanceGroups extends libthrift091.ProcessFunction {
      public listInstanceGroups() {
        super("listInstanceGroups");
      }

      public listInstanceGroups_args getEmptyArgsInstance() {
        return new listInstanceGroups_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public listInstanceGroups_result getResult(I iface, listInstanceGroups_args args) throws libthrift091.TException {
        listInstanceGroups_result result = new listInstanceGroups_result();
        try {
          result.success = iface.listInstanceGroups(args.clusterId);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class listInstancesInCluster extends libthrift091.ProcessFunction {
      public listInstancesInCluster() {
        super("listInstancesInCluster");
      }

      public listInstancesInCluster_args getEmptyArgsInstance() {
        return new listInstancesInCluster_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public listInstancesInCluster_result getResult(I iface, listInstancesInCluster_args args) throws libthrift091.TException {
        listInstancesInCluster_result result = new listInstancesInCluster_result();
        try {
          result.success = iface.listInstancesInCluster(args.clusterId);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class listInstancesInGroup extends libthrift091.ProcessFunction {
      public listInstancesInGroup() {
        super("listInstancesInGroup");
      }

      public listInstancesInGroup_args getEmptyArgsInstance() {
        return new listInstancesInGroup_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public listInstancesInGroup_result getResult(I iface, listInstancesInGroup_args args) throws libthrift091.TException {
        listInstancesInGroup_result result = new listInstancesInGroup_result();
        try {
          result.success = iface.listInstancesInGroup(args.clusterId, args.groupId, args.groupRole);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class listJobs extends libthrift091.ProcessFunction {
      public listJobs() {
        super("listJobs");
      }

      public listJobs_args getEmptyArgsInstance() {
        return new listJobs_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public listJobs_result getResult(I iface, listJobs_args args) throws libthrift091.TException {
        listJobs_result result = new listJobs_result();
        try {
          result.success = iface.listJobs(args.clusterId);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class setPermission extends libthrift091.ProcessFunction {
      public setPermission() {
        super("setPermission");
      }

      public setPermission_args getEmptyArgsInstance() {
        return new setPermission_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public setPermission_result getResult(I iface, setPermission_args args) throws libthrift091.TException {
        setPermission_result result = new setPermission_result();
        try {
          iface.setPermission(args.request);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class revokePermission extends libthrift091.ProcessFunction {
      public revokePermission() {
        super("revokePermission");
      }

      public revokePermission_args getEmptyArgsInstance() {
        return new revokePermission_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public revokePermission_result getResult(I iface, revokePermission_args args) throws libthrift091.TException {
        revokePermission_result result = new revokePermission_result();
        try {
          iface.revokePermission(args.request);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class queryPermission extends libthrift091.ProcessFunction {
      public queryPermission() {
        super("queryPermission");
      }

      public queryPermission_args getEmptyArgsInstance() {
        return new queryPermission_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public queryPermission_result getResult(I iface, queryPermission_args args) throws libthrift091.TException {
        queryPermission_result result = new queryPermission_result();
        try {
          result.success = iface.queryPermission(args.request);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class listPermissions extends libthrift091.ProcessFunction {
      public listPermissions() {
        super("listPermissions");
      }

      public listPermissions_args getEmptyArgsInstance() {
        return new listPermissions_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public listPermissions_result getResult(I iface, listPermissions_args args) throws libthrift091.TException {
        listPermissions_result result = new listPermissions_result();
        try {
          result.success = iface.listPermissions(args.request);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class getSSHPublicKeys extends libthrift091.ProcessFunction {
      public getSSHPublicKeys() {
        super("getSSHPublicKeys");
      }

      public getSSHPublicKeys_args getEmptyArgsInstance() {
        return new getSSHPublicKeys_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getSSHPublicKeys_result getResult(I iface, getSSHPublicKeys_args args) throws libthrift091.TException {
        getSSHPublicKeys_result result = new getSSHPublicKeys_result();
        try {
          result.success = iface.getSSHPublicKeys(args.request);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class addSSHPublicKeys extends libthrift091.ProcessFunction {
      public addSSHPublicKeys() {
        super("addSSHPublicKeys");
      }

      public addSSHPublicKeys_args getEmptyArgsInstance() {
        return new addSSHPublicKeys_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public addSSHPublicKeys_result getResult(I iface, addSSHPublicKeys_args args) throws libthrift091.TException {
        addSSHPublicKeys_result result = new addSSHPublicKeys_result();
        try {
          iface.addSSHPublicKeys(args.request);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class deleteSSHPublicKeys extends libthrift091.ProcessFunction {
      public deleteSSHPublicKeys() {
        super("deleteSSHPublicKeys");
      }

      public deleteSSHPublicKeys_args getEmptyArgsInstance() {
        return new deleteSSHPublicKeys_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public deleteSSHPublicKeys_result getResult(I iface, deleteSSHPublicKeys_args args) throws libthrift091.TException {
        deleteSSHPublicKeys_result result = new deleteSSHPublicKeys_result();
        try {
          iface.deleteSSHPublicKeys(args.request);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class getQuota extends libthrift091.ProcessFunction {
      public getQuota() {
        super("getQuota");
      }

      public getQuota_args getEmptyArgsInstance() {
        return new getQuota_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getQuota_result getResult(I iface, getQuota_args args) throws libthrift091.TException {
        getQuota_result result = new getQuota_result();
        try {
          result.success = iface.getQuota(args.request);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class deleteCluster extends libthrift091.ProcessFunction {
      public deleteCluster() {
        super("deleteCluster");
      }

      public deleteCluster_args getEmptyArgsInstance() {
        return new deleteCluster_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public deleteCluster_result getResult(I iface, deleteCluster_args args) throws libthrift091.TException {
        deleteCluster_result result = new deleteCluster_result();
        try {
          result.success = iface.deleteCluster(args.request);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class getEMRBasicConfig extends libthrift091.ProcessFunction {
      public getEMRBasicConfig() {
        super("getEMRBasicConfig");
      }

      public getEMRBasicConfig_args getEmptyArgsInstance() {
        return new getEMRBasicConfig_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getEMRBasicConfig_result getResult(I iface, getEMRBasicConfig_args args) throws libthrift091.TException {
        getEMRBasicConfig_result result = new getEMRBasicConfig_result();
        try {
          result.success = iface.getEMRBasicConfig();
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class getSoftwareConfig extends libthrift091.ProcessFunction {
      public getSoftwareConfig() {
        super("getSoftwareConfig");
      }

      public getSoftwareConfig_args getEmptyArgsInstance() {
        return new getSoftwareConfig_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getSoftwareConfig_result getResult(I iface, getSoftwareConfig_args args) throws libthrift091.TException {
        getSoftwareConfig_result result = new getSoftwareConfig_result();
        try {
          result.success = iface.getSoftwareConfig();
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class getHardwareConfig extends libthrift091.ProcessFunction {
      public getHardwareConfig() {
        super("getHardwareConfig");
      }

      public getHardwareConfig_args getEmptyArgsInstance() {
        return new getHardwareConfig_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getHardwareConfig_result getResult(I iface, getHardwareConfig_args args) throws libthrift091.TException {
        getHardwareConfig_result result = new getHardwareConfig_result();
        try {
          result.success = iface.getHardwareConfig();
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class addTags extends libthrift091.ProcessFunction {
      public addTags() {
        super("addTags");
      }

      public addTags_args getEmptyArgsInstance() {
        return new addTags_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public addTags_result getResult(I iface, addTags_args args) throws libthrift091.TException {
        addTags_result result = new addTags_result();
        try {
          iface.addTags(args.request);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class getTags extends libthrift091.ProcessFunction {
      public getTags() {
        super("getTags");
      }

      public getTags_args getEmptyArgsInstance() {
        return new getTags_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getTags_result getResult(I iface, getTags_args args) throws libthrift091.TException {
        getTags_result result = new getTags_result();
        try {
          result.success = iface.getTags(args.request);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class deleteTag extends libthrift091.ProcessFunction {
      public deleteTag() {
        super("deleteTag");
      }

      public deleteTag_args getEmptyArgsInstance() {
        return new deleteTag_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public deleteTag_result getResult(I iface, deleteTag_args args) throws libthrift091.TException {
        deleteTag_result result = new deleteTag_result();
        try {
          iface.deleteTag(args.request);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

    public static class resizeInstanceGroup extends libthrift091.ProcessFunction {
      public resizeInstanceGroup() {
        super("resizeInstanceGroup");
      }

      public resizeInstanceGroup_args getEmptyArgsInstance() {
        return new resizeInstanceGroup_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public resizeInstanceGroup_result getResult(I iface, resizeInstanceGroup_args args) throws libthrift091.TException {
        resizeInstanceGroup_result result = new resizeInstanceGroup_result();
        try {
          result.success = iface.resizeInstanceGroup(args.request);
        } catch (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

  }

  public static class AsyncProcessor extends com.xiaomi.infra.galaxy.rpc.thrift.BaseService.AsyncProcessor {
    private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
    public AsyncProcessor(I iface) {
      super(iface, getProcessMap(new HashMap>()));
    }

    protected AsyncProcessor(I iface, Map> processMap) {
      super(iface, getProcessMap(processMap));
    }

    private static  Map> getProcessMap(Map> processMap) {
      processMap.put("createCluster", new createCluster());
      processMap.put("addInstanceGroup", new addInstanceGroup());
      processMap.put("addInstanceGroups", new addInstanceGroups());
      processMap.put("submitJob", new submitJob());
      processMap.put("submitJobs", new submitJobs());
      processMap.put("terminateCluster", new terminateCluster());
      processMap.put("modifyInstanceGroup", new modifyInstanceGroup());
      processMap.put("describeCluster", new describeCluster());
      processMap.put("describeInstanceGroup", new describeInstanceGroup());
      processMap.put("describeInstance", new describeInstance());
      processMap.put("describeJob", new describeJob());
      processMap.put("listClusters", new listClusters());
      processMap.put("listClustersWithPrefix", new listClustersWithPrefix());
      processMap.put("listInstanceGroups", new listInstanceGroups());
      processMap.put("listInstancesInCluster", new listInstancesInCluster());
      processMap.put("listInstancesInGroup", new listInstancesInGroup());
      processMap.put("listJobs", new listJobs());
      processMap.put("setPermission", new setPermission());
      processMap.put("revokePermission", new revokePermission());
      processMap.put("queryPermission", new queryPermission());
      processMap.put("listPermissions", new listPermissions());
      processMap.put("getSSHPublicKeys", new getSSHPublicKeys());
      processMap.put("addSSHPublicKeys", new addSSHPublicKeys());
      processMap.put("deleteSSHPublicKeys", new deleteSSHPublicKeys());
      processMap.put("getQuota", new getQuota());
      processMap.put("deleteCluster", new deleteCluster());
      processMap.put("getEMRBasicConfig", new getEMRBasicConfig());
      processMap.put("getSoftwareConfig", new getSoftwareConfig());
      processMap.put("getHardwareConfig", new getHardwareConfig());
      processMap.put("addTags", new addTags());
      processMap.put("getTags", new getTags());
      processMap.put("deleteTag", new deleteTag());
      processMap.put("resizeInstanceGroup", new resizeInstanceGroup());
      return processMap;
    }

    public static class createCluster extends libthrift091.AsyncProcessFunction {
      public createCluster() {
        super("createCluster");
      }

      public createCluster_args getEmptyArgsInstance() {
        return new createCluster_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(CreateClusterResponse o) {
            createCluster_result result = new createCluster_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            createCluster_result result = new createCluster_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, createCluster_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.createCluster(args.cluster,resultHandler);
      }
    }

    public static class addInstanceGroup extends libthrift091.AsyncProcessFunction {
      public addInstanceGroup() {
        super("addInstanceGroup");
      }

      public addInstanceGroup_args getEmptyArgsInstance() {
        return new addInstanceGroup_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(AddInstanceGroupResponse o) {
            addInstanceGroup_result result = new addInstanceGroup_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            addInstanceGroup_result result = new addInstanceGroup_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, addInstanceGroup_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.addInstanceGroup(args.instanceGroup,resultHandler);
      }
    }

    public static class addInstanceGroups extends libthrift091.AsyncProcessFunction> {
      public addInstanceGroups() {
        super("addInstanceGroups");
      }

      public addInstanceGroups_args getEmptyArgsInstance() {
        return new addInstanceGroups_args();
      }

      public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback>() { 
          public void onComplete(List o) {
            addInstanceGroups_result result = new addInstanceGroups_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            addInstanceGroups_result result = new addInstanceGroups_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, addInstanceGroups_args args, libthrift091.async.AsyncMethodCallback> resultHandler) throws TException {
        iface.addInstanceGroups(args.instanceGroups,resultHandler);
      }
    }

    public static class submitJob extends libthrift091.AsyncProcessFunction {
      public submitJob() {
        super("submitJob");
      }

      public submitJob_args getEmptyArgsInstance() {
        return new submitJob_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(SubmitJobResponse o) {
            submitJob_result result = new submitJob_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            submitJob_result result = new submitJob_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, submitJob_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.submitJob(args.job,resultHandler);
      }
    }

    public static class submitJobs extends libthrift091.AsyncProcessFunction> {
      public submitJobs() {
        super("submitJobs");
      }

      public submitJobs_args getEmptyArgsInstance() {
        return new submitJobs_args();
      }

      public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback>() { 
          public void onComplete(List o) {
            submitJobs_result result = new submitJobs_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            submitJobs_result result = new submitJobs_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, submitJobs_args args, libthrift091.async.AsyncMethodCallback> resultHandler) throws TException {
        iface.submitJobs(args.jobs,resultHandler);
      }
    }

    public static class terminateCluster extends libthrift091.AsyncProcessFunction {
      public terminateCluster() {
        super("terminateCluster");
      }

      public terminateCluster_args getEmptyArgsInstance() {
        return new terminateCluster_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(String o) {
            terminateCluster_result result = new terminateCluster_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            terminateCluster_result result = new terminateCluster_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, terminateCluster_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.terminateCluster(args.terminateCluster,resultHandler);
      }
    }

    public static class modifyInstanceGroup extends libthrift091.AsyncProcessFunction {
      public modifyInstanceGroup() {
        super("modifyInstanceGroup");
      }

      public modifyInstanceGroup_args getEmptyArgsInstance() {
        return new modifyInstanceGroup_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(ModifyInstanceGroupResponse o) {
            modifyInstanceGroup_result result = new modifyInstanceGroup_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            modifyInstanceGroup_result result = new modifyInstanceGroup_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, modifyInstanceGroup_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.modifyInstanceGroup(args.instanceGroup,resultHandler);
      }
    }

    public static class describeCluster extends libthrift091.AsyncProcessFunction {
      public describeCluster() {
        super("describeCluster");
      }

      public describeCluster_args getEmptyArgsInstance() {
        return new describeCluster_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(ClusterDetail o) {
            describeCluster_result result = new describeCluster_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            describeCluster_result result = new describeCluster_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, describeCluster_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.describeCluster(args.clusterId,resultHandler);
      }
    }

    public static class describeInstanceGroup extends libthrift091.AsyncProcessFunction {
      public describeInstanceGroup() {
        super("describeInstanceGroup");
      }

      public describeInstanceGroup_args getEmptyArgsInstance() {
        return new describeInstanceGroup_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(InstanceGroupDetail o) {
            describeInstanceGroup_result result = new describeInstanceGroup_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            describeInstanceGroup_result result = new describeInstanceGroup_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, describeInstanceGroup_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.describeInstanceGroup(args.instanceGroupId,resultHandler);
      }
    }

    public static class describeInstance extends libthrift091.AsyncProcessFunction {
      public describeInstance() {
        super("describeInstance");
      }

      public describeInstance_args getEmptyArgsInstance() {
        return new describeInstance_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(InstanceDetail o) {
            describeInstance_result result = new describeInstance_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            describeInstance_result result = new describeInstance_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, describeInstance_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.describeInstance(args.clusterId, args.instanceId,resultHandler);
      }
    }

    public static class describeJob extends libthrift091.AsyncProcessFunction {
      public describeJob() {
        super("describeJob");
      }

      public describeJob_args getEmptyArgsInstance() {
        return new describeJob_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(JobDetail o) {
            describeJob_result result = new describeJob_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            describeJob_result result = new describeJob_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, describeJob_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.describeJob(args.clusterId, args.jobId,resultHandler);
      }
    }

    public static class listClusters extends libthrift091.AsyncProcessFunction> {
      public listClusters() {
        super("listClusters");
      }

      public listClusters_args getEmptyArgsInstance() {
        return new listClusters_args();
      }

      public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback>() { 
          public void onComplete(List o) {
            listClusters_result result = new listClusters_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            listClusters_result result = new listClusters_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, listClusters_args args, libthrift091.async.AsyncMethodCallback> resultHandler) throws TException {
        iface.listClusters(args.createdAfter, args.createdBefore,resultHandler);
      }
    }

    public static class listClustersWithPrefix extends libthrift091.AsyncProcessFunction> {
      public listClustersWithPrefix() {
        super("listClustersWithPrefix");
      }

      public listClustersWithPrefix_args getEmptyArgsInstance() {
        return new listClustersWithPrefix_args();
      }

      public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback>() { 
          public void onComplete(List o) {
            listClustersWithPrefix_result result = new listClustersWithPrefix_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            listClustersWithPrefix_result result = new listClustersWithPrefix_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, listClustersWithPrefix_args args, libthrift091.async.AsyncMethodCallback> resultHandler) throws TException {
        iface.listClustersWithPrefix(args.prefix,resultHandler);
      }
    }

    public static class listInstanceGroups extends libthrift091.AsyncProcessFunction> {
      public listInstanceGroups() {
        super("listInstanceGroups");
      }

      public listInstanceGroups_args getEmptyArgsInstance() {
        return new listInstanceGroups_args();
      }

      public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback>() { 
          public void onComplete(List o) {
            listInstanceGroups_result result = new listInstanceGroups_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            listInstanceGroups_result result = new listInstanceGroups_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, listInstanceGroups_args args, libthrift091.async.AsyncMethodCallback> resultHandler) throws TException {
        iface.listInstanceGroups(args.clusterId,resultHandler);
      }
    }

    public static class listInstancesInCluster extends libthrift091.AsyncProcessFunction> {
      public listInstancesInCluster() {
        super("listInstancesInCluster");
      }

      public listInstancesInCluster_args getEmptyArgsInstance() {
        return new listInstancesInCluster_args();
      }

      public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback>() { 
          public void onComplete(List o) {
            listInstancesInCluster_result result = new listInstancesInCluster_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            listInstancesInCluster_result result = new listInstancesInCluster_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, listInstancesInCluster_args args, libthrift091.async.AsyncMethodCallback> resultHandler) throws TException {
        iface.listInstancesInCluster(args.clusterId,resultHandler);
      }
    }

    public static class listInstancesInGroup extends libthrift091.AsyncProcessFunction> {
      public listInstancesInGroup() {
        super("listInstancesInGroup");
      }

      public listInstancesInGroup_args getEmptyArgsInstance() {
        return new listInstancesInGroup_args();
      }

      public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback>() { 
          public void onComplete(List o) {
            listInstancesInGroup_result result = new listInstancesInGroup_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            listInstancesInGroup_result result = new listInstancesInGroup_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, listInstancesInGroup_args args, libthrift091.async.AsyncMethodCallback> resultHandler) throws TException {
        iface.listInstancesInGroup(args.clusterId, args.groupId, args.groupRole,resultHandler);
      }
    }

    public static class listJobs extends libthrift091.AsyncProcessFunction> {
      public listJobs() {
        super("listJobs");
      }

      public listJobs_args getEmptyArgsInstance() {
        return new listJobs_args();
      }

      public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback>() { 
          public void onComplete(List o) {
            listJobs_result result = new listJobs_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            listJobs_result result = new listJobs_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, listJobs_args args, libthrift091.async.AsyncMethodCallback> resultHandler) throws TException {
        iface.listJobs(args.clusterId,resultHandler);
      }
    }

    public static class setPermission extends libthrift091.AsyncProcessFunction {
      public setPermission() {
        super("setPermission");
      }

      public setPermission_args getEmptyArgsInstance() {
        return new setPermission_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(Void o) {
            setPermission_result result = new setPermission_result();
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            setPermission_result result = new setPermission_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, setPermission_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.setPermission(args.request,resultHandler);
      }
    }

    public static class revokePermission extends libthrift091.AsyncProcessFunction {
      public revokePermission() {
        super("revokePermission");
      }

      public revokePermission_args getEmptyArgsInstance() {
        return new revokePermission_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(Void o) {
            revokePermission_result result = new revokePermission_result();
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            revokePermission_result result = new revokePermission_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, revokePermission_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.revokePermission(args.request,resultHandler);
      }
    }

    public static class queryPermission extends libthrift091.AsyncProcessFunction {
      public queryPermission() {
        super("queryPermission");
      }

      public queryPermission_args getEmptyArgsInstance() {
        return new queryPermission_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(QueryPermissionResponse o) {
            queryPermission_result result = new queryPermission_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            queryPermission_result result = new queryPermission_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, queryPermission_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.queryPermission(args.request,resultHandler);
      }
    }

    public static class listPermissions extends libthrift091.AsyncProcessFunction {
      public listPermissions() {
        super("listPermissions");
      }

      public listPermissions_args getEmptyArgsInstance() {
        return new listPermissions_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(ListPermissionResponse o) {
            listPermissions_result result = new listPermissions_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            listPermissions_result result = new listPermissions_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, listPermissions_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.listPermissions(args.request,resultHandler);
      }
    }

    public static class getSSHPublicKeys extends libthrift091.AsyncProcessFunction {
      public getSSHPublicKeys() {
        super("getSSHPublicKeys");
      }

      public getSSHPublicKeys_args getEmptyArgsInstance() {
        return new getSSHPublicKeys_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(GetSSHPublicKeysResponse o) {
            getSSHPublicKeys_result result = new getSSHPublicKeys_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            getSSHPublicKeys_result result = new getSSHPublicKeys_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getSSHPublicKeys_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.getSSHPublicKeys(args.request,resultHandler);
      }
    }

    public static class addSSHPublicKeys extends libthrift091.AsyncProcessFunction {
      public addSSHPublicKeys() {
        super("addSSHPublicKeys");
      }

      public addSSHPublicKeys_args getEmptyArgsInstance() {
        return new addSSHPublicKeys_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(Void o) {
            addSSHPublicKeys_result result = new addSSHPublicKeys_result();
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            addSSHPublicKeys_result result = new addSSHPublicKeys_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, addSSHPublicKeys_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.addSSHPublicKeys(args.request,resultHandler);
      }
    }

    public static class deleteSSHPublicKeys extends libthrift091.AsyncProcessFunction {
      public deleteSSHPublicKeys() {
        super("deleteSSHPublicKeys");
      }

      public deleteSSHPublicKeys_args getEmptyArgsInstance() {
        return new deleteSSHPublicKeys_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(Void o) {
            deleteSSHPublicKeys_result result = new deleteSSHPublicKeys_result();
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            deleteSSHPublicKeys_result result = new deleteSSHPublicKeys_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, deleteSSHPublicKeys_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.deleteSSHPublicKeys(args.request,resultHandler);
      }
    }

    public static class getQuota extends libthrift091.AsyncProcessFunction {
      public getQuota() {
        super("getQuota");
      }

      public getQuota_args getEmptyArgsInstance() {
        return new getQuota_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(GetQuotaResponse o) {
            getQuota_result result = new getQuota_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            getQuota_result result = new getQuota_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getQuota_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.getQuota(args.request,resultHandler);
      }
    }

    public static class deleteCluster extends libthrift091.AsyncProcessFunction {
      public deleteCluster() {
        super("deleteCluster");
      }

      public deleteCluster_args getEmptyArgsInstance() {
        return new deleteCluster_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(DeleteClusterResponse o) {
            deleteCluster_result result = new deleteCluster_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            deleteCluster_result result = new deleteCluster_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, deleteCluster_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.deleteCluster(args.request,resultHandler);
      }
    }

    public static class getEMRBasicConfig extends libthrift091.AsyncProcessFunction {
      public getEMRBasicConfig() {
        super("getEMRBasicConfig");
      }

      public getEMRBasicConfig_args getEmptyArgsInstance() {
        return new getEMRBasicConfig_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(GetEMRBasicConfigResponse o) {
            getEMRBasicConfig_result result = new getEMRBasicConfig_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            getEMRBasicConfig_result result = new getEMRBasicConfig_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getEMRBasicConfig_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.getEMRBasicConfig(resultHandler);
      }
    }

    public static class getSoftwareConfig extends libthrift091.AsyncProcessFunction {
      public getSoftwareConfig() {
        super("getSoftwareConfig");
      }

      public getSoftwareConfig_args getEmptyArgsInstance() {
        return new getSoftwareConfig_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(GetSoftwareConfigResponse o) {
            getSoftwareConfig_result result = new getSoftwareConfig_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            getSoftwareConfig_result result = new getSoftwareConfig_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getSoftwareConfig_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.getSoftwareConfig(resultHandler);
      }
    }

    public static class getHardwareConfig extends libthrift091.AsyncProcessFunction {
      public getHardwareConfig() {
        super("getHardwareConfig");
      }

      public getHardwareConfig_args getEmptyArgsInstance() {
        return new getHardwareConfig_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(GetHardwareConfigResponse o) {
            getHardwareConfig_result result = new getHardwareConfig_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            getHardwareConfig_result result = new getHardwareConfig_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getHardwareConfig_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.getHardwareConfig(resultHandler);
      }
    }

    public static class addTags extends libthrift091.AsyncProcessFunction {
      public addTags() {
        super("addTags");
      }

      public addTags_args getEmptyArgsInstance() {
        return new addTags_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(Void o) {
            addTags_result result = new addTags_result();
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            addTags_result result = new addTags_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, addTags_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.addTags(args.request,resultHandler);
      }
    }

    public static class getTags extends libthrift091.AsyncProcessFunction {
      public getTags() {
        super("getTags");
      }

      public getTags_args getEmptyArgsInstance() {
        return new getTags_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(GetTagsResponse o) {
            getTags_result result = new getTags_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            getTags_result result = new getTags_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getTags_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.getTags(args.request,resultHandler);
      }
    }

    public static class deleteTag extends libthrift091.AsyncProcessFunction {
      public deleteTag() {
        super("deleteTag");
      }

      public deleteTag_args getEmptyArgsInstance() {
        return new deleteTag_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(Void o) {
            deleteTag_result result = new deleteTag_result();
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            deleteTag_result result = new deleteTag_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, deleteTag_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.deleteTag(args.request,resultHandler);
      }
    }

    public static class resizeInstanceGroup extends libthrift091.AsyncProcessFunction {
      public resizeInstanceGroup() {
        super("resizeInstanceGroup");
      }

      public resizeInstanceGroup_args getEmptyArgsInstance() {
        return new resizeInstanceGroup_args();
      }

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(ResizeInstanceGroupResponse o) {
            resizeInstanceGroup_result result = new resizeInstanceGroup_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            resizeInstanceGroup_result result = new resizeInstanceGroup_result();
            if (e instanceof com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) {
                        result.se = (com.xiaomi.infra.galaxy.rpc.thrift.ServiceException) e;
                        result.setSeIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, resizeInstanceGroup_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.resizeInstanceGroup(args.request,resultHandler);
      }
    }

  }

  public static class createCluster_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("createCluster_args");

    private static final libthrift091.protocol.TField CLUSTER_FIELD_DESC = new libthrift091.protocol.TField("cluster", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new createCluster_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new createCluster_argsTupleSchemeFactory());
    }

    public CreateClusterRequest cluster; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      CLUSTER((short)1, "cluster");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CLUSTER
            return CLUSTER;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CLUSTER, new libthrift091.meta_data.FieldMetaData("cluster", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, CreateClusterRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(createCluster_args.class, metaDataMap);
    }

    public createCluster_args() {
    }

    public createCluster_args(
      CreateClusterRequest cluster)
    {
      this();
      this.cluster = cluster;
    }

    /**
     * Performs a deep copy on other.
     */
    public createCluster_args(createCluster_args other) {
      if (other.isSetCluster()) {
        this.cluster = new CreateClusterRequest(other.cluster);
      }
    }

    public createCluster_args deepCopy() {
      return new createCluster_args(this);
    }

    @Override
    public void clear() {
      this.cluster = null;
    }

    public CreateClusterRequest getCluster() {
      return this.cluster;
    }

    public createCluster_args setCluster(CreateClusterRequest cluster) {
      this.cluster = cluster;
      return this;
    }

    public void unsetCluster() {
      this.cluster = null;
    }

    /** Returns true if field cluster is set (has been assigned a value) and false otherwise */
    public boolean isSetCluster() {
      return this.cluster != null;
    }

    public void setClusterIsSet(boolean value) {
      if (!value) {
        this.cluster = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CLUSTER:
        if (value == null) {
          unsetCluster();
        } else {
          setCluster((CreateClusterRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CLUSTER:
        return getCluster();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case CLUSTER:
        return isSetCluster();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof createCluster_args)
        return this.equals((createCluster_args)that);
      return false;
    }

    public boolean equals(createCluster_args that) {
      if (that == null)
        return false;

      boolean this_present_cluster = true && this.isSetCluster();
      boolean that_present_cluster = true && that.isSetCluster();
      if (this_present_cluster || that_present_cluster) {
        if (!(this_present_cluster && that_present_cluster))
          return false;
        if (!this.cluster.equals(that.cluster))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_cluster = true && (isSetCluster());
      list.add(present_cluster);
      if (present_cluster)
        list.add(cluster);

      return list.hashCode();
    }

    @Override
    public int compareTo(createCluster_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetCluster()).compareTo(other.isSetCluster());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCluster()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.cluster, other.cluster);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("createCluster_args(");
      boolean first = true;

      sb.append("cluster:");
      if (this.cluster == null) {
        sb.append("null");
      } else {
        sb.append(this.cluster);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (cluster != null) {
        cluster.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class createCluster_argsStandardSchemeFactory implements SchemeFactory {
      public createCluster_argsStandardScheme getScheme() {
        return new createCluster_argsStandardScheme();
      }
    }

    private static class createCluster_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, createCluster_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // CLUSTER
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.cluster = new CreateClusterRequest();
                struct.cluster.read(iprot);
                struct.setClusterIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, createCluster_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.cluster != null) {
          oprot.writeFieldBegin(CLUSTER_FIELD_DESC);
          struct.cluster.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class createCluster_argsTupleSchemeFactory implements SchemeFactory {
      public createCluster_argsTupleScheme getScheme() {
        return new createCluster_argsTupleScheme();
      }
    }

    private static class createCluster_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, createCluster_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetCluster()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetCluster()) {
          struct.cluster.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, createCluster_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.cluster = new CreateClusterRequest();
          struct.cluster.read(iprot);
          struct.setClusterIsSet(true);
        }
      }
    }

  }

  public static class createCluster_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("createCluster_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new createCluster_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new createCluster_resultTupleSchemeFactory());
    }

    public CreateClusterResponse success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, CreateClusterResponse.class)));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(createCluster_result.class, metaDataMap);
    }

    public createCluster_result() {
    }

    public createCluster_result(
      CreateClusterResponse success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public createCluster_result(createCluster_result other) {
      if (other.isSetSuccess()) {
        this.success = new CreateClusterResponse(other.success);
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public createCluster_result deepCopy() {
      return new createCluster_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public CreateClusterResponse getSuccess() {
      return this.success;
    }

    public createCluster_result setSuccess(CreateClusterResponse 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public createCluster_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((CreateClusterResponse)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof createCluster_result)
        return this.equals((createCluster_result)that);
      return false;
    }

    public boolean equals(createCluster_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(createCluster_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("createCluster_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class createCluster_resultStandardSchemeFactory implements SchemeFactory {
      public createCluster_resultStandardScheme getScheme() {
        return new createCluster_resultStandardScheme();
      }
    }

    private static class createCluster_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, createCluster_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new CreateClusterResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, createCluster_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class createCluster_resultTupleSchemeFactory implements SchemeFactory {
      public createCluster_resultTupleScheme getScheme() {
        return new createCluster_resultTupleScheme();
      }
    }

    private static class createCluster_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, createCluster_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, createCluster_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new CreateClusterResponse();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class addInstanceGroup_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("addInstanceGroup_args");

    private static final libthrift091.protocol.TField INSTANCE_GROUP_FIELD_DESC = new libthrift091.protocol.TField("instanceGroup", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new addInstanceGroup_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new addInstanceGroup_argsTupleSchemeFactory());
    }

    public AddInstanceGroupRequest instanceGroup; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      INSTANCE_GROUP((short)1, "instanceGroup");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // INSTANCE_GROUP
            return INSTANCE_GROUP;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.INSTANCE_GROUP, new libthrift091.meta_data.FieldMetaData("instanceGroup", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, AddInstanceGroupRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(addInstanceGroup_args.class, metaDataMap);
    }

    public addInstanceGroup_args() {
    }

    public addInstanceGroup_args(
      AddInstanceGroupRequest instanceGroup)
    {
      this();
      this.instanceGroup = instanceGroup;
    }

    /**
     * Performs a deep copy on other.
     */
    public addInstanceGroup_args(addInstanceGroup_args other) {
      if (other.isSetInstanceGroup()) {
        this.instanceGroup = new AddInstanceGroupRequest(other.instanceGroup);
      }
    }

    public addInstanceGroup_args deepCopy() {
      return new addInstanceGroup_args(this);
    }

    @Override
    public void clear() {
      this.instanceGroup = null;
    }

    public AddInstanceGroupRequest getInstanceGroup() {
      return this.instanceGroup;
    }

    public addInstanceGroup_args setInstanceGroup(AddInstanceGroupRequest instanceGroup) {
      this.instanceGroup = instanceGroup;
      return this;
    }

    public void unsetInstanceGroup() {
      this.instanceGroup = null;
    }

    /** Returns true if field instanceGroup is set (has been assigned a value) and false otherwise */
    public boolean isSetInstanceGroup() {
      return this.instanceGroup != null;
    }

    public void setInstanceGroupIsSet(boolean value) {
      if (!value) {
        this.instanceGroup = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case INSTANCE_GROUP:
        if (value == null) {
          unsetInstanceGroup();
        } else {
          setInstanceGroup((AddInstanceGroupRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case INSTANCE_GROUP:
        return getInstanceGroup();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case INSTANCE_GROUP:
        return isSetInstanceGroup();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addInstanceGroup_args)
        return this.equals((addInstanceGroup_args)that);
      return false;
    }

    public boolean equals(addInstanceGroup_args that) {
      if (that == null)
        return false;

      boolean this_present_instanceGroup = true && this.isSetInstanceGroup();
      boolean that_present_instanceGroup = true && that.isSetInstanceGroup();
      if (this_present_instanceGroup || that_present_instanceGroup) {
        if (!(this_present_instanceGroup && that_present_instanceGroup))
          return false;
        if (!this.instanceGroup.equals(that.instanceGroup))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_instanceGroup = true && (isSetInstanceGroup());
      list.add(present_instanceGroup);
      if (present_instanceGroup)
        list.add(instanceGroup);

      return list.hashCode();
    }

    @Override
    public int compareTo(addInstanceGroup_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetInstanceGroup()).compareTo(other.isSetInstanceGroup());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetInstanceGroup()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.instanceGroup, other.instanceGroup);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addInstanceGroup_args(");
      boolean first = true;

      sb.append("instanceGroup:");
      if (this.instanceGroup == null) {
        sb.append("null");
      } else {
        sb.append(this.instanceGroup);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (instanceGroup != null) {
        instanceGroup.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class addInstanceGroup_argsStandardSchemeFactory implements SchemeFactory {
      public addInstanceGroup_argsStandardScheme getScheme() {
        return new addInstanceGroup_argsStandardScheme();
      }
    }

    private static class addInstanceGroup_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, addInstanceGroup_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // INSTANCE_GROUP
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.instanceGroup = new AddInstanceGroupRequest();
                struct.instanceGroup.read(iprot);
                struct.setInstanceGroupIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, addInstanceGroup_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.instanceGroup != null) {
          oprot.writeFieldBegin(INSTANCE_GROUP_FIELD_DESC);
          struct.instanceGroup.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class addInstanceGroup_argsTupleSchemeFactory implements SchemeFactory {
      public addInstanceGroup_argsTupleScheme getScheme() {
        return new addInstanceGroup_argsTupleScheme();
      }
    }

    private static class addInstanceGroup_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, addInstanceGroup_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetInstanceGroup()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetInstanceGroup()) {
          struct.instanceGroup.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, addInstanceGroup_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.instanceGroup = new AddInstanceGroupRequest();
          struct.instanceGroup.read(iprot);
          struct.setInstanceGroupIsSet(true);
        }
      }
    }

  }

  public static class addInstanceGroup_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("addInstanceGroup_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new addInstanceGroup_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new addInstanceGroup_resultTupleSchemeFactory());
    }

    public AddInstanceGroupResponse success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, AddInstanceGroupResponse.class)));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(addInstanceGroup_result.class, metaDataMap);
    }

    public addInstanceGroup_result() {
    }

    public addInstanceGroup_result(
      AddInstanceGroupResponse success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public addInstanceGroup_result(addInstanceGroup_result other) {
      if (other.isSetSuccess()) {
        this.success = new AddInstanceGroupResponse(other.success);
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public addInstanceGroup_result deepCopy() {
      return new addInstanceGroup_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public AddInstanceGroupResponse getSuccess() {
      return this.success;
    }

    public addInstanceGroup_result setSuccess(AddInstanceGroupResponse 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public addInstanceGroup_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((AddInstanceGroupResponse)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addInstanceGroup_result)
        return this.equals((addInstanceGroup_result)that);
      return false;
    }

    public boolean equals(addInstanceGroup_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(addInstanceGroup_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addInstanceGroup_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class addInstanceGroup_resultStandardSchemeFactory implements SchemeFactory {
      public addInstanceGroup_resultStandardScheme getScheme() {
        return new addInstanceGroup_resultStandardScheme();
      }
    }

    private static class addInstanceGroup_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, addInstanceGroup_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new AddInstanceGroupResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, addInstanceGroup_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class addInstanceGroup_resultTupleSchemeFactory implements SchemeFactory {
      public addInstanceGroup_resultTupleScheme getScheme() {
        return new addInstanceGroup_resultTupleScheme();
      }
    }

    private static class addInstanceGroup_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, addInstanceGroup_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, addInstanceGroup_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new AddInstanceGroupResponse();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class addInstanceGroups_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("addInstanceGroups_args");

    private static final libthrift091.protocol.TField INSTANCE_GROUPS_FIELD_DESC = new libthrift091.protocol.TField("instanceGroups", libthrift091.protocol.TType.LIST, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new addInstanceGroups_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new addInstanceGroups_argsTupleSchemeFactory());
    }

    public List instanceGroups; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      INSTANCE_GROUPS((short)1, "instanceGroups");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // INSTANCE_GROUPS
            return INSTANCE_GROUPS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.INSTANCE_GROUPS, new libthrift091.meta_data.FieldMetaData("instanceGroups", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST, 
              new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, AddInstanceGroupRequest.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(addInstanceGroups_args.class, metaDataMap);
    }

    public addInstanceGroups_args() {
    }

    public addInstanceGroups_args(
      List instanceGroups)
    {
      this();
      this.instanceGroups = instanceGroups;
    }

    /**
     * Performs a deep copy on other.
     */
    public addInstanceGroups_args(addInstanceGroups_args other) {
      if (other.isSetInstanceGroups()) {
        List __this__instanceGroups = new ArrayList(other.instanceGroups.size());
        for (AddInstanceGroupRequest other_element : other.instanceGroups) {
          __this__instanceGroups.add(new AddInstanceGroupRequest(other_element));
        }
        this.instanceGroups = __this__instanceGroups;
      }
    }

    public addInstanceGroups_args deepCopy() {
      return new addInstanceGroups_args(this);
    }

    @Override
    public void clear() {
      this.instanceGroups = null;
    }

    public int getInstanceGroupsSize() {
      return (this.instanceGroups == null) ? 0 : this.instanceGroups.size();
    }

    public java.util.Iterator getInstanceGroupsIterator() {
      return (this.instanceGroups == null) ? null : this.instanceGroups.iterator();
    }

    public void addToInstanceGroups(AddInstanceGroupRequest elem) {
      if (this.instanceGroups == null) {
        this.instanceGroups = new ArrayList();
      }
      this.instanceGroups.add(elem);
    }

    public List getInstanceGroups() {
      return this.instanceGroups;
    }

    public addInstanceGroups_args setInstanceGroups(List instanceGroups) {
      this.instanceGroups = instanceGroups;
      return this;
    }

    public void unsetInstanceGroups() {
      this.instanceGroups = null;
    }

    /** Returns true if field instanceGroups is set (has been assigned a value) and false otherwise */
    public boolean isSetInstanceGroups() {
      return this.instanceGroups != null;
    }

    public void setInstanceGroupsIsSet(boolean value) {
      if (!value) {
        this.instanceGroups = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case INSTANCE_GROUPS:
        if (value == null) {
          unsetInstanceGroups();
        } else {
          setInstanceGroups((List)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case INSTANCE_GROUPS:
        return getInstanceGroups();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case INSTANCE_GROUPS:
        return isSetInstanceGroups();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addInstanceGroups_args)
        return this.equals((addInstanceGroups_args)that);
      return false;
    }

    public boolean equals(addInstanceGroups_args that) {
      if (that == null)
        return false;

      boolean this_present_instanceGroups = true && this.isSetInstanceGroups();
      boolean that_present_instanceGroups = true && that.isSetInstanceGroups();
      if (this_present_instanceGroups || that_present_instanceGroups) {
        if (!(this_present_instanceGroups && that_present_instanceGroups))
          return false;
        if (!this.instanceGroups.equals(that.instanceGroups))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_instanceGroups = true && (isSetInstanceGroups());
      list.add(present_instanceGroups);
      if (present_instanceGroups)
        list.add(instanceGroups);

      return list.hashCode();
    }

    @Override
    public int compareTo(addInstanceGroups_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetInstanceGroups()).compareTo(other.isSetInstanceGroups());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetInstanceGroups()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.instanceGroups, other.instanceGroups);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addInstanceGroups_args(");
      boolean first = true;

      sb.append("instanceGroups:");
      if (this.instanceGroups == null) {
        sb.append("null");
      } else {
        sb.append(this.instanceGroups);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class addInstanceGroups_argsStandardSchemeFactory implements SchemeFactory {
      public addInstanceGroups_argsStandardScheme getScheme() {
        return new addInstanceGroups_argsStandardScheme();
      }
    }

    private static class addInstanceGroups_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, addInstanceGroups_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // INSTANCE_GROUPS
              if (schemeField.type == libthrift091.protocol.TType.LIST) {
                {
                  libthrift091.protocol.TList _list228 = iprot.readListBegin();
                  struct.instanceGroups = new ArrayList(_list228.size);
                  AddInstanceGroupRequest _elem229;
                  for (int _i230 = 0; _i230 < _list228.size; ++_i230)
                  {
                    _elem229 = new AddInstanceGroupRequest();
                    _elem229.read(iprot);
                    struct.instanceGroups.add(_elem229);
                  }
                  iprot.readListEnd();
                }
                struct.setInstanceGroupsIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, addInstanceGroups_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.instanceGroups != null) {
          oprot.writeFieldBegin(INSTANCE_GROUPS_FIELD_DESC);
          {
            oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.instanceGroups.size()));
            for (AddInstanceGroupRequest _iter231 : struct.instanceGroups)
            {
              _iter231.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class addInstanceGroups_argsTupleSchemeFactory implements SchemeFactory {
      public addInstanceGroups_argsTupleScheme getScheme() {
        return new addInstanceGroups_argsTupleScheme();
      }
    }

    private static class addInstanceGroups_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, addInstanceGroups_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetInstanceGroups()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetInstanceGroups()) {
          {
            oprot.writeI32(struct.instanceGroups.size());
            for (AddInstanceGroupRequest _iter232 : struct.instanceGroups)
            {
              _iter232.write(oprot);
            }
          }
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, addInstanceGroups_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          {
            libthrift091.protocol.TList _list233 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
            struct.instanceGroups = new ArrayList(_list233.size);
            AddInstanceGroupRequest _elem234;
            for (int _i235 = 0; _i235 < _list233.size; ++_i235)
            {
              _elem234 = new AddInstanceGroupRequest();
              _elem234.read(iprot);
              struct.instanceGroups.add(_elem234);
            }
          }
          struct.setInstanceGroupsIsSet(true);
        }
      }
    }

  }

  public static class addInstanceGroups_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("addInstanceGroups_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.LIST, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new addInstanceGroups_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new addInstanceGroups_resultTupleSchemeFactory());
    }

    public List success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST, 
              new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, AddInstanceGroupResponse.class))));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(addInstanceGroups_result.class, metaDataMap);
    }

    public addInstanceGroups_result() {
    }

    public addInstanceGroups_result(
      List success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public addInstanceGroups_result(addInstanceGroups_result other) {
      if (other.isSetSuccess()) {
        List __this__success = new ArrayList(other.success.size());
        for (AddInstanceGroupResponse other_element : other.success) {
          __this__success.add(new AddInstanceGroupResponse(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public addInstanceGroups_result deepCopy() {
      return new addInstanceGroups_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(AddInstanceGroupResponse elem) {
      if (this.success == null) {
        this.success = new ArrayList();
      }
      this.success.add(elem);
    }

    public List getSuccess() {
      return this.success;
    }

    public addInstanceGroups_result setSuccess(List 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public addInstanceGroups_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addInstanceGroups_result)
        return this.equals((addInstanceGroups_result)that);
      return false;
    }

    public boolean equals(addInstanceGroups_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(addInstanceGroups_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addInstanceGroups_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class addInstanceGroups_resultStandardSchemeFactory implements SchemeFactory {
      public addInstanceGroups_resultStandardScheme getScheme() {
        return new addInstanceGroups_resultStandardScheme();
      }
    }

    private static class addInstanceGroups_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, addInstanceGroups_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.LIST) {
                {
                  libthrift091.protocol.TList _list236 = iprot.readListBegin();
                  struct.success = new ArrayList(_list236.size);
                  AddInstanceGroupResponse _elem237;
                  for (int _i238 = 0; _i238 < _list236.size; ++_i238)
                  {
                    _elem237 = new AddInstanceGroupResponse();
                    _elem237.read(iprot);
                    struct.success.add(_elem237);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, addInstanceGroups_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.success.size()));
            for (AddInstanceGroupResponse _iter239 : struct.success)
            {
              _iter239.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class addInstanceGroups_resultTupleSchemeFactory implements SchemeFactory {
      public addInstanceGroups_resultTupleScheme getScheme() {
        return new addInstanceGroups_resultTupleScheme();
      }
    }

    private static class addInstanceGroups_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, addInstanceGroups_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (AddInstanceGroupResponse _iter240 : struct.success)
            {
              _iter240.write(oprot);
            }
          }
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, addInstanceGroups_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          {
            libthrift091.protocol.TList _list241 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList(_list241.size);
            AddInstanceGroupResponse _elem242;
            for (int _i243 = 0; _i243 < _list241.size; ++_i243)
            {
              _elem242 = new AddInstanceGroupResponse();
              _elem242.read(iprot);
              struct.success.add(_elem242);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class submitJob_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("submitJob_args");

    private static final libthrift091.protocol.TField JOB_FIELD_DESC = new libthrift091.protocol.TField("job", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new submitJob_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new submitJob_argsTupleSchemeFactory());
    }

    public SubmitJobRequest job; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      JOB((short)1, "job");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // JOB
            return JOB;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.JOB, new libthrift091.meta_data.FieldMetaData("job", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, SubmitJobRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(submitJob_args.class, metaDataMap);
    }

    public submitJob_args() {
    }

    public submitJob_args(
      SubmitJobRequest job)
    {
      this();
      this.job = job;
    }

    /**
     * Performs a deep copy on other.
     */
    public submitJob_args(submitJob_args other) {
      if (other.isSetJob()) {
        this.job = new SubmitJobRequest(other.job);
      }
    }

    public submitJob_args deepCopy() {
      return new submitJob_args(this);
    }

    @Override
    public void clear() {
      this.job = null;
    }

    public SubmitJobRequest getJob() {
      return this.job;
    }

    public submitJob_args setJob(SubmitJobRequest job) {
      this.job = job;
      return this;
    }

    public void unsetJob() {
      this.job = null;
    }

    /** Returns true if field job is set (has been assigned a value) and false otherwise */
    public boolean isSetJob() {
      return this.job != null;
    }

    public void setJobIsSet(boolean value) {
      if (!value) {
        this.job = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case JOB:
        if (value == null) {
          unsetJob();
        } else {
          setJob((SubmitJobRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case JOB:
        return getJob();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case JOB:
        return isSetJob();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof submitJob_args)
        return this.equals((submitJob_args)that);
      return false;
    }

    public boolean equals(submitJob_args that) {
      if (that == null)
        return false;

      boolean this_present_job = true && this.isSetJob();
      boolean that_present_job = true && that.isSetJob();
      if (this_present_job || that_present_job) {
        if (!(this_present_job && that_present_job))
          return false;
        if (!this.job.equals(that.job))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_job = true && (isSetJob());
      list.add(present_job);
      if (present_job)
        list.add(job);

      return list.hashCode();
    }

    @Override
    public int compareTo(submitJob_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetJob()).compareTo(other.isSetJob());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetJob()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.job, other.job);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("submitJob_args(");
      boolean first = true;

      sb.append("job:");
      if (this.job == null) {
        sb.append("null");
      } else {
        sb.append(this.job);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (job != null) {
        job.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class submitJob_argsStandardSchemeFactory implements SchemeFactory {
      public submitJob_argsStandardScheme getScheme() {
        return new submitJob_argsStandardScheme();
      }
    }

    private static class submitJob_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, submitJob_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // JOB
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.job = new SubmitJobRequest();
                struct.job.read(iprot);
                struct.setJobIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, submitJob_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.job != null) {
          oprot.writeFieldBegin(JOB_FIELD_DESC);
          struct.job.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class submitJob_argsTupleSchemeFactory implements SchemeFactory {
      public submitJob_argsTupleScheme getScheme() {
        return new submitJob_argsTupleScheme();
      }
    }

    private static class submitJob_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, submitJob_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetJob()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetJob()) {
          struct.job.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, submitJob_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.job = new SubmitJobRequest();
          struct.job.read(iprot);
          struct.setJobIsSet(true);
        }
      }
    }

  }

  public static class submitJob_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("submitJob_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new submitJob_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new submitJob_resultTupleSchemeFactory());
    }

    public SubmitJobResponse success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, SubmitJobResponse.class)));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(submitJob_result.class, metaDataMap);
    }

    public submitJob_result() {
    }

    public submitJob_result(
      SubmitJobResponse success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public submitJob_result(submitJob_result other) {
      if (other.isSetSuccess()) {
        this.success = new SubmitJobResponse(other.success);
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public submitJob_result deepCopy() {
      return new submitJob_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public SubmitJobResponse getSuccess() {
      return this.success;
    }

    public submitJob_result setSuccess(SubmitJobResponse 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public submitJob_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((SubmitJobResponse)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof submitJob_result)
        return this.equals((submitJob_result)that);
      return false;
    }

    public boolean equals(submitJob_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(submitJob_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("submitJob_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class submitJob_resultStandardSchemeFactory implements SchemeFactory {
      public submitJob_resultStandardScheme getScheme() {
        return new submitJob_resultStandardScheme();
      }
    }

    private static class submitJob_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, submitJob_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new SubmitJobResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, submitJob_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class submitJob_resultTupleSchemeFactory implements SchemeFactory {
      public submitJob_resultTupleScheme getScheme() {
        return new submitJob_resultTupleScheme();
      }
    }

    private static class submitJob_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, submitJob_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, submitJob_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new SubmitJobResponse();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class submitJobs_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("submitJobs_args");

    private static final libthrift091.protocol.TField JOBS_FIELD_DESC = new libthrift091.protocol.TField("jobs", libthrift091.protocol.TType.LIST, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new submitJobs_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new submitJobs_argsTupleSchemeFactory());
    }

    public List jobs; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      JOBS((short)1, "jobs");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // JOBS
            return JOBS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.JOBS, new libthrift091.meta_data.FieldMetaData("jobs", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST, 
              new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, SubmitJobRequest.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(submitJobs_args.class, metaDataMap);
    }

    public submitJobs_args() {
    }

    public submitJobs_args(
      List jobs)
    {
      this();
      this.jobs = jobs;
    }

    /**
     * Performs a deep copy on other.
     */
    public submitJobs_args(submitJobs_args other) {
      if (other.isSetJobs()) {
        List __this__jobs = new ArrayList(other.jobs.size());
        for (SubmitJobRequest other_element : other.jobs) {
          __this__jobs.add(new SubmitJobRequest(other_element));
        }
        this.jobs = __this__jobs;
      }
    }

    public submitJobs_args deepCopy() {
      return new submitJobs_args(this);
    }

    @Override
    public void clear() {
      this.jobs = null;
    }

    public int getJobsSize() {
      return (this.jobs == null) ? 0 : this.jobs.size();
    }

    public java.util.Iterator getJobsIterator() {
      return (this.jobs == null) ? null : this.jobs.iterator();
    }

    public void addToJobs(SubmitJobRequest elem) {
      if (this.jobs == null) {
        this.jobs = new ArrayList();
      }
      this.jobs.add(elem);
    }

    public List getJobs() {
      return this.jobs;
    }

    public submitJobs_args setJobs(List jobs) {
      this.jobs = jobs;
      return this;
    }

    public void unsetJobs() {
      this.jobs = null;
    }

    /** Returns true if field jobs is set (has been assigned a value) and false otherwise */
    public boolean isSetJobs() {
      return this.jobs != null;
    }

    public void setJobsIsSet(boolean value) {
      if (!value) {
        this.jobs = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case JOBS:
        if (value == null) {
          unsetJobs();
        } else {
          setJobs((List)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case JOBS:
        return getJobs();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case JOBS:
        return isSetJobs();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof submitJobs_args)
        return this.equals((submitJobs_args)that);
      return false;
    }

    public boolean equals(submitJobs_args that) {
      if (that == null)
        return false;

      boolean this_present_jobs = true && this.isSetJobs();
      boolean that_present_jobs = true && that.isSetJobs();
      if (this_present_jobs || that_present_jobs) {
        if (!(this_present_jobs && that_present_jobs))
          return false;
        if (!this.jobs.equals(that.jobs))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_jobs = true && (isSetJobs());
      list.add(present_jobs);
      if (present_jobs)
        list.add(jobs);

      return list.hashCode();
    }

    @Override
    public int compareTo(submitJobs_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetJobs()).compareTo(other.isSetJobs());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetJobs()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.jobs, other.jobs);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("submitJobs_args(");
      boolean first = true;

      sb.append("jobs:");
      if (this.jobs == null) {
        sb.append("null");
      } else {
        sb.append(this.jobs);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class submitJobs_argsStandardSchemeFactory implements SchemeFactory {
      public submitJobs_argsStandardScheme getScheme() {
        return new submitJobs_argsStandardScheme();
      }
    }

    private static class submitJobs_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, submitJobs_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // JOBS
              if (schemeField.type == libthrift091.protocol.TType.LIST) {
                {
                  libthrift091.protocol.TList _list244 = iprot.readListBegin();
                  struct.jobs = new ArrayList(_list244.size);
                  SubmitJobRequest _elem245;
                  for (int _i246 = 0; _i246 < _list244.size; ++_i246)
                  {
                    _elem245 = new SubmitJobRequest();
                    _elem245.read(iprot);
                    struct.jobs.add(_elem245);
                  }
                  iprot.readListEnd();
                }
                struct.setJobsIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, submitJobs_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.jobs != null) {
          oprot.writeFieldBegin(JOBS_FIELD_DESC);
          {
            oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.jobs.size()));
            for (SubmitJobRequest _iter247 : struct.jobs)
            {
              _iter247.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class submitJobs_argsTupleSchemeFactory implements SchemeFactory {
      public submitJobs_argsTupleScheme getScheme() {
        return new submitJobs_argsTupleScheme();
      }
    }

    private static class submitJobs_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, submitJobs_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetJobs()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetJobs()) {
          {
            oprot.writeI32(struct.jobs.size());
            for (SubmitJobRequest _iter248 : struct.jobs)
            {
              _iter248.write(oprot);
            }
          }
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, submitJobs_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          {
            libthrift091.protocol.TList _list249 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
            struct.jobs = new ArrayList(_list249.size);
            SubmitJobRequest _elem250;
            for (int _i251 = 0; _i251 < _list249.size; ++_i251)
            {
              _elem250 = new SubmitJobRequest();
              _elem250.read(iprot);
              struct.jobs.add(_elem250);
            }
          }
          struct.setJobsIsSet(true);
        }
      }
    }

  }

  public static class submitJobs_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("submitJobs_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.LIST, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new submitJobs_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new submitJobs_resultTupleSchemeFactory());
    }

    public List success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST, 
              new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, SubmitJobResponse.class))));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(submitJobs_result.class, metaDataMap);
    }

    public submitJobs_result() {
    }

    public submitJobs_result(
      List success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public submitJobs_result(submitJobs_result other) {
      if (other.isSetSuccess()) {
        List __this__success = new ArrayList(other.success.size());
        for (SubmitJobResponse other_element : other.success) {
          __this__success.add(new SubmitJobResponse(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public submitJobs_result deepCopy() {
      return new submitJobs_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(SubmitJobResponse elem) {
      if (this.success == null) {
        this.success = new ArrayList();
      }
      this.success.add(elem);
    }

    public List getSuccess() {
      return this.success;
    }

    public submitJobs_result setSuccess(List 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public submitJobs_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof submitJobs_result)
        return this.equals((submitJobs_result)that);
      return false;
    }

    public boolean equals(submitJobs_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(submitJobs_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("submitJobs_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class submitJobs_resultStandardSchemeFactory implements SchemeFactory {
      public submitJobs_resultStandardScheme getScheme() {
        return new submitJobs_resultStandardScheme();
      }
    }

    private static class submitJobs_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, submitJobs_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.LIST) {
                {
                  libthrift091.protocol.TList _list252 = iprot.readListBegin();
                  struct.success = new ArrayList(_list252.size);
                  SubmitJobResponse _elem253;
                  for (int _i254 = 0; _i254 < _list252.size; ++_i254)
                  {
                    _elem253 = new SubmitJobResponse();
                    _elem253.read(iprot);
                    struct.success.add(_elem253);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, submitJobs_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.success.size()));
            for (SubmitJobResponse _iter255 : struct.success)
            {
              _iter255.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class submitJobs_resultTupleSchemeFactory implements SchemeFactory {
      public submitJobs_resultTupleScheme getScheme() {
        return new submitJobs_resultTupleScheme();
      }
    }

    private static class submitJobs_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, submitJobs_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (SubmitJobResponse _iter256 : struct.success)
            {
              _iter256.write(oprot);
            }
          }
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, submitJobs_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          {
            libthrift091.protocol.TList _list257 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList(_list257.size);
            SubmitJobResponse _elem258;
            for (int _i259 = 0; _i259 < _list257.size; ++_i259)
            {
              _elem258 = new SubmitJobResponse();
              _elem258.read(iprot);
              struct.success.add(_elem258);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class terminateCluster_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("terminateCluster_args");

    private static final libthrift091.protocol.TField TERMINATE_CLUSTER_FIELD_DESC = new libthrift091.protocol.TField("terminateCluster", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new terminateCluster_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new terminateCluster_argsTupleSchemeFactory());
    }

    public TerminateClusterRequest terminateCluster; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      TERMINATE_CLUSTER((short)1, "terminateCluster");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // TERMINATE_CLUSTER
            return TERMINATE_CLUSTER;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.TERMINATE_CLUSTER, new libthrift091.meta_data.FieldMetaData("terminateCluster", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, TerminateClusterRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(terminateCluster_args.class, metaDataMap);
    }

    public terminateCluster_args() {
    }

    public terminateCluster_args(
      TerminateClusterRequest terminateCluster)
    {
      this();
      this.terminateCluster = terminateCluster;
    }

    /**
     * Performs a deep copy on other.
     */
    public terminateCluster_args(terminateCluster_args other) {
      if (other.isSetTerminateCluster()) {
        this.terminateCluster = new TerminateClusterRequest(other.terminateCluster);
      }
    }

    public terminateCluster_args deepCopy() {
      return new terminateCluster_args(this);
    }

    @Override
    public void clear() {
      this.terminateCluster = null;
    }

    public TerminateClusterRequest getTerminateCluster() {
      return this.terminateCluster;
    }

    public terminateCluster_args setTerminateCluster(TerminateClusterRequest terminateCluster) {
      this.terminateCluster = terminateCluster;
      return this;
    }

    public void unsetTerminateCluster() {
      this.terminateCluster = null;
    }

    /** Returns true if field terminateCluster is set (has been assigned a value) and false otherwise */
    public boolean isSetTerminateCluster() {
      return this.terminateCluster != null;
    }

    public void setTerminateClusterIsSet(boolean value) {
      if (!value) {
        this.terminateCluster = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case TERMINATE_CLUSTER:
        if (value == null) {
          unsetTerminateCluster();
        } else {
          setTerminateCluster((TerminateClusterRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case TERMINATE_CLUSTER:
        return getTerminateCluster();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case TERMINATE_CLUSTER:
        return isSetTerminateCluster();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof terminateCluster_args)
        return this.equals((terminateCluster_args)that);
      return false;
    }

    public boolean equals(terminateCluster_args that) {
      if (that == null)
        return false;

      boolean this_present_terminateCluster = true && this.isSetTerminateCluster();
      boolean that_present_terminateCluster = true && that.isSetTerminateCluster();
      if (this_present_terminateCluster || that_present_terminateCluster) {
        if (!(this_present_terminateCluster && that_present_terminateCluster))
          return false;
        if (!this.terminateCluster.equals(that.terminateCluster))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_terminateCluster = true && (isSetTerminateCluster());
      list.add(present_terminateCluster);
      if (present_terminateCluster)
        list.add(terminateCluster);

      return list.hashCode();
    }

    @Override
    public int compareTo(terminateCluster_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetTerminateCluster()).compareTo(other.isSetTerminateCluster());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTerminateCluster()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.terminateCluster, other.terminateCluster);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("terminateCluster_args(");
      boolean first = true;

      sb.append("terminateCluster:");
      if (this.terminateCluster == null) {
        sb.append("null");
      } else {
        sb.append(this.terminateCluster);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (terminateCluster != null) {
        terminateCluster.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class terminateCluster_argsStandardSchemeFactory implements SchemeFactory {
      public terminateCluster_argsStandardScheme getScheme() {
        return new terminateCluster_argsStandardScheme();
      }
    }

    private static class terminateCluster_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, terminateCluster_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // TERMINATE_CLUSTER
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.terminateCluster = new TerminateClusterRequest();
                struct.terminateCluster.read(iprot);
                struct.setTerminateClusterIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, terminateCluster_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.terminateCluster != null) {
          oprot.writeFieldBegin(TERMINATE_CLUSTER_FIELD_DESC);
          struct.terminateCluster.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class terminateCluster_argsTupleSchemeFactory implements SchemeFactory {
      public terminateCluster_argsTupleScheme getScheme() {
        return new terminateCluster_argsTupleScheme();
      }
    }

    private static class terminateCluster_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, terminateCluster_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetTerminateCluster()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetTerminateCluster()) {
          struct.terminateCluster.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, terminateCluster_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.terminateCluster = new TerminateClusterRequest();
          struct.terminateCluster.read(iprot);
          struct.setTerminateClusterIsSet(true);
        }
      }
    }

  }

  public static class terminateCluster_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("terminateCluster_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRING, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new terminateCluster_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new terminateCluster_resultTupleSchemeFactory());
    }

    public String success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(terminateCluster_result.class, metaDataMap);
    }

    public terminateCluster_result() {
    }

    public terminateCluster_result(
      String success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public terminateCluster_result(terminateCluster_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public terminateCluster_result deepCopy() {
      return new terminateCluster_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public String getSuccess() {
      return this.success;
    }

    public terminateCluster_result setSuccess(String success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public terminateCluster_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((String)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof terminateCluster_result)
        return this.equals((terminateCluster_result)that);
      return false;
    }

    public boolean equals(terminateCluster_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(terminateCluster_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("terminateCluster_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class terminateCluster_resultStandardSchemeFactory implements SchemeFactory {
      public terminateCluster_resultStandardScheme getScheme() {
        return new terminateCluster_resultStandardScheme();
      }
    }

    private static class terminateCluster_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, terminateCluster_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRING) {
                struct.success = iprot.readString();
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, terminateCluster_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeString(struct.success);
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class terminateCluster_resultTupleSchemeFactory implements SchemeFactory {
      public terminateCluster_resultTupleScheme getScheme() {
        return new terminateCluster_resultTupleScheme();
      }
    }

    private static class terminateCluster_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, terminateCluster_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          oprot.writeString(struct.success);
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, terminateCluster_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = iprot.readString();
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class modifyInstanceGroup_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("modifyInstanceGroup_args");

    private static final libthrift091.protocol.TField INSTANCE_GROUP_FIELD_DESC = new libthrift091.protocol.TField("instanceGroup", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new modifyInstanceGroup_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new modifyInstanceGroup_argsTupleSchemeFactory());
    }

    public ModifyInstanceGroupRequest instanceGroup; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      INSTANCE_GROUP((short)1, "instanceGroup");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // INSTANCE_GROUP
            return INSTANCE_GROUP;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.INSTANCE_GROUP, new libthrift091.meta_data.FieldMetaData("instanceGroup", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ModifyInstanceGroupRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(modifyInstanceGroup_args.class, metaDataMap);
    }

    public modifyInstanceGroup_args() {
    }

    public modifyInstanceGroup_args(
      ModifyInstanceGroupRequest instanceGroup)
    {
      this();
      this.instanceGroup = instanceGroup;
    }

    /**
     * Performs a deep copy on other.
     */
    public modifyInstanceGroup_args(modifyInstanceGroup_args other) {
      if (other.isSetInstanceGroup()) {
        this.instanceGroup = new ModifyInstanceGroupRequest(other.instanceGroup);
      }
    }

    public modifyInstanceGroup_args deepCopy() {
      return new modifyInstanceGroup_args(this);
    }

    @Override
    public void clear() {
      this.instanceGroup = null;
    }

    public ModifyInstanceGroupRequest getInstanceGroup() {
      return this.instanceGroup;
    }

    public modifyInstanceGroup_args setInstanceGroup(ModifyInstanceGroupRequest instanceGroup) {
      this.instanceGroup = instanceGroup;
      return this;
    }

    public void unsetInstanceGroup() {
      this.instanceGroup = null;
    }

    /** Returns true if field instanceGroup is set (has been assigned a value) and false otherwise */
    public boolean isSetInstanceGroup() {
      return this.instanceGroup != null;
    }

    public void setInstanceGroupIsSet(boolean value) {
      if (!value) {
        this.instanceGroup = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case INSTANCE_GROUP:
        if (value == null) {
          unsetInstanceGroup();
        } else {
          setInstanceGroup((ModifyInstanceGroupRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case INSTANCE_GROUP:
        return getInstanceGroup();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case INSTANCE_GROUP:
        return isSetInstanceGroup();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof modifyInstanceGroup_args)
        return this.equals((modifyInstanceGroup_args)that);
      return false;
    }

    public boolean equals(modifyInstanceGroup_args that) {
      if (that == null)
        return false;

      boolean this_present_instanceGroup = true && this.isSetInstanceGroup();
      boolean that_present_instanceGroup = true && that.isSetInstanceGroup();
      if (this_present_instanceGroup || that_present_instanceGroup) {
        if (!(this_present_instanceGroup && that_present_instanceGroup))
          return false;
        if (!this.instanceGroup.equals(that.instanceGroup))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_instanceGroup = true && (isSetInstanceGroup());
      list.add(present_instanceGroup);
      if (present_instanceGroup)
        list.add(instanceGroup);

      return list.hashCode();
    }

    @Override
    public int compareTo(modifyInstanceGroup_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetInstanceGroup()).compareTo(other.isSetInstanceGroup());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetInstanceGroup()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.instanceGroup, other.instanceGroup);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("modifyInstanceGroup_args(");
      boolean first = true;

      sb.append("instanceGroup:");
      if (this.instanceGroup == null) {
        sb.append("null");
      } else {
        sb.append(this.instanceGroup);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (instanceGroup != null) {
        instanceGroup.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class modifyInstanceGroup_argsStandardSchemeFactory implements SchemeFactory {
      public modifyInstanceGroup_argsStandardScheme getScheme() {
        return new modifyInstanceGroup_argsStandardScheme();
      }
    }

    private static class modifyInstanceGroup_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, modifyInstanceGroup_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // INSTANCE_GROUP
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.instanceGroup = new ModifyInstanceGroupRequest();
                struct.instanceGroup.read(iprot);
                struct.setInstanceGroupIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, modifyInstanceGroup_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.instanceGroup != null) {
          oprot.writeFieldBegin(INSTANCE_GROUP_FIELD_DESC);
          struct.instanceGroup.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class modifyInstanceGroup_argsTupleSchemeFactory implements SchemeFactory {
      public modifyInstanceGroup_argsTupleScheme getScheme() {
        return new modifyInstanceGroup_argsTupleScheme();
      }
    }

    private static class modifyInstanceGroup_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, modifyInstanceGroup_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetInstanceGroup()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetInstanceGroup()) {
          struct.instanceGroup.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, modifyInstanceGroup_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.instanceGroup = new ModifyInstanceGroupRequest();
          struct.instanceGroup.read(iprot);
          struct.setInstanceGroupIsSet(true);
        }
      }
    }

  }

  public static class modifyInstanceGroup_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("modifyInstanceGroup_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new modifyInstanceGroup_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new modifyInstanceGroup_resultTupleSchemeFactory());
    }

    public ModifyInstanceGroupResponse success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ModifyInstanceGroupResponse.class)));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(modifyInstanceGroup_result.class, metaDataMap);
    }

    public modifyInstanceGroup_result() {
    }

    public modifyInstanceGroup_result(
      ModifyInstanceGroupResponse success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public modifyInstanceGroup_result(modifyInstanceGroup_result other) {
      if (other.isSetSuccess()) {
        this.success = new ModifyInstanceGroupResponse(other.success);
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public modifyInstanceGroup_result deepCopy() {
      return new modifyInstanceGroup_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public ModifyInstanceGroupResponse getSuccess() {
      return this.success;
    }

    public modifyInstanceGroup_result setSuccess(ModifyInstanceGroupResponse 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public modifyInstanceGroup_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((ModifyInstanceGroupResponse)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof modifyInstanceGroup_result)
        return this.equals((modifyInstanceGroup_result)that);
      return false;
    }

    public boolean equals(modifyInstanceGroup_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(modifyInstanceGroup_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("modifyInstanceGroup_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class modifyInstanceGroup_resultStandardSchemeFactory implements SchemeFactory {
      public modifyInstanceGroup_resultStandardScheme getScheme() {
        return new modifyInstanceGroup_resultStandardScheme();
      }
    }

    private static class modifyInstanceGroup_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, modifyInstanceGroup_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new ModifyInstanceGroupResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, modifyInstanceGroup_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class modifyInstanceGroup_resultTupleSchemeFactory implements SchemeFactory {
      public modifyInstanceGroup_resultTupleScheme getScheme() {
        return new modifyInstanceGroup_resultTupleScheme();
      }
    }

    private static class modifyInstanceGroup_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, modifyInstanceGroup_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, modifyInstanceGroup_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new ModifyInstanceGroupResponse();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class describeCluster_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("describeCluster_args");

    private static final libthrift091.protocol.TField CLUSTER_ID_FIELD_DESC = new libthrift091.protocol.TField("clusterId", libthrift091.protocol.TType.STRING, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new describeCluster_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new describeCluster_argsTupleSchemeFactory());
    }

    public String clusterId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      CLUSTER_ID((short)1, "clusterId");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CLUSTER_ID
            return CLUSTER_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CLUSTER_ID, new libthrift091.meta_data.FieldMetaData("clusterId", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(describeCluster_args.class, metaDataMap);
    }

    public describeCluster_args() {
    }

    public describeCluster_args(
      String clusterId)
    {
      this();
      this.clusterId = clusterId;
    }

    /**
     * Performs a deep copy on other.
     */
    public describeCluster_args(describeCluster_args other) {
      if (other.isSetClusterId()) {
        this.clusterId = other.clusterId;
      }
    }

    public describeCluster_args deepCopy() {
      return new describeCluster_args(this);
    }

    @Override
    public void clear() {
      this.clusterId = null;
    }

    public String getClusterId() {
      return this.clusterId;
    }

    public describeCluster_args setClusterId(String clusterId) {
      this.clusterId = clusterId;
      return this;
    }

    public void unsetClusterId() {
      this.clusterId = null;
    }

    /** Returns true if field clusterId is set (has been assigned a value) and false otherwise */
    public boolean isSetClusterId() {
      return this.clusterId != null;
    }

    public void setClusterIdIsSet(boolean value) {
      if (!value) {
        this.clusterId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CLUSTER_ID:
        if (value == null) {
          unsetClusterId();
        } else {
          setClusterId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CLUSTER_ID:
        return getClusterId();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case CLUSTER_ID:
        return isSetClusterId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof describeCluster_args)
        return this.equals((describeCluster_args)that);
      return false;
    }

    public boolean equals(describeCluster_args that) {
      if (that == null)
        return false;

      boolean this_present_clusterId = true && this.isSetClusterId();
      boolean that_present_clusterId = true && that.isSetClusterId();
      if (this_present_clusterId || that_present_clusterId) {
        if (!(this_present_clusterId && that_present_clusterId))
          return false;
        if (!this.clusterId.equals(that.clusterId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_clusterId = true && (isSetClusterId());
      list.add(present_clusterId);
      if (present_clusterId)
        list.add(clusterId);

      return list.hashCode();
    }

    @Override
    public int compareTo(describeCluster_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetClusterId()).compareTo(other.isSetClusterId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetClusterId()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.clusterId, other.clusterId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("describeCluster_args(");
      boolean first = true;

      sb.append("clusterId:");
      if (this.clusterId == null) {
        sb.append("null");
      } else {
        sb.append(this.clusterId);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class describeCluster_argsStandardSchemeFactory implements SchemeFactory {
      public describeCluster_argsStandardScheme getScheme() {
        return new describeCluster_argsStandardScheme();
      }
    }

    private static class describeCluster_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, describeCluster_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // CLUSTER_ID
              if (schemeField.type == libthrift091.protocol.TType.STRING) {
                struct.clusterId = iprot.readString();
                struct.setClusterIdIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, describeCluster_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.clusterId != null) {
          oprot.writeFieldBegin(CLUSTER_ID_FIELD_DESC);
          oprot.writeString(struct.clusterId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class describeCluster_argsTupleSchemeFactory implements SchemeFactory {
      public describeCluster_argsTupleScheme getScheme() {
        return new describeCluster_argsTupleScheme();
      }
    }

    private static class describeCluster_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, describeCluster_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetClusterId()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetClusterId()) {
          oprot.writeString(struct.clusterId);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, describeCluster_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.clusterId = iprot.readString();
          struct.setClusterIdIsSet(true);
        }
      }
    }

  }

  public static class describeCluster_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("describeCluster_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new describeCluster_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new describeCluster_resultTupleSchemeFactory());
    }

    public ClusterDetail success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ClusterDetail.class)));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(describeCluster_result.class, metaDataMap);
    }

    public describeCluster_result() {
    }

    public describeCluster_result(
      ClusterDetail success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public describeCluster_result(describeCluster_result other) {
      if (other.isSetSuccess()) {
        this.success = new ClusterDetail(other.success);
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public describeCluster_result deepCopy() {
      return new describeCluster_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public ClusterDetail getSuccess() {
      return this.success;
    }

    public describeCluster_result setSuccess(ClusterDetail 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public describeCluster_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((ClusterDetail)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof describeCluster_result)
        return this.equals((describeCluster_result)that);
      return false;
    }

    public boolean equals(describeCluster_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(describeCluster_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("describeCluster_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class describeCluster_resultStandardSchemeFactory implements SchemeFactory {
      public describeCluster_resultStandardScheme getScheme() {
        return new describeCluster_resultStandardScheme();
      }
    }

    private static class describeCluster_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, describeCluster_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new ClusterDetail();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, describeCluster_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class describeCluster_resultTupleSchemeFactory implements SchemeFactory {
      public describeCluster_resultTupleScheme getScheme() {
        return new describeCluster_resultTupleScheme();
      }
    }

    private static class describeCluster_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, describeCluster_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, describeCluster_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new ClusterDetail();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class describeInstanceGroup_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("describeInstanceGroup_args");

    private static final libthrift091.protocol.TField INSTANCE_GROUP_ID_FIELD_DESC = new libthrift091.protocol.TField("instanceGroupId", libthrift091.protocol.TType.STRING, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new describeInstanceGroup_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new describeInstanceGroup_argsTupleSchemeFactory());
    }

    public String instanceGroupId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      INSTANCE_GROUP_ID((short)1, "instanceGroupId");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // INSTANCE_GROUP_ID
            return INSTANCE_GROUP_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.INSTANCE_GROUP_ID, new libthrift091.meta_data.FieldMetaData("instanceGroupId", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(describeInstanceGroup_args.class, metaDataMap);
    }

    public describeInstanceGroup_args() {
    }

    public describeInstanceGroup_args(
      String instanceGroupId)
    {
      this();
      this.instanceGroupId = instanceGroupId;
    }

    /**
     * Performs a deep copy on other.
     */
    public describeInstanceGroup_args(describeInstanceGroup_args other) {
      if (other.isSetInstanceGroupId()) {
        this.instanceGroupId = other.instanceGroupId;
      }
    }

    public describeInstanceGroup_args deepCopy() {
      return new describeInstanceGroup_args(this);
    }

    @Override
    public void clear() {
      this.instanceGroupId = null;
    }

    public String getInstanceGroupId() {
      return this.instanceGroupId;
    }

    public describeInstanceGroup_args setInstanceGroupId(String instanceGroupId) {
      this.instanceGroupId = instanceGroupId;
      return this;
    }

    public void unsetInstanceGroupId() {
      this.instanceGroupId = null;
    }

    /** Returns true if field instanceGroupId is set (has been assigned a value) and false otherwise */
    public boolean isSetInstanceGroupId() {
      return this.instanceGroupId != null;
    }

    public void setInstanceGroupIdIsSet(boolean value) {
      if (!value) {
        this.instanceGroupId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case INSTANCE_GROUP_ID:
        if (value == null) {
          unsetInstanceGroupId();
        } else {
          setInstanceGroupId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case INSTANCE_GROUP_ID:
        return getInstanceGroupId();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case INSTANCE_GROUP_ID:
        return isSetInstanceGroupId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof describeInstanceGroup_args)
        return this.equals((describeInstanceGroup_args)that);
      return false;
    }

    public boolean equals(describeInstanceGroup_args that) {
      if (that == null)
        return false;

      boolean this_present_instanceGroupId = true && this.isSetInstanceGroupId();
      boolean that_present_instanceGroupId = true && that.isSetInstanceGroupId();
      if (this_present_instanceGroupId || that_present_instanceGroupId) {
        if (!(this_present_instanceGroupId && that_present_instanceGroupId))
          return false;
        if (!this.instanceGroupId.equals(that.instanceGroupId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_instanceGroupId = true && (isSetInstanceGroupId());
      list.add(present_instanceGroupId);
      if (present_instanceGroupId)
        list.add(instanceGroupId);

      return list.hashCode();
    }

    @Override
    public int compareTo(describeInstanceGroup_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetInstanceGroupId()).compareTo(other.isSetInstanceGroupId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetInstanceGroupId()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.instanceGroupId, other.instanceGroupId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("describeInstanceGroup_args(");
      boolean first = true;

      sb.append("instanceGroupId:");
      if (this.instanceGroupId == null) {
        sb.append("null");
      } else {
        sb.append(this.instanceGroupId);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class describeInstanceGroup_argsStandardSchemeFactory implements SchemeFactory {
      public describeInstanceGroup_argsStandardScheme getScheme() {
        return new describeInstanceGroup_argsStandardScheme();
      }
    }

    private static class describeInstanceGroup_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, describeInstanceGroup_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // INSTANCE_GROUP_ID
              if (schemeField.type == libthrift091.protocol.TType.STRING) {
                struct.instanceGroupId = iprot.readString();
                struct.setInstanceGroupIdIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, describeInstanceGroup_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.instanceGroupId != null) {
          oprot.writeFieldBegin(INSTANCE_GROUP_ID_FIELD_DESC);
          oprot.writeString(struct.instanceGroupId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class describeInstanceGroup_argsTupleSchemeFactory implements SchemeFactory {
      public describeInstanceGroup_argsTupleScheme getScheme() {
        return new describeInstanceGroup_argsTupleScheme();
      }
    }

    private static class describeInstanceGroup_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, describeInstanceGroup_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetInstanceGroupId()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetInstanceGroupId()) {
          oprot.writeString(struct.instanceGroupId);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, describeInstanceGroup_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.instanceGroupId = iprot.readString();
          struct.setInstanceGroupIdIsSet(true);
        }
      }
    }

  }

  public static class describeInstanceGroup_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("describeInstanceGroup_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new describeInstanceGroup_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new describeInstanceGroup_resultTupleSchemeFactory());
    }

    public InstanceGroupDetail success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, InstanceGroupDetail.class)));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(describeInstanceGroup_result.class, metaDataMap);
    }

    public describeInstanceGroup_result() {
    }

    public describeInstanceGroup_result(
      InstanceGroupDetail success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public describeInstanceGroup_result(describeInstanceGroup_result other) {
      if (other.isSetSuccess()) {
        this.success = new InstanceGroupDetail(other.success);
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public describeInstanceGroup_result deepCopy() {
      return new describeInstanceGroup_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public InstanceGroupDetail getSuccess() {
      return this.success;
    }

    public describeInstanceGroup_result setSuccess(InstanceGroupDetail 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public describeInstanceGroup_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((InstanceGroupDetail)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof describeInstanceGroup_result)
        return this.equals((describeInstanceGroup_result)that);
      return false;
    }

    public boolean equals(describeInstanceGroup_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(describeInstanceGroup_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("describeInstanceGroup_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class describeInstanceGroup_resultStandardSchemeFactory implements SchemeFactory {
      public describeInstanceGroup_resultStandardScheme getScheme() {
        return new describeInstanceGroup_resultStandardScheme();
      }
    }

    private static class describeInstanceGroup_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, describeInstanceGroup_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new InstanceGroupDetail();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, describeInstanceGroup_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class describeInstanceGroup_resultTupleSchemeFactory implements SchemeFactory {
      public describeInstanceGroup_resultTupleScheme getScheme() {
        return new describeInstanceGroup_resultTupleScheme();
      }
    }

    private static class describeInstanceGroup_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, describeInstanceGroup_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, describeInstanceGroup_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new InstanceGroupDetail();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class describeInstance_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("describeInstance_args");

    private static final libthrift091.protocol.TField CLUSTER_ID_FIELD_DESC = new libthrift091.protocol.TField("clusterId", libthrift091.protocol.TType.STRING, (short)1);
    private static final libthrift091.protocol.TField INSTANCE_ID_FIELD_DESC = new libthrift091.protocol.TField("instanceId", libthrift091.protocol.TType.STRING, (short)2);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new describeInstance_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new describeInstance_argsTupleSchemeFactory());
    }

    public String clusterId; // required
    public String instanceId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      CLUSTER_ID((short)1, "clusterId"),
      INSTANCE_ID((short)2, "instanceId");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CLUSTER_ID
            return CLUSTER_ID;
          case 2: // INSTANCE_ID
            return INSTANCE_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CLUSTER_ID, new libthrift091.meta_data.FieldMetaData("clusterId", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
      tmpMap.put(_Fields.INSTANCE_ID, new libthrift091.meta_data.FieldMetaData("instanceId", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(describeInstance_args.class, metaDataMap);
    }

    public describeInstance_args() {
    }

    public describeInstance_args(
      String clusterId,
      String instanceId)
    {
      this();
      this.clusterId = clusterId;
      this.instanceId = instanceId;
    }

    /**
     * Performs a deep copy on other.
     */
    public describeInstance_args(describeInstance_args other) {
      if (other.isSetClusterId()) {
        this.clusterId = other.clusterId;
      }
      if (other.isSetInstanceId()) {
        this.instanceId = other.instanceId;
      }
    }

    public describeInstance_args deepCopy() {
      return new describeInstance_args(this);
    }

    @Override
    public void clear() {
      this.clusterId = null;
      this.instanceId = null;
    }

    public String getClusterId() {
      return this.clusterId;
    }

    public describeInstance_args setClusterId(String clusterId) {
      this.clusterId = clusterId;
      return this;
    }

    public void unsetClusterId() {
      this.clusterId = null;
    }

    /** Returns true if field clusterId is set (has been assigned a value) and false otherwise */
    public boolean isSetClusterId() {
      return this.clusterId != null;
    }

    public void setClusterIdIsSet(boolean value) {
      if (!value) {
        this.clusterId = null;
      }
    }

    public String getInstanceId() {
      return this.instanceId;
    }

    public describeInstance_args setInstanceId(String instanceId) {
      this.instanceId = instanceId;
      return this;
    }

    public void unsetInstanceId() {
      this.instanceId = null;
    }

    /** Returns true if field instanceId is set (has been assigned a value) and false otherwise */
    public boolean isSetInstanceId() {
      return this.instanceId != null;
    }

    public void setInstanceIdIsSet(boolean value) {
      if (!value) {
        this.instanceId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CLUSTER_ID:
        if (value == null) {
          unsetClusterId();
        } else {
          setClusterId((String)value);
        }
        break;

      case INSTANCE_ID:
        if (value == null) {
          unsetInstanceId();
        } else {
          setInstanceId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CLUSTER_ID:
        return getClusterId();

      case INSTANCE_ID:
        return getInstanceId();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case CLUSTER_ID:
        return isSetClusterId();
      case INSTANCE_ID:
        return isSetInstanceId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof describeInstance_args)
        return this.equals((describeInstance_args)that);
      return false;
    }

    public boolean equals(describeInstance_args that) {
      if (that == null)
        return false;

      boolean this_present_clusterId = true && this.isSetClusterId();
      boolean that_present_clusterId = true && that.isSetClusterId();
      if (this_present_clusterId || that_present_clusterId) {
        if (!(this_present_clusterId && that_present_clusterId))
          return false;
        if (!this.clusterId.equals(that.clusterId))
          return false;
      }

      boolean this_present_instanceId = true && this.isSetInstanceId();
      boolean that_present_instanceId = true && that.isSetInstanceId();
      if (this_present_instanceId || that_present_instanceId) {
        if (!(this_present_instanceId && that_present_instanceId))
          return false;
        if (!this.instanceId.equals(that.instanceId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_clusterId = true && (isSetClusterId());
      list.add(present_clusterId);
      if (present_clusterId)
        list.add(clusterId);

      boolean present_instanceId = true && (isSetInstanceId());
      list.add(present_instanceId);
      if (present_instanceId)
        list.add(instanceId);

      return list.hashCode();
    }

    @Override
    public int compareTo(describeInstance_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetClusterId()).compareTo(other.isSetClusterId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetClusterId()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.clusterId, other.clusterId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetInstanceId()).compareTo(other.isSetInstanceId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetInstanceId()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.instanceId, other.instanceId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("describeInstance_args(");
      boolean first = true;

      sb.append("clusterId:");
      if (this.clusterId == null) {
        sb.append("null");
      } else {
        sb.append(this.clusterId);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("instanceId:");
      if (this.instanceId == null) {
        sb.append("null");
      } else {
        sb.append(this.instanceId);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class describeInstance_argsStandardSchemeFactory implements SchemeFactory {
      public describeInstance_argsStandardScheme getScheme() {
        return new describeInstance_argsStandardScheme();
      }
    }

    private static class describeInstance_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, describeInstance_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // CLUSTER_ID
              if (schemeField.type == libthrift091.protocol.TType.STRING) {
                struct.clusterId = iprot.readString();
                struct.setClusterIdIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // INSTANCE_ID
              if (schemeField.type == libthrift091.protocol.TType.STRING) {
                struct.instanceId = iprot.readString();
                struct.setInstanceIdIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, describeInstance_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.clusterId != null) {
          oprot.writeFieldBegin(CLUSTER_ID_FIELD_DESC);
          oprot.writeString(struct.clusterId);
          oprot.writeFieldEnd();
        }
        if (struct.instanceId != null) {
          oprot.writeFieldBegin(INSTANCE_ID_FIELD_DESC);
          oprot.writeString(struct.instanceId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class describeInstance_argsTupleSchemeFactory implements SchemeFactory {
      public describeInstance_argsTupleScheme getScheme() {
        return new describeInstance_argsTupleScheme();
      }
    }

    private static class describeInstance_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, describeInstance_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetClusterId()) {
          optionals.set(0);
        }
        if (struct.isSetInstanceId()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetClusterId()) {
          oprot.writeString(struct.clusterId);
        }
        if (struct.isSetInstanceId()) {
          oprot.writeString(struct.instanceId);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, describeInstance_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.clusterId = iprot.readString();
          struct.setClusterIdIsSet(true);
        }
        if (incoming.get(1)) {
          struct.instanceId = iprot.readString();
          struct.setInstanceIdIsSet(true);
        }
      }
    }

  }

  public static class describeInstance_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("describeInstance_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new describeInstance_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new describeInstance_resultTupleSchemeFactory());
    }

    public InstanceDetail success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, InstanceDetail.class)));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(describeInstance_result.class, metaDataMap);
    }

    public describeInstance_result() {
    }

    public describeInstance_result(
      InstanceDetail success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public describeInstance_result(describeInstance_result other) {
      if (other.isSetSuccess()) {
        this.success = new InstanceDetail(other.success);
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public describeInstance_result deepCopy() {
      return new describeInstance_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public InstanceDetail getSuccess() {
      return this.success;
    }

    public describeInstance_result setSuccess(InstanceDetail 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public describeInstance_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((InstanceDetail)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof describeInstance_result)
        return this.equals((describeInstance_result)that);
      return false;
    }

    public boolean equals(describeInstance_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(describeInstance_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("describeInstance_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class describeInstance_resultStandardSchemeFactory implements SchemeFactory {
      public describeInstance_resultStandardScheme getScheme() {
        return new describeInstance_resultStandardScheme();
      }
    }

    private static class describeInstance_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, describeInstance_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new InstanceDetail();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, describeInstance_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class describeInstance_resultTupleSchemeFactory implements SchemeFactory {
      public describeInstance_resultTupleScheme getScheme() {
        return new describeInstance_resultTupleScheme();
      }
    }

    private static class describeInstance_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, describeInstance_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, describeInstance_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new InstanceDetail();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class describeJob_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("describeJob_args");

    private static final libthrift091.protocol.TField CLUSTER_ID_FIELD_DESC = new libthrift091.protocol.TField("clusterId", libthrift091.protocol.TType.STRING, (short)1);
    private static final libthrift091.protocol.TField JOB_ID_FIELD_DESC = new libthrift091.protocol.TField("jobId", libthrift091.protocol.TType.STRING, (short)2);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new describeJob_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new describeJob_argsTupleSchemeFactory());
    }

    public String clusterId; // required
    public String jobId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      CLUSTER_ID((short)1, "clusterId"),
      JOB_ID((short)2, "jobId");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CLUSTER_ID
            return CLUSTER_ID;
          case 2: // JOB_ID
            return JOB_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CLUSTER_ID, new libthrift091.meta_data.FieldMetaData("clusterId", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
      tmpMap.put(_Fields.JOB_ID, new libthrift091.meta_data.FieldMetaData("jobId", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(describeJob_args.class, metaDataMap);
    }

    public describeJob_args() {
    }

    public describeJob_args(
      String clusterId,
      String jobId)
    {
      this();
      this.clusterId = clusterId;
      this.jobId = jobId;
    }

    /**
     * Performs a deep copy on other.
     */
    public describeJob_args(describeJob_args other) {
      if (other.isSetClusterId()) {
        this.clusterId = other.clusterId;
      }
      if (other.isSetJobId()) {
        this.jobId = other.jobId;
      }
    }

    public describeJob_args deepCopy() {
      return new describeJob_args(this);
    }

    @Override
    public void clear() {
      this.clusterId = null;
      this.jobId = null;
    }

    public String getClusterId() {
      return this.clusterId;
    }

    public describeJob_args setClusterId(String clusterId) {
      this.clusterId = clusterId;
      return this;
    }

    public void unsetClusterId() {
      this.clusterId = null;
    }

    /** Returns true if field clusterId is set (has been assigned a value) and false otherwise */
    public boolean isSetClusterId() {
      return this.clusterId != null;
    }

    public void setClusterIdIsSet(boolean value) {
      if (!value) {
        this.clusterId = null;
      }
    }

    public String getJobId() {
      return this.jobId;
    }

    public describeJob_args setJobId(String jobId) {
      this.jobId = jobId;
      return this;
    }

    public void unsetJobId() {
      this.jobId = null;
    }

    /** Returns true if field jobId is set (has been assigned a value) and false otherwise */
    public boolean isSetJobId() {
      return this.jobId != null;
    }

    public void setJobIdIsSet(boolean value) {
      if (!value) {
        this.jobId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CLUSTER_ID:
        if (value == null) {
          unsetClusterId();
        } else {
          setClusterId((String)value);
        }
        break;

      case JOB_ID:
        if (value == null) {
          unsetJobId();
        } else {
          setJobId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CLUSTER_ID:
        return getClusterId();

      case JOB_ID:
        return getJobId();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case CLUSTER_ID:
        return isSetClusterId();
      case JOB_ID:
        return isSetJobId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof describeJob_args)
        return this.equals((describeJob_args)that);
      return false;
    }

    public boolean equals(describeJob_args that) {
      if (that == null)
        return false;

      boolean this_present_clusterId = true && this.isSetClusterId();
      boolean that_present_clusterId = true && that.isSetClusterId();
      if (this_present_clusterId || that_present_clusterId) {
        if (!(this_present_clusterId && that_present_clusterId))
          return false;
        if (!this.clusterId.equals(that.clusterId))
          return false;
      }

      boolean this_present_jobId = true && this.isSetJobId();
      boolean that_present_jobId = true && that.isSetJobId();
      if (this_present_jobId || that_present_jobId) {
        if (!(this_present_jobId && that_present_jobId))
          return false;
        if (!this.jobId.equals(that.jobId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_clusterId = true && (isSetClusterId());
      list.add(present_clusterId);
      if (present_clusterId)
        list.add(clusterId);

      boolean present_jobId = true && (isSetJobId());
      list.add(present_jobId);
      if (present_jobId)
        list.add(jobId);

      return list.hashCode();
    }

    @Override
    public int compareTo(describeJob_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetClusterId()).compareTo(other.isSetClusterId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetClusterId()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.clusterId, other.clusterId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetJobId()).compareTo(other.isSetJobId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetJobId()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.jobId, other.jobId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("describeJob_args(");
      boolean first = true;

      sb.append("clusterId:");
      if (this.clusterId == null) {
        sb.append("null");
      } else {
        sb.append(this.clusterId);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("jobId:");
      if (this.jobId == null) {
        sb.append("null");
      } else {
        sb.append(this.jobId);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class describeJob_argsStandardSchemeFactory implements SchemeFactory {
      public describeJob_argsStandardScheme getScheme() {
        return new describeJob_argsStandardScheme();
      }
    }

    private static class describeJob_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, describeJob_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // CLUSTER_ID
              if (schemeField.type == libthrift091.protocol.TType.STRING) {
                struct.clusterId = iprot.readString();
                struct.setClusterIdIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // JOB_ID
              if (schemeField.type == libthrift091.protocol.TType.STRING) {
                struct.jobId = iprot.readString();
                struct.setJobIdIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, describeJob_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.clusterId != null) {
          oprot.writeFieldBegin(CLUSTER_ID_FIELD_DESC);
          oprot.writeString(struct.clusterId);
          oprot.writeFieldEnd();
        }
        if (struct.jobId != null) {
          oprot.writeFieldBegin(JOB_ID_FIELD_DESC);
          oprot.writeString(struct.jobId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class describeJob_argsTupleSchemeFactory implements SchemeFactory {
      public describeJob_argsTupleScheme getScheme() {
        return new describeJob_argsTupleScheme();
      }
    }

    private static class describeJob_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, describeJob_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetClusterId()) {
          optionals.set(0);
        }
        if (struct.isSetJobId()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetClusterId()) {
          oprot.writeString(struct.clusterId);
        }
        if (struct.isSetJobId()) {
          oprot.writeString(struct.jobId);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, describeJob_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.clusterId = iprot.readString();
          struct.setClusterIdIsSet(true);
        }
        if (incoming.get(1)) {
          struct.jobId = iprot.readString();
          struct.setJobIdIsSet(true);
        }
      }
    }

  }

  public static class describeJob_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("describeJob_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new describeJob_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new describeJob_resultTupleSchemeFactory());
    }

    public JobDetail success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, JobDetail.class)));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(describeJob_result.class, metaDataMap);
    }

    public describeJob_result() {
    }

    public describeJob_result(
      JobDetail success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public describeJob_result(describeJob_result other) {
      if (other.isSetSuccess()) {
        this.success = new JobDetail(other.success);
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public describeJob_result deepCopy() {
      return new describeJob_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public JobDetail getSuccess() {
      return this.success;
    }

    public describeJob_result setSuccess(JobDetail 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public describeJob_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((JobDetail)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof describeJob_result)
        return this.equals((describeJob_result)that);
      return false;
    }

    public boolean equals(describeJob_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(describeJob_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("describeJob_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class describeJob_resultStandardSchemeFactory implements SchemeFactory {
      public describeJob_resultStandardScheme getScheme() {
        return new describeJob_resultStandardScheme();
      }
    }

    private static class describeJob_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, describeJob_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new JobDetail();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, describeJob_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class describeJob_resultTupleSchemeFactory implements SchemeFactory {
      public describeJob_resultTupleScheme getScheme() {
        return new describeJob_resultTupleScheme();
      }
    }

    private static class describeJob_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, describeJob_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, describeJob_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new JobDetail();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class listClusters_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listClusters_args");

    private static final libthrift091.protocol.TField CREATED_AFTER_FIELD_DESC = new libthrift091.protocol.TField("createdAfter", libthrift091.protocol.TType.I32, (short)1);
    private static final libthrift091.protocol.TField CREATED_BEFORE_FIELD_DESC = new libthrift091.protocol.TField("createdBefore", libthrift091.protocol.TType.I32, (short)2);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new listClusters_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new listClusters_argsTupleSchemeFactory());
    }

    public int createdAfter; // required
    public int createdBefore; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      CREATED_AFTER((short)1, "createdAfter"),
      CREATED_BEFORE((short)2, "createdBefore");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CREATED_AFTER
            return CREATED_AFTER;
          case 2: // CREATED_BEFORE
            return CREATED_BEFORE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __CREATEDAFTER_ISSET_ID = 0;
    private static final int __CREATEDBEFORE_ISSET_ID = 1;
    private byte __isset_bitfield = 0;
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CREATED_AFTER, new libthrift091.meta_data.FieldMetaData("createdAfter", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I32)));
      tmpMap.put(_Fields.CREATED_BEFORE, new libthrift091.meta_data.FieldMetaData("createdBefore", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I32)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listClusters_args.class, metaDataMap);
    }

    public listClusters_args() {
    }

    public listClusters_args(
      int createdAfter,
      int createdBefore)
    {
      this();
      this.createdAfter = createdAfter;
      setCreatedAfterIsSet(true);
      this.createdBefore = createdBefore;
      setCreatedBeforeIsSet(true);
    }

    /**
     * Performs a deep copy on other.
     */
    public listClusters_args(listClusters_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.createdAfter = other.createdAfter;
      this.createdBefore = other.createdBefore;
    }

    public listClusters_args deepCopy() {
      return new listClusters_args(this);
    }

    @Override
    public void clear() {
      setCreatedAfterIsSet(false);
      this.createdAfter = 0;
      setCreatedBeforeIsSet(false);
      this.createdBefore = 0;
    }

    public int getCreatedAfter() {
      return this.createdAfter;
    }

    public listClusters_args setCreatedAfter(int createdAfter) {
      this.createdAfter = createdAfter;
      setCreatedAfterIsSet(true);
      return this;
    }

    public void unsetCreatedAfter() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDAFTER_ISSET_ID);
    }

    /** Returns true if field createdAfter is set (has been assigned a value) and false otherwise */
    public boolean isSetCreatedAfter() {
      return EncodingUtils.testBit(__isset_bitfield, __CREATEDAFTER_ISSET_ID);
    }

    public void setCreatedAfterIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDAFTER_ISSET_ID, value);
    }

    public int getCreatedBefore() {
      return this.createdBefore;
    }

    public listClusters_args setCreatedBefore(int createdBefore) {
      this.createdBefore = createdBefore;
      setCreatedBeforeIsSet(true);
      return this;
    }

    public void unsetCreatedBefore() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDBEFORE_ISSET_ID);
    }

    /** Returns true if field createdBefore is set (has been assigned a value) and false otherwise */
    public boolean isSetCreatedBefore() {
      return EncodingUtils.testBit(__isset_bitfield, __CREATEDBEFORE_ISSET_ID);
    }

    public void setCreatedBeforeIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDBEFORE_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CREATED_AFTER:
        if (value == null) {
          unsetCreatedAfter();
        } else {
          setCreatedAfter((Integer)value);
        }
        break;

      case CREATED_BEFORE:
        if (value == null) {
          unsetCreatedBefore();
        } else {
          setCreatedBefore((Integer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CREATED_AFTER:
        return Integer.valueOf(getCreatedAfter());

      case CREATED_BEFORE:
        return Integer.valueOf(getCreatedBefore());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case CREATED_AFTER:
        return isSetCreatedAfter();
      case CREATED_BEFORE:
        return isSetCreatedBefore();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof listClusters_args)
        return this.equals((listClusters_args)that);
      return false;
    }

    public boolean equals(listClusters_args that) {
      if (that == null)
        return false;

      boolean this_present_createdAfter = true;
      boolean that_present_createdAfter = true;
      if (this_present_createdAfter || that_present_createdAfter) {
        if (!(this_present_createdAfter && that_present_createdAfter))
          return false;
        if (this.createdAfter != that.createdAfter)
          return false;
      }

      boolean this_present_createdBefore = true;
      boolean that_present_createdBefore = true;
      if (this_present_createdBefore || that_present_createdBefore) {
        if (!(this_present_createdBefore && that_present_createdBefore))
          return false;
        if (this.createdBefore != that.createdBefore)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_createdAfter = true;
      list.add(present_createdAfter);
      if (present_createdAfter)
        list.add(createdAfter);

      boolean present_createdBefore = true;
      list.add(present_createdBefore);
      if (present_createdBefore)
        list.add(createdBefore);

      return list.hashCode();
    }

    @Override
    public int compareTo(listClusters_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetCreatedAfter()).compareTo(other.isSetCreatedAfter());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCreatedAfter()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.createdAfter, other.createdAfter);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCreatedBefore()).compareTo(other.isSetCreatedBefore());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCreatedBefore()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.createdBefore, other.createdBefore);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("listClusters_args(");
      boolean first = true;

      sb.append("createdAfter:");
      sb.append(this.createdAfter);
      first = false;
      if (!first) sb.append(", ");
      sb.append("createdBefore:");
      sb.append(this.createdBefore);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bitfield = 0;
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class listClusters_argsStandardSchemeFactory implements SchemeFactory {
      public listClusters_argsStandardScheme getScheme() {
        return new listClusters_argsStandardScheme();
      }
    }

    private static class listClusters_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listClusters_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // CREATED_AFTER
              if (schemeField.type == libthrift091.protocol.TType.I32) {
                struct.createdAfter = iprot.readI32();
                struct.setCreatedAfterIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // CREATED_BEFORE
              if (schemeField.type == libthrift091.protocol.TType.I32) {
                struct.createdBefore = iprot.readI32();
                struct.setCreatedBeforeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, listClusters_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(CREATED_AFTER_FIELD_DESC);
        oprot.writeI32(struct.createdAfter);
        oprot.writeFieldEnd();
        oprot.writeFieldBegin(CREATED_BEFORE_FIELD_DESC);
        oprot.writeI32(struct.createdBefore);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listClusters_argsTupleSchemeFactory implements SchemeFactory {
      public listClusters_argsTupleScheme getScheme() {
        return new listClusters_argsTupleScheme();
      }
    }

    private static class listClusters_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, listClusters_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetCreatedAfter()) {
          optionals.set(0);
        }
        if (struct.isSetCreatedBefore()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetCreatedAfter()) {
          oprot.writeI32(struct.createdAfter);
        }
        if (struct.isSetCreatedBefore()) {
          oprot.writeI32(struct.createdBefore);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, listClusters_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.createdAfter = iprot.readI32();
          struct.setCreatedAfterIsSet(true);
        }
        if (incoming.get(1)) {
          struct.createdBefore = iprot.readI32();
          struct.setCreatedBeforeIsSet(true);
        }
      }
    }

  }

  public static class listClusters_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listClusters_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.LIST, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new listClusters_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new listClusters_resultTupleSchemeFactory());
    }

    public List success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST, 
              new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ClusterDetail.class))));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listClusters_result.class, metaDataMap);
    }

    public listClusters_result() {
    }

    public listClusters_result(
      List success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public listClusters_result(listClusters_result other) {
      if (other.isSetSuccess()) {
        List __this__success = new ArrayList(other.success.size());
        for (ClusterDetail other_element : other.success) {
          __this__success.add(new ClusterDetail(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public listClusters_result deepCopy() {
      return new listClusters_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(ClusterDetail elem) {
      if (this.success == null) {
        this.success = new ArrayList();
      }
      this.success.add(elem);
    }

    public List getSuccess() {
      return this.success;
    }

    public listClusters_result setSuccess(List 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public listClusters_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof listClusters_result)
        return this.equals((listClusters_result)that);
      return false;
    }

    public boolean equals(listClusters_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(listClusters_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("listClusters_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class listClusters_resultStandardSchemeFactory implements SchemeFactory {
      public listClusters_resultStandardScheme getScheme() {
        return new listClusters_resultStandardScheme();
      }
    }

    private static class listClusters_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listClusters_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.LIST) {
                {
                  libthrift091.protocol.TList _list260 = iprot.readListBegin();
                  struct.success = new ArrayList(_list260.size);
                  ClusterDetail _elem261;
                  for (int _i262 = 0; _i262 < _list260.size; ++_i262)
                  {
                    _elem261 = new ClusterDetail();
                    _elem261.read(iprot);
                    struct.success.add(_elem261);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, listClusters_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.success.size()));
            for (ClusterDetail _iter263 : struct.success)
            {
              _iter263.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listClusters_resultTupleSchemeFactory implements SchemeFactory {
      public listClusters_resultTupleScheme getScheme() {
        return new listClusters_resultTupleScheme();
      }
    }

    private static class listClusters_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, listClusters_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (ClusterDetail _iter264 : struct.success)
            {
              _iter264.write(oprot);
            }
          }
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, listClusters_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          {
            libthrift091.protocol.TList _list265 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList(_list265.size);
            ClusterDetail _elem266;
            for (int _i267 = 0; _i267 < _list265.size; ++_i267)
            {
              _elem266 = new ClusterDetail();
              _elem266.read(iprot);
              struct.success.add(_elem266);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class listClustersWithPrefix_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listClustersWithPrefix_args");

    private static final libthrift091.protocol.TField PREFIX_FIELD_DESC = new libthrift091.protocol.TField("prefix", libthrift091.protocol.TType.STRING, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new listClustersWithPrefix_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new listClustersWithPrefix_argsTupleSchemeFactory());
    }

    public String prefix; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      PREFIX((short)1, "prefix");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // PREFIX
            return PREFIX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.PREFIX, new libthrift091.meta_data.FieldMetaData("prefix", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listClustersWithPrefix_args.class, metaDataMap);
    }

    public listClustersWithPrefix_args() {
    }

    public listClustersWithPrefix_args(
      String prefix)
    {
      this();
      this.prefix = prefix;
    }

    /**
     * Performs a deep copy on other.
     */
    public listClustersWithPrefix_args(listClustersWithPrefix_args other) {
      if (other.isSetPrefix()) {
        this.prefix = other.prefix;
      }
    }

    public listClustersWithPrefix_args deepCopy() {
      return new listClustersWithPrefix_args(this);
    }

    @Override
    public void clear() {
      this.prefix = null;
    }

    public String getPrefix() {
      return this.prefix;
    }

    public listClustersWithPrefix_args setPrefix(String prefix) {
      this.prefix = prefix;
      return this;
    }

    public void unsetPrefix() {
      this.prefix = null;
    }

    /** Returns true if field prefix is set (has been assigned a value) and false otherwise */
    public boolean isSetPrefix() {
      return this.prefix != null;
    }

    public void setPrefixIsSet(boolean value) {
      if (!value) {
        this.prefix = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PREFIX:
        if (value == null) {
          unsetPrefix();
        } else {
          setPrefix((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case PREFIX:
        return getPrefix();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case PREFIX:
        return isSetPrefix();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof listClustersWithPrefix_args)
        return this.equals((listClustersWithPrefix_args)that);
      return false;
    }

    public boolean equals(listClustersWithPrefix_args that) {
      if (that == null)
        return false;

      boolean this_present_prefix = true && this.isSetPrefix();
      boolean that_present_prefix = true && that.isSetPrefix();
      if (this_present_prefix || that_present_prefix) {
        if (!(this_present_prefix && that_present_prefix))
          return false;
        if (!this.prefix.equals(that.prefix))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_prefix = true && (isSetPrefix());
      list.add(present_prefix);
      if (present_prefix)
        list.add(prefix);

      return list.hashCode();
    }

    @Override
    public int compareTo(listClustersWithPrefix_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetPrefix()).compareTo(other.isSetPrefix());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPrefix()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.prefix, other.prefix);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("listClustersWithPrefix_args(");
      boolean first = true;

      sb.append("prefix:");
      if (this.prefix == null) {
        sb.append("null");
      } else {
        sb.append(this.prefix);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class listClustersWithPrefix_argsStandardSchemeFactory implements SchemeFactory {
      public listClustersWithPrefix_argsStandardScheme getScheme() {
        return new listClustersWithPrefix_argsStandardScheme();
      }
    }

    private static class listClustersWithPrefix_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listClustersWithPrefix_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // PREFIX
              if (schemeField.type == libthrift091.protocol.TType.STRING) {
                struct.prefix = iprot.readString();
                struct.setPrefixIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, listClustersWithPrefix_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.prefix != null) {
          oprot.writeFieldBegin(PREFIX_FIELD_DESC);
          oprot.writeString(struct.prefix);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listClustersWithPrefix_argsTupleSchemeFactory implements SchemeFactory {
      public listClustersWithPrefix_argsTupleScheme getScheme() {
        return new listClustersWithPrefix_argsTupleScheme();
      }
    }

    private static class listClustersWithPrefix_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, listClustersWithPrefix_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetPrefix()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetPrefix()) {
          oprot.writeString(struct.prefix);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, listClustersWithPrefix_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.prefix = iprot.readString();
          struct.setPrefixIsSet(true);
        }
      }
    }

  }

  public static class listClustersWithPrefix_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listClustersWithPrefix_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.LIST, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new listClustersWithPrefix_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new listClustersWithPrefix_resultTupleSchemeFactory());
    }

    public List success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST, 
              new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ClusterDetail.class))));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listClustersWithPrefix_result.class, metaDataMap);
    }

    public listClustersWithPrefix_result() {
    }

    public listClustersWithPrefix_result(
      List success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public listClustersWithPrefix_result(listClustersWithPrefix_result other) {
      if (other.isSetSuccess()) {
        List __this__success = new ArrayList(other.success.size());
        for (ClusterDetail other_element : other.success) {
          __this__success.add(new ClusterDetail(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public listClustersWithPrefix_result deepCopy() {
      return new listClustersWithPrefix_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(ClusterDetail elem) {
      if (this.success == null) {
        this.success = new ArrayList();
      }
      this.success.add(elem);
    }

    public List getSuccess() {
      return this.success;
    }

    public listClustersWithPrefix_result setSuccess(List 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public listClustersWithPrefix_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof listClustersWithPrefix_result)
        return this.equals((listClustersWithPrefix_result)that);
      return false;
    }

    public boolean equals(listClustersWithPrefix_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(listClustersWithPrefix_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("listClustersWithPrefix_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class listClustersWithPrefix_resultStandardSchemeFactory implements SchemeFactory {
      public listClustersWithPrefix_resultStandardScheme getScheme() {
        return new listClustersWithPrefix_resultStandardScheme();
      }
    }

    private static class listClustersWithPrefix_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listClustersWithPrefix_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.LIST) {
                {
                  libthrift091.protocol.TList _list268 = iprot.readListBegin();
                  struct.success = new ArrayList(_list268.size);
                  ClusterDetail _elem269;
                  for (int _i270 = 0; _i270 < _list268.size; ++_i270)
                  {
                    _elem269 = new ClusterDetail();
                    _elem269.read(iprot);
                    struct.success.add(_elem269);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, listClustersWithPrefix_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.success.size()));
            for (ClusterDetail _iter271 : struct.success)
            {
              _iter271.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listClustersWithPrefix_resultTupleSchemeFactory implements SchemeFactory {
      public listClustersWithPrefix_resultTupleScheme getScheme() {
        return new listClustersWithPrefix_resultTupleScheme();
      }
    }

    private static class listClustersWithPrefix_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, listClustersWithPrefix_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (ClusterDetail _iter272 : struct.success)
            {
              _iter272.write(oprot);
            }
          }
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, listClustersWithPrefix_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          {
            libthrift091.protocol.TList _list273 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList(_list273.size);
            ClusterDetail _elem274;
            for (int _i275 = 0; _i275 < _list273.size; ++_i275)
            {
              _elem274 = new ClusterDetail();
              _elem274.read(iprot);
              struct.success.add(_elem274);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class listInstanceGroups_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listInstanceGroups_args");

    private static final libthrift091.protocol.TField CLUSTER_ID_FIELD_DESC = new libthrift091.protocol.TField("clusterId", libthrift091.protocol.TType.STRING, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new listInstanceGroups_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new listInstanceGroups_argsTupleSchemeFactory());
    }

    public String clusterId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      CLUSTER_ID((short)1, "clusterId");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CLUSTER_ID
            return CLUSTER_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CLUSTER_ID, new libthrift091.meta_data.FieldMetaData("clusterId", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listInstanceGroups_args.class, metaDataMap);
    }

    public listInstanceGroups_args() {
    }

    public listInstanceGroups_args(
      String clusterId)
    {
      this();
      this.clusterId = clusterId;
    }

    /**
     * Performs a deep copy on other.
     */
    public listInstanceGroups_args(listInstanceGroups_args other) {
      if (other.isSetClusterId()) {
        this.clusterId = other.clusterId;
      }
    }

    public listInstanceGroups_args deepCopy() {
      return new listInstanceGroups_args(this);
    }

    @Override
    public void clear() {
      this.clusterId = null;
    }

    public String getClusterId() {
      return this.clusterId;
    }

    public listInstanceGroups_args setClusterId(String clusterId) {
      this.clusterId = clusterId;
      return this;
    }

    public void unsetClusterId() {
      this.clusterId = null;
    }

    /** Returns true if field clusterId is set (has been assigned a value) and false otherwise */
    public boolean isSetClusterId() {
      return this.clusterId != null;
    }

    public void setClusterIdIsSet(boolean value) {
      if (!value) {
        this.clusterId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CLUSTER_ID:
        if (value == null) {
          unsetClusterId();
        } else {
          setClusterId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CLUSTER_ID:
        return getClusterId();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case CLUSTER_ID:
        return isSetClusterId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof listInstanceGroups_args)
        return this.equals((listInstanceGroups_args)that);
      return false;
    }

    public boolean equals(listInstanceGroups_args that) {
      if (that == null)
        return false;

      boolean this_present_clusterId = true && this.isSetClusterId();
      boolean that_present_clusterId = true && that.isSetClusterId();
      if (this_present_clusterId || that_present_clusterId) {
        if (!(this_present_clusterId && that_present_clusterId))
          return false;
        if (!this.clusterId.equals(that.clusterId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_clusterId = true && (isSetClusterId());
      list.add(present_clusterId);
      if (present_clusterId)
        list.add(clusterId);

      return list.hashCode();
    }

    @Override
    public int compareTo(listInstanceGroups_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetClusterId()).compareTo(other.isSetClusterId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetClusterId()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.clusterId, other.clusterId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("listInstanceGroups_args(");
      boolean first = true;

      sb.append("clusterId:");
      if (this.clusterId == null) {
        sb.append("null");
      } else {
        sb.append(this.clusterId);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class listInstanceGroups_argsStandardSchemeFactory implements SchemeFactory {
      public listInstanceGroups_argsStandardScheme getScheme() {
        return new listInstanceGroups_argsStandardScheme();
      }
    }

    private static class listInstanceGroups_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listInstanceGroups_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // CLUSTER_ID
              if (schemeField.type == libthrift091.protocol.TType.STRING) {
                struct.clusterId = iprot.readString();
                struct.setClusterIdIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, listInstanceGroups_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.clusterId != null) {
          oprot.writeFieldBegin(CLUSTER_ID_FIELD_DESC);
          oprot.writeString(struct.clusterId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listInstanceGroups_argsTupleSchemeFactory implements SchemeFactory {
      public listInstanceGroups_argsTupleScheme getScheme() {
        return new listInstanceGroups_argsTupleScheme();
      }
    }

    private static class listInstanceGroups_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, listInstanceGroups_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetClusterId()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetClusterId()) {
          oprot.writeString(struct.clusterId);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, listInstanceGroups_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.clusterId = iprot.readString();
          struct.setClusterIdIsSet(true);
        }
      }
    }

  }

  public static class listInstanceGroups_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listInstanceGroups_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.LIST, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new listInstanceGroups_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new listInstanceGroups_resultTupleSchemeFactory());
    }

    public List success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST, 
              new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, InstanceGroupDetail.class))));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listInstanceGroups_result.class, metaDataMap);
    }

    public listInstanceGroups_result() {
    }

    public listInstanceGroups_result(
      List success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public listInstanceGroups_result(listInstanceGroups_result other) {
      if (other.isSetSuccess()) {
        List __this__success = new ArrayList(other.success.size());
        for (InstanceGroupDetail other_element : other.success) {
          __this__success.add(new InstanceGroupDetail(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public listInstanceGroups_result deepCopy() {
      return new listInstanceGroups_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(InstanceGroupDetail elem) {
      if (this.success == null) {
        this.success = new ArrayList();
      }
      this.success.add(elem);
    }

    public List getSuccess() {
      return this.success;
    }

    public listInstanceGroups_result setSuccess(List 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public listInstanceGroups_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof listInstanceGroups_result)
        return this.equals((listInstanceGroups_result)that);
      return false;
    }

    public boolean equals(listInstanceGroups_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(listInstanceGroups_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("listInstanceGroups_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class listInstanceGroups_resultStandardSchemeFactory implements SchemeFactory {
      public listInstanceGroups_resultStandardScheme getScheme() {
        return new listInstanceGroups_resultStandardScheme();
      }
    }

    private static class listInstanceGroups_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listInstanceGroups_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.LIST) {
                {
                  libthrift091.protocol.TList _list276 = iprot.readListBegin();
                  struct.success = new ArrayList(_list276.size);
                  InstanceGroupDetail _elem277;
                  for (int _i278 = 0; _i278 < _list276.size; ++_i278)
                  {
                    _elem277 = new InstanceGroupDetail();
                    _elem277.read(iprot);
                    struct.success.add(_elem277);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, listInstanceGroups_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.success.size()));
            for (InstanceGroupDetail _iter279 : struct.success)
            {
              _iter279.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listInstanceGroups_resultTupleSchemeFactory implements SchemeFactory {
      public listInstanceGroups_resultTupleScheme getScheme() {
        return new listInstanceGroups_resultTupleScheme();
      }
    }

    private static class listInstanceGroups_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, listInstanceGroups_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (InstanceGroupDetail _iter280 : struct.success)
            {
              _iter280.write(oprot);
            }
          }
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, listInstanceGroups_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          {
            libthrift091.protocol.TList _list281 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList(_list281.size);
            InstanceGroupDetail _elem282;
            for (int _i283 = 0; _i283 < _list281.size; ++_i283)
            {
              _elem282 = new InstanceGroupDetail();
              _elem282.read(iprot);
              struct.success.add(_elem282);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class listInstancesInCluster_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listInstancesInCluster_args");

    private static final libthrift091.protocol.TField CLUSTER_ID_FIELD_DESC = new libthrift091.protocol.TField("clusterId", libthrift091.protocol.TType.STRING, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new listInstancesInCluster_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new listInstancesInCluster_argsTupleSchemeFactory());
    }

    public String clusterId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      CLUSTER_ID((short)1, "clusterId");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CLUSTER_ID
            return CLUSTER_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CLUSTER_ID, new libthrift091.meta_data.FieldMetaData("clusterId", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listInstancesInCluster_args.class, metaDataMap);
    }

    public listInstancesInCluster_args() {
    }

    public listInstancesInCluster_args(
      String clusterId)
    {
      this();
      this.clusterId = clusterId;
    }

    /**
     * Performs a deep copy on other.
     */
    public listInstancesInCluster_args(listInstancesInCluster_args other) {
      if (other.isSetClusterId()) {
        this.clusterId = other.clusterId;
      }
    }

    public listInstancesInCluster_args deepCopy() {
      return new listInstancesInCluster_args(this);
    }

    @Override
    public void clear() {
      this.clusterId = null;
    }

    public String getClusterId() {
      return this.clusterId;
    }

    public listInstancesInCluster_args setClusterId(String clusterId) {
      this.clusterId = clusterId;
      return this;
    }

    public void unsetClusterId() {
      this.clusterId = null;
    }

    /** Returns true if field clusterId is set (has been assigned a value) and false otherwise */
    public boolean isSetClusterId() {
      return this.clusterId != null;
    }

    public void setClusterIdIsSet(boolean value) {
      if (!value) {
        this.clusterId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CLUSTER_ID:
        if (value == null) {
          unsetClusterId();
        } else {
          setClusterId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CLUSTER_ID:
        return getClusterId();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case CLUSTER_ID:
        return isSetClusterId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof listInstancesInCluster_args)
        return this.equals((listInstancesInCluster_args)that);
      return false;
    }

    public boolean equals(listInstancesInCluster_args that) {
      if (that == null)
        return false;

      boolean this_present_clusterId = true && this.isSetClusterId();
      boolean that_present_clusterId = true && that.isSetClusterId();
      if (this_present_clusterId || that_present_clusterId) {
        if (!(this_present_clusterId && that_present_clusterId))
          return false;
        if (!this.clusterId.equals(that.clusterId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_clusterId = true && (isSetClusterId());
      list.add(present_clusterId);
      if (present_clusterId)
        list.add(clusterId);

      return list.hashCode();
    }

    @Override
    public int compareTo(listInstancesInCluster_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetClusterId()).compareTo(other.isSetClusterId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetClusterId()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.clusterId, other.clusterId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("listInstancesInCluster_args(");
      boolean first = true;

      sb.append("clusterId:");
      if (this.clusterId == null) {
        sb.append("null");
      } else {
        sb.append(this.clusterId);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class listInstancesInCluster_argsStandardSchemeFactory implements SchemeFactory {
      public listInstancesInCluster_argsStandardScheme getScheme() {
        return new listInstancesInCluster_argsStandardScheme();
      }
    }

    private static class listInstancesInCluster_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listInstancesInCluster_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // CLUSTER_ID
              if (schemeField.type == libthrift091.protocol.TType.STRING) {
                struct.clusterId = iprot.readString();
                struct.setClusterIdIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, listInstancesInCluster_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.clusterId != null) {
          oprot.writeFieldBegin(CLUSTER_ID_FIELD_DESC);
          oprot.writeString(struct.clusterId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listInstancesInCluster_argsTupleSchemeFactory implements SchemeFactory {
      public listInstancesInCluster_argsTupleScheme getScheme() {
        return new listInstancesInCluster_argsTupleScheme();
      }
    }

    private static class listInstancesInCluster_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, listInstancesInCluster_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetClusterId()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetClusterId()) {
          oprot.writeString(struct.clusterId);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, listInstancesInCluster_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.clusterId = iprot.readString();
          struct.setClusterIdIsSet(true);
        }
      }
    }

  }

  public static class listInstancesInCluster_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listInstancesInCluster_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.LIST, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new listInstancesInCluster_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new listInstancesInCluster_resultTupleSchemeFactory());
    }

    public List success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST, 
              new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, InstanceDetail.class))));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listInstancesInCluster_result.class, metaDataMap);
    }

    public listInstancesInCluster_result() {
    }

    public listInstancesInCluster_result(
      List success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public listInstancesInCluster_result(listInstancesInCluster_result other) {
      if (other.isSetSuccess()) {
        List __this__success = new ArrayList(other.success.size());
        for (InstanceDetail other_element : other.success) {
          __this__success.add(new InstanceDetail(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public listInstancesInCluster_result deepCopy() {
      return new listInstancesInCluster_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(InstanceDetail elem) {
      if (this.success == null) {
        this.success = new ArrayList();
      }
      this.success.add(elem);
    }

    public List getSuccess() {
      return this.success;
    }

    public listInstancesInCluster_result setSuccess(List 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public listInstancesInCluster_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof listInstancesInCluster_result)
        return this.equals((listInstancesInCluster_result)that);
      return false;
    }

    public boolean equals(listInstancesInCluster_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(listInstancesInCluster_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("listInstancesInCluster_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class listInstancesInCluster_resultStandardSchemeFactory implements SchemeFactory {
      public listInstancesInCluster_resultStandardScheme getScheme() {
        return new listInstancesInCluster_resultStandardScheme();
      }
    }

    private static class listInstancesInCluster_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listInstancesInCluster_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.LIST) {
                {
                  libthrift091.protocol.TList _list284 = iprot.readListBegin();
                  struct.success = new ArrayList(_list284.size);
                  InstanceDetail _elem285;
                  for (int _i286 = 0; _i286 < _list284.size; ++_i286)
                  {
                    _elem285 = new InstanceDetail();
                    _elem285.read(iprot);
                    struct.success.add(_elem285);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, listInstancesInCluster_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.success.size()));
            for (InstanceDetail _iter287 : struct.success)
            {
              _iter287.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listInstancesInCluster_resultTupleSchemeFactory implements SchemeFactory {
      public listInstancesInCluster_resultTupleScheme getScheme() {
        return new listInstancesInCluster_resultTupleScheme();
      }
    }

    private static class listInstancesInCluster_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, listInstancesInCluster_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (InstanceDetail _iter288 : struct.success)
            {
              _iter288.write(oprot);
            }
          }
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, listInstancesInCluster_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          {
            libthrift091.protocol.TList _list289 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList(_list289.size);
            InstanceDetail _elem290;
            for (int _i291 = 0; _i291 < _list289.size; ++_i291)
            {
              _elem290 = new InstanceDetail();
              _elem290.read(iprot);
              struct.success.add(_elem290);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class listInstancesInGroup_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listInstancesInGroup_args");

    private static final libthrift091.protocol.TField CLUSTER_ID_FIELD_DESC = new libthrift091.protocol.TField("clusterId", libthrift091.protocol.TType.STRING, (short)1);
    private static final libthrift091.protocol.TField GROUP_ID_FIELD_DESC = new libthrift091.protocol.TField("groupId", libthrift091.protocol.TType.STRING, (short)2);
    private static final libthrift091.protocol.TField GROUP_ROLE_FIELD_DESC = new libthrift091.protocol.TField("groupRole", libthrift091.protocol.TType.I32, (short)3);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new listInstancesInGroup_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new listInstancesInGroup_argsTupleSchemeFactory());
    }

    public String clusterId; // required
    public String groupId; // required
    /**
     * 
     * @see InstanceGroupRole
     */
    public InstanceGroupRole groupRole; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      CLUSTER_ID((short)1, "clusterId"),
      GROUP_ID((short)2, "groupId"),
      /**
       * 
       * @see InstanceGroupRole
       */
      GROUP_ROLE((short)3, "groupRole");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CLUSTER_ID
            return CLUSTER_ID;
          case 2: // GROUP_ID
            return GROUP_ID;
          case 3: // GROUP_ROLE
            return GROUP_ROLE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CLUSTER_ID, new libthrift091.meta_data.FieldMetaData("clusterId", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
      tmpMap.put(_Fields.GROUP_ID, new libthrift091.meta_data.FieldMetaData("groupId", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
      tmpMap.put(_Fields.GROUP_ROLE, new libthrift091.meta_data.FieldMetaData("groupRole", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.EnumMetaData(libthrift091.protocol.TType.ENUM, InstanceGroupRole.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listInstancesInGroup_args.class, metaDataMap);
    }

    public listInstancesInGroup_args() {
    }

    public listInstancesInGroup_args(
      String clusterId,
      String groupId,
      InstanceGroupRole groupRole)
    {
      this();
      this.clusterId = clusterId;
      this.groupId = groupId;
      this.groupRole = groupRole;
    }

    /**
     * Performs a deep copy on other.
     */
    public listInstancesInGroup_args(listInstancesInGroup_args other) {
      if (other.isSetClusterId()) {
        this.clusterId = other.clusterId;
      }
      if (other.isSetGroupId()) {
        this.groupId = other.groupId;
      }
      if (other.isSetGroupRole()) {
        this.groupRole = other.groupRole;
      }
    }

    public listInstancesInGroup_args deepCopy() {
      return new listInstancesInGroup_args(this);
    }

    @Override
    public void clear() {
      this.clusterId = null;
      this.groupId = null;
      this.groupRole = null;
    }

    public String getClusterId() {
      return this.clusterId;
    }

    public listInstancesInGroup_args setClusterId(String clusterId) {
      this.clusterId = clusterId;
      return this;
    }

    public void unsetClusterId() {
      this.clusterId = null;
    }

    /** Returns true if field clusterId is set (has been assigned a value) and false otherwise */
    public boolean isSetClusterId() {
      return this.clusterId != null;
    }

    public void setClusterIdIsSet(boolean value) {
      if (!value) {
        this.clusterId = null;
      }
    }

    public String getGroupId() {
      return this.groupId;
    }

    public listInstancesInGroup_args setGroupId(String groupId) {
      this.groupId = groupId;
      return this;
    }

    public void unsetGroupId() {
      this.groupId = null;
    }

    /** Returns true if field groupId is set (has been assigned a value) and false otherwise */
    public boolean isSetGroupId() {
      return this.groupId != null;
    }

    public void setGroupIdIsSet(boolean value) {
      if (!value) {
        this.groupId = null;
      }
    }

    /**
     * 
     * @see InstanceGroupRole
     */
    public InstanceGroupRole getGroupRole() {
      return this.groupRole;
    }

    /**
     * 
     * @see InstanceGroupRole
     */
    public listInstancesInGroup_args setGroupRole(InstanceGroupRole groupRole) {
      this.groupRole = groupRole;
      return this;
    }

    public void unsetGroupRole() {
      this.groupRole = null;
    }

    /** Returns true if field groupRole is set (has been assigned a value) and false otherwise */
    public boolean isSetGroupRole() {
      return this.groupRole != null;
    }

    public void setGroupRoleIsSet(boolean value) {
      if (!value) {
        this.groupRole = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CLUSTER_ID:
        if (value == null) {
          unsetClusterId();
        } else {
          setClusterId((String)value);
        }
        break;

      case GROUP_ID:
        if (value == null) {
          unsetGroupId();
        } else {
          setGroupId((String)value);
        }
        break;

      case GROUP_ROLE:
        if (value == null) {
          unsetGroupRole();
        } else {
          setGroupRole((InstanceGroupRole)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CLUSTER_ID:
        return getClusterId();

      case GROUP_ID:
        return getGroupId();

      case GROUP_ROLE:
        return getGroupRole();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case CLUSTER_ID:
        return isSetClusterId();
      case GROUP_ID:
        return isSetGroupId();
      case GROUP_ROLE:
        return isSetGroupRole();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof listInstancesInGroup_args)
        return this.equals((listInstancesInGroup_args)that);
      return false;
    }

    public boolean equals(listInstancesInGroup_args that) {
      if (that == null)
        return false;

      boolean this_present_clusterId = true && this.isSetClusterId();
      boolean that_present_clusterId = true && that.isSetClusterId();
      if (this_present_clusterId || that_present_clusterId) {
        if (!(this_present_clusterId && that_present_clusterId))
          return false;
        if (!this.clusterId.equals(that.clusterId))
          return false;
      }

      boolean this_present_groupId = true && this.isSetGroupId();
      boolean that_present_groupId = true && that.isSetGroupId();
      if (this_present_groupId || that_present_groupId) {
        if (!(this_present_groupId && that_present_groupId))
          return false;
        if (!this.groupId.equals(that.groupId))
          return false;
      }

      boolean this_present_groupRole = true && this.isSetGroupRole();
      boolean that_present_groupRole = true && that.isSetGroupRole();
      if (this_present_groupRole || that_present_groupRole) {
        if (!(this_present_groupRole && that_present_groupRole))
          return false;
        if (!this.groupRole.equals(that.groupRole))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_clusterId = true && (isSetClusterId());
      list.add(present_clusterId);
      if (present_clusterId)
        list.add(clusterId);

      boolean present_groupId = true && (isSetGroupId());
      list.add(present_groupId);
      if (present_groupId)
        list.add(groupId);

      boolean present_groupRole = true && (isSetGroupRole());
      list.add(present_groupRole);
      if (present_groupRole)
        list.add(groupRole.getValue());

      return list.hashCode();
    }

    @Override
    public int compareTo(listInstancesInGroup_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetClusterId()).compareTo(other.isSetClusterId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetClusterId()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.clusterId, other.clusterId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGroupId()).compareTo(other.isSetGroupId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGroupId()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.groupId, other.groupId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGroupRole()).compareTo(other.isSetGroupRole());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGroupRole()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.groupRole, other.groupRole);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("listInstancesInGroup_args(");
      boolean first = true;

      sb.append("clusterId:");
      if (this.clusterId == null) {
        sb.append("null");
      } else {
        sb.append(this.clusterId);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("groupId:");
      if (this.groupId == null) {
        sb.append("null");
      } else {
        sb.append(this.groupId);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("groupRole:");
      if (this.groupRole == null) {
        sb.append("null");
      } else {
        sb.append(this.groupRole);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class listInstancesInGroup_argsStandardSchemeFactory implements SchemeFactory {
      public listInstancesInGroup_argsStandardScheme getScheme() {
        return new listInstancesInGroup_argsStandardScheme();
      }
    }

    private static class listInstancesInGroup_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listInstancesInGroup_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // CLUSTER_ID
              if (schemeField.type == libthrift091.protocol.TType.STRING) {
                struct.clusterId = iprot.readString();
                struct.setClusterIdIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // GROUP_ID
              if (schemeField.type == libthrift091.protocol.TType.STRING) {
                struct.groupId = iprot.readString();
                struct.setGroupIdIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // GROUP_ROLE
              if (schemeField.type == libthrift091.protocol.TType.I32) {
                struct.groupRole = com.xiaomi.infra.galaxy.emr.thrift.InstanceGroupRole.findByValue(iprot.readI32());
                struct.setGroupRoleIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, listInstancesInGroup_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.clusterId != null) {
          oprot.writeFieldBegin(CLUSTER_ID_FIELD_DESC);
          oprot.writeString(struct.clusterId);
          oprot.writeFieldEnd();
        }
        if (struct.groupId != null) {
          oprot.writeFieldBegin(GROUP_ID_FIELD_DESC);
          oprot.writeString(struct.groupId);
          oprot.writeFieldEnd();
        }
        if (struct.groupRole != null) {
          oprot.writeFieldBegin(GROUP_ROLE_FIELD_DESC);
          oprot.writeI32(struct.groupRole.getValue());
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listInstancesInGroup_argsTupleSchemeFactory implements SchemeFactory {
      public listInstancesInGroup_argsTupleScheme getScheme() {
        return new listInstancesInGroup_argsTupleScheme();
      }
    }

    private static class listInstancesInGroup_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, listInstancesInGroup_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetClusterId()) {
          optionals.set(0);
        }
        if (struct.isSetGroupId()) {
          optionals.set(1);
        }
        if (struct.isSetGroupRole()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetClusterId()) {
          oprot.writeString(struct.clusterId);
        }
        if (struct.isSetGroupId()) {
          oprot.writeString(struct.groupId);
        }
        if (struct.isSetGroupRole()) {
          oprot.writeI32(struct.groupRole.getValue());
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, listInstancesInGroup_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.clusterId = iprot.readString();
          struct.setClusterIdIsSet(true);
        }
        if (incoming.get(1)) {
          struct.groupId = iprot.readString();
          struct.setGroupIdIsSet(true);
        }
        if (incoming.get(2)) {
          struct.groupRole = com.xiaomi.infra.galaxy.emr.thrift.InstanceGroupRole.findByValue(iprot.readI32());
          struct.setGroupRoleIsSet(true);
        }
      }
    }

  }

  public static class listInstancesInGroup_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listInstancesInGroup_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.LIST, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new listInstancesInGroup_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new listInstancesInGroup_resultTupleSchemeFactory());
    }

    public List success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST, 
              new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, InstanceDetail.class))));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listInstancesInGroup_result.class, metaDataMap);
    }

    public listInstancesInGroup_result() {
    }

    public listInstancesInGroup_result(
      List success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public listInstancesInGroup_result(listInstancesInGroup_result other) {
      if (other.isSetSuccess()) {
        List __this__success = new ArrayList(other.success.size());
        for (InstanceDetail other_element : other.success) {
          __this__success.add(new InstanceDetail(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public listInstancesInGroup_result deepCopy() {
      return new listInstancesInGroup_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(InstanceDetail elem) {
      if (this.success == null) {
        this.success = new ArrayList();
      }
      this.success.add(elem);
    }

    public List getSuccess() {
      return this.success;
    }

    public listInstancesInGroup_result setSuccess(List 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public listInstancesInGroup_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof listInstancesInGroup_result)
        return this.equals((listInstancesInGroup_result)that);
      return false;
    }

    public boolean equals(listInstancesInGroup_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(listInstancesInGroup_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("listInstancesInGroup_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class listInstancesInGroup_resultStandardSchemeFactory implements SchemeFactory {
      public listInstancesInGroup_resultStandardScheme getScheme() {
        return new listInstancesInGroup_resultStandardScheme();
      }
    }

    private static class listInstancesInGroup_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listInstancesInGroup_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.LIST) {
                {
                  libthrift091.protocol.TList _list292 = iprot.readListBegin();
                  struct.success = new ArrayList(_list292.size);
                  InstanceDetail _elem293;
                  for (int _i294 = 0; _i294 < _list292.size; ++_i294)
                  {
                    _elem293 = new InstanceDetail();
                    _elem293.read(iprot);
                    struct.success.add(_elem293);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, listInstancesInGroup_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.success.size()));
            for (InstanceDetail _iter295 : struct.success)
            {
              _iter295.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listInstancesInGroup_resultTupleSchemeFactory implements SchemeFactory {
      public listInstancesInGroup_resultTupleScheme getScheme() {
        return new listInstancesInGroup_resultTupleScheme();
      }
    }

    private static class listInstancesInGroup_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, listInstancesInGroup_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (InstanceDetail _iter296 : struct.success)
            {
              _iter296.write(oprot);
            }
          }
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, listInstancesInGroup_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          {
            libthrift091.protocol.TList _list297 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList(_list297.size);
            InstanceDetail _elem298;
            for (int _i299 = 0; _i299 < _list297.size; ++_i299)
            {
              _elem298 = new InstanceDetail();
              _elem298.read(iprot);
              struct.success.add(_elem298);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class listJobs_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listJobs_args");

    private static final libthrift091.protocol.TField CLUSTER_ID_FIELD_DESC = new libthrift091.protocol.TField("clusterId", libthrift091.protocol.TType.STRING, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new listJobs_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new listJobs_argsTupleSchemeFactory());
    }

    public String clusterId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      CLUSTER_ID((short)1, "clusterId");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CLUSTER_ID
            return CLUSTER_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CLUSTER_ID, new libthrift091.meta_data.FieldMetaData("clusterId", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listJobs_args.class, metaDataMap);
    }

    public listJobs_args() {
    }

    public listJobs_args(
      String clusterId)
    {
      this();
      this.clusterId = clusterId;
    }

    /**
     * Performs a deep copy on other.
     */
    public listJobs_args(listJobs_args other) {
      if (other.isSetClusterId()) {
        this.clusterId = other.clusterId;
      }
    }

    public listJobs_args deepCopy() {
      return new listJobs_args(this);
    }

    @Override
    public void clear() {
      this.clusterId = null;
    }

    public String getClusterId() {
      return this.clusterId;
    }

    public listJobs_args setClusterId(String clusterId) {
      this.clusterId = clusterId;
      return this;
    }

    public void unsetClusterId() {
      this.clusterId = null;
    }

    /** Returns true if field clusterId is set (has been assigned a value) and false otherwise */
    public boolean isSetClusterId() {
      return this.clusterId != null;
    }

    public void setClusterIdIsSet(boolean value) {
      if (!value) {
        this.clusterId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CLUSTER_ID:
        if (value == null) {
          unsetClusterId();
        } else {
          setClusterId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CLUSTER_ID:
        return getClusterId();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case CLUSTER_ID:
        return isSetClusterId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof listJobs_args)
        return this.equals((listJobs_args)that);
      return false;
    }

    public boolean equals(listJobs_args that) {
      if (that == null)
        return false;

      boolean this_present_clusterId = true && this.isSetClusterId();
      boolean that_present_clusterId = true && that.isSetClusterId();
      if (this_present_clusterId || that_present_clusterId) {
        if (!(this_present_clusterId && that_present_clusterId))
          return false;
        if (!this.clusterId.equals(that.clusterId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_clusterId = true && (isSetClusterId());
      list.add(present_clusterId);
      if (present_clusterId)
        list.add(clusterId);

      return list.hashCode();
    }

    @Override
    public int compareTo(listJobs_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetClusterId()).compareTo(other.isSetClusterId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetClusterId()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.clusterId, other.clusterId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("listJobs_args(");
      boolean first = true;

      sb.append("clusterId:");
      if (this.clusterId == null) {
        sb.append("null");
      } else {
        sb.append(this.clusterId);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class listJobs_argsStandardSchemeFactory implements SchemeFactory {
      public listJobs_argsStandardScheme getScheme() {
        return new listJobs_argsStandardScheme();
      }
    }

    private static class listJobs_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listJobs_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // CLUSTER_ID
              if (schemeField.type == libthrift091.protocol.TType.STRING) {
                struct.clusterId = iprot.readString();
                struct.setClusterIdIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, listJobs_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.clusterId != null) {
          oprot.writeFieldBegin(CLUSTER_ID_FIELD_DESC);
          oprot.writeString(struct.clusterId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listJobs_argsTupleSchemeFactory implements SchemeFactory {
      public listJobs_argsTupleScheme getScheme() {
        return new listJobs_argsTupleScheme();
      }
    }

    private static class listJobs_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, listJobs_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetClusterId()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetClusterId()) {
          oprot.writeString(struct.clusterId);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, listJobs_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.clusterId = iprot.readString();
          struct.setClusterIdIsSet(true);
        }
      }
    }

  }

  public static class listJobs_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listJobs_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.LIST, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new listJobs_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new listJobs_resultTupleSchemeFactory());
    }

    public List success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST, 
              new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, JobDetail.class))));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listJobs_result.class, metaDataMap);
    }

    public listJobs_result() {
    }

    public listJobs_result(
      List success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public listJobs_result(listJobs_result other) {
      if (other.isSetSuccess()) {
        List __this__success = new ArrayList(other.success.size());
        for (JobDetail other_element : other.success) {
          __this__success.add(new JobDetail(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public listJobs_result deepCopy() {
      return new listJobs_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(JobDetail elem) {
      if (this.success == null) {
        this.success = new ArrayList();
      }
      this.success.add(elem);
    }

    public List getSuccess() {
      return this.success;
    }

    public listJobs_result setSuccess(List 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public listJobs_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof listJobs_result)
        return this.equals((listJobs_result)that);
      return false;
    }

    public boolean equals(listJobs_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(listJobs_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("listJobs_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class listJobs_resultStandardSchemeFactory implements SchemeFactory {
      public listJobs_resultStandardScheme getScheme() {
        return new listJobs_resultStandardScheme();
      }
    }

    private static class listJobs_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listJobs_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.LIST) {
                {
                  libthrift091.protocol.TList _list300 = iprot.readListBegin();
                  struct.success = new ArrayList(_list300.size);
                  JobDetail _elem301;
                  for (int _i302 = 0; _i302 < _list300.size; ++_i302)
                  {
                    _elem301 = new JobDetail();
                    _elem301.read(iprot);
                    struct.success.add(_elem301);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, listJobs_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.success.size()));
            for (JobDetail _iter303 : struct.success)
            {
              _iter303.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listJobs_resultTupleSchemeFactory implements SchemeFactory {
      public listJobs_resultTupleScheme getScheme() {
        return new listJobs_resultTupleScheme();
      }
    }

    private static class listJobs_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, listJobs_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (JobDetail _iter304 : struct.success)
            {
              _iter304.write(oprot);
            }
          }
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, listJobs_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          {
            libthrift091.protocol.TList _list305 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList(_list305.size);
            JobDetail _elem306;
            for (int _i307 = 0; _i307 < _list305.size; ++_i307)
            {
              _elem306 = new JobDetail();
              _elem306.read(iprot);
              struct.success.add(_elem306);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class setPermission_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("setPermission_args");

    private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new setPermission_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new setPermission_argsTupleSchemeFactory());
    }

    public SetPermissionRequest request; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      REQUEST((short)1, "request");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, SetPermissionRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(setPermission_args.class, metaDataMap);
    }

    public setPermission_args() {
    }

    public setPermission_args(
      SetPermissionRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public setPermission_args(setPermission_args other) {
      if (other.isSetRequest()) {
        this.request = new SetPermissionRequest(other.request);
      }
    }

    public setPermission_args deepCopy() {
      return new setPermission_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public SetPermissionRequest getRequest() {
      return this.request;
    }

    public setPermission_args setRequest(SetPermissionRequest request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

    /** Returns true if field request is set (has been assigned a value) and false otherwise */
    public boolean isSetRequest() {
      return this.request != null;
    }

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((SetPermissionRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case REQUEST:
        return getRequest();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof setPermission_args)
        return this.equals((setPermission_args)that);
      return false;
    }

    public boolean equals(setPermission_args that) {
      if (that == null)
        return false;

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request))
          return false;
        if (!this.request.equals(that.request))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_request = true && (isSetRequest());
      list.add(present_request);
      if (present_request)
        list.add(request);

      return list.hashCode();
    }

    @Override
    public int compareTo(setPermission_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("setPermission_args(");
      boolean first = true;

      sb.append("request:");
      if (this.request == null) {
        sb.append("null");
      } else {
        sb.append(this.request);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (request != null) {
        request.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class setPermission_argsStandardSchemeFactory implements SchemeFactory {
      public setPermission_argsStandardScheme getScheme() {
        return new setPermission_argsStandardScheme();
      }
    }

    private static class setPermission_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, setPermission_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new SetPermissionRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, setPermission_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.request != null) {
          oprot.writeFieldBegin(REQUEST_FIELD_DESC);
          struct.request.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class setPermission_argsTupleSchemeFactory implements SchemeFactory {
      public setPermission_argsTupleScheme getScheme() {
        return new setPermission_argsTupleScheme();
      }
    }

    private static class setPermission_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, setPermission_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, setPermission_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new SetPermissionRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

  public static class setPermission_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("setPermission_result");

    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new setPermission_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new setPermission_resultTupleSchemeFactory());
    }

    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(setPermission_result.class, metaDataMap);
    }

    public setPermission_result() {
    }

    public setPermission_result(
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public setPermission_result(setPermission_result other) {
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public setPermission_result deepCopy() {
      return new setPermission_result(this);
    }

    @Override
    public void clear() {
      this.se = null;
    }

    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public setPermission_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof setPermission_result)
        return this.equals((setPermission_result)that);
      return false;
    }

    public boolean equals(setPermission_result that) {
      if (that == null)
        return false;

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(setPermission_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("setPermission_result(");
      boolean first = true;

      sb.append("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class setPermission_resultStandardSchemeFactory implements SchemeFactory {
      public setPermission_resultStandardScheme getScheme() {
        return new setPermission_resultStandardScheme();
      }
    }

    private static class setPermission_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, setPermission_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, setPermission_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class setPermission_resultTupleSchemeFactory implements SchemeFactory {
      public setPermission_resultTupleScheme getScheme() {
        return new setPermission_resultTupleScheme();
      }
    }

    private static class setPermission_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, setPermission_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSe()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, setPermission_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class revokePermission_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("revokePermission_args");

    private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new revokePermission_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new revokePermission_argsTupleSchemeFactory());
    }

    public RevokePermissionRequest request; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      REQUEST((short)1, "request");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, RevokePermissionRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(revokePermission_args.class, metaDataMap);
    }

    public revokePermission_args() {
    }

    public revokePermission_args(
      RevokePermissionRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public revokePermission_args(revokePermission_args other) {
      if (other.isSetRequest()) {
        this.request = new RevokePermissionRequest(other.request);
      }
    }

    public revokePermission_args deepCopy() {
      return new revokePermission_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public RevokePermissionRequest getRequest() {
      return this.request;
    }

    public revokePermission_args setRequest(RevokePermissionRequest request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

    /** Returns true if field request is set (has been assigned a value) and false otherwise */
    public boolean isSetRequest() {
      return this.request != null;
    }

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((RevokePermissionRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case REQUEST:
        return getRequest();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof revokePermission_args)
        return this.equals((revokePermission_args)that);
      return false;
    }

    public boolean equals(revokePermission_args that) {
      if (that == null)
        return false;

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request))
          return false;
        if (!this.request.equals(that.request))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_request = true && (isSetRequest());
      list.add(present_request);
      if (present_request)
        list.add(request);

      return list.hashCode();
    }

    @Override
    public int compareTo(revokePermission_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("revokePermission_args(");
      boolean first = true;

      sb.append("request:");
      if (this.request == null) {
        sb.append("null");
      } else {
        sb.append(this.request);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (request != null) {
        request.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class revokePermission_argsStandardSchemeFactory implements SchemeFactory {
      public revokePermission_argsStandardScheme getScheme() {
        return new revokePermission_argsStandardScheme();
      }
    }

    private static class revokePermission_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, revokePermission_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new RevokePermissionRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, revokePermission_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.request != null) {
          oprot.writeFieldBegin(REQUEST_FIELD_DESC);
          struct.request.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class revokePermission_argsTupleSchemeFactory implements SchemeFactory {
      public revokePermission_argsTupleScheme getScheme() {
        return new revokePermission_argsTupleScheme();
      }
    }

    private static class revokePermission_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, revokePermission_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, revokePermission_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new RevokePermissionRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

  public static class revokePermission_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("revokePermission_result");

    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new revokePermission_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new revokePermission_resultTupleSchemeFactory());
    }

    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(revokePermission_result.class, metaDataMap);
    }

    public revokePermission_result() {
    }

    public revokePermission_result(
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public revokePermission_result(revokePermission_result other) {
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public revokePermission_result deepCopy() {
      return new revokePermission_result(this);
    }

    @Override
    public void clear() {
      this.se = null;
    }

    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public revokePermission_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof revokePermission_result)
        return this.equals((revokePermission_result)that);
      return false;
    }

    public boolean equals(revokePermission_result that) {
      if (that == null)
        return false;

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(revokePermission_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("revokePermission_result(");
      boolean first = true;

      sb.append("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class revokePermission_resultStandardSchemeFactory implements SchemeFactory {
      public revokePermission_resultStandardScheme getScheme() {
        return new revokePermission_resultStandardScheme();
      }
    }

    private static class revokePermission_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, revokePermission_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, revokePermission_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class revokePermission_resultTupleSchemeFactory implements SchemeFactory {
      public revokePermission_resultTupleScheme getScheme() {
        return new revokePermission_resultTupleScheme();
      }
    }

    private static class revokePermission_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, revokePermission_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSe()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, revokePermission_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class queryPermission_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("queryPermission_args");

    private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new queryPermission_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new queryPermission_argsTupleSchemeFactory());
    }

    public QueryPermissionRequest request; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      REQUEST((short)1, "request");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, QueryPermissionRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(queryPermission_args.class, metaDataMap);
    }

    public queryPermission_args() {
    }

    public queryPermission_args(
      QueryPermissionRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public queryPermission_args(queryPermission_args other) {
      if (other.isSetRequest()) {
        this.request = new QueryPermissionRequest(other.request);
      }
    }

    public queryPermission_args deepCopy() {
      return new queryPermission_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public QueryPermissionRequest getRequest() {
      return this.request;
    }

    public queryPermission_args setRequest(QueryPermissionRequest request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

    /** Returns true if field request is set (has been assigned a value) and false otherwise */
    public boolean isSetRequest() {
      return this.request != null;
    }

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((QueryPermissionRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case REQUEST:
        return getRequest();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof queryPermission_args)
        return this.equals((queryPermission_args)that);
      return false;
    }

    public boolean equals(queryPermission_args that) {
      if (that == null)
        return false;

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request))
          return false;
        if (!this.request.equals(that.request))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_request = true && (isSetRequest());
      list.add(present_request);
      if (present_request)
        list.add(request);

      return list.hashCode();
    }

    @Override
    public int compareTo(queryPermission_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("queryPermission_args(");
      boolean first = true;

      sb.append("request:");
      if (this.request == null) {
        sb.append("null");
      } else {
        sb.append(this.request);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (request != null) {
        request.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class queryPermission_argsStandardSchemeFactory implements SchemeFactory {
      public queryPermission_argsStandardScheme getScheme() {
        return new queryPermission_argsStandardScheme();
      }
    }

    private static class queryPermission_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, queryPermission_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new QueryPermissionRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, queryPermission_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.request != null) {
          oprot.writeFieldBegin(REQUEST_FIELD_DESC);
          struct.request.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class queryPermission_argsTupleSchemeFactory implements SchemeFactory {
      public queryPermission_argsTupleScheme getScheme() {
        return new queryPermission_argsTupleScheme();
      }
    }

    private static class queryPermission_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, queryPermission_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, queryPermission_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new QueryPermissionRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

  public static class queryPermission_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("queryPermission_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new queryPermission_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new queryPermission_resultTupleSchemeFactory());
    }

    public QueryPermissionResponse success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, QueryPermissionResponse.class)));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(queryPermission_result.class, metaDataMap);
    }

    public queryPermission_result() {
    }

    public queryPermission_result(
      QueryPermissionResponse success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public queryPermission_result(queryPermission_result other) {
      if (other.isSetSuccess()) {
        this.success = new QueryPermissionResponse(other.success);
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public queryPermission_result deepCopy() {
      return new queryPermission_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public QueryPermissionResponse getSuccess() {
      return this.success;
    }

    public queryPermission_result setSuccess(QueryPermissionResponse 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public queryPermission_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((QueryPermissionResponse)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof queryPermission_result)
        return this.equals((queryPermission_result)that);
      return false;
    }

    public boolean equals(queryPermission_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(queryPermission_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("queryPermission_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class queryPermission_resultStandardSchemeFactory implements SchemeFactory {
      public queryPermission_resultStandardScheme getScheme() {
        return new queryPermission_resultStandardScheme();
      }
    }

    private static class queryPermission_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, queryPermission_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new QueryPermissionResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, queryPermission_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class queryPermission_resultTupleSchemeFactory implements SchemeFactory {
      public queryPermission_resultTupleScheme getScheme() {
        return new queryPermission_resultTupleScheme();
      }
    }

    private static class queryPermission_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, queryPermission_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, queryPermission_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new QueryPermissionResponse();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class listPermissions_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listPermissions_args");

    private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new listPermissions_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new listPermissions_argsTupleSchemeFactory());
    }

    public ListPermissionRequest request; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      REQUEST((short)1, "request");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ListPermissionRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listPermissions_args.class, metaDataMap);
    }

    public listPermissions_args() {
    }

    public listPermissions_args(
      ListPermissionRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public listPermissions_args(listPermissions_args other) {
      if (other.isSetRequest()) {
        this.request = new ListPermissionRequest(other.request);
      }
    }

    public listPermissions_args deepCopy() {
      return new listPermissions_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public ListPermissionRequest getRequest() {
      return this.request;
    }

    public listPermissions_args setRequest(ListPermissionRequest request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

    /** Returns true if field request is set (has been assigned a value) and false otherwise */
    public boolean isSetRequest() {
      return this.request != null;
    }

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((ListPermissionRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case REQUEST:
        return getRequest();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof listPermissions_args)
        return this.equals((listPermissions_args)that);
      return false;
    }

    public boolean equals(listPermissions_args that) {
      if (that == null)
        return false;

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request))
          return false;
        if (!this.request.equals(that.request))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_request = true && (isSetRequest());
      list.add(present_request);
      if (present_request)
        list.add(request);

      return list.hashCode();
    }

    @Override
    public int compareTo(listPermissions_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("listPermissions_args(");
      boolean first = true;

      sb.append("request:");
      if (this.request == null) {
        sb.append("null");
      } else {
        sb.append(this.request);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (request != null) {
        request.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class listPermissions_argsStandardSchemeFactory implements SchemeFactory {
      public listPermissions_argsStandardScheme getScheme() {
        return new listPermissions_argsStandardScheme();
      }
    }

    private static class listPermissions_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listPermissions_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new ListPermissionRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, listPermissions_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.request != null) {
          oprot.writeFieldBegin(REQUEST_FIELD_DESC);
          struct.request.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listPermissions_argsTupleSchemeFactory implements SchemeFactory {
      public listPermissions_argsTupleScheme getScheme() {
        return new listPermissions_argsTupleScheme();
      }
    }

    private static class listPermissions_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, listPermissions_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, listPermissions_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new ListPermissionRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

  public static class listPermissions_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listPermissions_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new listPermissions_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new listPermissions_resultTupleSchemeFactory());
    }

    public ListPermissionResponse success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ListPermissionResponse.class)));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listPermissions_result.class, metaDataMap);
    }

    public listPermissions_result() {
    }

    public listPermissions_result(
      ListPermissionResponse success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public listPermissions_result(listPermissions_result other) {
      if (other.isSetSuccess()) {
        this.success = new ListPermissionResponse(other.success);
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public listPermissions_result deepCopy() {
      return new listPermissions_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public ListPermissionResponse getSuccess() {
      return this.success;
    }

    public listPermissions_result setSuccess(ListPermissionResponse 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public listPermissions_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((ListPermissionResponse)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof listPermissions_result)
        return this.equals((listPermissions_result)that);
      return false;
    }

    public boolean equals(listPermissions_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(listPermissions_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("listPermissions_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class listPermissions_resultStandardSchemeFactory implements SchemeFactory {
      public listPermissions_resultStandardScheme getScheme() {
        return new listPermissions_resultStandardScheme();
      }
    }

    private static class listPermissions_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listPermissions_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new ListPermissionResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, listPermissions_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listPermissions_resultTupleSchemeFactory implements SchemeFactory {
      public listPermissions_resultTupleScheme getScheme() {
        return new listPermissions_resultTupleScheme();
      }
    }

    private static class listPermissions_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, listPermissions_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, listPermissions_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new ListPermissionResponse();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class getSSHPublicKeys_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getSSHPublicKeys_args");

    private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getSSHPublicKeys_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getSSHPublicKeys_argsTupleSchemeFactory());
    }

    public GetSSHPublicKeysRequest request; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      REQUEST((short)1, "request");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, GetSSHPublicKeysRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getSSHPublicKeys_args.class, metaDataMap);
    }

    public getSSHPublicKeys_args() {
    }

    public getSSHPublicKeys_args(
      GetSSHPublicKeysRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public getSSHPublicKeys_args(getSSHPublicKeys_args other) {
      if (other.isSetRequest()) {
        this.request = new GetSSHPublicKeysRequest(other.request);
      }
    }

    public getSSHPublicKeys_args deepCopy() {
      return new getSSHPublicKeys_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public GetSSHPublicKeysRequest getRequest() {
      return this.request;
    }

    public getSSHPublicKeys_args setRequest(GetSSHPublicKeysRequest request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

    /** Returns true if field request is set (has been assigned a value) and false otherwise */
    public boolean isSetRequest() {
      return this.request != null;
    }

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((GetSSHPublicKeysRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case REQUEST:
        return getRequest();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getSSHPublicKeys_args)
        return this.equals((getSSHPublicKeys_args)that);
      return false;
    }

    public boolean equals(getSSHPublicKeys_args that) {
      if (that == null)
        return false;

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request))
          return false;
        if (!this.request.equals(that.request))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_request = true && (isSetRequest());
      list.add(present_request);
      if (present_request)
        list.add(request);

      return list.hashCode();
    }

    @Override
    public int compareTo(getSSHPublicKeys_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getSSHPublicKeys_args(");
      boolean first = true;

      sb.append("request:");
      if (this.request == null) {
        sb.append("null");
      } else {
        sb.append(this.request);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (request != null) {
        request.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getSSHPublicKeys_argsStandardSchemeFactory implements SchemeFactory {
      public getSSHPublicKeys_argsStandardScheme getScheme() {
        return new getSSHPublicKeys_argsStandardScheme();
      }
    }

    private static class getSSHPublicKeys_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getSSHPublicKeys_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new GetSSHPublicKeysRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, getSSHPublicKeys_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.request != null) {
          oprot.writeFieldBegin(REQUEST_FIELD_DESC);
          struct.request.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getSSHPublicKeys_argsTupleSchemeFactory implements SchemeFactory {
      public getSSHPublicKeys_argsTupleScheme getScheme() {
        return new getSSHPublicKeys_argsTupleScheme();
      }
    }

    private static class getSSHPublicKeys_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, getSSHPublicKeys_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, getSSHPublicKeys_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new GetSSHPublicKeysRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

  public static class getSSHPublicKeys_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getSSHPublicKeys_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getSSHPublicKeys_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getSSHPublicKeys_resultTupleSchemeFactory());
    }

    public GetSSHPublicKeysResponse success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, GetSSHPublicKeysResponse.class)));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getSSHPublicKeys_result.class, metaDataMap);
    }

    public getSSHPublicKeys_result() {
    }

    public getSSHPublicKeys_result(
      GetSSHPublicKeysResponse success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public getSSHPublicKeys_result(getSSHPublicKeys_result other) {
      if (other.isSetSuccess()) {
        this.success = new GetSSHPublicKeysResponse(other.success);
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public getSSHPublicKeys_result deepCopy() {
      return new getSSHPublicKeys_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public GetSSHPublicKeysResponse getSuccess() {
      return this.success;
    }

    public getSSHPublicKeys_result setSuccess(GetSSHPublicKeysResponse 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public getSSHPublicKeys_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((GetSSHPublicKeysResponse)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getSSHPublicKeys_result)
        return this.equals((getSSHPublicKeys_result)that);
      return false;
    }

    public boolean equals(getSSHPublicKeys_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(getSSHPublicKeys_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getSSHPublicKeys_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getSSHPublicKeys_resultStandardSchemeFactory implements SchemeFactory {
      public getSSHPublicKeys_resultStandardScheme getScheme() {
        return new getSSHPublicKeys_resultStandardScheme();
      }
    }

    private static class getSSHPublicKeys_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getSSHPublicKeys_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new GetSSHPublicKeysResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, getSSHPublicKeys_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getSSHPublicKeys_resultTupleSchemeFactory implements SchemeFactory {
      public getSSHPublicKeys_resultTupleScheme getScheme() {
        return new getSSHPublicKeys_resultTupleScheme();
      }
    }

    private static class getSSHPublicKeys_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, getSSHPublicKeys_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, getSSHPublicKeys_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new GetSSHPublicKeysResponse();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class addSSHPublicKeys_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("addSSHPublicKeys_args");

    private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new addSSHPublicKeys_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new addSSHPublicKeys_argsTupleSchemeFactory());
    }

    public AddSSHPublicKeysRequest request; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      REQUEST((short)1, "request");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, AddSSHPublicKeysRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(addSSHPublicKeys_args.class, metaDataMap);
    }

    public addSSHPublicKeys_args() {
    }

    public addSSHPublicKeys_args(
      AddSSHPublicKeysRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public addSSHPublicKeys_args(addSSHPublicKeys_args other) {
      if (other.isSetRequest()) {
        this.request = new AddSSHPublicKeysRequest(other.request);
      }
    }

    public addSSHPublicKeys_args deepCopy() {
      return new addSSHPublicKeys_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public AddSSHPublicKeysRequest getRequest() {
      return this.request;
    }

    public addSSHPublicKeys_args setRequest(AddSSHPublicKeysRequest request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

    /** Returns true if field request is set (has been assigned a value) and false otherwise */
    public boolean isSetRequest() {
      return this.request != null;
    }

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((AddSSHPublicKeysRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case REQUEST:
        return getRequest();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addSSHPublicKeys_args)
        return this.equals((addSSHPublicKeys_args)that);
      return false;
    }

    public boolean equals(addSSHPublicKeys_args that) {
      if (that == null)
        return false;

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request))
          return false;
        if (!this.request.equals(that.request))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_request = true && (isSetRequest());
      list.add(present_request);
      if (present_request)
        list.add(request);

      return list.hashCode();
    }

    @Override
    public int compareTo(addSSHPublicKeys_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addSSHPublicKeys_args(");
      boolean first = true;

      sb.append("request:");
      if (this.request == null) {
        sb.append("null");
      } else {
        sb.append(this.request);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (request != null) {
        request.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class addSSHPublicKeys_argsStandardSchemeFactory implements SchemeFactory {
      public addSSHPublicKeys_argsStandardScheme getScheme() {
        return new addSSHPublicKeys_argsStandardScheme();
      }
    }

    private static class addSSHPublicKeys_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, addSSHPublicKeys_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new AddSSHPublicKeysRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, addSSHPublicKeys_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.request != null) {
          oprot.writeFieldBegin(REQUEST_FIELD_DESC);
          struct.request.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class addSSHPublicKeys_argsTupleSchemeFactory implements SchemeFactory {
      public addSSHPublicKeys_argsTupleScheme getScheme() {
        return new addSSHPublicKeys_argsTupleScheme();
      }
    }

    private static class addSSHPublicKeys_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, addSSHPublicKeys_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, addSSHPublicKeys_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new AddSSHPublicKeysRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

  public static class addSSHPublicKeys_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("addSSHPublicKeys_result");

    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new addSSHPublicKeys_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new addSSHPublicKeys_resultTupleSchemeFactory());
    }

    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(addSSHPublicKeys_result.class, metaDataMap);
    }

    public addSSHPublicKeys_result() {
    }

    public addSSHPublicKeys_result(
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public addSSHPublicKeys_result(addSSHPublicKeys_result other) {
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public addSSHPublicKeys_result deepCopy() {
      return new addSSHPublicKeys_result(this);
    }

    @Override
    public void clear() {
      this.se = null;
    }

    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public addSSHPublicKeys_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addSSHPublicKeys_result)
        return this.equals((addSSHPublicKeys_result)that);
      return false;
    }

    public boolean equals(addSSHPublicKeys_result that) {
      if (that == null)
        return false;

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(addSSHPublicKeys_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addSSHPublicKeys_result(");
      boolean first = true;

      sb.append("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class addSSHPublicKeys_resultStandardSchemeFactory implements SchemeFactory {
      public addSSHPublicKeys_resultStandardScheme getScheme() {
        return new addSSHPublicKeys_resultStandardScheme();
      }
    }

    private static class addSSHPublicKeys_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, addSSHPublicKeys_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, addSSHPublicKeys_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class addSSHPublicKeys_resultTupleSchemeFactory implements SchemeFactory {
      public addSSHPublicKeys_resultTupleScheme getScheme() {
        return new addSSHPublicKeys_resultTupleScheme();
      }
    }

    private static class addSSHPublicKeys_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, addSSHPublicKeys_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSe()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, addSSHPublicKeys_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class deleteSSHPublicKeys_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deleteSSHPublicKeys_args");

    private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new deleteSSHPublicKeys_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new deleteSSHPublicKeys_argsTupleSchemeFactory());
    }

    public DeleteSSHPublicKeysRequest request; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      REQUEST((short)1, "request");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, DeleteSSHPublicKeysRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deleteSSHPublicKeys_args.class, metaDataMap);
    }

    public deleteSSHPublicKeys_args() {
    }

    public deleteSSHPublicKeys_args(
      DeleteSSHPublicKeysRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public deleteSSHPublicKeys_args(deleteSSHPublicKeys_args other) {
      if (other.isSetRequest()) {
        this.request = new DeleteSSHPublicKeysRequest(other.request);
      }
    }

    public deleteSSHPublicKeys_args deepCopy() {
      return new deleteSSHPublicKeys_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public DeleteSSHPublicKeysRequest getRequest() {
      return this.request;
    }

    public deleteSSHPublicKeys_args setRequest(DeleteSSHPublicKeysRequest request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

    /** Returns true if field request is set (has been assigned a value) and false otherwise */
    public boolean isSetRequest() {
      return this.request != null;
    }

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((DeleteSSHPublicKeysRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case REQUEST:
        return getRequest();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof deleteSSHPublicKeys_args)
        return this.equals((deleteSSHPublicKeys_args)that);
      return false;
    }

    public boolean equals(deleteSSHPublicKeys_args that) {
      if (that == null)
        return false;

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request))
          return false;
        if (!this.request.equals(that.request))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_request = true && (isSetRequest());
      list.add(present_request);
      if (present_request)
        list.add(request);

      return list.hashCode();
    }

    @Override
    public int compareTo(deleteSSHPublicKeys_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("deleteSSHPublicKeys_args(");
      boolean first = true;

      sb.append("request:");
      if (this.request == null) {
        sb.append("null");
      } else {
        sb.append(this.request);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (request != null) {
        request.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class deleteSSHPublicKeys_argsStandardSchemeFactory implements SchemeFactory {
      public deleteSSHPublicKeys_argsStandardScheme getScheme() {
        return new deleteSSHPublicKeys_argsStandardScheme();
      }
    }

    private static class deleteSSHPublicKeys_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, deleteSSHPublicKeys_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new DeleteSSHPublicKeysRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, deleteSSHPublicKeys_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.request != null) {
          oprot.writeFieldBegin(REQUEST_FIELD_DESC);
          struct.request.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class deleteSSHPublicKeys_argsTupleSchemeFactory implements SchemeFactory {
      public deleteSSHPublicKeys_argsTupleScheme getScheme() {
        return new deleteSSHPublicKeys_argsTupleScheme();
      }
    }

    private static class deleteSSHPublicKeys_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, deleteSSHPublicKeys_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, deleteSSHPublicKeys_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new DeleteSSHPublicKeysRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

  public static class deleteSSHPublicKeys_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deleteSSHPublicKeys_result");

    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new deleteSSHPublicKeys_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new deleteSSHPublicKeys_resultTupleSchemeFactory());
    }

    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deleteSSHPublicKeys_result.class, metaDataMap);
    }

    public deleteSSHPublicKeys_result() {
    }

    public deleteSSHPublicKeys_result(
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public deleteSSHPublicKeys_result(deleteSSHPublicKeys_result other) {
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public deleteSSHPublicKeys_result deepCopy() {
      return new deleteSSHPublicKeys_result(this);
    }

    @Override
    public void clear() {
      this.se = null;
    }

    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public deleteSSHPublicKeys_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof deleteSSHPublicKeys_result)
        return this.equals((deleteSSHPublicKeys_result)that);
      return false;
    }

    public boolean equals(deleteSSHPublicKeys_result that) {
      if (that == null)
        return false;

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(deleteSSHPublicKeys_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("deleteSSHPublicKeys_result(");
      boolean first = true;

      sb.append("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class deleteSSHPublicKeys_resultStandardSchemeFactory implements SchemeFactory {
      public deleteSSHPublicKeys_resultStandardScheme getScheme() {
        return new deleteSSHPublicKeys_resultStandardScheme();
      }
    }

    private static class deleteSSHPublicKeys_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, deleteSSHPublicKeys_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, deleteSSHPublicKeys_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class deleteSSHPublicKeys_resultTupleSchemeFactory implements SchemeFactory {
      public deleteSSHPublicKeys_resultTupleScheme getScheme() {
        return new deleteSSHPublicKeys_resultTupleScheme();
      }
    }

    private static class deleteSSHPublicKeys_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, deleteSSHPublicKeys_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSe()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, deleteSSHPublicKeys_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class getQuota_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getQuota_args");

    private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getQuota_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getQuota_argsTupleSchemeFactory());
    }

    public GetQuotaRequest request; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      REQUEST((short)1, "request");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, GetQuotaRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getQuota_args.class, metaDataMap);
    }

    public getQuota_args() {
    }

    public getQuota_args(
      GetQuotaRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public getQuota_args(getQuota_args other) {
      if (other.isSetRequest()) {
        this.request = new GetQuotaRequest(other.request);
      }
    }

    public getQuota_args deepCopy() {
      return new getQuota_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public GetQuotaRequest getRequest() {
      return this.request;
    }

    public getQuota_args setRequest(GetQuotaRequest request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

    /** Returns true if field request is set (has been assigned a value) and false otherwise */
    public boolean isSetRequest() {
      return this.request != null;
    }

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((GetQuotaRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case REQUEST:
        return getRequest();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getQuota_args)
        return this.equals((getQuota_args)that);
      return false;
    }

    public boolean equals(getQuota_args that) {
      if (that == null)
        return false;

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request))
          return false;
        if (!this.request.equals(that.request))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_request = true && (isSetRequest());
      list.add(present_request);
      if (present_request)
        list.add(request);

      return list.hashCode();
    }

    @Override
    public int compareTo(getQuota_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getQuota_args(");
      boolean first = true;

      sb.append("request:");
      if (this.request == null) {
        sb.append("null");
      } else {
        sb.append(this.request);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (request != null) {
        request.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getQuota_argsStandardSchemeFactory implements SchemeFactory {
      public getQuota_argsStandardScheme getScheme() {
        return new getQuota_argsStandardScheme();
      }
    }

    private static class getQuota_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getQuota_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new GetQuotaRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, getQuota_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.request != null) {
          oprot.writeFieldBegin(REQUEST_FIELD_DESC);
          struct.request.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getQuota_argsTupleSchemeFactory implements SchemeFactory {
      public getQuota_argsTupleScheme getScheme() {
        return new getQuota_argsTupleScheme();
      }
    }

    private static class getQuota_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, getQuota_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, getQuota_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new GetQuotaRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

  public static class getQuota_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getQuota_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getQuota_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getQuota_resultTupleSchemeFactory());
    }

    public GetQuotaResponse success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, GetQuotaResponse.class)));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getQuota_result.class, metaDataMap);
    }

    public getQuota_result() {
    }

    public getQuota_result(
      GetQuotaResponse success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public getQuota_result(getQuota_result other) {
      if (other.isSetSuccess()) {
        this.success = new GetQuotaResponse(other.success);
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public getQuota_result deepCopy() {
      return new getQuota_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public GetQuotaResponse getSuccess() {
      return this.success;
    }

    public getQuota_result setSuccess(GetQuotaResponse 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public getQuota_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((GetQuotaResponse)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getQuota_result)
        return this.equals((getQuota_result)that);
      return false;
    }

    public boolean equals(getQuota_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(getQuota_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getQuota_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getQuota_resultStandardSchemeFactory implements SchemeFactory {
      public getQuota_resultStandardScheme getScheme() {
        return new getQuota_resultStandardScheme();
      }
    }

    private static class getQuota_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getQuota_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new GetQuotaResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, getQuota_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getQuota_resultTupleSchemeFactory implements SchemeFactory {
      public getQuota_resultTupleScheme getScheme() {
        return new getQuota_resultTupleScheme();
      }
    }

    private static class getQuota_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, getQuota_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, getQuota_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new GetQuotaResponse();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class deleteCluster_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deleteCluster_args");

    private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new deleteCluster_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new deleteCluster_argsTupleSchemeFactory());
    }

    public DeleteClusterRequest request; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      REQUEST((short)1, "request");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, DeleteClusterRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deleteCluster_args.class, metaDataMap);
    }

    public deleteCluster_args() {
    }

    public deleteCluster_args(
      DeleteClusterRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public deleteCluster_args(deleteCluster_args other) {
      if (other.isSetRequest()) {
        this.request = new DeleteClusterRequest(other.request);
      }
    }

    public deleteCluster_args deepCopy() {
      return new deleteCluster_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public DeleteClusterRequest getRequest() {
      return this.request;
    }

    public deleteCluster_args setRequest(DeleteClusterRequest request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

    /** Returns true if field request is set (has been assigned a value) and false otherwise */
    public boolean isSetRequest() {
      return this.request != null;
    }

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((DeleteClusterRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case REQUEST:
        return getRequest();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof deleteCluster_args)
        return this.equals((deleteCluster_args)that);
      return false;
    }

    public boolean equals(deleteCluster_args that) {
      if (that == null)
        return false;

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request))
          return false;
        if (!this.request.equals(that.request))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_request = true && (isSetRequest());
      list.add(present_request);
      if (present_request)
        list.add(request);

      return list.hashCode();
    }

    @Override
    public int compareTo(deleteCluster_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("deleteCluster_args(");
      boolean first = true;

      sb.append("request:");
      if (this.request == null) {
        sb.append("null");
      } else {
        sb.append(this.request);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (request != null) {
        request.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class deleteCluster_argsStandardSchemeFactory implements SchemeFactory {
      public deleteCluster_argsStandardScheme getScheme() {
        return new deleteCluster_argsStandardScheme();
      }
    }

    private static class deleteCluster_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, deleteCluster_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new DeleteClusterRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, deleteCluster_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.request != null) {
          oprot.writeFieldBegin(REQUEST_FIELD_DESC);
          struct.request.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class deleteCluster_argsTupleSchemeFactory implements SchemeFactory {
      public deleteCluster_argsTupleScheme getScheme() {
        return new deleteCluster_argsTupleScheme();
      }
    }

    private static class deleteCluster_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, deleteCluster_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, deleteCluster_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new DeleteClusterRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

  public static class deleteCluster_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deleteCluster_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new deleteCluster_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new deleteCluster_resultTupleSchemeFactory());
    }

    public DeleteClusterResponse success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, DeleteClusterResponse.class)));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deleteCluster_result.class, metaDataMap);
    }

    public deleteCluster_result() {
    }

    public deleteCluster_result(
      DeleteClusterResponse success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public deleteCluster_result(deleteCluster_result other) {
      if (other.isSetSuccess()) {
        this.success = new DeleteClusterResponse(other.success);
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public deleteCluster_result deepCopy() {
      return new deleteCluster_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public DeleteClusterResponse getSuccess() {
      return this.success;
    }

    public deleteCluster_result setSuccess(DeleteClusterResponse 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public deleteCluster_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((DeleteClusterResponse)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof deleteCluster_result)
        return this.equals((deleteCluster_result)that);
      return false;
    }

    public boolean equals(deleteCluster_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(deleteCluster_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("deleteCluster_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class deleteCluster_resultStandardSchemeFactory implements SchemeFactory {
      public deleteCluster_resultStandardScheme getScheme() {
        return new deleteCluster_resultStandardScheme();
      }
    }

    private static class deleteCluster_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, deleteCluster_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new DeleteClusterResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, deleteCluster_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class deleteCluster_resultTupleSchemeFactory implements SchemeFactory {
      public deleteCluster_resultTupleScheme getScheme() {
        return new deleteCluster_resultTupleScheme();
      }
    }

    private static class deleteCluster_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, deleteCluster_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, deleteCluster_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new DeleteClusterResponse();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class getEMRBasicConfig_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getEMRBasicConfig_args");


    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getEMRBasicConfig_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getEMRBasicConfig_argsTupleSchemeFactory());
    }


    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
;

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getEMRBasicConfig_args.class, metaDataMap);
    }

    public getEMRBasicConfig_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getEMRBasicConfig_args(getEMRBasicConfig_args other) {
    }

    public getEMRBasicConfig_args deepCopy() {
      return new getEMRBasicConfig_args(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getEMRBasicConfig_args)
        return this.equals((getEMRBasicConfig_args)that);
      return false;
    }

    public boolean equals(getEMRBasicConfig_args that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      return list.hashCode();
    }

    @Override
    public int compareTo(getEMRBasicConfig_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(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getEMRBasicConfig_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getEMRBasicConfig_argsStandardSchemeFactory implements SchemeFactory {
      public getEMRBasicConfig_argsStandardScheme getScheme() {
        return new getEMRBasicConfig_argsStandardScheme();
      }
    }

    private static class getEMRBasicConfig_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getEMRBasicConfig_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, getEMRBasicConfig_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getEMRBasicConfig_argsTupleSchemeFactory implements SchemeFactory {
      public getEMRBasicConfig_argsTupleScheme getScheme() {
        return new getEMRBasicConfig_argsTupleScheme();
      }
    }

    private static class getEMRBasicConfig_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, getEMRBasicConfig_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, getEMRBasicConfig_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
      }
    }

  }

  public static class getEMRBasicConfig_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getEMRBasicConfig_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getEMRBasicConfig_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getEMRBasicConfig_resultTupleSchemeFactory());
    }

    public GetEMRBasicConfigResponse success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, GetEMRBasicConfigResponse.class)));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getEMRBasicConfig_result.class, metaDataMap);
    }

    public getEMRBasicConfig_result() {
    }

    public getEMRBasicConfig_result(
      GetEMRBasicConfigResponse success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public getEMRBasicConfig_result(getEMRBasicConfig_result other) {
      if (other.isSetSuccess()) {
        this.success = new GetEMRBasicConfigResponse(other.success);
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public getEMRBasicConfig_result deepCopy() {
      return new getEMRBasicConfig_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public GetEMRBasicConfigResponse getSuccess() {
      return this.success;
    }

    public getEMRBasicConfig_result setSuccess(GetEMRBasicConfigResponse 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public getEMRBasicConfig_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((GetEMRBasicConfigResponse)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getEMRBasicConfig_result)
        return this.equals((getEMRBasicConfig_result)that);
      return false;
    }

    public boolean equals(getEMRBasicConfig_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(getEMRBasicConfig_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getEMRBasicConfig_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getEMRBasicConfig_resultStandardSchemeFactory implements SchemeFactory {
      public getEMRBasicConfig_resultStandardScheme getScheme() {
        return new getEMRBasicConfig_resultStandardScheme();
      }
    }

    private static class getEMRBasicConfig_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getEMRBasicConfig_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new GetEMRBasicConfigResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, getEMRBasicConfig_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getEMRBasicConfig_resultTupleSchemeFactory implements SchemeFactory {
      public getEMRBasicConfig_resultTupleScheme getScheme() {
        return new getEMRBasicConfig_resultTupleScheme();
      }
    }

    private static class getEMRBasicConfig_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, getEMRBasicConfig_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, getEMRBasicConfig_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new GetEMRBasicConfigResponse();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class getSoftwareConfig_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getSoftwareConfig_args");


    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getSoftwareConfig_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getSoftwareConfig_argsTupleSchemeFactory());
    }


    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
;

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getSoftwareConfig_args.class, metaDataMap);
    }

    public getSoftwareConfig_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getSoftwareConfig_args(getSoftwareConfig_args other) {
    }

    public getSoftwareConfig_args deepCopy() {
      return new getSoftwareConfig_args(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getSoftwareConfig_args)
        return this.equals((getSoftwareConfig_args)that);
      return false;
    }

    public boolean equals(getSoftwareConfig_args that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      return list.hashCode();
    }

    @Override
    public int compareTo(getSoftwareConfig_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(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getSoftwareConfig_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getSoftwareConfig_argsStandardSchemeFactory implements SchemeFactory {
      public getSoftwareConfig_argsStandardScheme getScheme() {
        return new getSoftwareConfig_argsStandardScheme();
      }
    }

    private static class getSoftwareConfig_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getSoftwareConfig_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, getSoftwareConfig_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getSoftwareConfig_argsTupleSchemeFactory implements SchemeFactory {
      public getSoftwareConfig_argsTupleScheme getScheme() {
        return new getSoftwareConfig_argsTupleScheme();
      }
    }

    private static class getSoftwareConfig_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, getSoftwareConfig_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, getSoftwareConfig_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
      }
    }

  }

  public static class getSoftwareConfig_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getSoftwareConfig_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getSoftwareConfig_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getSoftwareConfig_resultTupleSchemeFactory());
    }

    public GetSoftwareConfigResponse success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, GetSoftwareConfigResponse.class)));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getSoftwareConfig_result.class, metaDataMap);
    }

    public getSoftwareConfig_result() {
    }

    public getSoftwareConfig_result(
      GetSoftwareConfigResponse success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public getSoftwareConfig_result(getSoftwareConfig_result other) {
      if (other.isSetSuccess()) {
        this.success = new GetSoftwareConfigResponse(other.success);
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public getSoftwareConfig_result deepCopy() {
      return new getSoftwareConfig_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public GetSoftwareConfigResponse getSuccess() {
      return this.success;
    }

    public getSoftwareConfig_result setSuccess(GetSoftwareConfigResponse 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public getSoftwareConfig_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((GetSoftwareConfigResponse)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getSoftwareConfig_result)
        return this.equals((getSoftwareConfig_result)that);
      return false;
    }

    public boolean equals(getSoftwareConfig_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(getSoftwareConfig_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getSoftwareConfig_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getSoftwareConfig_resultStandardSchemeFactory implements SchemeFactory {
      public getSoftwareConfig_resultStandardScheme getScheme() {
        return new getSoftwareConfig_resultStandardScheme();
      }
    }

    private static class getSoftwareConfig_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getSoftwareConfig_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new GetSoftwareConfigResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, getSoftwareConfig_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getSoftwareConfig_resultTupleSchemeFactory implements SchemeFactory {
      public getSoftwareConfig_resultTupleScheme getScheme() {
        return new getSoftwareConfig_resultTupleScheme();
      }
    }

    private static class getSoftwareConfig_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, getSoftwareConfig_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, getSoftwareConfig_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new GetSoftwareConfigResponse();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class getHardwareConfig_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getHardwareConfig_args");


    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getHardwareConfig_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getHardwareConfig_argsTupleSchemeFactory());
    }


    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
;

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getHardwareConfig_args.class, metaDataMap);
    }

    public getHardwareConfig_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getHardwareConfig_args(getHardwareConfig_args other) {
    }

    public getHardwareConfig_args deepCopy() {
      return new getHardwareConfig_args(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getHardwareConfig_args)
        return this.equals((getHardwareConfig_args)that);
      return false;
    }

    public boolean equals(getHardwareConfig_args that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      return list.hashCode();
    }

    @Override
    public int compareTo(getHardwareConfig_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(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getHardwareConfig_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getHardwareConfig_argsStandardSchemeFactory implements SchemeFactory {
      public getHardwareConfig_argsStandardScheme getScheme() {
        return new getHardwareConfig_argsStandardScheme();
      }
    }

    private static class getHardwareConfig_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getHardwareConfig_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, getHardwareConfig_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getHardwareConfig_argsTupleSchemeFactory implements SchemeFactory {
      public getHardwareConfig_argsTupleScheme getScheme() {
        return new getHardwareConfig_argsTupleScheme();
      }
    }

    private static class getHardwareConfig_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, getHardwareConfig_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, getHardwareConfig_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
      }
    }

  }

  public static class getHardwareConfig_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getHardwareConfig_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getHardwareConfig_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getHardwareConfig_resultTupleSchemeFactory());
    }

    public GetHardwareConfigResponse success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, GetHardwareConfigResponse.class)));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getHardwareConfig_result.class, metaDataMap);
    }

    public getHardwareConfig_result() {
    }

    public getHardwareConfig_result(
      GetHardwareConfigResponse success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public getHardwareConfig_result(getHardwareConfig_result other) {
      if (other.isSetSuccess()) {
        this.success = new GetHardwareConfigResponse(other.success);
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public getHardwareConfig_result deepCopy() {
      return new getHardwareConfig_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public GetHardwareConfigResponse getSuccess() {
      return this.success;
    }

    public getHardwareConfig_result setSuccess(GetHardwareConfigResponse 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public getHardwareConfig_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((GetHardwareConfigResponse)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getHardwareConfig_result)
        return this.equals((getHardwareConfig_result)that);
      return false;
    }

    public boolean equals(getHardwareConfig_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(getHardwareConfig_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getHardwareConfig_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getHardwareConfig_resultStandardSchemeFactory implements SchemeFactory {
      public getHardwareConfig_resultStandardScheme getScheme() {
        return new getHardwareConfig_resultStandardScheme();
      }
    }

    private static class getHardwareConfig_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getHardwareConfig_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new GetHardwareConfigResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, getHardwareConfig_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getHardwareConfig_resultTupleSchemeFactory implements SchemeFactory {
      public getHardwareConfig_resultTupleScheme getScheme() {
        return new getHardwareConfig_resultTupleScheme();
      }
    }

    private static class getHardwareConfig_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, getHardwareConfig_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, getHardwareConfig_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new GetHardwareConfigResponse();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class addTags_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("addTags_args");

    private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new addTags_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new addTags_argsTupleSchemeFactory());
    }

    public AddTagsRequest request; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      REQUEST((short)1, "request");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, AddTagsRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(addTags_args.class, metaDataMap);
    }

    public addTags_args() {
    }

    public addTags_args(
      AddTagsRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public addTags_args(addTags_args other) {
      if (other.isSetRequest()) {
        this.request = new AddTagsRequest(other.request);
      }
    }

    public addTags_args deepCopy() {
      return new addTags_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public AddTagsRequest getRequest() {
      return this.request;
    }

    public addTags_args setRequest(AddTagsRequest request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

    /** Returns true if field request is set (has been assigned a value) and false otherwise */
    public boolean isSetRequest() {
      return this.request != null;
    }

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((AddTagsRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case REQUEST:
        return getRequest();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addTags_args)
        return this.equals((addTags_args)that);
      return false;
    }

    public boolean equals(addTags_args that) {
      if (that == null)
        return false;

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request))
          return false;
        if (!this.request.equals(that.request))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_request = true && (isSetRequest());
      list.add(present_request);
      if (present_request)
        list.add(request);

      return list.hashCode();
    }

    @Override
    public int compareTo(addTags_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addTags_args(");
      boolean first = true;

      sb.append("request:");
      if (this.request == null) {
        sb.append("null");
      } else {
        sb.append(this.request);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (request != null) {
        request.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class addTags_argsStandardSchemeFactory implements SchemeFactory {
      public addTags_argsStandardScheme getScheme() {
        return new addTags_argsStandardScheme();
      }
    }

    private static class addTags_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, addTags_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new AddTagsRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, addTags_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.request != null) {
          oprot.writeFieldBegin(REQUEST_FIELD_DESC);
          struct.request.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class addTags_argsTupleSchemeFactory implements SchemeFactory {
      public addTags_argsTupleScheme getScheme() {
        return new addTags_argsTupleScheme();
      }
    }

    private static class addTags_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, addTags_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, addTags_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new AddTagsRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

  public static class addTags_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("addTags_result");

    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new addTags_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new addTags_resultTupleSchemeFactory());
    }

    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(addTags_result.class, metaDataMap);
    }

    public addTags_result() {
    }

    public addTags_result(
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public addTags_result(addTags_result other) {
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public addTags_result deepCopy() {
      return new addTags_result(this);
    }

    @Override
    public void clear() {
      this.se = null;
    }

    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public addTags_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addTags_result)
        return this.equals((addTags_result)that);
      return false;
    }

    public boolean equals(addTags_result that) {
      if (that == null)
        return false;

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(addTags_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addTags_result(");
      boolean first = true;

      sb.append("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class addTags_resultStandardSchemeFactory implements SchemeFactory {
      public addTags_resultStandardScheme getScheme() {
        return new addTags_resultStandardScheme();
      }
    }

    private static class addTags_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, addTags_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, addTags_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class addTags_resultTupleSchemeFactory implements SchemeFactory {
      public addTags_resultTupleScheme getScheme() {
        return new addTags_resultTupleScheme();
      }
    }

    private static class addTags_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, addTags_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSe()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, addTags_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class getTags_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getTags_args");

    private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getTags_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getTags_argsTupleSchemeFactory());
    }

    public GetTagsRequest request; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      REQUEST((short)1, "request");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, GetTagsRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getTags_args.class, metaDataMap);
    }

    public getTags_args() {
    }

    public getTags_args(
      GetTagsRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public getTags_args(getTags_args other) {
      if (other.isSetRequest()) {
        this.request = new GetTagsRequest(other.request);
      }
    }

    public getTags_args deepCopy() {
      return new getTags_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public GetTagsRequest getRequest() {
      return this.request;
    }

    public getTags_args setRequest(GetTagsRequest request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

    /** Returns true if field request is set (has been assigned a value) and false otherwise */
    public boolean isSetRequest() {
      return this.request != null;
    }

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((GetTagsRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case REQUEST:
        return getRequest();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getTags_args)
        return this.equals((getTags_args)that);
      return false;
    }

    public boolean equals(getTags_args that) {
      if (that == null)
        return false;

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request))
          return false;
        if (!this.request.equals(that.request))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_request = true && (isSetRequest());
      list.add(present_request);
      if (present_request)
        list.add(request);

      return list.hashCode();
    }

    @Override
    public int compareTo(getTags_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getTags_args(");
      boolean first = true;

      sb.append("request:");
      if (this.request == null) {
        sb.append("null");
      } else {
        sb.append(this.request);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (request != null) {
        request.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getTags_argsStandardSchemeFactory implements SchemeFactory {
      public getTags_argsStandardScheme getScheme() {
        return new getTags_argsStandardScheme();
      }
    }

    private static class getTags_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getTags_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new GetTagsRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, getTags_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.request != null) {
          oprot.writeFieldBegin(REQUEST_FIELD_DESC);
          struct.request.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getTags_argsTupleSchemeFactory implements SchemeFactory {
      public getTags_argsTupleScheme getScheme() {
        return new getTags_argsTupleScheme();
      }
    }

    private static class getTags_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, getTags_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, getTags_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new GetTagsRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

  public static class getTags_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getTags_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getTags_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getTags_resultTupleSchemeFactory());
    }

    public GetTagsResponse success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, GetTagsResponse.class)));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getTags_result.class, metaDataMap);
    }

    public getTags_result() {
    }

    public getTags_result(
      GetTagsResponse success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public getTags_result(getTags_result other) {
      if (other.isSetSuccess()) {
        this.success = new GetTagsResponse(other.success);
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public getTags_result deepCopy() {
      return new getTags_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public GetTagsResponse getSuccess() {
      return this.success;
    }

    public getTags_result setSuccess(GetTagsResponse 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public getTags_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((GetTagsResponse)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getTags_result)
        return this.equals((getTags_result)that);
      return false;
    }

    public boolean equals(getTags_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(getTags_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getTags_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getTags_resultStandardSchemeFactory implements SchemeFactory {
      public getTags_resultStandardScheme getScheme() {
        return new getTags_resultStandardScheme();
      }
    }

    private static class getTags_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getTags_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new GetTagsResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, getTags_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getTags_resultTupleSchemeFactory implements SchemeFactory {
      public getTags_resultTupleScheme getScheme() {
        return new getTags_resultTupleScheme();
      }
    }

    private static class getTags_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, getTags_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, getTags_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new GetTagsResponse();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class deleteTag_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deleteTag_args");

    private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new deleteTag_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new deleteTag_argsTupleSchemeFactory());
    }

    public DeleteTagRequest request; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      REQUEST((short)1, "request");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, DeleteTagRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deleteTag_args.class, metaDataMap);
    }

    public deleteTag_args() {
    }

    public deleteTag_args(
      DeleteTagRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public deleteTag_args(deleteTag_args other) {
      if (other.isSetRequest()) {
        this.request = new DeleteTagRequest(other.request);
      }
    }

    public deleteTag_args deepCopy() {
      return new deleteTag_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public DeleteTagRequest getRequest() {
      return this.request;
    }

    public deleteTag_args setRequest(DeleteTagRequest request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

    /** Returns true if field request is set (has been assigned a value) and false otherwise */
    public boolean isSetRequest() {
      return this.request != null;
    }

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((DeleteTagRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case REQUEST:
        return getRequest();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof deleteTag_args)
        return this.equals((deleteTag_args)that);
      return false;
    }

    public boolean equals(deleteTag_args that) {
      if (that == null)
        return false;

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request))
          return false;
        if (!this.request.equals(that.request))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_request = true && (isSetRequest());
      list.add(present_request);
      if (present_request)
        list.add(request);

      return list.hashCode();
    }

    @Override
    public int compareTo(deleteTag_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("deleteTag_args(");
      boolean first = true;

      sb.append("request:");
      if (this.request == null) {
        sb.append("null");
      } else {
        sb.append(this.request);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (request != null) {
        request.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class deleteTag_argsStandardSchemeFactory implements SchemeFactory {
      public deleteTag_argsStandardScheme getScheme() {
        return new deleteTag_argsStandardScheme();
      }
    }

    private static class deleteTag_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, deleteTag_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new DeleteTagRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, deleteTag_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.request != null) {
          oprot.writeFieldBegin(REQUEST_FIELD_DESC);
          struct.request.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class deleteTag_argsTupleSchemeFactory implements SchemeFactory {
      public deleteTag_argsTupleScheme getScheme() {
        return new deleteTag_argsTupleScheme();
      }
    }

    private static class deleteTag_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, deleteTag_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, deleteTag_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new DeleteTagRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

  public static class deleteTag_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deleteTag_result");

    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new deleteTag_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new deleteTag_resultTupleSchemeFactory());
    }

    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deleteTag_result.class, metaDataMap);
    }

    public deleteTag_result() {
    }

    public deleteTag_result(
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public deleteTag_result(deleteTag_result other) {
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public deleteTag_result deepCopy() {
      return new deleteTag_result(this);
    }

    @Override
    public void clear() {
      this.se = null;
    }

    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public deleteTag_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof deleteTag_result)
        return this.equals((deleteTag_result)that);
      return false;
    }

    public boolean equals(deleteTag_result that) {
      if (that == null)
        return false;

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(deleteTag_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("deleteTag_result(");
      boolean first = true;

      sb.append("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class deleteTag_resultStandardSchemeFactory implements SchemeFactory {
      public deleteTag_resultStandardScheme getScheme() {
        return new deleteTag_resultStandardScheme();
      }
    }

    private static class deleteTag_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, deleteTag_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, deleteTag_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class deleteTag_resultTupleSchemeFactory implements SchemeFactory {
      public deleteTag_resultTupleScheme getScheme() {
        return new deleteTag_resultTupleScheme();
      }
    }

    private static class deleteTag_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, deleteTag_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSe()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, deleteTag_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

  public static class resizeInstanceGroup_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("resizeInstanceGroup_args");

    private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new resizeInstanceGroup_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new resizeInstanceGroup_argsTupleSchemeFactory());
    }

    public ResizeInstanceGroupRequest request; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      REQUEST((short)1, "request");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ResizeInstanceGroupRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(resizeInstanceGroup_args.class, metaDataMap);
    }

    public resizeInstanceGroup_args() {
    }

    public resizeInstanceGroup_args(
      ResizeInstanceGroupRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public resizeInstanceGroup_args(resizeInstanceGroup_args other) {
      if (other.isSetRequest()) {
        this.request = new ResizeInstanceGroupRequest(other.request);
      }
    }

    public resizeInstanceGroup_args deepCopy() {
      return new resizeInstanceGroup_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public ResizeInstanceGroupRequest getRequest() {
      return this.request;
    }

    public resizeInstanceGroup_args setRequest(ResizeInstanceGroupRequest request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

    /** Returns true if field request is set (has been assigned a value) and false otherwise */
    public boolean isSetRequest() {
      return this.request != null;
    }

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((ResizeInstanceGroupRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case REQUEST:
        return getRequest();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof resizeInstanceGroup_args)
        return this.equals((resizeInstanceGroup_args)that);
      return false;
    }

    public boolean equals(resizeInstanceGroup_args that) {
      if (that == null)
        return false;

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request))
          return false;
        if (!this.request.equals(that.request))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_request = true && (isSetRequest());
      list.add(present_request);
      if (present_request)
        list.add(request);

      return list.hashCode();
    }

    @Override
    public int compareTo(resizeInstanceGroup_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("resizeInstanceGroup_args(");
      boolean first = true;

      sb.append("request:");
      if (this.request == null) {
        sb.append("null");
      } else {
        sb.append(this.request);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (request != null) {
        request.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class resizeInstanceGroup_argsStandardSchemeFactory implements SchemeFactory {
      public resizeInstanceGroup_argsStandardScheme getScheme() {
        return new resizeInstanceGroup_argsStandardScheme();
      }
    }

    private static class resizeInstanceGroup_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, resizeInstanceGroup_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new ResizeInstanceGroupRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, resizeInstanceGroup_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.request != null) {
          oprot.writeFieldBegin(REQUEST_FIELD_DESC);
          struct.request.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class resizeInstanceGroup_argsTupleSchemeFactory implements SchemeFactory {
      public resizeInstanceGroup_argsTupleScheme getScheme() {
        return new resizeInstanceGroup_argsTupleScheme();
      }
    }

    private static class resizeInstanceGroup_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, resizeInstanceGroup_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, resizeInstanceGroup_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new ResizeInstanceGroupRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

  public static class resizeInstanceGroup_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("resizeInstanceGroup_result");

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
    private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new resizeInstanceGroup_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new resizeInstanceGroup_resultTupleSchemeFactory());
    }

    public ResizeInstanceGroupResponse success; // required
    public com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      SE((short)1, "se");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ResizeInstanceGroupResponse.class)));
      tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(resizeInstanceGroup_result.class, metaDataMap);
    }

    public resizeInstanceGroup_result() {
    }

    public resizeInstanceGroup_result(
      ResizeInstanceGroupResponse success,
      com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on other.
     */
    public resizeInstanceGroup_result(resizeInstanceGroup_result other) {
      if (other.isSetSuccess()) {
        this.success = new ResizeInstanceGroupResponse(other.success);
      }
      if (other.isSetSe()) {
        this.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException(other.se);
      }
    }

    public resizeInstanceGroup_result deepCopy() {
      return new resizeInstanceGroup_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.se = null;
    }

    public ResizeInstanceGroupResponse getSuccess() {
      return this.success;
    }

    public resizeInstanceGroup_result setSuccess(ResizeInstanceGroupResponse 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 com.xiaomi.infra.galaxy.rpc.thrift.ServiceException getSe() {
      return this.se;
    }

    public resizeInstanceGroup_result setSe(com.xiaomi.infra.galaxy.rpc.thrift.ServiceException se) {
      this.se = se;
      return this;
    }

    public void unsetSe() {
      this.se = null;
    }

    /** Returns true if field se is set (has been assigned a value) and false otherwise */
    public boolean isSetSe() {
      return this.se != null;
    }

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((ResizeInstanceGroupResponse)value);
        }
        break;

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((com.xiaomi.infra.galaxy.rpc.thrift.ServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof resizeInstanceGroup_result)
        return this.equals((resizeInstanceGroup_result)that);
      return false;
    }

    public boolean equals(resizeInstanceGroup_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_se = true && (isSetSe());
      list.add(present_se);
      if (present_se)
        list.add(se);

      return list.hashCode();
    }

    @Override
    public int compareTo(resizeInstanceGroup_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("resizeInstanceGroup_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("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class resizeInstanceGroup_resultStandardSchemeFactory implements SchemeFactory {
      public resizeInstanceGroup_resultStandardScheme getScheme() {
        return new resizeInstanceGroup_resultStandardScheme();
      }
    }

    private static class resizeInstanceGroup_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, resizeInstanceGroup_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new ResizeInstanceGroupResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // SE
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
                struct.se.read(iprot);
                struct.setSeIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, resizeInstanceGroup_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.se != null) {
          oprot.writeFieldBegin(SE_FIELD_DESC);
          struct.se.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class resizeInstanceGroup_resultTupleSchemeFactory implements SchemeFactory {
      public resizeInstanceGroup_resultTupleScheme getScheme() {
        return new resizeInstanceGroup_resultTupleScheme();
      }
    }

    private static class resizeInstanceGroup_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, resizeInstanceGroup_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetSe()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetSe()) {
          struct.se.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, resizeInstanceGroup_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new ResizeInstanceGroupResponse();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.se = new com.xiaomi.infra.galaxy.rpc.thrift.ServiceException();
          struct.se.read(iprot);
          struct.setSeIsSet(true);
        }
      }
    }

  }

}