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

org.sourcelab.github.client.response.WorkflowRunsResponse Maven / Gradle / Ivy

The newest version!
package org.sourcelab.github.client.response;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.sourcelab.github.client.objects.WorkflowRun;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class WorkflowRunsResponse {
    private final int totalCount;
    private final List workflowRuns;

    @JsonCreator
    public WorkflowRunsResponse(
        @JsonProperty("total_count") final int totalCount,
        @JsonProperty("workflow_runs") final List workflowRuns
    ) {
        this.totalCount = totalCount;
        this.workflowRuns = Collections.unmodifiableList(new ArrayList<>( (workflowRuns == null) ? Collections.emptyList() : workflowRuns ));
    }

    public int getTotalCount() {
        return totalCount;
    }

    public List getWorkflowRuns() {
        return workflowRuns;
    }

    @Override
    public String toString() {
        return "WorkflowRunsResponse{"
            + "\n\ttotalCount=" + totalCount
            + "\n\tworkflowRuns=" + workflowRuns
            + "\n}";
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy