public void write(GetPoSkuListResponse struct, Protocol oprot) throws OspException {

    validate(struct);
    oprot.writeStructBegin();

    if (struct.getPurchase_order_sku_list() != null) {

      oprot.writeFieldBegin("purchase_order_sku_list");

      oprot.writeListBegin();
      for (vipapis.delivery.PurchaseOrderSku _item0 : struct.getPurchase_order_sku_list()) {

        vipapis.delivery.PurchaseOrderSkuHelper.getInstance().write(_item0, oprot);
      }

      oprot.writeListEnd();

      oprot.writeFieldEnd();
    }

    if (struct.getTotal() != null) {

      oprot.writeFieldBegin("total");
      oprot.writeI32(struct.getTotal());

      oprot.writeFieldEnd();
    }

    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }