public void write(org.apache.thrift.protocol.TProtocol oprot, TSentryRole struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.roleName != null) { oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); oprot.writeString(struct.roleName); oprot.writeFieldEnd(); } if (struct.groups != null) { oprot.writeFieldBegin(GROUPS_FIELD_DESC); { oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, struct.groups.size())); for (TSentryGroup _iter43 : struct.groups) { _iter43.write(oprot); } oprot.writeSetEnd(); } oprot.writeFieldEnd(); } if (struct.grantorPrincipal != null) { oprot.writeFieldBegin(GRANTOR_PRINCIPAL_FIELD_DESC); oprot.writeString(struct.grantorPrincipal); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
struct.validate();