public void write(org.apache.thrift.protocol.TProtocol oprot, TSentryActiveRoleSet struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(ALL_FIELD_DESC); oprot.writeBool(struct.all); oprot.writeFieldEnd(); if (struct.roles != null) { oprot.writeFieldBegin(ROLES_FIELD_DESC); { oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.roles.size())); for (String _iter75 : struct.roles) { oprot.writeString(_iter75); } oprot.writeSetEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
struct.validate();
public void validate() throws org.apache.thrift.TException { // check for required fields if (!isSetProtocol_version()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'protocol_version' is unset! Struct:" + toString()); } if (!isSetComponent()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'component' is unset! Struct:" + toString()); } if (!isSetServiceName()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'serviceName' is unset! Struct:" + toString()); } if (!isSetGroups()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'groups' is unset! Struct:" + toString()); } if (!isSetRoleSet()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'roleSet' is unset! Struct:" + toString()); } // check for sub-struct validity if (roleSet != null) { roleSet.validate(); } }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!isSetProtocol_version()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'protocol_version' is unset! Struct:" + toString()); } if (!isSetRequestorUserName()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'requestorUserName' is unset! Struct:" + toString()); } if (!isSetComponent()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'component' is unset! Struct:" + toString()); } if (!isSetServiceName()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'serviceName' is unset! Struct:" + toString()); } if (!isSetAuthorizablesSet()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'authorizablesSet' is unset! Struct:" + toString()); } // check for sub-struct validity if (roleSet != null) { roleSet.validate(); } }