package com.github.sullis.email.markup.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; /** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.1-dev * User agent: apibuilder app.apibuilder.io/sullis/email-markup/0.0.1-dev/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 OneClickAction { private final String atContext; private final String atType; private final PotentialAction potentialAction; private final String description; @JsonCreator public OneClickAction(@JsonProperty("at_context") String atContext, @JsonProperty("at_type") String atType, @JsonProperty("potentialAction") PotentialAction potentialAction, @JsonProperty("description") String description) { this.atContext = atContext; this.atType = atType; this.potentialAction = potentialAction; this.description = description; } public String getAtContext() { return atContext; } public String getAtType() { return atType; } public PotentialAction getPotentialAction() { return potentialAction; } public String getDescription() { return description; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; OneClickAction that = (OneClickAction) o; if (atContext != null ? !atContext.equals(that.atContext) : that.atContext != null) return false; if (atType != null ? !atType.equals(that.atType) : that.atType != null) return false; if (potentialAction != null ? !potentialAction.equals(that.potentialAction) : that.potentialAction != null) return false; if (description != null ? !description.equals(that.description) : that.description != null) return false; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (atContext != null ? atContext.hashCode() : 0); result = 31 * result + (atType != null ? atType.hashCode() : 0); result = 31 * result + (potentialAction != null ? potentialAction.hashCode() : 0); result = 31 * result + (description != null ? description.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return com.github.sullis.email.markup.v0.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static OneClickAction parseJson(String json) throws IOException { return com.github.sullis.email.markup.v0.android.ApiBuilderObjectMapper.getInstance().readValue( json, OneClickAction.class); } }