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

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

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

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

public class HeadCommit {
    private final String id;
    private final String message;
    private final NameAndEmail author;
    private final NameAndEmail committer;

    /**
     * Constructor.
     */
    @JsonCreator
    public HeadCommit(
        @JsonProperty("id") final String id,
        @JsonProperty("message") final String message,
        @JsonProperty("author") final NameAndEmail author,
        @JsonProperty("committer") final NameAndEmail committer
    ) {
        this.id = id;
        this.message = message;
        this.author = author;
        this.committer = committer;
    }

    public String getId() {
        return id;
    }

    public String getMessage() {
        return message;
    }

    public NameAndEmail getAuthor() {
        return author;
    }

    public NameAndEmail getCommitter() {
        return committer;
    }

    @Override
    public String toString() {
        return "HeadCommit{"
            + "\n\tid='" + id + '\''
            + "\n\tmessage='" + message + '\''
            + "\n\tauthor=" + author
            + "\n\tcommitter=" + committer
            + "\n}";
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy