
org.sourcelab.github.client.objects.Repository 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;
public class Repository {
private final long id;
private final String name;
private final String fullName;
private final boolean isPrivate;
private final String htmlUrl;
private final String description;
private final boolean isArchived;
private final boolean isDisabled;
private final ZonedDateTime createdAt;
private final ZonedDateTime updatedAt;
// Dependant objects
private final RepositoryOwner owner;
/**
* Constructor.
*/
@JsonCreator
public Repository(
@JsonProperty("id") final long id,
@JsonProperty("name") final String name,
@JsonProperty("full_name") final String fullName,
@JsonProperty("private") final boolean isPrivate,
@JsonProperty("html_url") final String htmlUrl,
@JsonProperty("description") final String description,
@JsonProperty("archived") final boolean isArchived,
@JsonProperty("disabled") final boolean isDisabled,
@JsonProperty("created_at") final ZonedDateTime createdAt,
@JsonProperty("updated_at") final ZonedDateTime updatedAt,
@JsonProperty("owner") final RepositoryOwner owner
) {
this.id = id;
this.name = name;
this.fullName = fullName;
this.isPrivate = isPrivate;
this.htmlUrl = htmlUrl;
this.description = description;
this.isArchived = isArchived;
this.isDisabled = isDisabled;
this.createdAt = createdAt;
this.updatedAt = updatedAt;
this.owner = owner;
}
public long getId() {
return id;
}
public String getName() {
return name;
}
public String getFullName() {
return fullName;
}
public boolean isPrivate() {
return isPrivate;
}
public String getHtmlUrl() {
return htmlUrl;
}
public String getDescription() {
return description;
}
public boolean isArchived() {
return isArchived;
}
public boolean isDisabled() {
return isDisabled;
}
public ZonedDateTime getCreatedAt() {
return createdAt;
}
public ZonedDateTime getUpdatedAt() {
return updatedAt;
}
public RepositoryOwner getOwner() {
return owner;
}
@Override
public String toString() {
return "Repository{"
+ "\n\tid=" + id
+ "\n\tname='" + name + '\''
+ "\n\tfullName='" + fullName + '\''
+ "\n\tisPrivate=" + isPrivate
+ "\n\thtmlUrl='" + htmlUrl + '\''
+ "\n\tdescription='" + description + '\''
+ "\n\tisArchived=" + isArchived
+ "\n\tisDisabled=" + isDisabled
+ "\n\tcreatedAt=" + createdAt
+ "\n\tupdatedAt=" + updatedAt
+ "\n\towner=" + owner
+ "\n}";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy