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

org.sourcelab.github.client.objects.WorkflowJob Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.time.ZonedDateTime;
import java.util.List;

public class WorkflowJob {
    private final long id;
    private final String name;
    private final long runId;
    private final long runAttempt;
    private final String headSha;
    private final String htmlUrl;
    private final WorkflowJobStatus status;
    private final WorkflowJobConclusion conclusion;
    private final ZonedDateTime startedAt;
    private final ZonedDateTime completedAt;
    private final List steps;

    /**
     * Constructor.
     */
    @JsonCreator
    public WorkflowJob(
        @JsonProperty("id") final long id,
        @JsonProperty("name") final String name,
        @JsonProperty("run_id") final long runId,
        @JsonProperty("run_attempt") final long runAttempt,
        @JsonProperty("head_sha") final String headSha,
        @JsonProperty("html_url") final String htmlUrl,
        @JsonProperty("status") final WorkflowJobStatus status,
        @JsonProperty("conclusion") final WorkflowJobConclusion conclusion,
        @JsonProperty("started_at") final ZonedDateTime startedAt,
        @JsonProperty("completed_at") final ZonedDateTime completedAt,
        @JsonProperty("steps") final List steps
    ) {
        this.id = id;
        this.name = name;
        this.runId = runId;
        this.runAttempt = runAttempt;
        this.headSha = headSha;
        this.htmlUrl = htmlUrl;
        this.status = status;
        this.conclusion = conclusion;
        this.startedAt = startedAt;
        this.completedAt = completedAt;
        this.steps = steps;
    }

    public long getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public long getRunId() {
        return runId;
    }

    public long getRunAttempt() {
        return runAttempt;
    }

    public String getHeadSha() {
        return headSha;
    }

    public String getHtmlUrl() {
        return htmlUrl;
    }

    public WorkflowJobStatus getStatus() {
        return status;
    }

    public WorkflowJobConclusion getConclusion() {
        return conclusion;
    }

    public ZonedDateTime getStartedAt() {
        return startedAt;
    }

    public ZonedDateTime getCompletedAt() {
        return completedAt;
    }

    public List getSteps() {
        return steps;
    }

    @Override
    public String toString() {
        return "WorkflowJob{"
            + "\n\tid=" + id
            + "\n\tname='" + name + '\''
            + "\n\trunId=" + runId
            + "\n\trunAttempt=" + runAttempt
            + "\n\theadSha='" + headSha + '\''
            + "\n\thtmlUrl='" + htmlUrl + '\''
            + "\n\tstatus=" + status
            + "\n\tconclusion=" + conclusion
            + "\n\tstartedAt=" + startedAt
            + "\n\tcompletedAt=" + completedAt
            + "\n\tsteps=" + steps
            + "\n}";
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy