Example #1
0
    public void write(libthrift091.protocol.TProtocol oprot, Credential struct)
        throws libthrift091.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.type != null) {
        if (struct.isSetType()) {
          oprot.writeFieldBegin(TYPE_FIELD_DESC);
          oprot.writeI32(struct.type.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.secretKeyId != null) {
        if (struct.isSetSecretKeyId()) {
          oprot.writeFieldBegin(SECRET_KEY_ID_FIELD_DESC);
          oprot.writeString(struct.secretKeyId);
          oprot.writeFieldEnd();
        }
      }
      if (struct.secretKey != null) {
        if (struct.isSetSecretKey()) {
          oprot.writeFieldBegin(SECRET_KEY_FIELD_DESC);
          oprot.writeString(struct.secretKey);
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }