com.easilydo.sift.model.Domain Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sift-sdk Show documentation
Show all versions of sift-sdk Show documentation
Java SDK for use of the Sift Email Parse APIs
The newest version!
package com.easilydo.sift.model;
import java.util.HashMap;
import java.util.Map;
import com.easilydo.sift.model.gen.*;
public enum Domain {
UNKNOWN(0, "unknown", null),
PURCHASE(1, "purchase", Order.class),
SHIPMENT(2, "shipment", ParcelDelivery.class),
BILL(3, "bill", Invoice.class),
EVENT(4, "event", EventReservation.class),
RESTAURANT(5, "restaurant", FoodEstablishmentReservation.class),
HOTEL(6, "hotel", LodgingReservation.class),
TRAIN(7, "train", TrainReservation.class),
DEAL(8, "deal", Deal.class),
CONTACT(9, "contact", Contact.class),
CAR_RENTAL(10, "rentalcar", RentalCarReservation.class),
FLIGHT(11, "flight", FlightReservation.class),
BOARDING_PASS(12, "boardingpass", FlightReservation.class),
REMINDER(13, "reminder", Reminder.class),
CRUISE(14, "cruise", LodgingReservation.class);
public final int id;
public final String name;
public final Class clazz;
private static Map constants = new HashMap();
static {
for (Domain d: values()) {
constants.put(d.name, d);
}
}
Domain(int id, String name, Class clazz) {
this.id = id;
this.name = name;
this.clazz = clazz;
}
public static Domain getDomain(String type) {
return constants.get(type);
}
}