<commit_before>package com.nulabinc.backlog4j.api.option;

import com.nulabinc.backlog4j.http.NameValuePair;

import java.util.List;

/**
 * Parameters for update pull request API.
 *
 * @author nulab-inc
 */
public class UpdatePullRequestParams extends PatchParams {

    private long projectId;
    private String projectKey;
    private long repoId;
    private String repoName;
    private long number;

    /**
     * Constructor
     *
     * @param projectId   the project identifier
     * @param repoId      the repository identifier
     * @param number      the pull request identifier
     */
    public UpdatePullRequestParams(long projectId, long repoId, long number) {
        this.projectId = projectId;
        this.repoId = repoId;
        this.number = number;
    }

    /**
     * Constructor
     *
     * @param projectKey    the project identifier
     * @param repoName      the repository identifier
     * @param number        the pull request title
     */
    public UpdatePullRequestParams(String projectKey, String repoName, long number) {
        this.projectKey = projectKey;
        this.repoName = repoName;
        this.number = number;
    }

    public String getProjectIdOrKeyString() {
        if(projectKey != null){
            return projectKey;
        }else{
            return String.valueOf(projectId);
        }
    }

    public String getRepoIdOrNameString() {
        if(repoName != null){
            return repoName;
        }else{
            return String.valueOf(repoId);
        }
    }

    public long getNumber() {
        return this.number;
    }

    /**
     * Sets the description.
     *
     * @param description the pull request description
     * @return UpdatePullRequestParams instance
     */
    public UpdatePullRequestParams description(String description) {
        parameters.add(new NameValuePair("description", description));
        return this;
    }

    /**
     * Sets the base parameter.
     *
     * @param base the base branch name
     * @return UpdatePullRequestParams instance
     */
    public UpdatePullRequestParams base(String base) {
        parameters.add(new NameValuePair("base", base));
        return this;
    }

    /**
     * Sets the branch parameter.
     *
     * @param branch the branch name merge to<commit_msg>fix update pull request params.<commit_after>package com.nulabinc.backlog4j.api.option;

import com.nulabinc.backlog4j.http.NameValuePair;

import java.util.List;

/**
 * Parameters for update pull request API.
 *
 * @author nulab-inc
 */
public class UpdatePullRequestParams extends PatchParams {

    private long projectId;
    private String projectKey;
    private long repoId;
    private String repoName;
    private long number;

    /**
     * Constructor
     *
     * @param projectId   the project identifier
     * @param repoId      the repository identifier
     * @param number      the pull request identifier
     */
    public UpdatePullRequestParams(long projectId, long repoId, long number) {
        this.projectId = projectId;
        this.repoId = repoId;
        this.number = number;
    }

    /**
     * Constructor
     *
     * @param projectKey    the project identifier
     * @param repoName      the repository identifier
     * @param number        the pull request title
     */
    public UpdatePullRequestParams(String projectKey, String repoName, long number) {
        this.projectKey = projectKey;
        this.repoName = repoName;
        this.number = number;
    }

    public String getProjectIdOrKeyString() {
        if(projectKey != null){
            return projectKey;
        }else{
            return String.valueOf(projectId);
        }
    }

    public String getRepoIdOrNameString() {
        if(repoName != null){
            return repoName;
        }else{
            return String.valueOf(repoId);
        }
    }

    public long getNumber() {
        return this.number;
    }

    /**
     * Sets the summary.
     *
     * @param summary the pull request description
     * @return UpdatePullRequestParams instance
     */
    public UpdatePullRequestParams summary(String summary) {
        parameters.add(new NameValuePair("summary", summary));
        return this;
    }

    /**
     * Sets the description.
     *
     * @param description the pull request description
     * @return UpdatePullRequestParams instance
     */
    public UpdatePullRequestParams description(String description) {
        parameters.add(new NameValuePair("description", description));
        return this;
    }

    /**
     * Sets the base parameter.
     *
     * @param base the base branch name
     * @return UpdatePullRequestParams instance
     */
    public UpdatePullRequestParams base(String base) {
        parameters.add(new NameValuePair("base", base));
        return this;
    }

    /**
     * Sets the branch parameter.
     *
     * @param branch the branch name merge to
{'fraction_non_alphanumeric': 0.08163676678089095, 'fraction_numerical': 0.0008062890546260835, 'mean_word_length': 2.24950884086444, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6650118', 'n_tokens_mistral': 1324, 'n_tokens_neox': 1288, 'n_words': 370}