Cochrane+ App API

<back to all web services

AttendanceSessionStatusChangeRequest

Requires Authentication
The following routes are available for this service:
POST/attendance/sessionstatus
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class AttendanceSessionStatusChangeRequest extends ApiServiceRequest
    {
        public Integer attendanceSessionId = null;
        public AttendanceEventType eventType = null;
        public String timeZoneName = null;
        
        public Integer getAttendanceSessionId() { return attendanceSessionId; }
        public AttendanceSessionStatusChangeRequest setAttendanceSessionId(Integer value) { this.attendanceSessionId = value; return this; }
        public AttendanceEventType getEventType() { return eventType; }
        public AttendanceSessionStatusChangeRequest setEventType(AttendanceEventType value) { this.eventType = value; return this; }
        public String getTimeZoneName() { return timeZoneName; }
        public AttendanceSessionStatusChangeRequest setTimeZoneName(String value) { this.timeZoneName = value; return this; }
    }

    public static class ApiServiceRequest implements IServiceRequest, IHasApiKey, IHasDeviceInfo
    {
        /**
        * The API Key required for authentication
        */
        @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
        public String apiKey = null;

        /**
        * Latitude of the user making this request
        */
        @ApiMember(DataType="double", Description="Latitude of the user making this request")
        public Double latitude = null;

        /**
        * Longitude of the user making this request
        */
        @ApiMember(DataType="double", Description="Longitude of the user making this request")
        public Double longitude = null;
        
        public String getApiKey() { return apiKey; }
        public ApiServiceRequest setApiKey(String value) { this.apiKey = value; return this; }
        public Double getLatitude() { return latitude; }
        public ApiServiceRequest setLatitude(Double value) { this.latitude = value; return this; }
        public Double getLongitude() { return longitude; }
        public ApiServiceRequest setLongitude(Double value) { this.longitude = value; return this; }
    }

    public static enum AttendanceEventType
    {
        @SerializedName("0") ClockOut(0),
        @SerializedName("1") ClockIn(1),
        @SerializedName("2") StartLunch(2),
        @SerializedName("3") EndLunch(3),
        @SerializedName("4") StartBreak(4),
        @SerializedName("5") EndBreak(5);

        private final int value;
        AttendanceEventType(final int intValue) { value = intValue; }
        public int getValue() { return value; }
    }

    public static class GetAttendanceSessionInfoResponse extends ApiServiceResponse
    {
        public AttendanceSessionInfo sessionInfo = null;
        
        public AttendanceSessionInfo getSessionInfo() { return sessionInfo; }
        public GetAttendanceSessionInfoResponse setSessionInfo(AttendanceSessionInfo value) { this.sessionInfo = value; return this; }
    }

    public static class ApiServiceResponse implements IServiceResponse
    {
        public String description = null;
        public String heading = null;
        public Boolean wasSuccessful = null;
        public Object modelState = null;
        
        public String getDescription() { return description; }
        public ApiServiceResponse setDescription(String value) { this.description = value; return this; }
        public String getHeading() { return heading; }
        public ApiServiceResponse setHeading(String value) { this.heading = value; return this; }
        public Boolean isWasSuccessful() { return wasSuccessful; }
        public ApiServiceResponse setWasSuccessful(Boolean value) { this.wasSuccessful = value; return this; }
        public Object getModelState() { return modelState; }
        public ApiServiceResponse setModelState(Object value) { this.modelState = value; return this; }
    }

    public static class AttendanceSessionInfo
    {
        public Integer attendanceSessionId = null;
        public Double attendanceGoalTime = null;
        public String attendanceGoalTimeValue = null;
        public ArrayList<AttendanceEventData> attendanceEvents = null;
        public String startDate = null;
        public String endDate = null;
        public Boolean isClockedIn = null;
        public Double timeElapsed = null;
        public AttendanceEventType latestEventType = null;
        public Double totalBreakTime = null;
        public Double totalLunchTime = null;
        public Boolean isNew = null;
        
        public Integer getAttendanceSessionId() { return attendanceSessionId; }
        public AttendanceSessionInfo setAttendanceSessionId(Integer value) { this.attendanceSessionId = value; return this; }
        public Double getAttendanceGoalTime() { return attendanceGoalTime; }
        public AttendanceSessionInfo setAttendanceGoalTime(Double value) { this.attendanceGoalTime = value; return this; }
        public String getAttendanceGoalTimeValue() { return attendanceGoalTimeValue; }
        public AttendanceSessionInfo setAttendanceGoalTimeValue(String value) { this.attendanceGoalTimeValue = value; return this; }
        public ArrayList<AttendanceEventData> getAttendanceEvents() { return attendanceEvents; }
        public AttendanceSessionInfo setAttendanceEvents(ArrayList<AttendanceEventData> value) { this.attendanceEvents = value; return this; }
        public String getStartDate() { return startDate; }
        public AttendanceSessionInfo setStartDate(String value) { this.startDate = value; return this; }
        public String getEndDate() { return endDate; }
        public AttendanceSessionInfo setEndDate(String value) { this.endDate = value; return this; }
        public Boolean getIsClockedIn() { return isClockedIn; }
        public AttendanceSessionInfo setIsClockedIn(Boolean value) { this.isClockedIn = value; return this; }
        public Double getTimeElapsed() { return timeElapsed; }
        public AttendanceSessionInfo setTimeElapsed(Double value) { this.timeElapsed = value; return this; }
        public AttendanceEventType getLatestEventType() { return latestEventType; }
        public AttendanceSessionInfo setLatestEventType(AttendanceEventType value) { this.latestEventType = value; return this; }
        public Double getTotalBreakTime() { return totalBreakTime; }
        public AttendanceSessionInfo setTotalBreakTime(Double value) { this.totalBreakTime = value; return this; }
        public Double getTotalLunchTime() { return totalLunchTime; }
        public AttendanceSessionInfo setTotalLunchTime(Double value) { this.totalLunchTime = value; return this; }
        public Boolean getIsNew() { return isNew; }
        public AttendanceSessionInfo setIsNew(Boolean value) { this.isNew = value; return this; }
    }

    public static class AttendanceEventData
    {
        public AttendanceEventType type = null;
        public String time = null;
        public String location = null;
        
        public AttendanceEventType getType() { return type; }
        public AttendanceEventData setType(AttendanceEventType value) { this.type = value; return this; }
        public String getTime() { return time; }
        public AttendanceEventData setTime(String value) { this.time = value; return this; }
        public String getLocation() { return location; }
        public AttendanceEventData setLocation(String value) { this.location = value; return this; }
    }

}

Java AttendanceSessionStatusChangeRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /attendance/sessionstatus HTTP/1.1 
Host: cochraneplus-api-dev.happen.zone 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"attendanceSessionId":0,"eventType":0,"timeZoneName":"String","apiKey":"String","latitude":0,"longitude":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"sessionInfo":{"attendanceSessionId":0,"attendanceGoalTime":0,"attendanceGoalTimeValue":"00:00:00","attendanceEvents":[{}],"startDate":"String","endDate":"String","isClockedIn":false,"timeElapsed":0,"latestEventType":0,"totalBreakTime":0,"totalLunchTime":0,"isNew":false},"description":"String","heading":"String","wasSuccessful":false,"modelState":{}}