Unverified Commit 94f26c90 authored by Jérémie Bresson's avatar Jérémie Bresson Committed by GitHub
Browse files

Fix wrongly named "*_at" members (#1062)

parent 7420c35a
...@@ -2,11 +2,13 @@ package org.gitlab4j.api.models; ...@@ -2,11 +2,13 @@ package org.gitlab4j.api.models;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.annotation.JsonIgnore;
public class GpgKey { public class GpgKey {
private Long id; private Long id;
private String key; private String key;
private Date created_at; private Date createdAt;
public Long getId() { public Long getId() {
return id; return id;
...@@ -24,11 +26,31 @@ public class GpgKey { ...@@ -24,11 +26,31 @@ public class GpgKey {
this.key = key; this.key = key;
} }
public Date getCreated_at() {
return created_at; public Date getCreatedAt() {
return createdAt;
} }
public void setCreated_at(Date created_at) { public void setCreatedAt(Date createdAt) {
this.created_at = created_at; 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;
}}
...@@ -4,11 +4,13 @@ import java.util.Date; ...@@ -4,11 +4,13 @@ import java.util.Date;
import org.gitlab4j.api.utils.JacksonJson; import org.gitlab4j.api.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonIgnore;
public class PackageFile { public class PackageFile {
private Long id; private Long id;
private Long packageId; private Long packageId;
private Date created_at; private Date createdAt;
private String fileName; private String fileName;
private Long size; private Long size;
private String fileMd5; private String fileMd5;
...@@ -30,14 +32,33 @@ public class PackageFile { ...@@ -30,14 +32,33 @@ public class PackageFile {
this.packageId = packageId; this.packageId = packageId;
} }
public Date getCreated_at() { public Date getCreatedAt() {
return created_at; 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() { public String getFileName() {
return fileName; return fileName;
} }
......
...@@ -130,32 +130,32 @@ public class Pipeline { ...@@ -130,32 +130,32 @@ public class Pipeline {
return updatedAt; return updatedAt;
} }
public void setUpdatedAt(Date updated_at) { public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updated_at; this.updatedAt = updatedAt;
} }
public Date getStartedAt() { public Date getStartedAt() {
return startedAt; return startedAt;
} }
public void setStartedAt(Date started_at) { public void setStartedAt(Date startedAt) {
this.startedAt = started_at; this.startedAt = startedAt;
} }
public Date getFinishedAt() { public Date getFinishedAt() {
return finishedAt; return finishedAt;
} }
public void setFinishedAt(Date finished_at) { public void setFinishedAt(Date finishedAt) {
this.finishedAt = finished_at; this.finishedAt = finishedAt;
} }
public Date getCommittedAt() { public Date getCommittedAt() {
return committedAt; return committedAt;
} }
public void setCommittedAt(Date committed_at) { public void setCommittedAt(Date committedAt) {
this.committedAt = committed_at; this.committedAt = committedAt;
} }
/** /**
......
...@@ -5,6 +5,8 @@ import java.util.Date; ...@@ -5,6 +5,8 @@ import java.util.Date;
import org.gitlab4j.api.models.User; import org.gitlab4j.api.models.User;
import org.gitlab4j.api.utils.JacksonJson; 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"> * 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. * Job Events</a> is incorrect, this class represents the actual content of the Job Hook event.
...@@ -22,8 +24,8 @@ public class BuildEvent extends AbstractEvent { ...@@ -22,8 +24,8 @@ public class BuildEvent extends AbstractEvent {
private String buildName; private String buildName;
private String buildStage; private String buildStage;
private String buildStatus; private String buildStatus;
private Date buildStarted_at; private Date buildStartedAt;
private Date buildFinished_at; private Date buildFinishedAt;
private Float buildDuration; private Float buildDuration;
private Float buildQueuedDuration; private Float buildQueuedDuration;
...@@ -111,20 +113,60 @@ public class BuildEvent extends AbstractEvent { ...@@ -111,20 +113,60 @@ public class BuildEvent extends AbstractEvent {
this.buildStatus = 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() { 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) { public void setBuildFinishedAt(Date buildFinishedAt) {
this.buildStarted_at = buildStarted_at; this.buildFinishedAt = buildFinishedAt;
} }
/**
* @deprecated Replaced by {@link #getBuildFinishedAt()}
* @return the buildfinished at Date
*/
@Deprecated
@JsonIgnore
public Date getBuildFinished_at() { 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() { public Float getBuildDuration() {
......
...@@ -5,6 +5,8 @@ import java.util.Date; ...@@ -5,6 +5,8 @@ import java.util.Date;
import org.gitlab4j.api.models.User; import org.gitlab4j.api.models.User;
import org.gitlab4j.api.utils.JacksonJson; import org.gitlab4j.api.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonIgnore;
public class JobEvent extends AbstractEvent { public class JobEvent extends AbstractEvent {
public static final String JOB_HOOK_X_GITLAB_EVENT = "Job Hook"; public static final String JOB_HOOK_X_GITLAB_EVENT = "Job Hook";
...@@ -18,8 +20,8 @@ public class JobEvent extends AbstractEvent { ...@@ -18,8 +20,8 @@ public class JobEvent extends AbstractEvent {
private String jobName; private String jobName;
private String jobStage; private String jobStage;
private String jobStatus; private String jobStatus;
private Date jobStarted_at; private Date jobStartedAt;
private Date jobFinished_at; private Date jobFinishedAt;
private Integer jobDuration; private Integer jobDuration;
private Boolean jobAllowFailure; private Boolean jobAllowFailure;
private String jobFailureReason; private String jobFailureReason;
...@@ -103,22 +105,61 @@ public class JobEvent extends AbstractEvent { ...@@ -103,22 +105,61 @@ public class JobEvent extends AbstractEvent {
this.jobStatus = 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() { 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() { public Date getJobFinishedAt() {
return jobFinished_at; return jobFinishedAt;
} }
public void setJobFinished_at(Date jobFinished_at) { public void setJobFinishedAt(Date jobFinishedAt) {
this.jobFinished_at = jobFinished_at; 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() { public Integer getJobDuration() {
return jobDuration; return jobDuration;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment