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

com.envisioniot.enos.api.common.constant.response.EnosScrollData Maven / Gradle / Ivy

There is a newer version: 2.5.10
Show newest version
package com.envisioniot.enos.api.common.constant.response;

import com.envisioniot.enos.api.common.constant.request.Sorter;

import java.util.List;

/**
 * @author : gaozhijun
 * @date : 2019-05-10 14:28
 **/
public class EnosScrollData extends EnosSortedData {

    /**
     * 
     */
    private static final long serialVersionUID = -589032144526201462L;

    private String pageToken;
    private int pageSize;

    public EnosScrollData() {}

    public EnosScrollData(List sortedBy, String pageToken, int pageSize, List items) {
        super(sortedBy, items);
        this.pageToken = pageToken;
        this.pageSize = pageSize;
    }

    public static  EnosScrollData.EnosScrollDataBuilder builder() {
        return new EnosScrollData.EnosScrollDataBuilder<>();
    }

    public String getPageToken() {
        return this.pageToken;
    }

    public void setPageToken(String pageToken) {
        this.pageToken = pageToken;
    }

    public int getPageSize() {
        return this.pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    @Override
    public String toString() {
        return "EnosScrollData(pageToken=" + this.getPageToken() + ", pageSize=" + this.getPageSize() + ")";
    }

    public static class EnosScrollDataBuilder {
        private int pageSize;
        private List sortedBy;
        private String pageToken;
        private List items;

        EnosScrollDataBuilder() {}

        public EnosScrollData.EnosScrollDataBuilder pageSize(int pageSize) {
            this.pageSize = pageSize;
            return this;
        }

        public EnosScrollData.EnosScrollDataBuilder sortedBy(List sortedBy) {
            this.sortedBy = sortedBy;
            return this;
        }

        public EnosScrollData.EnosScrollDataBuilder pageToken(String pageToken) {
            this.pageToken = pageToken;
            return this;
        }

        public EnosScrollData.EnosScrollDataBuilder items(List items) {
            this.items = items;
            return this;
        }

        public EnosScrollData build() {
            return new EnosScrollData<>(this.sortedBy, this.pageToken, this.pageSize, this.items);
        }

        @Override
        public String toString() {
            return "EnosScrollData.EnosScrollDataBuilder(pageSize=" + this.pageSize + ", sortedBy=" + this.sortedBy
                + ", pageToken=" + this.pageToken + ", items=" + this.items + ")";
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy