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

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

package com.pdd.pop.sdk.http.api.pop.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.pop.response.PddAdApiUnitBidUpdateResponse;
import com.pdd.pop.sdk.http.HttpMethod;
import com.pdd.pop.sdk.http.PopBaseHttpRequest;

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

public class PddAdApiUnitBidUpdateRequest extends PopBaseHttpRequest {

    /**
     * 广告单元Id
     */
    @JsonProperty("adId")
    private Long adId;

    /**
     * 更新列表
     */
    @JsonProperty("adUnitBids")
    private List adUnitBids;

    /**
     * 出价资源类型。1表示人群定向,2表示资源位。
     */
    @JsonProperty("bidReferenceType")
    private Integer bidReferenceType;

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

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

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

    @Override
    public String getType() {
        return "pdd.ad.api.unit.bid.update";
    }

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

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

    @Override
    protected void setUserParams(Map params) {
        setUserParam(params, "adId", adId);
        setUserParam(params, "adUnitBids", adUnitBids);
        setUserParam(params, "bidReferenceType", bidReferenceType);
    }

    public void setAdId(Long adId) {
        this.adId = adId;
    }

    public void setAdUnitBids(List adUnitBids) {
        this.adUnitBids = adUnitBids;
    }

    public void setBidReferenceType(Integer bidReferenceType) {
        this.bidReferenceType = bidReferenceType;
    }

    public static class AdUnitBidsItem {

        /**
         * 出价Id
         */
        @JsonProperty("bidId")
        private Long bidId;

        /**
         * 出价,万分比
         */
        @JsonProperty("bidValue")
        private Long bidValue;

        public void setBidId(Long bidId) {
            this.bidId = bidId;
        }

        public void setBidValue(Long bidValue) {
            this.bidValue = bidValue;
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy