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.Object; import java.lang.Override; import java.lang.String; import java.util.Arrays; /** * 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 TriggerData { private final NumberOfAppSession numberOfAppSession; private final TimeInForeground timeInForeground; private final String[] mobileappVersion; private final NumberOfDays submitted; private final NumberOfDays declined; private final String[] mobileosVersion; private final PercentageOfSessions percentageOfSessions; private final String genericRule; @JsonCreator public TriggerData(@JsonProperty("numberOfAppSession") NumberOfAppSession numberOfAppSession, @JsonProperty("timeInForeground") TimeInForeground timeInForeground, @JsonProperty("mobileappVersion") String[] mobileappVersion, @JsonProperty("submitted") NumberOfDays submitted, @JsonProperty("declined") NumberOfDays declined, @JsonProperty("mobileosVersion") String[] mobileosVersion, @JsonProperty("percentageOfSessions") PercentageOfSessions percentageOfSessions, @JsonProperty("genericRule") String genericRule) { this.numberOfAppSession = numberOfAppSession; this.timeInForeground = timeInForeground; this.mobileappVersion = mobileappVersion; this.submitted = submitted; this.declined = declined; this.mobileosVersion = mobileosVersion; this.percentageOfSessions = percentageOfSessions; this.genericRule = genericRule; } /** * Number of App Sessions to show the invite, with compare string */ public NumberOfAppSession getNumberOfAppSession() { return numberOfAppSession; } /** * App Time in foreground in seconds to show the invite, with compare string */ public TimeInForeground getTimeInForeground() { return timeInForeground; } /** * Mobile App Versions */ public String[] getMobileappVersion() { return mobileappVersion; } /** * Don't invite a visitor who submitted feedback in the past x days */ public NumberOfDays getSubmitted() { return submitted; } /** * Don't invite a visitor who declined an invitation in the past x days */ public NumberOfDays getDeclined() { return declined; } /** * Mobile App Versions */ public String[] getMobileosVersion() { return mobileosVersion; } /** * Invite to this percentage of sessions */ public PercentageOfSessions getPercentageOfSessions() { return percentageOfSessions; } /** * Set of generic rules creates in the invitation settings */ public String getGenericRule() { return genericRule; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TriggerData that = (TriggerData) o; if (numberOfAppSession != null ? !numberOfAppSession.equals(that.numberOfAppSession) : that.numberOfAppSession != null) return false; if (timeInForeground != null ? !timeInForeground.equals(that.timeInForeground) : that.timeInForeground != null) return false; if (!Arrays.equals(mobileappVersion, that.mobileappVersion)) return false; if (submitted != null ? !submitted.equals(that.submitted) : that.submitted != null) return false; if (declined != null ? !declined.equals(that.declined) : that.declined != null) return false; if (!Arrays.equals(mobileosVersion, that.mobileosVersion)) return false; if (percentageOfSessions != null ? !percentageOfSessions.equals(that.percentageOfSessions) : that.percentageOfSessions != null) return false; if (genericRule != null ? !genericRule.equals(that.genericRule) : that.genericRule != null) return false; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (numberOfAppSession != null ? numberOfAppSession.hashCode() : 0); result = 31 * result + (timeInForeground != null ? timeInForeground.hashCode() : 0); result = 31 * result + (mobileappVersion != null ? mobileappVersion.hashCode() : 0); result = 31 * result + (submitted != null ? submitted.hashCode() : 0); result = 31 * result + (declined != null ? declined.hashCode() : 0); result = 31 * result + (mobileosVersion != null ? mobileosVersion.hashCode() : 0); result = 31 * result + (percentageOfSessions != null ? percentageOfSessions.hashCode() : 0); result = 31 * result + (genericRule != null ? genericRule.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return com.edsancha.medallia.api.v0.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static TriggerData parseJson(String json) throws IOException { return com.edsancha.medallia.api.v0.android.ApiBuilderObjectMapper.getInstance().readValue( json, TriggerData.class); } }