All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pdd.pop.sdk.http.api.ark.request.PddFlightQueryGuestRuleRequest Maven / Gradle / Ivy

There is a newer version: 1.10.85
Show newest version
package com.pdd.pop.sdk.http.api.ark.request;

import com.pdd.pop.sdk.common.util.JsonUtil;
import com.pdd.pop.ext.fasterxml.jackson.annotation.JsonProperty;
import com.pdd.pop.sdk.http.api.ark.response.PddFlightQueryGuestRuleResponse;
import com.pdd.pop.sdk.http.HttpMethod;
import com.pdd.pop.sdk.http.PopBaseHttpRequest;

import java.util.List;
import java.util.Map;

public class PddFlightQueryGuestRuleRequest extends PopBaseHttpRequest {

    /**
     * 用于搜索到下单的请求日志关联
     */
    @JsonProperty("trace_id")
    private String traceId;

    /**
     * 用于一次请求的日志关联
     */
    @JsonProperty("sub_trace_id")
    private String subTraceId;

    /**
     * 乘客类型列表
     */
    @JsonProperty("product_list")
    private List productList;

    /**
     * 查询客规阶段,即在何阶段查询客规
     */
    @JsonProperty("query_stage")
    private Integer queryStage;

    @Override
    public String getVersion() {
        return "V1";
    }

    @Override
    public String getDataType() {
        return "JSON";
    }

    @Override
    public Integer getPlatform() {
        return 1;
    }

    @Override
    public String getType() {
        return "pdd.flight.query.guest.rule";
    }

    @Override
    public HttpMethod getHttpMethod() {
        return HttpMethod.POST;
    }

    @Override
    public Class getResponseClass() {
        return PddFlightQueryGuestRuleResponse.class;
    }

    @Override
    protected void setUserParams(Map params) {
        setUserParam(params, "trace_id", traceId);
        setUserParam(params, "sub_trace_id", subTraceId);
        setUserParam(params, "product_list", productList);
        setUserParam(params, "query_stage", queryStage);
    }

    public void setTraceId(String traceId) {
        this.traceId = traceId;
    }

    public void setSubTraceId(String subTraceId) {
        this.subTraceId = subTraceId;
    }

    public void setProductList(List productList) {
        this.productList = productList;
    }

    public void setQueryStage(Integer queryStage) {
        this.queryStage = queryStage;
    }

    public static class ProductListItem {

        /**
         * 乘客类型列表
         */
        @JsonProperty("passenger_type_list")
        private List passengerTypeList;

        /**
         * 航班信息列表
         */
        @JsonProperty("flight_info_list")
        private List flightInfoList;

        /**
         * 航班舱位对应
         */
        @JsonProperty("flight_cabin_info_list")
        private List flightCabinInfoList;

        /**
         * 行程类型
         */
        @JsonProperty("trip_type")
        private String tripType;

        /**
         * 同舱同产品类型价格的唯一标识
         */
        @JsonProperty("product_id")
        private String productId;

        /**
         * 产品类型
         */
        @JsonProperty("product_type")
        private Integer productType;

        public void setPassengerTypeList(List passengerTypeList) {
            this.passengerTypeList = passengerTypeList;
        }

        public void setFlightInfoList(List flightInfoList) {
            this.flightInfoList = flightInfoList;
        }

        public void setFlightCabinInfoList(List flightCabinInfoList) {
            this.flightCabinInfoList = flightCabinInfoList;
        }

        public void setTripType(String tripType) {
            this.tripType = tripType;
        }

        public void setProductId(String productId) {
            this.productId = productId;
        }

        public void setProductType(Integer productType) {
            this.productType = productType;
        }

        @Override
        public String toString() {
            return JsonUtil.transferToJson(this);
        }
    }

    public static class ProductListItemFlightInfoListItem {

        /**
         * 航程编号
         */
        @JsonProperty("segment_no")
        private Integer segmentNo;

        /**
         * 航段编号
         */
        @JsonProperty("sequence_no")
        private Integer sequenceNo;

        /**
         * 起飞时间
         */
        @JsonProperty("departure_date_time")
        private String departureDateTime;

        /**
         * 起飞机场三字码
         */
        @JsonProperty("departure_airport_code")
        private String departureAirportCode;

        /**
         * 到达时间
         */
        @JsonProperty("arrival_date_time")
        private String arrivalDateTime;

        /**
         * 到达机场三字码
         */
        @JsonProperty("arrival_airport_code")
        private String arrivalAirportCode;

        /**
         * 航班号
         */
        @JsonProperty("flight_no")
        private String flightNo;

        /**
         * 航司
         */
        @JsonProperty("carrier_code")
        private String carrierCode;

        public void setSegmentNo(Integer segmentNo) {
            this.segmentNo = segmentNo;
        }

        public void setSequenceNo(Integer sequenceNo) {
            this.sequenceNo = sequenceNo;
        }

        public void setDepartureDateTime(String departureDateTime) {
            this.departureDateTime = departureDateTime;
        }

        public void setDepartureAirportCode(String departureAirportCode) {
            this.departureAirportCode = departureAirportCode;
        }

        public void setArrivalDateTime(String arrivalDateTime) {
            this.arrivalDateTime = arrivalDateTime;
        }

        public void setArrivalAirportCode(String arrivalAirportCode) {
            this.arrivalAirportCode = arrivalAirportCode;
        }

        public void setFlightNo(String flightNo) {
            this.flightNo = flightNo;
        }

        public void setCarrierCode(String carrierCode) {
            this.carrierCode = carrierCode;
        }

        @Override
        public String toString() {
            return JsonUtil.transferToJson(this);
        }
    }

    public static class ProductListItemFlightCabinInfoListItem {

        /**
         * 航程编号
         */
        @JsonProperty("segment_no")
        private Integer segmentNo;

        /**
         * 航段编号
         */
        @JsonProperty("sequence_no")
        private Integer sequenceNo;

        /**
         * 舱位列表
         */
        @JsonProperty("cabin_info_list")
        private List cabinInfoList;

        public void setSegmentNo(Integer segmentNo) {
            this.segmentNo = segmentNo;
        }

        public void setSequenceNo(Integer sequenceNo) {
            this.sequenceNo = sequenceNo;
        }

        public void setCabinInfoList(List cabinInfoList) {
            this.cabinInfoList = cabinInfoList;
        }

        @Override
        public String toString() {
            return JsonUtil.transferToJson(this);
        }
    }

    public static class ProductListItemFlightCabinInfoListItemCabinInfoListItem {

        /**
         * 航程编号 (从1开始编号)
         */
        @JsonProperty("segment_no")
        private String segmentNo;

        /**
         * 航段编号 (从1开始编号)
         */
        @JsonProperty("sequence_no")
        private String sequenceNo;

        /**
         * 舱位列表
         */
        @JsonProperty("cabin_info_list")
        private List cabinInfoList;

        public void setSegmentNo(String segmentNo) {
            this.segmentNo = segmentNo;
        }

        public void setSequenceNo(String sequenceNo) {
            this.sequenceNo = sequenceNo;
        }

        public void setCabinInfoList(List cabinInfoList) {
            this.cabinInfoList = cabinInfoList;
        }

        @Override
        public String toString() {
            return JsonUtil.transferToJson(this);
        }
    }

    public static class ProductListItemFlightCabinInfoListItemCabinInfoListItemCabinInfoListItem {

        /**
         * 乘客类型
         */
        @JsonProperty("passenger_type")
        private String passengerType;

        /**
         * 舱位
         */
        @JsonProperty("sub_class")
        private String subClass;

        public void setPassengerType(String passengerType) {
            this.passengerType = passengerType;
        }

        public void setSubClass(String subClass) {
            this.subClass = subClass;
        }

        @Override
        public String toString() {
            return JsonUtil.transferToJson(this);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy