package com.nulabinc.backlog4j.api.option;

import com.nulabinc.backlog4j.PullRequest;
import com.nulabinc.backlog4j.http.NameValuePair;

import java.util.List;

/**
 * Parameters for pull request query.
 *
 * @author nulab-inc
 */
public class PullRequestQueryParams extends GetParams {

    public PullRequestQueryParams statusType(List<PullRequest.StatusType> statusType) {
        for (PullRequest.StatusType type : statusType) {
            parameters.add(new NameValuePair("statusId[]", String.valueOf(type.getIntValue())));
        }
        return this;
    }

    public PullRequestQueryParams assigneeIds(List assigneeIds) {
        for (Object assigneeId : assigneeIds) {
            parameters.add(new NameValuePair("assigneeId[]", assigneeId.toString()));
        }
        return this;
    }

    public PullRequestQueryParams issueIds(List issueIds) {
        for (Object issueId : issueIds) {
            parameters.add(new NameValuePair("issueId[]", issueId.toString()));
        }
        return this;
    }

    public PullRequestQueryParams createdUserIds(List createdUserIds) {
        for (Object createdUserId : createdUserIds) {
            parameters.add(new NameValuePair("createdUserId[]", createdUserId.toString()));
        }
        return this;
    }

    public PullRequestQueryParams minId(Object minId) {
        parameters.add(new NameValuePair("minId", minId.toString()));
        return this;
    }

    public PullRequestQueryParams maxId(Object maxId) {
        parameters.add(new NameValuePair("maxId", maxId.toString()));
        return this;
    }

    public PullRequestQueryParams count(int count) {
        parameters.add(new NameValuePair("count", String.valueOf(count)));
        return this;
    }

    public PullRequestQueryParams count(long count) {
        parameters.add(new NameValuePair("count", String.valueOf(count)));
        return this;
    }
    public PullRequestQueryParams offset(long offset) {
        parameters.add(new NameValuePair("offset", String.valueOf(offset)));
        return this;
    }

    public PullRequestQueryParams offset(int offset) {
        parameters.add(new NameValuePair("offset", String.valueOf(offset)));
        return this;
    }
}

@@ -273,11 +273,13 @@
 nds 
-Get
+Query
 Para
@@ -1270,32 +1270,46 @@
 rn this;%0A    %7D%0A%0A
+    @Override%0A
     public PullR
@@ -1360,97 +1360,80 @@
     
-parameters.add(new NameValuePair(%22
+return (PullRequestQueryParams) super.
 minId
-%22, 
+(
 minId
-.toString())
 );%0A    
+%7D%0A%0A
     
-return this;%0A    %7D%0A
+@Override
 %0A   
@@ -1497,97 +1497,80 @@
     
-parameters.add(new NameValuePair(%22
+return (PullRequestQueryParams) super.
 maxId
-%22, 
+(
 maxId
-.toString())
 );%0A    
+%7D%0A%0A
     
-return this;%0A    %7D%0A
+@Override
 %0A   
@@ -1606,19 +1606,20 @@
 s count(
-int
+long
  count) 
@@ -1632,102 +1632,80 @@
     
-parameters.add(new NameValuePair(%22count%22, String.valueOf
+return (PullRequestQueryParams) super.count
 (count)
-))
 ;%0A    
+%7D%0A%0A
     
-return this;%0A    %7D%0A
+@Override
 %0A   
@@ -1733,36 +1733,35 @@
 eryParams count(
-long
+int
  count) %7B%0A      
@@ -1766,102 +1766,202 @@
     
-parameters.add(new NameValuePair(%22count%22, String.valueOf(count)));%0A        return this
+return (PullRequestQueryParams) super.count(count);%0A    %7D%0A%0A    @Override%0A    public PullRequestQueryParams order(Order order) %7B%0A        return (PullRequestQueryParams) super.order(order)
 ;%0A    %7D%0A
     
@@ -1952,24 +1952,25 @@
 der);%0A    %7D%0A
+%0A
     public P

fix pull request query params again2