Skip to content

Fix wrongly named "*_at" members #1062

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 28 additions & 6 deletions src/main/java/org/gitlab4j/api/models/GpgKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonIgnore;

public class GpgKey {

private Long id;
private String key;
private Date created_at;
private Date createdAt;

public Long getId() {
return id;
Expand All @@ -24,11 +26,31 @@ public void setKey(String key) {
this.key = key;
}

public Date getCreated_at() {
return created_at;

public Date getCreatedAt() {
return createdAt;
}

public void setCreated_at(Date created_at) {
this.created_at = created_at;
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
}

/**
* @deprecated Replaced by {@link #getCreatedAt()}
* @return the created at Date
*/
@Deprecated
@JsonIgnore
public Date getCreated_at() {
return createdAt;
}

/**
* @deprecated Replaced by {@link #setCreatedAt(Date)}
* @param createdAt new created at value
*/
@Deprecated
@JsonIgnore
public void setCreated_at(Date createdAt) {
this.createdAt = createdAt;
}}
31 changes: 26 additions & 5 deletions src/main/java/org/gitlab4j/api/models/PackageFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@

import org.gitlab4j.api.utils.JacksonJson;

import com.fasterxml.jackson.annotation.JsonIgnore;

public class PackageFile {

private Long id;
private Long packageId;
private Date created_at;
private Date createdAt;
private String fileName;
private Long size;
private String fileMd5;
Expand All @@ -30,14 +32,33 @@ public void setPackageId(Long packageId) {
this.packageId = packageId;
}

public Date getCreated_at() {
return created_at;
public Date getCreatedAt() {
return createdAt;
}

public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}

public void setCreated_at(Date created_at) {
this.created_at = created_at;
/**
* @deprecated Replaced by {@link #getCreatedAt()}
* @return the created at Date
*/
@Deprecated
@JsonIgnore
public Date getCreated_at() {
return createdAt;
}

/**
* @deprecated Replaced by {@link #setCreatedAt(Date)}
* @param createdAt new created at value
*/
@Deprecated
@JsonIgnore
public void setCreated_at(Date createdAt) {
this.createdAt = createdAt;
}
public String getFileName() {
return fileName;
}
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/org/gitlab4j/api/models/Pipeline.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,32 +130,32 @@ public Date getUpdatedAt() {
return updatedAt;
}

public void setUpdatedAt(Date updated_at) {
this.updatedAt = updated_at;
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}

public Date getStartedAt() {
return startedAt;
}

public void setStartedAt(Date started_at) {
this.startedAt = started_at;
public void setStartedAt(Date startedAt) {
this.startedAt = startedAt;
}

public Date getFinishedAt() {
return finishedAt;
}

public void setFinishedAt(Date finished_at) {
this.finishedAt = finished_at;
public void setFinishedAt(Date finishedAt) {
this.finishedAt = finishedAt;
}

public Date getCommittedAt() {
return committedAt;
}

public void setCommittedAt(Date committed_at) {
this.committedAt = committed_at;
public void setCommittedAt(Date committedAt) {
this.committedAt = committedAt;
}

/**
Expand Down
58 changes: 50 additions & 8 deletions src/main/java/org/gitlab4j/api/webhook/BuildEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import org.gitlab4j.api.models.User;
import org.gitlab4j.api.utils.JacksonJson;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
* The documentation at: <a href="https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#job-events">
* Job Events</a> is incorrect, this class represents the actual content of the Job Hook event.
Expand All @@ -22,8 +24,8 @@ public class BuildEvent extends AbstractEvent {
private String buildName;
private String buildStage;
private String buildStatus;
private Date buildStarted_at;
private Date buildFinished_at;
private Date buildStartedAt;
private Date buildFinishedAt;
private Float buildDuration;

private Float buildQueuedDuration;
Expand Down Expand Up @@ -111,20 +113,60 @@ public void setBuildStatus(String buildStatus) {
this.buildStatus = buildStatus;
}

public Date getBuildStartedAt() {
return buildStartedAt;
}

public void setBuildStartedAt(Date buildStartedAt) {
this.buildStartedAt = buildStartedAt;
}

/**
* @deprecated Replaced by {@link #getBuildStartedAt()}
* @return the buildstarted at Date
*/
@Deprecated
@JsonIgnore
public Date getBuildStarted_at() {
return buildStarted_at;
return buildStartedAt;
}

/**
* @deprecated Replaced by {@link #setBuildStartedAt(Date)}
* @param buildStartedAt new buildstarted at value
*/
@Deprecated
@JsonIgnore
public void setBuildStarted_at(Date buildStartedAt) {
this.buildStartedAt = buildStartedAt;
}

public Date getBuildFinishedAt() {
return buildFinishedAt;
}

public void setBuildStarted_at(Date buildStarted_at) {
this.buildStarted_at = buildStarted_at;
public void setBuildFinishedAt(Date buildFinishedAt) {
this.buildFinishedAt = buildFinishedAt;
}

/**
* @deprecated Replaced by {@link #getBuildFinishedAt()}
* @return the buildfinished at Date
*/
@Deprecated
@JsonIgnore
public Date getBuildFinished_at() {
return buildFinished_at;
return buildFinishedAt;
}

public void setBuildFinished_at(Date buildFinished_at) {
this.buildFinished_at = buildFinished_at;
/**
* @deprecated Replaced by {@link #setBuildFinishedAt(Date)}
* @param buildFinishedAt new buildfinished at value
*/
@Deprecated
@JsonIgnore
public void setBuildFinished_at(Date buildFinishedAt) {
this.buildFinishedAt = buildFinishedAt;
}

public Float getBuildDuration() {
Expand Down
59 changes: 50 additions & 9 deletions src/main/java/org/gitlab4j/api/webhook/JobEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import org.gitlab4j.api.models.User;
import org.gitlab4j.api.utils.JacksonJson;

import com.fasterxml.jackson.annotation.JsonIgnore;

public class JobEvent extends AbstractEvent {

public static final String JOB_HOOK_X_GITLAB_EVENT = "Job Hook";
Expand All @@ -18,8 +20,8 @@ public class JobEvent extends AbstractEvent {
private String jobName;
private String jobStage;
private String jobStatus;
private Date jobStarted_at;
private Date jobFinished_at;
private Date jobStartedAt;
private Date jobFinishedAt;
private Integer jobDuration;
private Boolean jobAllowFailure;
private String jobFailureReason;
Expand Down Expand Up @@ -103,22 +105,61 @@ public void setJobStatus(String jobStatus) {
this.jobStatus = jobStatus;
}

public Date getJobStartedAt() {
return jobStartedAt;
}

public void setJobStartedAt(Date jobStartedAt) {
this.jobStartedAt = jobStartedAt;
}

/**
* @deprecated Replaced by {@link #getJobStartedAt()}
* @return the jobstarted at Date
*/
@Deprecated
@JsonIgnore
public Date getJobStarted_at() {
return jobStarted_at;
return jobStartedAt;
}

public void setJobStarted_at(Date jobStarted_at) {
this.jobStarted_at = jobStarted_at;
/**
* @deprecated Replaced by {@link #setJobStartedAt(Date)}
* @param jobStartedAt new jobstarted at value
*/
@Deprecated
@JsonIgnore
public void setJobStarted_at(Date jobStartedAt) {
this.jobStartedAt = jobStartedAt;
}

public Date getJobFinished_at() {
return jobFinished_at;
public Date getJobFinishedAt() {
return jobFinishedAt;
}

public void setJobFinished_at(Date jobFinished_at) {
this.jobFinished_at = jobFinished_at;
public void setJobFinishedAt(Date jobFinishedAt) {
this.jobFinishedAt = jobFinishedAt;
}

/**
* @deprecated Replaced by {@link #getJobFinishedAt()}
* @return the jobfinished at Date
*/
@Deprecated
@JsonIgnore
public Date getJobFinished_at() {
return jobFinishedAt;
}

/**
* @deprecated Replaced by {@link #setJobFinishedAt(Date)}
* @param jobFinishedAt new jobfinished at value
*/
@Deprecated
@JsonIgnore
public void setJobFinished_at(Date jobFinishedAt) {
this.jobFinishedAt = jobFinishedAt;
}
public Integer getJobDuration() {
return jobDuration;
}
Expand Down