Ejemplo n.º 1
0
 public void SetPagination(vipapis.puma.Pagination value)
 {
     this.pagination_ = value;
 }
Ejemplo n.º 2
0
        public void Read(ProductQueryResponse structs, Protocol iprot)
        {
            String schemeStruct = iprot.ReadStructBegin();

            if (schemeStruct != null)
            {
                while (true)
                {
                    String schemeField = iprot.ReadFieldBegin();
                    if (schemeField == null)
                    {
                        break;
                    }
                    bool needSkip = true;


                    if ("pagination".Equals(schemeField.Trim()))
                    {
                        needSkip = false;
                        vipapis.puma.Pagination value;

                        value = new vipapis.puma.Pagination();
                        vipapis.puma.PaginationHelper.getInstance().Read(value, iprot);

                        structs.SetPagination(value);
                    }



                    if ("marketing_products".Equals(schemeField.Trim()))
                    {
                        needSkip = false;
                        List <vipapis.puma.Product> value;

                        value = new List <vipapis.puma.Product>();
                        iprot.ReadListBegin();
                        while (true)
                        {
                            try{
                                vipapis.puma.Product elem1;

                                elem1 = new vipapis.puma.Product();
                                vipapis.puma.ProductHelper.getInstance().Read(elem1, iprot);

                                value.Add(elem1);
                            }
                            catch (Exception e) {
                                break;
                            }
                        }

                        iprot.ReadListEnd();

                        structs.SetMarketing_products(value);
                    }



                    if (needSkip)
                    {
                        ProtocolUtil.skip(iprot);
                    }

                    iprot.ReadFieldEnd();
                }

                iprot.ReadStructEnd();
                Validate(structs);
            }
            else
            {
                throw new OspException();
            }
        }
Ejemplo n.º 3
0
        public void Read(ProductQueryRequest structs, Protocol iprot)
        {
            String schemeStruct = iprot.ReadStructBegin();

            if (schemeStruct != null)
            {
                while (true)
                {
                    String schemeField = iprot.ReadFieldBegin();
                    if (schemeField == null)
                    {
                        break;
                    }
                    bool needSkip = true;


                    if ("pagination".Equals(schemeField.Trim()))
                    {
                        needSkip = false;
                        vipapis.puma.Pagination value;

                        value = new vipapis.puma.Pagination();
                        vipapis.puma.PaginationHelper.getInstance().Read(value, iprot);

                        structs.SetPagination(value);
                    }



                    if ("product_ids".Equals(schemeField.Trim()))
                    {
                        needSkip = false;
                        List <long?> value;

                        value = new List <long?>();
                        iprot.ReadSetBegin();
                        while (true)
                        {
                            try{
                                long elem1;
                                elem1 = iprot.ReadI64();

                                value.Add(elem1);
                            }
                            catch (Exception e) {
                                break;
                            }
                        }

                        iprot.ReadSetEnd();

                        structs.SetProduct_ids(value);
                    }



                    if ("brand_sns".Equals(schemeField.Trim()))
                    {
                        needSkip = false;
                        List <string> value;

                        value = new List <string>();
                        iprot.ReadSetBegin();
                        while (true)
                        {
                            try{
                                string elem2;
                                elem2 = iprot.ReadString();

                                value.Add(elem2);
                            }
                            catch (Exception e) {
                                break;
                            }
                        }

                        iprot.ReadSetEnd();

                        structs.SetBrand_sns(value);
                    }



                    if ("third_level_category_ids".Equals(schemeField.Trim()))
                    {
                        needSkip = false;
                        List <int?> value;

                        value = new List <int?>();
                        iprot.ReadSetBegin();
                        while (true)
                        {
                            try{
                                int elem3;
                                elem3 = iprot.ReadI32();

                                value.Add(elem3);
                            }
                            catch (Exception e) {
                                break;
                            }
                        }

                        iprot.ReadSetEnd();

                        structs.SetThird_level_category_ids(value);
                    }



                    if ("query_types".Equals(schemeField.Trim()))
                    {
                        needSkip = false;
                        List <int?> value;

                        value = new List <int?>();
                        iprot.ReadSetBegin();
                        while (true)
                        {
                            try{
                                int elem4;
                                elem4 = iprot.ReadI32();

                                value.Add(elem4);
                            }
                            catch (Exception e) {
                                break;
                            }
                        }

                        iprot.ReadSetEnd();

                        structs.SetQuery_types(value);
                    }



                    if ("is_on_sale".Equals(schemeField.Trim()))
                    {
                        needSkip = false;
                        int?value;
                        value = iprot.ReadI32();

                        structs.SetIs_on_sale(value);
                    }



                    if (needSkip)
                    {
                        ProtocolUtil.skip(iprot);
                    }

                    iprot.ReadFieldEnd();
                }

                iprot.ReadStructEnd();
                Validate(structs);
            }
            else
            {
                throw new OspException();
            }
        }