package com.robinpowered.sdk.model;

import org.joda.time.DateTime;

/**
 * Represents the check-in/confirmation of an {@link Event}.
 */
public class Confirmation {

    public static final String MIME_TYPE = "vnd.robinpowered.confirmation.v1";

    private String eventId;
    private Integer user_id;
    private Integer device_id;
    private DateTime confirmedAt;

    public Confirmation(String eventId, Integer user_id, Integer device_id, DateTime confirmedAt) {
        this.eventId = eventId;
        this.user_id = user_id;
        this.device_id = device_id;
        this.confirmedAt = confirmedAt;
    }

    public String getEventId() {
        return eventId;
    }

    public Integer getUser_id() {
        return user_id;
    }

    public Integer getDevice_id() {
        return device_id;
    }

    public DateTime getConfirmedAt() {
        return confirmedAt;
    }
}

@@ -30,16 +30,55 @@
 model;%0A%0A
+import com.google.common.base.Objects;%0A
 import o
@@ -291,16 +291,22 @@
 private 
+final 
 String e
@@ -317,32 +317,38 @@
 Id;%0A    private 
+final 
 Integer user_id;
@@ -339,26 +339,25 @@
 Integer user
-_i
+I
 d;%0A    priva
@@ -359,16 +359,22 @@
 private 
+final 
 Integer 
@@ -375,26 +375,25 @@
 teger device
-_i
+I
 d;%0A    priva
@@ -395,16 +395,22 @@
 private 
+final 
 DateTime
@@ -476,18 +476,17 @@
 ger user
-_i
+I
 d, Integ
@@ -494,18 +494,17 @@
 r device
-_i
+I
 d, DateT
@@ -575,18 +575,17 @@
 user
-_i
+I
 d = user
 _id;
@@ -576,26 +576,25 @@
 serId = user
-_i
+I
 d;%0A        t
@@ -603,18 +603,17 @@
 s.device
-_i
+I
 d = devi
@@ -610,26 +610,25 @@
 eId = device
-_i
+I
 d;%0A        t
@@ -755,18 +755,17 @@
  getUser
-_i
+I
 d() %7B%0A  
@@ -781,18 +781,17 @@
 urn user
-_i
+I
 d;%0A    %7D
@@ -820,18 +820,17 @@
 etDevice
-_i
+I
 d() %7B%0A  
@@ -852,10 +852,9 @@
 vice
-_i
+I
 d;%0A 
@@ -931,11 +931,570 @@
 t;%0A    %7D
+%0A%0A    @Override%0A    public boolean equals(Object o) %7B%0A        if (this == o) return true;%0A        if (o == null %7C%7C getClass() != o.getClass()) return false;%0A        Confirmation that = (Confirmation) o;%0A        return Objects.equal(eventId, that.eventId) &&%0A                Objects.equal(userId, that.userId) &&%0A                Objects.equal(deviceId, that.deviceId) &&%0A                Objects.equal(confirmedAt, that.confirmedAt);%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        return Objects.hashCode(eventId, userId, deviceId, confirmedAt);%0A    %7D
 %0A%7D%0A

Test fixes for Confirmation model.