/** * Performs a deep copy on <i>other</i>. */ public TListSentryRolesRequest(TListSentryRolesRequest other) { __isset_bitfield = other.__isset_bitfield; this.protocol_version = other.protocol_version; if (other.isSetRequestorUserName()) { this.requestorUserName = other.requestorUserName; } if (other.isSetGroupName()) { this.groupName = other.groupName; } }
@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_protocol_version = true; builder.append(present_protocol_version); if (present_protocol_version) builder.append(protocol_version); boolean present_requestorUserName = true && (isSetRequestorUserName()); builder.append(present_requestorUserName); if (present_requestorUserName) builder.append(requestorUserName); boolean present_groupName = true && (isSetGroupName()); builder.append(present_groupName); if (present_groupName) builder.append(groupName); return builder.toHashCode(); }
@Override public String toString() { StringBuilder sb = new StringBuilder("TListSentryRolesRequest("); boolean first = true; sb.append("protocol_version:"); sb.append(this.protocol_version); first = false; if (!first) sb.append(", "); sb.append("requestorUserName:"); if (this.requestorUserName == null) { sb.append("null"); } else { sb.append(this.requestorUserName); } first = false; if (isSetGroupName()) { if (!first) sb.append(", "); sb.append("groupName:"); if (this.groupName == null) { sb.append("null"); } else { sb.append(this.groupName); } first = false; } sb.append(")"); return sb.toString(); }
/** 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 PROTOCOL_VERSION: return isSetProtocol_version(); case REQUESTOR_USER_NAME: return isSetRequestorUserName(); case GROUP_NAME: return isSetGroupName(); } throw new IllegalStateException(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, TListSentryRolesRequest struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(PROTOCOL_VERSION_FIELD_DESC); oprot.writeI32(struct.protocol_version); oprot.writeFieldEnd(); if (struct.requestorUserName != null) { oprot.writeFieldBegin(REQUESTOR_USER_NAME_FIELD_DESC); oprot.writeString(struct.requestorUserName); oprot.writeFieldEnd(); } if (struct.groupName != null) { if (struct.isSetGroupName()) { oprot.writeFieldBegin(GROUP_NAME_FIELD_DESC); oprot.writeString(struct.groupName); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public boolean equals(TListSentryRolesRequest that) { if (that == null) return false; boolean this_present_protocol_version = true; boolean that_present_protocol_version = true; if (this_present_protocol_version || that_present_protocol_version) { if (!(this_present_protocol_version && that_present_protocol_version)) return false; if (this.protocol_version != that.protocol_version) return false; } boolean this_present_requestorUserName = true && this.isSetRequestorUserName(); boolean that_present_requestorUserName = true && that.isSetRequestorUserName(); if (this_present_requestorUserName || that_present_requestorUserName) { if (!(this_present_requestorUserName && that_present_requestorUserName)) return false; if (!this.requestorUserName.equals(that.requestorUserName)) return false; } boolean this_present_groupName = true && this.isSetGroupName(); boolean that_present_groupName = true && that.isSetGroupName(); if (this_present_groupName || that_present_groupName) { if (!(this_present_groupName && that_present_groupName)) return false; if (!this.groupName.equals(that.groupName)) return false; } return true; }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, TListSentryRolesRequest struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeI32(struct.protocol_version); oprot.writeString(struct.requestorUserName); BitSet optionals = new BitSet(); if (struct.isSetGroupName()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetGroupName()) { oprot.writeString(struct.groupName); } }
lastComparison = Boolean.valueOf(isSetGroupName()).compareTo(typedOther.isSetGroupName()); if (lastComparison != 0) { return lastComparison; if (isSetGroupName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupName, typedOther.groupName); if (lastComparison != 0) {