public void write(libthrift091.protocol.TProtocol oprot, DeleteMessageRequest struct)
        throws libthrift091.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.queueName != null) {
        oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC);
        oprot.writeString(struct.queueName);
        oprot.writeFieldEnd();
      }
      if (struct.receiptHandle != null) {
        oprot.writeFieldBegin(RECEIPT_HANDLE_FIELD_DESC);
        oprot.writeString(struct.receiptHandle);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
Пример #2
0
    public void write(libthrift091.protocol.TProtocol oprot, ListQueueResponse struct)
        throws libthrift091.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.queueName != null) {
        oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC);
        {
          oprot.writeListBegin(
              new libthrift091.protocol.TList(
                  libthrift091.protocol.TType.STRING, struct.queueName.size()));
          for (String _iter13 : struct.queueName) {
            oprot.writeString(_iter13);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
Пример #3
0
    public void read(libthrift091.protocol.TProtocol iprot, Credential struct)
        throws libthrift091.TException {
      libthrift091.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true) {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == libthrift091.protocol.TType.STOP) {
          break;
        }
        switch (schemeField.id) {
          case 1: // TYPE
            if (schemeField.type == libthrift091.protocol.TType.I32) {
              struct.type =
                  com.xiaomi.infra.galaxy.rpc.thrift.UserType.findByValue(iprot.readI32());
              struct.setTypeIsSet(true);
            } else {
              libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // SECRET_KEY_ID
            if (schemeField.type == libthrift091.protocol.TType.STRING) {
              struct.secretKeyId = iprot.readString();
              struct.setSecretKeyIdIsSet(true);
            } else {
              libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // SECRET_KEY
            if (schemeField.type == libthrift091.protocol.TType.STRING) {
              struct.secretKey = iprot.readString();
              struct.setSecretKeyIsSet(true);
            } else {
              libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }
Пример #4
0
    public void read(libthrift091.protocol.TProtocol iprot, ListQueueResponse struct)
        throws libthrift091.TException {
      libthrift091.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true) {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == libthrift091.protocol.TType.STOP) {
          break;
        }
        switch (schemeField.id) {
          case 1: // QUEUE_NAME
            if (schemeField.type == libthrift091.protocol.TType.LIST) {
              {
                libthrift091.protocol.TList _list10 = iprot.readListBegin();
                struct.queueName = new ArrayList<String>(_list10.size);
                String _elem11;
                for (int _i12 = 0; _i12 < _list10.size; ++_i12) {
                  _elem11 = iprot.readString();
                  struct.queueName.add(_elem11);
                }
                iprot.readListEnd();
              }
              struct.setQueueNameIsSet(true);
            } else {
              libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }
    public void read(libthrift091.protocol.TProtocol iprot, DeleteMessageRequest struct)
        throws libthrift091.TException {
      libthrift091.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true) {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == libthrift091.protocol.TType.STOP) {
          break;
        }
        switch (schemeField.id) {
          case 1: // QUEUE_NAME
            if (schemeField.type == libthrift091.protocol.TType.STRING) {
              struct.queueName = iprot.readString();
              struct.setQueueNameIsSet(true);
            } else {
              libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // RECEIPT_HANDLE
            if (schemeField.type == libthrift091.protocol.TType.STRING) {
              struct.receiptHandle = iprot.readString();
              struct.setReceiptHandleIsSet(true);
            } else {
              libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }
 public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
   schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
 }
 public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
   schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
 }
Пример #8
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();
    }