blob: 98c332925aa98c8c8c2cef8fd833c46ea0efcc30 [file] [log] [blame]
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.airavata.model.appcatalog.groupresourceprofile;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class GroupAccountSSHProvisionerConfig implements org.apache.thrift.TBase<GroupAccountSSHProvisionerConfig, GroupAccountSSHProvisionerConfig._Fields>, java.io.Serializable, Cloneable, Comparable<GroupAccountSSHProvisionerConfig> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GroupAccountSSHProvisionerConfig");
private static final org.apache.thrift.protocol.TField RESOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField GROUP_RESOURCE_PROFILE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("groupResourceProfileId", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField CONFIG_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("configName", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField CONFIG_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("configValue", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new GroupAccountSSHProvisionerConfigStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new GroupAccountSSHProvisionerConfigTupleSchemeFactory();
private java.lang.String resourceId; // required
private java.lang.String groupResourceProfileId; // required
private java.lang.String configName; // required
private java.lang.String configValue; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
RESOURCE_ID((short)1, "resourceId"),
GROUP_RESOURCE_PROFILE_ID((short)2, "groupResourceProfileId"),
CONFIG_NAME((short)3, "configName"),
CONFIG_VALUE((short)4, "configValue");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // RESOURCE_ID
return RESOURCE_ID;
case 2: // GROUP_RESOURCE_PROFILE_ID
return GROUP_RESOURCE_PROFILE_ID;
case 3: // CONFIG_NAME
return CONFIG_NAME;
case 4: // CONFIG_VALUE
return CONFIG_VALUE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.CONFIG_VALUE};
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.RESOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("resourceId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.GROUP_RESOURCE_PROFILE_ID, new org.apache.thrift.meta_data.FieldMetaData("groupResourceProfileId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.CONFIG_NAME, new org.apache.thrift.meta_data.FieldMetaData("configName", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.CONFIG_VALUE, new org.apache.thrift.meta_data.FieldMetaData("configValue", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GroupAccountSSHProvisionerConfig.class, metaDataMap);
}
public GroupAccountSSHProvisionerConfig() {
this.groupResourceProfileId = "DO_NOT_SET_AT_CLIENTS";
}
public GroupAccountSSHProvisionerConfig(
java.lang.String resourceId,
java.lang.String groupResourceProfileId,
java.lang.String configName)
{
this();
this.resourceId = resourceId;
this.groupResourceProfileId = groupResourceProfileId;
this.configName = configName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public GroupAccountSSHProvisionerConfig(GroupAccountSSHProvisionerConfig other) {
if (other.isSetResourceId()) {
this.resourceId = other.resourceId;
}
if (other.isSetGroupResourceProfileId()) {
this.groupResourceProfileId = other.groupResourceProfileId;
}
if (other.isSetConfigName()) {
this.configName = other.configName;
}
if (other.isSetConfigValue()) {
this.configValue = other.configValue;
}
}
public GroupAccountSSHProvisionerConfig deepCopy() {
return new GroupAccountSSHProvisionerConfig(this);
}
@Override
public void clear() {
this.resourceId = null;
this.groupResourceProfileId = "DO_NOT_SET_AT_CLIENTS";
this.configName = null;
this.configValue = null;
}
public java.lang.String getResourceId() {
return this.resourceId;
}
public void setResourceId(java.lang.String resourceId) {
this.resourceId = resourceId;
}
public void unsetResourceId() {
this.resourceId = null;
}
/** Returns true if field resourceId is set (has been assigned a value) and false otherwise */
public boolean isSetResourceId() {
return this.resourceId != null;
}
public void setResourceIdIsSet(boolean value) {
if (!value) {
this.resourceId = null;
}
}
public java.lang.String getGroupResourceProfileId() {
return this.groupResourceProfileId;
}
public void setGroupResourceProfileId(java.lang.String groupResourceProfileId) {
this.groupResourceProfileId = groupResourceProfileId;
}
public void unsetGroupResourceProfileId() {
this.groupResourceProfileId = null;
}
/** Returns true if field groupResourceProfileId is set (has been assigned a value) and false otherwise */
public boolean isSetGroupResourceProfileId() {
return this.groupResourceProfileId != null;
}
public void setGroupResourceProfileIdIsSet(boolean value) {
if (!value) {
this.groupResourceProfileId = null;
}
}
public java.lang.String getConfigName() {
return this.configName;
}
public void setConfigName(java.lang.String configName) {
this.configName = configName;
}
public void unsetConfigName() {
this.configName = null;
}
/** Returns true if field configName is set (has been assigned a value) and false otherwise */
public boolean isSetConfigName() {
return this.configName != null;
}
public void setConfigNameIsSet(boolean value) {
if (!value) {
this.configName = null;
}
}
public java.lang.String getConfigValue() {
return this.configValue;
}
public void setConfigValue(java.lang.String configValue) {
this.configValue = configValue;
}
public void unsetConfigValue() {
this.configValue = null;
}
/** Returns true if field configValue is set (has been assigned a value) and false otherwise */
public boolean isSetConfigValue() {
return this.configValue != null;
}
public void setConfigValueIsSet(boolean value) {
if (!value) {
this.configValue = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case RESOURCE_ID:
if (value == null) {
unsetResourceId();
} else {
setResourceId((java.lang.String)value);
}
break;
case GROUP_RESOURCE_PROFILE_ID:
if (value == null) {
unsetGroupResourceProfileId();
} else {
setGroupResourceProfileId((java.lang.String)value);
}
break;
case CONFIG_NAME:
if (value == null) {
unsetConfigName();
} else {
setConfigName((java.lang.String)value);
}
break;
case CONFIG_VALUE:
if (value == null) {
unsetConfigValue();
} else {
setConfigValue((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case RESOURCE_ID:
return getResourceId();
case GROUP_RESOURCE_PROFILE_ID:
return getGroupResourceProfileId();
case CONFIG_NAME:
return getConfigName();
case CONFIG_VALUE:
return getConfigValue();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case RESOURCE_ID:
return isSetResourceId();
case GROUP_RESOURCE_PROFILE_ID:
return isSetGroupResourceProfileId();
case CONFIG_NAME:
return isSetConfigName();
case CONFIG_VALUE:
return isSetConfigValue();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof GroupAccountSSHProvisionerConfig)
return this.equals((GroupAccountSSHProvisionerConfig)that);
return false;
}
public boolean equals(GroupAccountSSHProvisionerConfig that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_resourceId = true && this.isSetResourceId();
boolean that_present_resourceId = true && that.isSetResourceId();
if (this_present_resourceId || that_present_resourceId) {
if (!(this_present_resourceId && that_present_resourceId))
return false;
if (!this.resourceId.equals(that.resourceId))
return false;
}
boolean this_present_groupResourceProfileId = true && this.isSetGroupResourceProfileId();
boolean that_present_groupResourceProfileId = true && that.isSetGroupResourceProfileId();
if (this_present_groupResourceProfileId || that_present_groupResourceProfileId) {
if (!(this_present_groupResourceProfileId && that_present_groupResourceProfileId))
return false;
if (!this.groupResourceProfileId.equals(that.groupResourceProfileId))
return false;
}
boolean this_present_configName = true && this.isSetConfigName();
boolean that_present_configName = true && that.isSetConfigName();
if (this_present_configName || that_present_configName) {
if (!(this_present_configName && that_present_configName))
return false;
if (!this.configName.equals(that.configName))
return false;
}
boolean this_present_configValue = true && this.isSetConfigValue();
boolean that_present_configValue = true && that.isSetConfigValue();
if (this_present_configValue || that_present_configValue) {
if (!(this_present_configValue && that_present_configValue))
return false;
if (!this.configValue.equals(that.configValue))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetResourceId()) ? 131071 : 524287);
if (isSetResourceId())
hashCode = hashCode * 8191 + resourceId.hashCode();
hashCode = hashCode * 8191 + ((isSetGroupResourceProfileId()) ? 131071 : 524287);
if (isSetGroupResourceProfileId())
hashCode = hashCode * 8191 + groupResourceProfileId.hashCode();
hashCode = hashCode * 8191 + ((isSetConfigName()) ? 131071 : 524287);
if (isSetConfigName())
hashCode = hashCode * 8191 + configName.hashCode();
hashCode = hashCode * 8191 + ((isSetConfigValue()) ? 131071 : 524287);
if (isSetConfigValue())
hashCode = hashCode * 8191 + configValue.hashCode();
return hashCode;
}
@Override
public int compareTo(GroupAccountSSHProvisionerConfig other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetResourceId()).compareTo(other.isSetResourceId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetResourceId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceId, other.resourceId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetGroupResourceProfileId()).compareTo(other.isSetGroupResourceProfileId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGroupResourceProfileId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupResourceProfileId, other.groupResourceProfileId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetConfigName()).compareTo(other.isSetConfigName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetConfigName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configName, other.configName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetConfigValue()).compareTo(other.isSetConfigValue());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetConfigValue()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configValue, other.configValue);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("GroupAccountSSHProvisionerConfig(");
boolean first = true;
sb.append("resourceId:");
if (this.resourceId == null) {
sb.append("null");
} else {
sb.append(this.resourceId);
}
first = false;
if (!first) sb.append(", ");
sb.append("groupResourceProfileId:");
if (this.groupResourceProfileId == null) {
sb.append("null");
} else {
sb.append(this.groupResourceProfileId);
}
first = false;
if (!first) sb.append(", ");
sb.append("configName:");
if (this.configName == null) {
sb.append("null");
} else {
sb.append(this.configName);
}
first = false;
if (isSetConfigValue()) {
if (!first) sb.append(", ");
sb.append("configValue:");
if (this.configValue == null) {
sb.append("null");
} else {
sb.append(this.configValue);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (!isSetResourceId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'resourceId' is unset! Struct:" + toString());
}
if (!isSetGroupResourceProfileId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'groupResourceProfileId' is unset! Struct:" + toString());
}
if (!isSetConfigName()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'configName' is unset! Struct:" + toString());
}
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class GroupAccountSSHProvisionerConfigStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public GroupAccountSSHProvisionerConfigStandardScheme getScheme() {
return new GroupAccountSSHProvisionerConfigStandardScheme();
}
}
private static class GroupAccountSSHProvisionerConfigStandardScheme extends org.apache.thrift.scheme.StandardScheme<GroupAccountSSHProvisionerConfig> {
public void read(org.apache.thrift.protocol.TProtocol iprot, GroupAccountSSHProvisionerConfig 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: // RESOURCE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.resourceId = iprot.readString();
struct.setResourceIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // GROUP_RESOURCE_PROFILE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.groupResourceProfileId = iprot.readString();
struct.setGroupResourceProfileIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // CONFIG_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.configName = iprot.readString();
struct.setConfigNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // CONFIG_VALUE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.configValue = iprot.readString();
struct.setConfigValueIsSet(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();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, GroupAccountSSHProvisionerConfig struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.resourceId != null) {
oprot.writeFieldBegin(RESOURCE_ID_FIELD_DESC);
oprot.writeString(struct.resourceId);
oprot.writeFieldEnd();
}
if (struct.groupResourceProfileId != null) {
oprot.writeFieldBegin(GROUP_RESOURCE_PROFILE_ID_FIELD_DESC);
oprot.writeString(struct.groupResourceProfileId);
oprot.writeFieldEnd();
}
if (struct.configName != null) {
oprot.writeFieldBegin(CONFIG_NAME_FIELD_DESC);
oprot.writeString(struct.configName);
oprot.writeFieldEnd();
}
if (struct.configValue != null) {
if (struct.isSetConfigValue()) {
oprot.writeFieldBegin(CONFIG_VALUE_FIELD_DESC);
oprot.writeString(struct.configValue);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class GroupAccountSSHProvisionerConfigTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public GroupAccountSSHProvisionerConfigTupleScheme getScheme() {
return new GroupAccountSSHProvisionerConfigTupleScheme();
}
}
private static class GroupAccountSSHProvisionerConfigTupleScheme extends org.apache.thrift.scheme.TupleScheme<GroupAccountSSHProvisionerConfig> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, GroupAccountSSHProvisionerConfig struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.resourceId);
oprot.writeString(struct.groupResourceProfileId);
oprot.writeString(struct.configName);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetConfigValue()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetConfigValue()) {
oprot.writeString(struct.configValue);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, GroupAccountSSHProvisionerConfig struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.resourceId = iprot.readString();
struct.setResourceIdIsSet(true);
struct.groupResourceProfileId = iprot.readString();
struct.setGroupResourceProfileIdIsSet(true);
struct.configName = iprot.readString();
struct.setConfigNameIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.configValue = iprot.readString();
struct.setConfigValueIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}