/***************************************************************************
* Copyright (c) 2012-2013 VMware, Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
***************************************************************************/
/**
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package com.vmware.bdd.software.mgmt.thrift;
import java.util.BitSet;
import java.util.Collections;
import java.util.EnumMap;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class SoftwareManagement {
public interface Iface {
/**
* Run cluster operation, such as create, start, stop
*
* @param clusterOperation
*/
public int runClusterOperation(ClusterOperation clusterOperation) throws ClusterOperationException, org.apache.thrift.TException;
/**
* Query operation progress
*
* @param targetName
*/
public OperationStatusWithDetail getOperationStatusWithDetail(String targetName) throws ClusterOperationException, org.apache.thrift.TException;
/**
* Reset node's provision attribute
*
* @param targetName
*/
public void resetNodeProvisionAttribute(String targetName) throws ClusterOperationException, org.apache.thrift.TException;
}
public interface AsyncIface {
public void runClusterOperation(ClusterOperation clusterOperation, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.runClusterOperation_call> resultHandler) throws org.apache.thrift.TException;
public void getOperationStatusWithDetail(String targetName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getOperationStatusWithDetail_call> resultHandler) throws org.apache.thrift.TException;
public void resetNodeProvisionAttribute(String targetName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.resetNodeProvisionAttribute_call> resultHandler) throws org.apache.thrift.TException;
}
public static class Client extends org.apache.thrift.TServiceClient implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
return new Client(prot);
}
public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
return new Client(iprot, oprot);
}
}
public Client(org.apache.thrift.protocol.TProtocol prot)
{
super(prot, prot);
}
public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
super(iprot, oprot);
}
public int runClusterOperation(ClusterOperation clusterOperation) throws ClusterOperationException, org.apache.thrift.TException
{
send_runClusterOperation(clusterOperation);
return recv_runClusterOperation();
}
public void send_runClusterOperation(ClusterOperation clusterOperation) throws org.apache.thrift.TException
{
runClusterOperation_args args = new runClusterOperation_args();
args.setClusterOperation(clusterOperation);
sendBase("runClusterOperation", args);
}
public int recv_runClusterOperation() throws ClusterOperationException, org.apache.thrift.TException
{
runClusterOperation_result result = new runClusterOperation_result();
receiveBase(result, "runClusterOperation");
if (result.isSetSuccess()) {
return result.success;
}
if (result.coe != null) {
throw result.coe;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "runClusterOperation failed: unknown result");
}
public OperationStatusWithDetail getOperationStatusWithDetail(String targetName) throws ClusterOperationException, org.apache.thrift.TException
{
send_getOperationStatusWithDetail(targetName);
return recv_getOperationStatusWithDetail();
}
public void send_getOperationStatusWithDetail(String targetName) throws org.apache.thrift.TException
{
getOperationStatusWithDetail_args args = new getOperationStatusWithDetail_args();
args.setTargetName(targetName);
sendBase("getOperationStatusWithDetail", args);
}
public OperationStatusWithDetail recv_getOperationStatusWithDetail() throws ClusterOperationException, org.apache.thrift.TException
{
getOperationStatusWithDetail_result result = new getOperationStatusWithDetail_result();
receiveBase(result, "getOperationStatusWithDetail");
if (result.isSetSuccess()) {
return result.success;
}
if (result.coe != null) {
throw result.coe;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOperationStatusWithDetail failed: unknown result");
}
public void resetNodeProvisionAttribute(String targetName) throws ClusterOperationException, org.apache.thrift.TException
{
send_resetNodeProvisionAttribute(targetName);
recv_resetNodeProvisionAttribute();
}
public void send_resetNodeProvisionAttribute(String targetName) throws org.apache.thrift.TException
{
resetNodeProvisionAttribute_args args = new resetNodeProvisionAttribute_args();
args.setTargetName(targetName);
sendBase("resetNodeProvisionAttribute", args);
}
public void recv_resetNodeProvisionAttribute() throws ClusterOperationException, org.apache.thrift.TException
{
resetNodeProvisionAttribute_result result = new resetNodeProvisionAttribute_result();
receiveBase(result, "resetNodeProvisionAttribute");
if (result.coe != null) {
throw result.coe;
}
return;
}
}
public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
private org.apache.thrift.async.TAsyncClientManager clientManager;
private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
this.clientManager = clientManager;
this.protocolFactory = protocolFactory;
}
public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
return new AsyncClient(protocolFactory, clientManager, transport);
}
}
public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
super(protocolFactory, clientManager, transport);
}
public void runClusterOperation(ClusterOperation clusterOperation, org.apache.thrift.async.AsyncMethodCallback<runClusterOperation_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
runClusterOperation_call method_call = new runClusterOperation_call(clusterOperation, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class runClusterOperation_call extends org.apache.thrift.async.TAsyncMethodCall {
private ClusterOperation clusterOperation;
public runClusterOperation_call(ClusterOperation clusterOperation, org.apache.thrift.async.AsyncMethodCallback<runClusterOperation_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.clusterOperation = clusterOperation;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("runClusterOperation", org.apache.thrift.protocol.TMessageType.CALL, 0));
runClusterOperation_args args = new runClusterOperation_args();
args.setClusterOperation(clusterOperation);
args.write(prot);
prot.writeMessageEnd();
}
public int getResult() throws ClusterOperationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_runClusterOperation();
}
}
public void getOperationStatusWithDetail(String targetName, org.apache.thrift.async.AsyncMethodCallback<getOperationStatusWithDetail_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
getOperationStatusWithDetail_call method_call = new getOperationStatusWithDetail_call(targetName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getOperationStatusWithDetail_call extends org.apache.thrift.async.TAsyncMethodCall {
private String targetName;
public getOperationStatusWithDetail_call(String targetName, org.apache.thrift.async.AsyncMethodCallback<getOperationStatusWithDetail_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.targetName = targetName;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getOperationStatusWithDetail", org.apache.thrift.protocol.TMessageType.CALL, 0));
getOperationStatusWithDetail_args args = new getOperationStatusWithDetail_args();
args.setTargetName(targetName);
args.write(prot);
prot.writeMessageEnd();
}
public OperationStatusWithDetail getResult() throws ClusterOperationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_getOperationStatusWithDetail();
}
}
public void resetNodeProvisionAttribute(String targetName, org.apache.thrift.async.AsyncMethodCallback<resetNodeProvisionAttribute_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
resetNodeProvisionAttribute_call method_call = new resetNodeProvisionAttribute_call(targetName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class resetNodeProvisionAttribute_call extends org.apache.thrift.async.TAsyncMethodCall {
private String targetName;
public resetNodeProvisionAttribute_call(String targetName, org.apache.thrift.async.AsyncMethodCallback<resetNodeProvisionAttribute_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.targetName = targetName;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("resetNodeProvisionAttribute", org.apache.thrift.protocol.TMessageType.CALL, 0));
resetNodeProvisionAttribute_args args = new resetNodeProvisionAttribute_args();
args.setTargetName(targetName);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws ClusterOperationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_resetNodeProvisionAttribute();
}
}
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
}
protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
processMap.put("runClusterOperation", new runClusterOperation());
processMap.put("getOperationStatusWithDetail", new getOperationStatusWithDetail());
processMap.put("resetNodeProvisionAttribute", new resetNodeProvisionAttribute());
return processMap;
}
public static class runClusterOperation<I extends Iface> extends org.apache.thrift.ProcessFunction<I, runClusterOperation_args> {
public runClusterOperation() {
super("runClusterOperation");
}
public runClusterOperation_args getEmptyArgsInstance() {
return new runClusterOperation_args();
}
protected boolean isOneway() {
return false;
}
public runClusterOperation_result getResult(I iface, runClusterOperation_args args) throws org.apache.thrift.TException {
runClusterOperation_result result = new runClusterOperation_result();
try {
result.success = iface.runClusterOperation(args.clusterOperation);
result.setSuccessIsSet(true);
} catch (ClusterOperationException coe) {
result.coe = coe;
}
return result;
}
}
public static class getOperationStatusWithDetail<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getOperationStatusWithDetail_args> {
public getOperationStatusWithDetail() {
super("getOperationStatusWithDetail");
}
public getOperationStatusWithDetail_args getEmptyArgsInstance() {
return new getOperationStatusWithDetail_args();
}
protected boolean isOneway() {
return false;
}
public getOperationStatusWithDetail_result getResult(I iface, getOperationStatusWithDetail_args args) throws org.apache.thrift.TException {
getOperationStatusWithDetail_result result = new getOperationStatusWithDetail_result();
try {
result.success = iface.getOperationStatusWithDetail(args.targetName);
} catch (ClusterOperationException coe) {
result.coe = coe;
}
return result;
}
}
public static class resetNodeProvisionAttribute<I extends Iface> extends org.apache.thrift.ProcessFunction<I, resetNodeProvisionAttribute_args> {
public resetNodeProvisionAttribute() {
super("resetNodeProvisionAttribute");
}
public resetNodeProvisionAttribute_args getEmptyArgsInstance() {
return new resetNodeProvisionAttribute_args();
}
protected boolean isOneway() {
return false;
}
public resetNodeProvisionAttribute_result getResult(I iface, resetNodeProvisionAttribute_args args) throws org.apache.thrift.TException {
resetNodeProvisionAttribute_result result = new resetNodeProvisionAttribute_result();
try {
iface.resetNodeProvisionAttribute(args.targetName);
} catch (ClusterOperationException coe) {
result.coe = coe;
}
return result;
}
}
}
public static class runClusterOperation_args implements org.apache.thrift.TBase<runClusterOperation_args, runClusterOperation_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("runClusterOperation_args");
private static final org.apache.thrift.protocol.TField CLUSTER_OPERATION_FIELD_DESC = new org.apache.thrift.protocol.TField("clusterOperation", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new runClusterOperation_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new runClusterOperation_argsTupleSchemeFactory());
}
public ClusterOperation clusterOperation; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
CLUSTER_OPERATION((short)1, "clusterOperation");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // CLUSTER_OPERATION
return CLUSTER_OPERATION;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CLUSTER_OPERATION, new org.apache.thrift.meta_data.FieldMetaData("clusterOperation", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ClusterOperation.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(runClusterOperation_args.class, metaDataMap);
}
public runClusterOperation_args() {
}
public runClusterOperation_args(
ClusterOperation clusterOperation)
{
this();
this.clusterOperation = clusterOperation;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public runClusterOperation_args(runClusterOperation_args other) {
if (other.isSetClusterOperation()) {
this.clusterOperation = new ClusterOperation(other.clusterOperation);
}
}
public runClusterOperation_args deepCopy() {
return new runClusterOperation_args(this);
}
@Override
public void clear() {
this.clusterOperation = null;
}
public ClusterOperation getClusterOperation() {
return this.clusterOperation;
}
public runClusterOperation_args setClusterOperation(ClusterOperation clusterOperation) {
this.clusterOperation = clusterOperation;
return this;
}
public void unsetClusterOperation() {
this.clusterOperation = null;
}
/** Returns true if field clusterOperation is set (has been assigned a value) and false otherwise */
public boolean isSetClusterOperation() {
return this.clusterOperation != null;
}
public void setClusterOperationIsSet(boolean value) {
if (!value) {
this.clusterOperation = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case CLUSTER_OPERATION:
if (value == null) {
unsetClusterOperation();
} else {
setClusterOperation((ClusterOperation)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case CLUSTER_OPERATION:
return getClusterOperation();
}
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_OPERATION:
return isSetClusterOperation();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof runClusterOperation_args)
return this.equals((runClusterOperation_args)that);
return false;
}
public boolean equals(runClusterOperation_args that) {
if (that == null)
return false;
boolean this_present_clusterOperation = true && this.isSetClusterOperation();
boolean that_present_clusterOperation = true && that.isSetClusterOperation();
if (this_present_clusterOperation || that_present_clusterOperation) {
if (!(this_present_clusterOperation && that_present_clusterOperation))
return false;
if (!this.clusterOperation.equals(that.clusterOperation))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(runClusterOperation_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
runClusterOperation_args typedOther = (runClusterOperation_args)other;
lastComparison = Boolean.valueOf(isSetClusterOperation()).compareTo(typedOther.isSetClusterOperation());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetClusterOperation()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clusterOperation, typedOther.clusterOperation);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("runClusterOperation_args(");
boolean first = true;
sb.append("clusterOperation:");
if (this.clusterOperation == null) {
sb.append("null");
} else {
sb.append(this.clusterOperation);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (clusterOperation != null) {
clusterOperation.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class runClusterOperation_argsStandardSchemeFactory implements SchemeFactory {
public runClusterOperation_argsStandardScheme getScheme() {
return new runClusterOperation_argsStandardScheme();
}
}
private static class runClusterOperation_argsStandardScheme extends StandardScheme<runClusterOperation_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, runClusterOperation_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // CLUSTER_OPERATION
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.clusterOperation = new ClusterOperation();
struct.clusterOperation.read(iprot);
struct.setClusterOperationIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, runClusterOperation_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.clusterOperation != null) {
oprot.writeFieldBegin(CLUSTER_OPERATION_FIELD_DESC);
struct.clusterOperation.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class runClusterOperation_argsTupleSchemeFactory implements SchemeFactory {
public runClusterOperation_argsTupleScheme getScheme() {
return new runClusterOperation_argsTupleScheme();
}
}
private static class runClusterOperation_argsTupleScheme extends TupleScheme<runClusterOperation_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, runClusterOperation_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetClusterOperation()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetClusterOperation()) {
struct.clusterOperation.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, runClusterOperation_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.clusterOperation = new ClusterOperation();
struct.clusterOperation.read(iprot);
struct.setClusterOperationIsSet(true);
}
}
}
}
public static class runClusterOperation_result implements org.apache.thrift.TBase<runClusterOperation_result, runClusterOperation_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("runClusterOperation_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
private static final org.apache.thrift.protocol.TField COE_FIELD_DESC = new org.apache.thrift.protocol.TField("coe", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new runClusterOperation_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new runClusterOperation_resultTupleSchemeFactory());
}
public int success; // required
public ClusterOperationException coe; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
COE((short)1, "coe");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // COE
return COE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.COE, new org.apache.thrift.meta_data.FieldMetaData("coe", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(runClusterOperation_result.class, metaDataMap);
}
public runClusterOperation_result() {
}
public runClusterOperation_result(
int success,
ClusterOperationException coe)
{
this();
this.success = success;
setSuccessIsSet(true);
this.coe = coe;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public runClusterOperation_result(runClusterOperation_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetCoe()) {
this.coe = new ClusterOperationException(other.coe);
}
}
public runClusterOperation_result deepCopy() {
return new runClusterOperation_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = 0;
this.coe = null;
}
public int getSuccess() {
return this.success;
}
public runClusterOperation_result setSuccess(int success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public ClusterOperationException getCoe() {
return this.coe;
}
public runClusterOperation_result setCoe(ClusterOperationException coe) {
this.coe = coe;
return this;
}
public void unsetCoe() {
this.coe = null;
}
/** Returns true if field coe is set (has been assigned a value) and false otherwise */
public boolean isSetCoe() {
return this.coe != null;
}
public void setCoeIsSet(boolean value) {
if (!value) {
this.coe = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Integer)value);
}
break;
case COE:
if (value == null) {
unsetCoe();
} else {
setCoe((ClusterOperationException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Integer.valueOf(getSuccess());
case COE:
return getCoe();
}
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 COE:
return isSetCoe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof runClusterOperation_result)
return this.equals((runClusterOperation_result)that);
return false;
}
public boolean equals(runClusterOperation_result that) {
if (that == null)
return false;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_coe = true && this.isSetCoe();
boolean that_present_coe = true && that.isSetCoe();
if (this_present_coe || that_present_coe) {
if (!(this_present_coe && that_present_coe))
return false;
if (!this.coe.equals(that.coe))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(runClusterOperation_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
runClusterOperation_result typedOther = (runClusterOperation_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetCoe()).compareTo(typedOther.isSetCoe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCoe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.coe, typedOther.coe);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("runClusterOperation_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("coe:");
if (this.coe == null) {
sb.append("null");
} else {
sb.append(this.coe);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class runClusterOperation_resultStandardSchemeFactory implements SchemeFactory {
public runClusterOperation_resultStandardScheme getScheme() {
return new runClusterOperation_resultStandardScheme();
}
}
private static class runClusterOperation_resultStandardScheme extends StandardScheme<runClusterOperation_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, runClusterOperation_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.success = iprot.readI32();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // COE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.coe = new ClusterOperationException();
struct.coe.read(iprot);
struct.setCoeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, runClusterOperation_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeI32(struct.success);
oprot.writeFieldEnd();
}
if (struct.coe != null) {
oprot.writeFieldBegin(COE_FIELD_DESC);
struct.coe.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class runClusterOperation_resultTupleSchemeFactory implements SchemeFactory {
public runClusterOperation_resultTupleScheme getScheme() {
return new runClusterOperation_resultTupleScheme();
}
}
private static class runClusterOperation_resultTupleScheme extends TupleScheme<runClusterOperation_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, runClusterOperation_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetCoe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeI32(struct.success);
}
if (struct.isSetCoe()) {
struct.coe.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, runClusterOperation_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readI32();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.coe = new ClusterOperationException();
struct.coe.read(iprot);
struct.setCoeIsSet(true);
}
}
}
}
public static class getOperationStatusWithDetail_args implements org.apache.thrift.TBase<getOperationStatusWithDetail_args, getOperationStatusWithDetail_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOperationStatusWithDetail_args");
private static final org.apache.thrift.protocol.TField TARGET_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("targetName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getOperationStatusWithDetail_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getOperationStatusWithDetail_argsTupleSchemeFactory());
}
public String targetName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
TARGET_NAME((short)1, "targetName");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TARGET_NAME
return TARGET_NAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TARGET_NAME, new org.apache.thrift.meta_data.FieldMetaData("targetName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOperationStatusWithDetail_args.class, metaDataMap);
}
public getOperationStatusWithDetail_args() {
}
public getOperationStatusWithDetail_args(
String targetName)
{
this();
this.targetName = targetName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getOperationStatusWithDetail_args(getOperationStatusWithDetail_args other) {
if (other.isSetTargetName()) {
this.targetName = other.targetName;
}
}
public getOperationStatusWithDetail_args deepCopy() {
return new getOperationStatusWithDetail_args(this);
}
@Override
public void clear() {
this.targetName = null;
}
public String getTargetName() {
return this.targetName;
}
public getOperationStatusWithDetail_args setTargetName(String targetName) {
this.targetName = targetName;
return this;
}
public void unsetTargetName() {
this.targetName = null;
}
/** Returns true if field targetName is set (has been assigned a value) and false otherwise */
public boolean isSetTargetName() {
return this.targetName != null;
}
public void setTargetNameIsSet(boolean value) {
if (!value) {
this.targetName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TARGET_NAME:
if (value == null) {
unsetTargetName();
} else {
setTargetName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TARGET_NAME:
return getTargetName();
}
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 TARGET_NAME:
return isSetTargetName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getOperationStatusWithDetail_args)
return this.equals((getOperationStatusWithDetail_args)that);
return false;
}
public boolean equals(getOperationStatusWithDetail_args that) {
if (that == null)
return false;
boolean this_present_targetName = true && this.isSetTargetName();
boolean that_present_targetName = true && that.isSetTargetName();
if (this_present_targetName || that_present_targetName) {
if (!(this_present_targetName && that_present_targetName))
return false;
if (!this.targetName.equals(that.targetName))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getOperationStatusWithDetail_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getOperationStatusWithDetail_args typedOther = (getOperationStatusWithDetail_args)other;
lastComparison = Boolean.valueOf(isSetTargetName()).compareTo(typedOther.isSetTargetName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTargetName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.targetName, typedOther.targetName);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getOperationStatusWithDetail_args(");
boolean first = true;
sb.append("targetName:");
if (this.targetName == null) {
sb.append("null");
} else {
sb.append(this.targetName);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class getOperationStatusWithDetail_argsStandardSchemeFactory implements SchemeFactory {
public getOperationStatusWithDetail_argsStandardScheme getScheme() {
return new getOperationStatusWithDetail_argsStandardScheme();
}
}
private static class getOperationStatusWithDetail_argsStandardScheme extends StandardScheme<getOperationStatusWithDetail_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getOperationStatusWithDetail_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // TARGET_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.targetName = iprot.readString();
struct.setTargetNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getOperationStatusWithDetail_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.targetName != null) {
oprot.writeFieldBegin(TARGET_NAME_FIELD_DESC);
oprot.writeString(struct.targetName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getOperationStatusWithDetail_argsTupleSchemeFactory implements SchemeFactory {
public getOperationStatusWithDetail_argsTupleScheme getScheme() {
return new getOperationStatusWithDetail_argsTupleScheme();
}
}
private static class getOperationStatusWithDetail_argsTupleScheme extends TupleScheme<getOperationStatusWithDetail_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getOperationStatusWithDetail_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTargetName()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetTargetName()) {
oprot.writeString(struct.targetName);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getOperationStatusWithDetail_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.targetName = iprot.readString();
struct.setTargetNameIsSet(true);
}
}
}
}
public static class getOperationStatusWithDetail_result implements org.apache.thrift.TBase<getOperationStatusWithDetail_result, getOperationStatusWithDetail_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOperationStatusWithDetail_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField COE_FIELD_DESC = new org.apache.thrift.protocol.TField("coe", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getOperationStatusWithDetail_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getOperationStatusWithDetail_resultTupleSchemeFactory());
}
public OperationStatusWithDetail success; // required
public ClusterOperationException coe; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
COE((short)1, "coe");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // COE
return COE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OperationStatusWithDetail.class)));
tmpMap.put(_Fields.COE, new org.apache.thrift.meta_data.FieldMetaData("coe", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOperationStatusWithDetail_result.class, metaDataMap);
}
public getOperationStatusWithDetail_result() {
}
public getOperationStatusWithDetail_result(
OperationStatusWithDetail success,
ClusterOperationException coe)
{
this();
this.success = success;
this.coe = coe;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getOperationStatusWithDetail_result(getOperationStatusWithDetail_result other) {
if (other.isSetSuccess()) {
this.success = new OperationStatusWithDetail(other.success);
}
if (other.isSetCoe()) {
this.coe = new ClusterOperationException(other.coe);
}
}
public getOperationStatusWithDetail_result deepCopy() {
return new getOperationStatusWithDetail_result(this);
}
@Override
public void clear() {
this.success = null;
this.coe = null;
}
public OperationStatusWithDetail getSuccess() {
return this.success;
}
public getOperationStatusWithDetail_result setSuccess(OperationStatusWithDetail 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 ClusterOperationException getCoe() {
return this.coe;
}
public getOperationStatusWithDetail_result setCoe(ClusterOperationException coe) {
this.coe = coe;
return this;
}
public void unsetCoe() {
this.coe = null;
}
/** Returns true if field coe is set (has been assigned a value) and false otherwise */
public boolean isSetCoe() {
return this.coe != null;
}
public void setCoeIsSet(boolean value) {
if (!value) {
this.coe = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((OperationStatusWithDetail)value);
}
break;
case COE:
if (value == null) {
unsetCoe();
} else {
setCoe((ClusterOperationException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case COE:
return getCoe();
}
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 COE:
return isSetCoe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getOperationStatusWithDetail_result)
return this.equals((getOperationStatusWithDetail_result)that);
return false;
}
public boolean equals(getOperationStatusWithDetail_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_coe = true && this.isSetCoe();
boolean that_present_coe = true && that.isSetCoe();
if (this_present_coe || that_present_coe) {
if (!(this_present_coe && that_present_coe))
return false;
if (!this.coe.equals(that.coe))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getOperationStatusWithDetail_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getOperationStatusWithDetail_result typedOther = (getOperationStatusWithDetail_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetCoe()).compareTo(typedOther.isSetCoe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCoe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.coe, typedOther.coe);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getOperationStatusWithDetail_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("coe:");
if (this.coe == null) {
sb.append("null");
} else {
sb.append(this.coe);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class getOperationStatusWithDetail_resultStandardSchemeFactory implements SchemeFactory {
public getOperationStatusWithDetail_resultStandardScheme getScheme() {
return new getOperationStatusWithDetail_resultStandardScheme();
}
}
private static class getOperationStatusWithDetail_resultStandardScheme extends StandardScheme<getOperationStatusWithDetail_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getOperationStatusWithDetail_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new OperationStatusWithDetail();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // COE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.coe = new ClusterOperationException();
struct.coe.read(iprot);
struct.setCoeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getOperationStatusWithDetail_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.coe != null) {
oprot.writeFieldBegin(COE_FIELD_DESC);
struct.coe.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getOperationStatusWithDetail_resultTupleSchemeFactory implements SchemeFactory {
public getOperationStatusWithDetail_resultTupleScheme getScheme() {
return new getOperationStatusWithDetail_resultTupleScheme();
}
}
private static class getOperationStatusWithDetail_resultTupleScheme extends TupleScheme<getOperationStatusWithDetail_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getOperationStatusWithDetail_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetCoe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetCoe()) {
struct.coe.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getOperationStatusWithDetail_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new OperationStatusWithDetail();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.coe = new ClusterOperationException();
struct.coe.read(iprot);
struct.setCoeIsSet(true);
}
}
}
}
public static class resetNodeProvisionAttribute_args implements org.apache.thrift.TBase<resetNodeProvisionAttribute_args, resetNodeProvisionAttribute_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("resetNodeProvisionAttribute_args");
private static final org.apache.thrift.protocol.TField TARGET_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("targetName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new resetNodeProvisionAttribute_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new resetNodeProvisionAttribute_argsTupleSchemeFactory());
}
public String targetName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
TARGET_NAME((short)1, "targetName");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TARGET_NAME
return TARGET_NAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TARGET_NAME, new org.apache.thrift.meta_data.FieldMetaData("targetName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(resetNodeProvisionAttribute_args.class, metaDataMap);
}
public resetNodeProvisionAttribute_args() {
}
public resetNodeProvisionAttribute_args(
String targetName)
{
this();
this.targetName = targetName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public resetNodeProvisionAttribute_args(resetNodeProvisionAttribute_args other) {
if (other.isSetTargetName()) {
this.targetName = other.targetName;
}
}
public resetNodeProvisionAttribute_args deepCopy() {
return new resetNodeProvisionAttribute_args(this);
}
@Override
public void clear() {
this.targetName = null;
}
public String getTargetName() {
return this.targetName;
}
public resetNodeProvisionAttribute_args setTargetName(String targetName) {
this.targetName = targetName;
return this;
}
public void unsetTargetName() {
this.targetName = null;
}
/** Returns true if field targetName is set (has been assigned a value) and false otherwise */
public boolean isSetTargetName() {
return this.targetName != null;
}
public void setTargetNameIsSet(boolean value) {
if (!value) {
this.targetName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TARGET_NAME:
if (value == null) {
unsetTargetName();
} else {
setTargetName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TARGET_NAME:
return getTargetName();
}
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 TARGET_NAME:
return isSetTargetName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof resetNodeProvisionAttribute_args)
return this.equals((resetNodeProvisionAttribute_args)that);
return false;
}
public boolean equals(resetNodeProvisionAttribute_args that) {
if (that == null)
return false;
boolean this_present_targetName = true && this.isSetTargetName();
boolean that_present_targetName = true && that.isSetTargetName();
if (this_present_targetName || that_present_targetName) {
if (!(this_present_targetName && that_present_targetName))
return false;
if (!this.targetName.equals(that.targetName))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(resetNodeProvisionAttribute_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
resetNodeProvisionAttribute_args typedOther = (resetNodeProvisionAttribute_args)other;
lastComparison = Boolean.valueOf(isSetTargetName()).compareTo(typedOther.isSetTargetName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTargetName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.targetName, typedOther.targetName);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("resetNodeProvisionAttribute_args(");
boolean first = true;
sb.append("targetName:");
if (this.targetName == null) {
sb.append("null");
} else {
sb.append(this.targetName);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class resetNodeProvisionAttribute_argsStandardSchemeFactory implements SchemeFactory {
public resetNodeProvisionAttribute_argsStandardScheme getScheme() {
return new resetNodeProvisionAttribute_argsStandardScheme();
}
}
private static class resetNodeProvisionAttribute_argsStandardScheme extends StandardScheme<resetNodeProvisionAttribute_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, resetNodeProvisionAttribute_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // TARGET_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.targetName = iprot.readString();
struct.setTargetNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, resetNodeProvisionAttribute_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.targetName != null) {
oprot.writeFieldBegin(TARGET_NAME_FIELD_DESC);
oprot.writeString(struct.targetName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class resetNodeProvisionAttribute_argsTupleSchemeFactory implements SchemeFactory {
public resetNodeProvisionAttribute_argsTupleScheme getScheme() {
return new resetNodeProvisionAttribute_argsTupleScheme();
}
}
private static class resetNodeProvisionAttribute_argsTupleScheme extends TupleScheme<resetNodeProvisionAttribute_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, resetNodeProvisionAttribute_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTargetName()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetTargetName()) {
oprot.writeString(struct.targetName);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, resetNodeProvisionAttribute_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.targetName = iprot.readString();
struct.setTargetNameIsSet(true);
}
}
}
}
public static class resetNodeProvisionAttribute_result implements org.apache.thrift.TBase<resetNodeProvisionAttribute_result, resetNodeProvisionAttribute_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("resetNodeProvisionAttribute_result");
private static final org.apache.thrift.protocol.TField COE_FIELD_DESC = new org.apache.thrift.protocol.TField("coe", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new resetNodeProvisionAttribute_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new resetNodeProvisionAttribute_resultTupleSchemeFactory());
}
public ClusterOperationException coe; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
COE((short)1, "coe");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // COE
return COE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.COE, new org.apache.thrift.meta_data.FieldMetaData("coe", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(resetNodeProvisionAttribute_result.class, metaDataMap);
}
public resetNodeProvisionAttribute_result() {
}
public resetNodeProvisionAttribute_result(
ClusterOperationException coe)
{
this();
this.coe = coe;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public resetNodeProvisionAttribute_result(resetNodeProvisionAttribute_result other) {
if (other.isSetCoe()) {
this.coe = new ClusterOperationException(other.coe);
}
}
public resetNodeProvisionAttribute_result deepCopy() {
return new resetNodeProvisionAttribute_result(this);
}
@Override
public void clear() {
this.coe = null;
}
public ClusterOperationException getCoe() {
return this.coe;
}
public resetNodeProvisionAttribute_result setCoe(ClusterOperationException coe) {
this.coe = coe;
return this;
}
public void unsetCoe() {
this.coe = null;
}
/** Returns true if field coe is set (has been assigned a value) and false otherwise */
public boolean isSetCoe() {
return this.coe != null;
}
public void setCoeIsSet(boolean value) {
if (!value) {
this.coe = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case COE:
if (value == null) {
unsetCoe();
} else {
setCoe((ClusterOperationException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case COE:
return getCoe();
}
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 COE:
return isSetCoe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof resetNodeProvisionAttribute_result)
return this.equals((resetNodeProvisionAttribute_result)that);
return false;
}
public boolean equals(resetNodeProvisionAttribute_result that) {
if (that == null)
return false;
boolean this_present_coe = true && this.isSetCoe();
boolean that_present_coe = true && that.isSetCoe();
if (this_present_coe || that_present_coe) {
if (!(this_present_coe && that_present_coe))
return false;
if (!this.coe.equals(that.coe))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(resetNodeProvisionAttribute_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
resetNodeProvisionAttribute_result typedOther = (resetNodeProvisionAttribute_result)other;
lastComparison = Boolean.valueOf(isSetCoe()).compareTo(typedOther.isSetCoe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCoe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.coe, typedOther.coe);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("resetNodeProvisionAttribute_result(");
boolean first = true;
sb.append("coe:");
if (this.coe == null) {
sb.append("null");
} else {
sb.append(this.coe);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class resetNodeProvisionAttribute_resultStandardSchemeFactory implements SchemeFactory {
public resetNodeProvisionAttribute_resultStandardScheme getScheme() {
return new resetNodeProvisionAttribute_resultStandardScheme();
}
}
private static class resetNodeProvisionAttribute_resultStandardScheme extends StandardScheme<resetNodeProvisionAttribute_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, resetNodeProvisionAttribute_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // COE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.coe = new ClusterOperationException();
struct.coe.read(iprot);
struct.setCoeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, resetNodeProvisionAttribute_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.coe != null) {
oprot.writeFieldBegin(COE_FIELD_DESC);
struct.coe.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class resetNodeProvisionAttribute_resultTupleSchemeFactory implements SchemeFactory {
public resetNodeProvisionAttribute_resultTupleScheme getScheme() {
return new resetNodeProvisionAttribute_resultTupleScheme();
}
}
private static class resetNodeProvisionAttribute_resultTupleScheme extends TupleScheme<resetNodeProvisionAttribute_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, resetNodeProvisionAttribute_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetCoe()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetCoe()) {
struct.coe.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, resetNodeProvisionAttribute_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.coe = new ClusterOperationException();
struct.coe.read(iprot);
struct.setCoeIsSet(true);
}
}
}
}
}