package com.edsancha.medallia.api.v0.models; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.JsonProcessingException; import java.io.IOException; import java.lang.Integer; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.1 * User agent: apibuilder app.apibuilder.io/edsancha/medallia-api/0.0.1/android_client * * WARNING: not all features (notably unions) and data types work with android generator yet. * Android generator is designed to be used in an android application, but should work in any java codebase as long as you import jackson and retrofit2 libraries. * If you are considering using this library, would like to request/discuss features, or would like to share how you're using it, please contact android-feedback@gilt.com * */ @JsonIgnoreProperties( ignoreUnknown = true ) public class Form { private final Integer formId; private final String name; private final String title; private final FormType formType; private final InviteData inviteData; private final TriggerData triggerData; private final FormJson formJson; @JsonCreator public Form(@JsonProperty("formId") Integer formId, @JsonProperty("name") String name, @JsonProperty("title") String title, @JsonProperty("formType") FormType formType, @JsonProperty("inviteData") InviteData inviteData, @JsonProperty("triggerData") TriggerData triggerData, @JsonProperty("formJson") FormJson formJson) { this.formId = formId; this.name = name; this.title = title; this.formType = formType; this.inviteData = inviteData; this.triggerData = triggerData; this.formJson = formJson; } /** * Form Identifier */ public Integer getFormId() { return formId; } /** * Form name */ public String getName() { return name; } /** * Form title */ public String getTitle() { return title; } /** * Form type */ public FormType getFormType() { return formType; } /** * Invitation data */ public InviteData getInviteData() { return inviteData; } /** * Invitation trigger conditions */ public TriggerData getTriggerData() { return triggerData; } /** * Wrapper around form data */ public FormJson getFormJson() { return formJson; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Form that = (Form) o; if (formId != null ? !formId.equals(that.formId) : that.formId != null) return false; if (name != null ? !name.equals(that.name) : that.name != null) return false; if (title != null ? !title.equals(that.title) : that.title != null) return false; if (formType != null ? !formType.equals(that.formType) : that.formType != null) return false; if (inviteData != null ? !inviteData.equals(that.inviteData) : that.inviteData != null) return false; if (triggerData != null ? !triggerData.equals(that.triggerData) : that.triggerData != null) return false; if (formJson != null ? !formJson.equals(that.formJson) : that.formJson != null) return false; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (formId != null ? formId.hashCode() : 0); result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (title != null ? title.hashCode() : 0); result = 31 * result + (formType != null ? formType.hashCode() : 0); result = 31 * result + (inviteData != null ? inviteData.hashCode() : 0); result = 31 * result + (triggerData != null ? triggerData.hashCode() : 0); result = 31 * result + (formJson != null ? formJson.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return com.edsancha.medallia.api.v0.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static Form parseJson(String json) throws IOException { return com.edsancha.medallia.api.v0.android.ApiBuilderObjectMapper.getInstance().readValue( json, Form.class); } }