com.squareup.connect.models.V1TimecardEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of connect Show documentation
Show all versions of connect Show documentation
Java client library for the Square Connect API
/*
* Square Connect API
* Client library for accessing the Square Connect APIs
*
* OpenAPI spec version: 2.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.squareup.connect.models;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* V1TimecardEvent
*/
public class V1TimecardEvent {
@JsonProperty("id")
private String id = null;
/**
* The ID of the timecard to list events for.
*/
public enum EventTypeEnum {
API_CREATE("API_CREATE"),
API_EDIT("API_EDIT"),
API_DELETE("API_DELETE"),
REGISTER_CLOCKIN("REGISTER_CLOCKIN"),
REGISTER_CLOCKOUT("REGISTER_CLOCKOUT"),
DASHBOARD_SUPERVISOR_CLOSE("DASHBOARD_SUPERVISOR_CLOSE"),
DASHBOARD_EDIT("DASHBOARD_EDIT"),
DASHBOARD_DELETE("DASHBOARD_DELETE");
private String value;
EventTypeEnum(String value) {
this.value = value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static EventTypeEnum fromValue(String text) {
for (EventTypeEnum b : EventTypeEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
}
@JsonProperty("event_type")
private EventTypeEnum eventType = null;
@JsonProperty("clockin_time")
private String clockinTime = null;
@JsonProperty("clockout_time")
private String clockoutTime = null;
@JsonProperty("created_at")
private String createdAt = null;
public V1TimecardEvent id(String id) {
this.id = id;
return this;
}
/**
* The event's unique ID.
* @return id
**/
@ApiModelProperty(value = "The event's unique ID.")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public V1TimecardEvent eventType(EventTypeEnum eventType) {
this.eventType = eventType;
return this;
}
/**
* The ID of the timecard to list events for.
* @return eventType
**/
@ApiModelProperty(value = "The ID of the timecard to list events for.")
public EventTypeEnum getEventType() {
return eventType;
}
public void setEventType(EventTypeEnum eventType) {
this.eventType = eventType;
}
public V1TimecardEvent clockinTime(String clockinTime) {
this.clockinTime = clockinTime;
return this;
}
/**
* The time the employee clocked in, in ISO 8601 format.
* @return clockinTime
**/
@ApiModelProperty(value = "The time the employee clocked in, in ISO 8601 format.")
public String getClockinTime() {
return clockinTime;
}
public void setClockinTime(String clockinTime) {
this.clockinTime = clockinTime;
}
public V1TimecardEvent clockoutTime(String clockoutTime) {
this.clockoutTime = clockoutTime;
return this;
}
/**
* The time the employee clocked out, in ISO 8601 format.
* @return clockoutTime
**/
@ApiModelProperty(value = "The time the employee clocked out, in ISO 8601 format.")
public String getClockoutTime() {
return clockoutTime;
}
public void setClockoutTime(String clockoutTime) {
this.clockoutTime = clockoutTime;
}
public V1TimecardEvent createdAt(String createdAt) {
this.createdAt = createdAt;
return this;
}
/**
* The time when the event was created, in ISO 8601 format.
* @return createdAt
**/
@ApiModelProperty(value = "The time when the event was created, in ISO 8601 format.")
public String getCreatedAt() {
return createdAt;
}
public void setCreatedAt(String createdAt) {
this.createdAt = createdAt;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
V1TimecardEvent v1TimecardEvent = (V1TimecardEvent) o;
return Objects.equals(this.id, v1TimecardEvent.id) &&
Objects.equals(this.eventType, v1TimecardEvent.eventType) &&
Objects.equals(this.clockinTime, v1TimecardEvent.clockinTime) &&
Objects.equals(this.clockoutTime, v1TimecardEvent.clockoutTime) &&
Objects.equals(this.createdAt, v1TimecardEvent.createdAt);
}
@Override
public int hashCode() {
return Objects.hash(id, eventType, clockinTime, clockoutTime, createdAt);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class V1TimecardEvent {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n");
sb.append(" clockinTime: ").append(toIndentedString(clockinTime)).append("\n");
sb.append(" clockoutTime: ").append(toIndentedString(clockoutTime)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}