// Path: src/main/java/com/codepine/api/testrail/model/Page.java
// @JsonDeserialize(using = PageDeserializer.class)
// public class Page<T> {
// 
//     public int offset;
// 
//     public int limit;
// 
//     public int size;
// 
//     public Links _links;
// 
//     public T objects;
// }


import com.codepine.api.testrail.internal.*;
import com.codepine.api.testrail.model.Page;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.*;
import com.google.common.base.Charsets;
import com.google.common.io.ByteStreams;
import lombok.NonNull;
import lombok.extern.log4j.Log4j;
import javax.xml.bind.DatatypeConverter;
import java.io.*;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
        this.method = method;

        this.responseClass = responseClass;
        this.responseType = responseType;
        this.pageType = pageType;
        this.apiSegment = config.getBaseApiUrl().split("\\?")[1];
        this.restPath = restPath.replace(this.apiSegment, "");
    }

    /**
     * @param config TestRail configuration
     * @param method the HTTP method for request
     * @param restPath the path of the request URL
     * @param responseClass the type of the response entity
     */
    Request(TestRailConfig config, Method method, String restPath, @NonNull Class<? extends T> responseClass) {
        this(config, method, restPath, responseClass, null, null);
    }

    /**
     * @param config TestRail configuration
     * @param method the HTTP method for request
     * @param restPath the path of the request URL
     * @param responseType the type of the response entity
     */
    Request(TestRailConfig config, Method method, String restPath, @NonNull TypeReference<? extends T> responseType) {
        this(config, method, restPath, null, responseType, null);
    }

    Request(TestRailConfig config, Method method, String restPath, @NonNull TypeReference<? extends T> responseType,
// Path: src/main/java/com/codepine/api/testrail/model/Page.java
// @JsonDeserialize(using = PageDeserializer.class)
// public class Page<T> {
// 
//     public int offset;
// 
//     public int limit;
// 
//     public int size;
// 
//     public Links _links;
// 
//     public T objects;
// }


// Path: src/main/java/com/codepine/api/testrail/Request.java
import com.codepine.api.testrail.internal.*;
import com.codepine.api.testrail.model.Page;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.*;
import com.google.common.base.Charsets;
import com.google.common.io.ByteStreams;
import lombok.NonNull;
import lombok.extern.log4j.Log4j;
import javax.xml.bind.DatatypeConverter;
import java.io.*;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

        this.method = method;

        this.responseClass = responseClass;
        this.responseType = responseType;
        this.pageType = pageType;
        this.apiSegment = config.getBaseApiUrl().split("\\?")[1];
        this.restPath = restPath.replace(this.apiSegment, "");
    }

    /**
     * @param config TestRail configuration
     * @param method the HTTP method for request
     * @param restPath the path of the request URL
     * @param responseClass the type of the response entity
     */
    Request(TestRailConfig config, Method method, String restPath, @NonNull Class<? extends T> responseClass) {
        this(config, method, restPath, responseClass, null, null);
    }

    /**
     * @param config TestRail configuration
     * @param method the HTTP method for request
     * @param restPath the path of the request URL
     * @param responseType the type of the response entity
     */
    Request(TestRailConfig config, Method method, String restPath, @NonNull TypeReference<? extends T> responseType) {
        this(config, method, restPath, null, responseType, null);
    }

    Request(TestRailConfig config, Method method, String restPath, @NonNull TypeReference<? extends T> responseType,
            @NonNull TypeReference<Page<T>> pageType) {