| /** |
| * 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.18.1) |
| * |
| * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING |
| * @generated |
| */ |
| package org.apache.airavata.model.appcatalog.computeresource; |
| |
| /** |
| * Authenticate using Secured Shell |
| * |
| * alternativeSSHHostName: |
| * If the login to ssh is different than the hostname itself, specify it here |
| * |
| * sshPort: |
| * If a non-default port needs to used, specify it. |
| * |
| * batchQueueEmailSenders: |
| * If a resource always sends the monitoring from a specific address, specify the |
| * full email address. If a resource sends emails from multiple addresses ( |
| * example: based on the submitted login node) then use the wildchar * to indicate |
| * the same. Example: *@*.example.com or *@example.com |
| * |
| */ |
| @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) |
| @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)") |
| public class SSHJobSubmission implements org.apache.thrift.TBase<SSHJobSubmission, SSHJobSubmission._Fields>, java.io.Serializable, Cloneable, Comparable<SSHJobSubmission> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SSHJobSubmission"); |
| |
| private static final org.apache.thrift.protocol.TField JOB_SUBMISSION_INTERFACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jobSubmissionInterfaceId", org.apache.thrift.protocol.TType.STRING, (short)1); |
| private static final org.apache.thrift.protocol.TField SECURITY_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("securityProtocol", org.apache.thrift.protocol.TType.I32, (short)2); |
| private static final org.apache.thrift.protocol.TField RESOURCE_JOB_MANAGER_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceJobManager", org.apache.thrift.protocol.TType.STRUCT, (short)3); |
| private static final org.apache.thrift.protocol.TField ALTERNATIVE_SSHHOST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("alternativeSSHHostName", org.apache.thrift.protocol.TType.STRING, (short)4); |
| private static final org.apache.thrift.protocol.TField SSH_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("sshPort", org.apache.thrift.protocol.TType.I32, (short)5); |
| private static final org.apache.thrift.protocol.TField MONITOR_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("monitorMode", org.apache.thrift.protocol.TType.I32, (short)6); |
| private static final org.apache.thrift.protocol.TField BATCH_QUEUE_EMAIL_SENDERS_FIELD_DESC = new org.apache.thrift.protocol.TField("batchQueueEmailSenders", org.apache.thrift.protocol.TType.LIST, (short)7); |
| |
| private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SSHJobSubmissionStandardSchemeFactory(); |
| private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SSHJobSubmissionTupleSchemeFactory(); |
| |
| private @org.apache.thrift.annotation.Nullable java.lang.String jobSubmissionInterfaceId; // required |
| private @org.apache.thrift.annotation.Nullable org.apache.airavata.model.data.movement.SecurityProtocol securityProtocol; // required |
| private @org.apache.thrift.annotation.Nullable ResourceJobManager resourceJobManager; // required |
| private @org.apache.thrift.annotation.Nullable java.lang.String alternativeSSHHostName; // optional |
| private int sshPort; // optional |
| private @org.apache.thrift.annotation.Nullable MonitorMode monitorMode; // optional |
| private @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> batchQueueEmailSenders; // 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 { |
| JOB_SUBMISSION_INTERFACE_ID((short)1, "jobSubmissionInterfaceId"), |
| /** |
| * |
| * @see org.apache.airavata.model.data.movement.SecurityProtocol |
| */ |
| SECURITY_PROTOCOL((short)2, "securityProtocol"), |
| RESOURCE_JOB_MANAGER((short)3, "resourceJobManager"), |
| ALTERNATIVE_SSHHOST_NAME((short)4, "alternativeSSHHostName"), |
| SSH_PORT((short)5, "sshPort"), |
| /** |
| * |
| * @see MonitorMode |
| */ |
| MONITOR_MODE((short)6, "monitorMode"), |
| BATCH_QUEUE_EMAIL_SENDERS((short)7, "batchQueueEmailSenders"); |
| |
| 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. |
| */ |
| @org.apache.thrift.annotation.Nullable |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // JOB_SUBMISSION_INTERFACE_ID |
| return JOB_SUBMISSION_INTERFACE_ID; |
| case 2: // SECURITY_PROTOCOL |
| return SECURITY_PROTOCOL; |
| case 3: // RESOURCE_JOB_MANAGER |
| return RESOURCE_JOB_MANAGER; |
| case 4: // ALTERNATIVE_SSHHOST_NAME |
| return ALTERNATIVE_SSHHOST_NAME; |
| case 5: // SSH_PORT |
| return SSH_PORT; |
| case 6: // MONITOR_MODE |
| return MONITOR_MODE; |
| case 7: // BATCH_QUEUE_EMAIL_SENDERS |
| return BATCH_QUEUE_EMAIL_SENDERS; |
| 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. |
| */ |
| @org.apache.thrift.annotation.Nullable |
| 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; |
| } |
| |
| @Override |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| @Override |
| public java.lang.String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| private static final int __SSHPORT_ISSET_ID = 0; |
| private byte __isset_bitfield = 0; |
| private static final _Fields optionals[] = {_Fields.ALTERNATIVE_SSHHOST_NAME,_Fields.SSH_PORT,_Fields.MONITOR_MODE,_Fields.BATCH_QUEUE_EMAIL_SENDERS}; |
| 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.JOB_SUBMISSION_INTERFACE_ID, new org.apache.thrift.meta_data.FieldMetaData("jobSubmissionInterfaceId", org.apache.thrift.TFieldRequirementType.REQUIRED, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.SECURITY_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("securityProtocol", org.apache.thrift.TFieldRequirementType.REQUIRED, |
| new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.airavata.model.data.movement.SecurityProtocol.class))); |
| tmpMap.put(_Fields.RESOURCE_JOB_MANAGER, new org.apache.thrift.meta_data.FieldMetaData("resourceJobManager", org.apache.thrift.TFieldRequirementType.REQUIRED, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ResourceJobManager.class))); |
| tmpMap.put(_Fields.ALTERNATIVE_SSHHOST_NAME, new org.apache.thrift.meta_data.FieldMetaData("alternativeSSHHostName", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.SSH_PORT, new org.apache.thrift.meta_data.FieldMetaData("sshPort", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); |
| tmpMap.put(_Fields.MONITOR_MODE, new org.apache.thrift.meta_data.FieldMetaData("monitorMode", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, MonitorMode.class))); |
| tmpMap.put(_Fields.BATCH_QUEUE_EMAIL_SENDERS, new org.apache.thrift.meta_data.FieldMetaData("batchQueueEmailSenders", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, |
| 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(SSHJobSubmission.class, metaDataMap); |
| } |
| |
| public SSHJobSubmission() { |
| this.jobSubmissionInterfaceId = "DO_NOT_SET_AT_CLIENTS"; |
| |
| this.sshPort = 22; |
| |
| } |
| |
| public SSHJobSubmission( |
| java.lang.String jobSubmissionInterfaceId, |
| org.apache.airavata.model.data.movement.SecurityProtocol securityProtocol, |
| ResourceJobManager resourceJobManager) |
| { |
| this(); |
| this.jobSubmissionInterfaceId = jobSubmissionInterfaceId; |
| this.securityProtocol = securityProtocol; |
| this.resourceJobManager = resourceJobManager; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public SSHJobSubmission(SSHJobSubmission other) { |
| __isset_bitfield = other.__isset_bitfield; |
| if (other.isSetJobSubmissionInterfaceId()) { |
| this.jobSubmissionInterfaceId = other.jobSubmissionInterfaceId; |
| } |
| if (other.isSetSecurityProtocol()) { |
| this.securityProtocol = other.securityProtocol; |
| } |
| if (other.isSetResourceJobManager()) { |
| this.resourceJobManager = new ResourceJobManager(other.resourceJobManager); |
| } |
| if (other.isSetAlternativeSSHHostName()) { |
| this.alternativeSSHHostName = other.alternativeSSHHostName; |
| } |
| this.sshPort = other.sshPort; |
| if (other.isSetMonitorMode()) { |
| this.monitorMode = other.monitorMode; |
| } |
| if (other.isSetBatchQueueEmailSenders()) { |
| java.util.List<java.lang.String> __this__batchQueueEmailSenders = new java.util.ArrayList<java.lang.String>(other.batchQueueEmailSenders); |
| this.batchQueueEmailSenders = __this__batchQueueEmailSenders; |
| } |
| } |
| |
| @Override |
| public SSHJobSubmission deepCopy() { |
| return new SSHJobSubmission(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.jobSubmissionInterfaceId = "DO_NOT_SET_AT_CLIENTS"; |
| |
| this.securityProtocol = null; |
| this.resourceJobManager = null; |
| this.alternativeSSHHostName = null; |
| this.sshPort = 22; |
| |
| this.monitorMode = null; |
| this.batchQueueEmailSenders = null; |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.lang.String getJobSubmissionInterfaceId() { |
| return this.jobSubmissionInterfaceId; |
| } |
| |
| public void setJobSubmissionInterfaceId(@org.apache.thrift.annotation.Nullable java.lang.String jobSubmissionInterfaceId) { |
| this.jobSubmissionInterfaceId = jobSubmissionInterfaceId; |
| } |
| |
| public void unsetJobSubmissionInterfaceId() { |
| this.jobSubmissionInterfaceId = null; |
| } |
| |
| /** Returns true if field jobSubmissionInterfaceId is set (has been assigned a value) and false otherwise */ |
| public boolean isSetJobSubmissionInterfaceId() { |
| return this.jobSubmissionInterfaceId != null; |
| } |
| |
| public void setJobSubmissionInterfaceIdIsSet(boolean value) { |
| if (!value) { |
| this.jobSubmissionInterfaceId = null; |
| } |
| } |
| |
| /** |
| * |
| * @see org.apache.airavata.model.data.movement.SecurityProtocol |
| */ |
| @org.apache.thrift.annotation.Nullable |
| public org.apache.airavata.model.data.movement.SecurityProtocol getSecurityProtocol() { |
| return this.securityProtocol; |
| } |
| |
| /** |
| * |
| * @see org.apache.airavata.model.data.movement.SecurityProtocol |
| */ |
| public void setSecurityProtocol(@org.apache.thrift.annotation.Nullable org.apache.airavata.model.data.movement.SecurityProtocol securityProtocol) { |
| this.securityProtocol = securityProtocol; |
| } |
| |
| public void unsetSecurityProtocol() { |
| this.securityProtocol = null; |
| } |
| |
| /** Returns true if field securityProtocol is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSecurityProtocol() { |
| return this.securityProtocol != null; |
| } |
| |
| public void setSecurityProtocolIsSet(boolean value) { |
| if (!value) { |
| this.securityProtocol = null; |
| } |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public ResourceJobManager getResourceJobManager() { |
| return this.resourceJobManager; |
| } |
| |
| public void setResourceJobManager(@org.apache.thrift.annotation.Nullable ResourceJobManager resourceJobManager) { |
| this.resourceJobManager = resourceJobManager; |
| } |
| |
| public void unsetResourceJobManager() { |
| this.resourceJobManager = null; |
| } |
| |
| /** Returns true if field resourceJobManager is set (has been assigned a value) and false otherwise */ |
| public boolean isSetResourceJobManager() { |
| return this.resourceJobManager != null; |
| } |
| |
| public void setResourceJobManagerIsSet(boolean value) { |
| if (!value) { |
| this.resourceJobManager = null; |
| } |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.lang.String getAlternativeSSHHostName() { |
| return this.alternativeSSHHostName; |
| } |
| |
| public void setAlternativeSSHHostName(@org.apache.thrift.annotation.Nullable java.lang.String alternativeSSHHostName) { |
| this.alternativeSSHHostName = alternativeSSHHostName; |
| } |
| |
| public void unsetAlternativeSSHHostName() { |
| this.alternativeSSHHostName = null; |
| } |
| |
| /** Returns true if field alternativeSSHHostName is set (has been assigned a value) and false otherwise */ |
| public boolean isSetAlternativeSSHHostName() { |
| return this.alternativeSSHHostName != null; |
| } |
| |
| public void setAlternativeSSHHostNameIsSet(boolean value) { |
| if (!value) { |
| this.alternativeSSHHostName = null; |
| } |
| } |
| |
| public int getSshPort() { |
| return this.sshPort; |
| } |
| |
| public void setSshPort(int sshPort) { |
| this.sshPort = sshPort; |
| setSshPortIsSet(true); |
| } |
| |
| public void unsetSshPort() { |
| __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SSHPORT_ISSET_ID); |
| } |
| |
| /** Returns true if field sshPort is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSshPort() { |
| return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SSHPORT_ISSET_ID); |
| } |
| |
| public void setSshPortIsSet(boolean value) { |
| __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SSHPORT_ISSET_ID, value); |
| } |
| |
| /** |
| * |
| * @see MonitorMode |
| */ |
| @org.apache.thrift.annotation.Nullable |
| public MonitorMode getMonitorMode() { |
| return this.monitorMode; |
| } |
| |
| /** |
| * |
| * @see MonitorMode |
| */ |
| public void setMonitorMode(@org.apache.thrift.annotation.Nullable MonitorMode monitorMode) { |
| this.monitorMode = monitorMode; |
| } |
| |
| public void unsetMonitorMode() { |
| this.monitorMode = null; |
| } |
| |
| /** Returns true if field monitorMode is set (has been assigned a value) and false otherwise */ |
| public boolean isSetMonitorMode() { |
| return this.monitorMode != null; |
| } |
| |
| public void setMonitorModeIsSet(boolean value) { |
| if (!value) { |
| this.monitorMode = null; |
| } |
| } |
| |
| public int getBatchQueueEmailSendersSize() { |
| return (this.batchQueueEmailSenders == null) ? 0 : this.batchQueueEmailSenders.size(); |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.util.Iterator<java.lang.String> getBatchQueueEmailSendersIterator() { |
| return (this.batchQueueEmailSenders == null) ? null : this.batchQueueEmailSenders.iterator(); |
| } |
| |
| public void addToBatchQueueEmailSenders(java.lang.String elem) { |
| if (this.batchQueueEmailSenders == null) { |
| this.batchQueueEmailSenders = new java.util.ArrayList<java.lang.String>(); |
| } |
| this.batchQueueEmailSenders.add(elem); |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.util.List<java.lang.String> getBatchQueueEmailSenders() { |
| return this.batchQueueEmailSenders; |
| } |
| |
| public void setBatchQueueEmailSenders(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> batchQueueEmailSenders) { |
| this.batchQueueEmailSenders = batchQueueEmailSenders; |
| } |
| |
| public void unsetBatchQueueEmailSenders() { |
| this.batchQueueEmailSenders = null; |
| } |
| |
| /** Returns true if field batchQueueEmailSenders is set (has been assigned a value) and false otherwise */ |
| public boolean isSetBatchQueueEmailSenders() { |
| return this.batchQueueEmailSenders != null; |
| } |
| |
| public void setBatchQueueEmailSendersIsSet(boolean value) { |
| if (!value) { |
| this.batchQueueEmailSenders = null; |
| } |
| } |
| |
| @Override |
| public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { |
| switch (field) { |
| case JOB_SUBMISSION_INTERFACE_ID: |
| if (value == null) { |
| unsetJobSubmissionInterfaceId(); |
| } else { |
| setJobSubmissionInterfaceId((java.lang.String)value); |
| } |
| break; |
| |
| case SECURITY_PROTOCOL: |
| if (value == null) { |
| unsetSecurityProtocol(); |
| } else { |
| setSecurityProtocol((org.apache.airavata.model.data.movement.SecurityProtocol)value); |
| } |
| break; |
| |
| case RESOURCE_JOB_MANAGER: |
| if (value == null) { |
| unsetResourceJobManager(); |
| } else { |
| setResourceJobManager((ResourceJobManager)value); |
| } |
| break; |
| |
| case ALTERNATIVE_SSHHOST_NAME: |
| if (value == null) { |
| unsetAlternativeSSHHostName(); |
| } else { |
| setAlternativeSSHHostName((java.lang.String)value); |
| } |
| break; |
| |
| case SSH_PORT: |
| if (value == null) { |
| unsetSshPort(); |
| } else { |
| setSshPort((java.lang.Integer)value); |
| } |
| break; |
| |
| case MONITOR_MODE: |
| if (value == null) { |
| unsetMonitorMode(); |
| } else { |
| setMonitorMode((MonitorMode)value); |
| } |
| break; |
| |
| case BATCH_QUEUE_EMAIL_SENDERS: |
| if (value == null) { |
| unsetBatchQueueEmailSenders(); |
| } else { |
| setBatchQueueEmailSenders((java.util.List<java.lang.String>)value); |
| } |
| break; |
| |
| } |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| @Override |
| public java.lang.Object getFieldValue(_Fields field) { |
| switch (field) { |
| case JOB_SUBMISSION_INTERFACE_ID: |
| return getJobSubmissionInterfaceId(); |
| |
| case SECURITY_PROTOCOL: |
| return getSecurityProtocol(); |
| |
| case RESOURCE_JOB_MANAGER: |
| return getResourceJobManager(); |
| |
| case ALTERNATIVE_SSHHOST_NAME: |
| return getAlternativeSSHHostName(); |
| |
| case SSH_PORT: |
| return getSshPort(); |
| |
| case MONITOR_MODE: |
| return getMonitorMode(); |
| |
| case BATCH_QUEUE_EMAIL_SENDERS: |
| return getBatchQueueEmailSenders(); |
| |
| } |
| throw new java.lang.IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| @Override |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new java.lang.IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case JOB_SUBMISSION_INTERFACE_ID: |
| return isSetJobSubmissionInterfaceId(); |
| case SECURITY_PROTOCOL: |
| return isSetSecurityProtocol(); |
| case RESOURCE_JOB_MANAGER: |
| return isSetResourceJobManager(); |
| case ALTERNATIVE_SSHHOST_NAME: |
| return isSetAlternativeSSHHostName(); |
| case SSH_PORT: |
| return isSetSshPort(); |
| case MONITOR_MODE: |
| return isSetMonitorMode(); |
| case BATCH_QUEUE_EMAIL_SENDERS: |
| return isSetBatchQueueEmailSenders(); |
| } |
| throw new java.lang.IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(java.lang.Object that) { |
| if (that instanceof SSHJobSubmission) |
| return this.equals((SSHJobSubmission)that); |
| return false; |
| } |
| |
| public boolean equals(SSHJobSubmission that) { |
| if (that == null) |
| return false; |
| if (this == that) |
| return true; |
| |
| boolean this_present_jobSubmissionInterfaceId = true && this.isSetJobSubmissionInterfaceId(); |
| boolean that_present_jobSubmissionInterfaceId = true && that.isSetJobSubmissionInterfaceId(); |
| if (this_present_jobSubmissionInterfaceId || that_present_jobSubmissionInterfaceId) { |
| if (!(this_present_jobSubmissionInterfaceId && that_present_jobSubmissionInterfaceId)) |
| return false; |
| if (!this.jobSubmissionInterfaceId.equals(that.jobSubmissionInterfaceId)) |
| return false; |
| } |
| |
| boolean this_present_securityProtocol = true && this.isSetSecurityProtocol(); |
| boolean that_present_securityProtocol = true && that.isSetSecurityProtocol(); |
| if (this_present_securityProtocol || that_present_securityProtocol) { |
| if (!(this_present_securityProtocol && that_present_securityProtocol)) |
| return false; |
| if (!this.securityProtocol.equals(that.securityProtocol)) |
| return false; |
| } |
| |
| boolean this_present_resourceJobManager = true && this.isSetResourceJobManager(); |
| boolean that_present_resourceJobManager = true && that.isSetResourceJobManager(); |
| if (this_present_resourceJobManager || that_present_resourceJobManager) { |
| if (!(this_present_resourceJobManager && that_present_resourceJobManager)) |
| return false; |
| if (!this.resourceJobManager.equals(that.resourceJobManager)) |
| return false; |
| } |
| |
| boolean this_present_alternativeSSHHostName = true && this.isSetAlternativeSSHHostName(); |
| boolean that_present_alternativeSSHHostName = true && that.isSetAlternativeSSHHostName(); |
| if (this_present_alternativeSSHHostName || that_present_alternativeSSHHostName) { |
| if (!(this_present_alternativeSSHHostName && that_present_alternativeSSHHostName)) |
| return false; |
| if (!this.alternativeSSHHostName.equals(that.alternativeSSHHostName)) |
| return false; |
| } |
| |
| boolean this_present_sshPort = true && this.isSetSshPort(); |
| boolean that_present_sshPort = true && that.isSetSshPort(); |
| if (this_present_sshPort || that_present_sshPort) { |
| if (!(this_present_sshPort && that_present_sshPort)) |
| return false; |
| if (this.sshPort != that.sshPort) |
| return false; |
| } |
| |
| boolean this_present_monitorMode = true && this.isSetMonitorMode(); |
| boolean that_present_monitorMode = true && that.isSetMonitorMode(); |
| if (this_present_monitorMode || that_present_monitorMode) { |
| if (!(this_present_monitorMode && that_present_monitorMode)) |
| return false; |
| if (!this.monitorMode.equals(that.monitorMode)) |
| return false; |
| } |
| |
| boolean this_present_batchQueueEmailSenders = true && this.isSetBatchQueueEmailSenders(); |
| boolean that_present_batchQueueEmailSenders = true && that.isSetBatchQueueEmailSenders(); |
| if (this_present_batchQueueEmailSenders || that_present_batchQueueEmailSenders) { |
| if (!(this_present_batchQueueEmailSenders && that_present_batchQueueEmailSenders)) |
| return false; |
| if (!this.batchQueueEmailSenders.equals(that.batchQueueEmailSenders)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| int hashCode = 1; |
| |
| hashCode = hashCode * 8191 + ((isSetJobSubmissionInterfaceId()) ? 131071 : 524287); |
| if (isSetJobSubmissionInterfaceId()) |
| hashCode = hashCode * 8191 + jobSubmissionInterfaceId.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetSecurityProtocol()) ? 131071 : 524287); |
| if (isSetSecurityProtocol()) |
| hashCode = hashCode * 8191 + securityProtocol.getValue(); |
| |
| hashCode = hashCode * 8191 + ((isSetResourceJobManager()) ? 131071 : 524287); |
| if (isSetResourceJobManager()) |
| hashCode = hashCode * 8191 + resourceJobManager.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetAlternativeSSHHostName()) ? 131071 : 524287); |
| if (isSetAlternativeSSHHostName()) |
| hashCode = hashCode * 8191 + alternativeSSHHostName.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetSshPort()) ? 131071 : 524287); |
| if (isSetSshPort()) |
| hashCode = hashCode * 8191 + sshPort; |
| |
| hashCode = hashCode * 8191 + ((isSetMonitorMode()) ? 131071 : 524287); |
| if (isSetMonitorMode()) |
| hashCode = hashCode * 8191 + monitorMode.getValue(); |
| |
| hashCode = hashCode * 8191 + ((isSetBatchQueueEmailSenders()) ? 131071 : 524287); |
| if (isSetBatchQueueEmailSenders()) |
| hashCode = hashCode * 8191 + batchQueueEmailSenders.hashCode(); |
| |
| return hashCode; |
| } |
| |
| @Override |
| public int compareTo(SSHJobSubmission other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = java.lang.Boolean.compare(isSetJobSubmissionInterfaceId(), other.isSetJobSubmissionInterfaceId()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetJobSubmissionInterfaceId()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobSubmissionInterfaceId, other.jobSubmissionInterfaceId); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.compare(isSetSecurityProtocol(), other.isSetSecurityProtocol()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSecurityProtocol()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.securityProtocol, other.securityProtocol); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.compare(isSetResourceJobManager(), other.isSetResourceJobManager()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetResourceJobManager()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceJobManager, other.resourceJobManager); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.compare(isSetAlternativeSSHHostName(), other.isSetAlternativeSSHHostName()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetAlternativeSSHHostName()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.alternativeSSHHostName, other.alternativeSSHHostName); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.compare(isSetSshPort(), other.isSetSshPort()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSshPort()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sshPort, other.sshPort); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.compare(isSetMonitorMode(), other.isSetMonitorMode()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetMonitorMode()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.monitorMode, other.monitorMode); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.compare(isSetBatchQueueEmailSenders(), other.isSetBatchQueueEmailSenders()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetBatchQueueEmailSenders()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.batchQueueEmailSenders, other.batchQueueEmailSenders); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| @Override |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| scheme(iprot).read(iprot, this); |
| } |
| |
| @Override |
| 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("SSHJobSubmission("); |
| boolean first = true; |
| |
| sb.append("jobSubmissionInterfaceId:"); |
| if (this.jobSubmissionInterfaceId == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.jobSubmissionInterfaceId); |
| } |
| first = false; |
| if (!first) sb.append(", "); |
| sb.append("securityProtocol:"); |
| if (this.securityProtocol == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.securityProtocol); |
| } |
| first = false; |
| if (!first) sb.append(", "); |
| sb.append("resourceJobManager:"); |
| if (this.resourceJobManager == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.resourceJobManager); |
| } |
| first = false; |
| if (isSetAlternativeSSHHostName()) { |
| if (!first) sb.append(", "); |
| sb.append("alternativeSSHHostName:"); |
| if (this.alternativeSSHHostName == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.alternativeSSHHostName); |
| } |
| first = false; |
| } |
| if (isSetSshPort()) { |
| if (!first) sb.append(", "); |
| sb.append("sshPort:"); |
| sb.append(this.sshPort); |
| first = false; |
| } |
| if (isSetMonitorMode()) { |
| if (!first) sb.append(", "); |
| sb.append("monitorMode:"); |
| if (this.monitorMode == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.monitorMode); |
| } |
| first = false; |
| } |
| if (isSetBatchQueueEmailSenders()) { |
| if (!first) sb.append(", "); |
| sb.append("batchQueueEmailSenders:"); |
| if (this.batchQueueEmailSenders == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.batchQueueEmailSenders); |
| } |
| first = false; |
| } |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| if (!isSetJobSubmissionInterfaceId()) { |
| throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobSubmissionInterfaceId' is unset! Struct:" + toString()); |
| } |
| |
| if (!isSetSecurityProtocol()) { |
| throw new org.apache.thrift.protocol.TProtocolException("Required field 'securityProtocol' is unset! Struct:" + toString()); |
| } |
| |
| if (!isSetResourceJobManager()) { |
| throw new org.apache.thrift.protocol.TProtocolException("Required field 'resourceJobManager' is unset! Struct:" + toString()); |
| } |
| |
| // check for sub-struct validity |
| if (resourceJobManager != null) { |
| resourceJobManager.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { |
| try { |
| // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. |
| __isset_bitfield = 0; |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class SSHJobSubmissionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { |
| @Override |
| public SSHJobSubmissionStandardScheme getScheme() { |
| return new SSHJobSubmissionStandardScheme(); |
| } |
| } |
| |
| private static class SSHJobSubmissionStandardScheme extends org.apache.thrift.scheme.StandardScheme<SSHJobSubmission> { |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol iprot, SSHJobSubmission 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: // JOB_SUBMISSION_INTERFACE_ID |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.jobSubmissionInterfaceId = iprot.readString(); |
| struct.setJobSubmissionInterfaceIdIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 2: // SECURITY_PROTOCOL |
| if (schemeField.type == org.apache.thrift.protocol.TType.I32) { |
| struct.securityProtocol = org.apache.airavata.model.data.movement.SecurityProtocol.findByValue(iprot.readI32()); |
| struct.setSecurityProtocolIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 3: // RESOURCE_JOB_MANAGER |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.resourceJobManager = new ResourceJobManager(); |
| struct.resourceJobManager.read(iprot); |
| struct.setResourceJobManagerIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 4: // ALTERNATIVE_SSHHOST_NAME |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.alternativeSSHHostName = iprot.readString(); |
| struct.setAlternativeSSHHostNameIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 5: // SSH_PORT |
| if (schemeField.type == org.apache.thrift.protocol.TType.I32) { |
| struct.sshPort = iprot.readI32(); |
| struct.setSshPortIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 6: // MONITOR_MODE |
| if (schemeField.type == org.apache.thrift.protocol.TType.I32) { |
| struct.monitorMode = org.apache.airavata.model.appcatalog.computeresource.MonitorMode.findByValue(iprot.readI32()); |
| struct.setMonitorModeIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 7: // BATCH_QUEUE_EMAIL_SENDERS |
| if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { |
| { |
| org.apache.thrift.protocol.TList _list20 = iprot.readListBegin(); |
| struct.batchQueueEmailSenders = new java.util.ArrayList<java.lang.String>(_list20.size); |
| @org.apache.thrift.annotation.Nullable java.lang.String _elem21; |
| for (int _i22 = 0; _i22 < _list20.size; ++_i22) |
| { |
| _elem21 = iprot.readString(); |
| struct.batchQueueEmailSenders.add(_elem21); |
| } |
| iprot.readListEnd(); |
| } |
| struct.setBatchQueueEmailSendersIsSet(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(); |
| } |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol oprot, SSHJobSubmission struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.jobSubmissionInterfaceId != null) { |
| oprot.writeFieldBegin(JOB_SUBMISSION_INTERFACE_ID_FIELD_DESC); |
| oprot.writeString(struct.jobSubmissionInterfaceId); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.securityProtocol != null) { |
| oprot.writeFieldBegin(SECURITY_PROTOCOL_FIELD_DESC); |
| oprot.writeI32(struct.securityProtocol.getValue()); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.resourceJobManager != null) { |
| oprot.writeFieldBegin(RESOURCE_JOB_MANAGER_FIELD_DESC); |
| struct.resourceJobManager.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.alternativeSSHHostName != null) { |
| if (struct.isSetAlternativeSSHHostName()) { |
| oprot.writeFieldBegin(ALTERNATIVE_SSHHOST_NAME_FIELD_DESC); |
| oprot.writeString(struct.alternativeSSHHostName); |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.isSetSshPort()) { |
| oprot.writeFieldBegin(SSH_PORT_FIELD_DESC); |
| oprot.writeI32(struct.sshPort); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.monitorMode != null) { |
| if (struct.isSetMonitorMode()) { |
| oprot.writeFieldBegin(MONITOR_MODE_FIELD_DESC); |
| oprot.writeI32(struct.monitorMode.getValue()); |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.batchQueueEmailSenders != null) { |
| if (struct.isSetBatchQueueEmailSenders()) { |
| oprot.writeFieldBegin(BATCH_QUEUE_EMAIL_SENDERS_FIELD_DESC); |
| { |
| oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.batchQueueEmailSenders.size())); |
| for (java.lang.String _iter23 : struct.batchQueueEmailSenders) |
| { |
| oprot.writeString(_iter23); |
| } |
| oprot.writeListEnd(); |
| } |
| oprot.writeFieldEnd(); |
| } |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class SSHJobSubmissionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { |
| @Override |
| public SSHJobSubmissionTupleScheme getScheme() { |
| return new SSHJobSubmissionTupleScheme(); |
| } |
| } |
| |
| private static class SSHJobSubmissionTupleScheme extends org.apache.thrift.scheme.TupleScheme<SSHJobSubmission> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, SSHJobSubmission struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; |
| oprot.writeString(struct.jobSubmissionInterfaceId); |
| oprot.writeI32(struct.securityProtocol.getValue()); |
| struct.resourceJobManager.write(oprot); |
| java.util.BitSet optionals = new java.util.BitSet(); |
| if (struct.isSetAlternativeSSHHostName()) { |
| optionals.set(0); |
| } |
| if (struct.isSetSshPort()) { |
| optionals.set(1); |
| } |
| if (struct.isSetMonitorMode()) { |
| optionals.set(2); |
| } |
| if (struct.isSetBatchQueueEmailSenders()) { |
| optionals.set(3); |
| } |
| oprot.writeBitSet(optionals, 4); |
| if (struct.isSetAlternativeSSHHostName()) { |
| oprot.writeString(struct.alternativeSSHHostName); |
| } |
| if (struct.isSetSshPort()) { |
| oprot.writeI32(struct.sshPort); |
| } |
| if (struct.isSetMonitorMode()) { |
| oprot.writeI32(struct.monitorMode.getValue()); |
| } |
| if (struct.isSetBatchQueueEmailSenders()) { |
| { |
| oprot.writeI32(struct.batchQueueEmailSenders.size()); |
| for (java.lang.String _iter24 : struct.batchQueueEmailSenders) |
| { |
| oprot.writeString(_iter24); |
| } |
| } |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, SSHJobSubmission struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; |
| struct.jobSubmissionInterfaceId = iprot.readString(); |
| struct.setJobSubmissionInterfaceIdIsSet(true); |
| struct.securityProtocol = org.apache.airavata.model.data.movement.SecurityProtocol.findByValue(iprot.readI32()); |
| struct.setSecurityProtocolIsSet(true); |
| struct.resourceJobManager = new ResourceJobManager(); |
| struct.resourceJobManager.read(iprot); |
| struct.setResourceJobManagerIsSet(true); |
| java.util.BitSet incoming = iprot.readBitSet(4); |
| if (incoming.get(0)) { |
| struct.alternativeSSHHostName = iprot.readString(); |
| struct.setAlternativeSSHHostNameIsSet(true); |
| } |
| if (incoming.get(1)) { |
| struct.sshPort = iprot.readI32(); |
| struct.setSshPortIsSet(true); |
| } |
| if (incoming.get(2)) { |
| struct.monitorMode = org.apache.airavata.model.appcatalog.computeresource.MonitorMode.findByValue(iprot.readI32()); |
| struct.setMonitorModeIsSet(true); |
| } |
| if (incoming.get(3)) { |
| { |
| org.apache.thrift.protocol.TList _list25 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); |
| struct.batchQueueEmailSenders = new java.util.ArrayList<java.lang.String>(_list25.size); |
| @org.apache.thrift.annotation.Nullable java.lang.String _elem26; |
| for (int _i27 = 0; _i27 < _list25.size; ++_i27) |
| { |
| _elem26 = iprot.readString(); |
| struct.batchQueueEmailSenders.add(_elem26); |
| } |
| } |
| struct.setBatchQueueEmailSendersIsSet(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(); |
| } |
| } |
| |