public void Read(AddSkuItem structs, Protocol iprot) { String schemeStruct = iprot.ReadStructBegin(); if (schemeStruct != null) { while (true) { String schemeField = iprot.ReadFieldBegin(); if (schemeField == null) { break; } bool needSkip = true; if ("outer_sku_id".Equals(schemeField.Trim())) { needSkip = false; string value; value = iprot.ReadString(); structs.SetOuter_sku_id(value); } if ("market_price".Equals(schemeField.Trim())) { needSkip = false; double value; value = iprot.ReadDouble(); structs.SetMarket_price(value); } if ("sell_price".Equals(schemeField.Trim())) { needSkip = false; double value; value = iprot.ReadDouble(); structs.SetSell_price(value); } if ("simple_sale_props".Equals(schemeField.Trim())) { needSkip = false; List <vipapis.marketplace.product.SimpleProperty> value; value = new List <vipapis.marketplace.product.SimpleProperty>(); iprot.ReadListBegin(); while (true) { try{ vipapis.marketplace.product.SimpleProperty elem0; elem0 = new vipapis.marketplace.product.SimpleProperty(); vipapis.marketplace.product.SimplePropertyHelper.getInstance().Read(elem0, iprot); value.Add(elem0); } catch (Exception e) { break; } } iprot.ReadListEnd(); structs.SetSimple_sale_props(value); } if (needSkip) { ProtocolUtil.skip(iprot); } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); Validate(structs); } else { throw new OspException(); } }
public void Read(AddProductRequest structs, Protocol iprot) { String schemeStruct = iprot.ReadStructBegin(); if (schemeStruct != null) { while (true) { String schemeField = iprot.ReadFieldBegin(); if (schemeField == null) { break; } bool needSkip = true; if ("outer_spu_id".Equals(schemeField.Trim())) { needSkip = false; string value; value = iprot.ReadString(); structs.SetOuter_spu_id(value); } if ("title".Equals(schemeField.Trim())) { needSkip = false; string value; value = iprot.ReadString(); structs.SetTitle(value); } if ("third_category_id".Equals(schemeField.Trim())) { needSkip = false; int value; value = iprot.ReadI32(); structs.SetThird_category_id(value); } if ("brand_id".Equals(schemeField.Trim())) { needSkip = false; int value; value = iprot.ReadI32(); structs.SetBrand_id(value); } if ("images".Equals(schemeField.Trim())) { needSkip = false; List <vipapis.marketplace.product.Image> value; value = new List <vipapis.marketplace.product.Image>(); iprot.ReadListBegin(); while (true) { try{ vipapis.marketplace.product.Image elem1; elem1 = new vipapis.marketplace.product.Image(); vipapis.marketplace.product.ImageHelper.getInstance().Read(elem1, iprot); value.Add(elem1); } catch (Exception e) { break; } } iprot.ReadListEnd(); structs.SetImages(value); } if ("sub_title".Equals(schemeField.Trim())) { needSkip = false; string value; value = iprot.ReadString(); structs.SetSub_title(value); } if ("prod_props".Equals(schemeField.Trim())) { needSkip = false; List <vipapis.marketplace.product.SimpleProperty> value; value = new List <vipapis.marketplace.product.SimpleProperty>(); iprot.ReadListBegin(); while (true) { try{ vipapis.marketplace.product.SimpleProperty elem3; elem3 = new vipapis.marketplace.product.SimpleProperty(); vipapis.marketplace.product.SimplePropertyHelper.getInstance().Read(elem3, iprot); value.Add(elem3); } catch (Exception e) { break; } } iprot.ReadListEnd(); structs.SetProd_props(value); } if ("custom_prod_props".Equals(schemeField.Trim())) { needSkip = false; Dictionary <string, string> value; value = new Dictionary <string, string>(); iprot.ReadMapBegin(); while (true) { try{ string _key5; string _val5; _key5 = iprot.ReadString(); _val5 = iprot.ReadString(); value.Add(_key5, _val5); } catch (Exception e) { break; } } iprot.ReadMapEnd(); structs.SetCustom_prod_props(value); } if ("area_output".Equals(schemeField.Trim())) { needSkip = false; string value; value = iprot.ReadString(); structs.SetArea_output(value); } if ("sale_service".Equals(schemeField.Trim())) { needSkip = false; string value; value = iprot.ReadString(); structs.SetSale_service(value); } if ("accessories".Equals(schemeField.Trim())) { needSkip = false; string value; value = iprot.ReadString(); structs.SetAccessories(value); } if ("length".Equals(schemeField.Trim())) { needSkip = false; int?value; value = iprot.ReadI32(); structs.SetLength(value); } if ("width".Equals(schemeField.Trim())) { needSkip = false; int?value; value = iprot.ReadI32(); structs.SetWidth(value); } if ("height".Equals(schemeField.Trim())) { needSkip = false; int?value; value = iprot.ReadI32(); structs.SetHeight(value); } if ("weight".Equals(schemeField.Trim())) { needSkip = false; int?value; value = iprot.ReadI32(); structs.SetWeight(value); } if ("gross_weight".Equals(schemeField.Trim())) { needSkip = false; int?value; value = iprot.ReadI32(); structs.SetGross_weight(value); } if ("skus".Equals(schemeField.Trim())) { needSkip = false; List <vipapis.marketplace.product.AddSkuItem> value; value = new List <vipapis.marketplace.product.AddSkuItem>(); iprot.ReadListBegin(); while (true) { try{ vipapis.marketplace.product.AddSkuItem elem6; elem6 = new vipapis.marketplace.product.AddSkuItem(); vipapis.marketplace.product.AddSkuItemHelper.getInstance().Read(elem6, iprot); value.Add(elem6); } catch (Exception e) { break; } } iprot.ReadListEnd(); structs.SetSkus(value); } if ("color_images".Equals(schemeField.Trim())) { needSkip = false; List <vipapis.marketplace.product.ColorImage> value; value = new List <vipapis.marketplace.product.ColorImage>(); iprot.ReadListBegin(); while (true) { try{ vipapis.marketplace.product.ColorImage elem8; elem8 = new vipapis.marketplace.product.ColorImage(); vipapis.marketplace.product.ColorImageHelper.getInstance().Read(elem8, iprot); value.Add(elem8); } catch (Exception e) { break; } } iprot.ReadListEnd(); structs.SetColor_images(value); } if (needSkip) { ProtocolUtil.skip(iprot); } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); Validate(structs); } else { throw new OspException(); } }
public void Read(EditProductRequest structs, Protocol iprot) { String schemeStruct = iprot.ReadStructBegin(); if (schemeStruct != null) { while (true) { String schemeField = iprot.ReadFieldBegin(); if (schemeField == null) { break; } bool needSkip = true; if ("outer_spu_id".Equals(schemeField.Trim())) { needSkip = false; string value; value = iprot.ReadString(); structs.SetOuter_spu_id(value); } if ("spuid".Equals(schemeField.Trim())) { needSkip = false; string value; value = iprot.ReadString(); structs.SetSpuid(value); } if ("title".Equals(schemeField.Trim())) { needSkip = false; string value; value = iprot.ReadString(); structs.SetTitle(value); } if ("area_output".Equals(schemeField.Trim())) { needSkip = false; string value; value = iprot.ReadString(); structs.SetArea_output(value); } if ("sale_service".Equals(schemeField.Trim())) { needSkip = false; string value; value = iprot.ReadString(); structs.SetSale_service(value); } if ("accessories".Equals(schemeField.Trim())) { needSkip = false; string value; value = iprot.ReadString(); structs.SetAccessories(value); } if ("sub_title".Equals(schemeField.Trim())) { needSkip = false; string value; value = iprot.ReadString(); structs.SetSub_title(value); } if ("length".Equals(schemeField.Trim())) { needSkip = false; double?value; value = iprot.ReadDouble(); structs.SetLength(value); } if ("width".Equals(schemeField.Trim())) { needSkip = false; double?value; value = iprot.ReadDouble(); structs.SetWidth(value); } if ("high".Equals(schemeField.Trim())) { needSkip = false; double?value; value = iprot.ReadDouble(); structs.SetHigh(value); } if ("weight".Equals(schemeField.Trim())) { needSkip = false; double?value; value = iprot.ReadDouble(); structs.SetWeight(value); } if ("gross_weight".Equals(schemeField.Trim())) { needSkip = false; int?value; value = iprot.ReadI32(); structs.SetGross_weight(value); } if ("prod_props".Equals(schemeField.Trim())) { needSkip = false; List <vipapis.marketplace.product.SimpleProperty> value; value = new List <vipapis.marketplace.product.SimpleProperty>(); iprot.ReadListBegin(); while (true) { try{ vipapis.marketplace.product.SimpleProperty elem0; elem0 = new vipapis.marketplace.product.SimpleProperty(); vipapis.marketplace.product.SimplePropertyHelper.getInstance().Read(elem0, iprot); value.Add(elem0); } catch (Exception e) { break; } } iprot.ReadListEnd(); structs.SetProd_props(value); } if ("custom_prod_props".Equals(schemeField.Trim())) { needSkip = false; Dictionary <string, string> value; value = new Dictionary <string, string>(); iprot.ReadMapBegin(); while (true) { try{ string _key2; string _val2; _key2 = iprot.ReadString(); _val2 = iprot.ReadString(); value.Add(_key2, _val2); } catch (Exception e) { break; } } iprot.ReadMapEnd(); structs.SetCustom_prod_props(value); } if ("images".Equals(schemeField.Trim())) { needSkip = false; List <vipapis.marketplace.product.Image> value; value = new List <vipapis.marketplace.product.Image>(); iprot.ReadListBegin(); while (true) { try{ vipapis.marketplace.product.Image elem3; elem3 = new vipapis.marketplace.product.Image(); vipapis.marketplace.product.ImageHelper.getInstance().Read(elem3, iprot); value.Add(elem3); } catch (Exception e) { break; } } iprot.ReadListEnd(); structs.SetImages(value); } if (needSkip) { ProtocolUtil.skip(iprot); } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); Validate(structs); } else { throw new OspException(); } }