package io.flow.github.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.Long; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.5.16 * User agent: apibuilder app.apibuilder.io/flow/github/0.5.16/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 User { private final Long id; private final String login; private final String name; private final String email; private final String avatarUrl; private final String gravatarId; private final String url; private final String htmlUrl; private final OwnerType type; @JsonCreator public User(@JsonProperty("id") Long id, @JsonProperty("login") String login, @JsonProperty("name") String name, @JsonProperty("email") String email, @JsonProperty("avatar_url") String avatarUrl, @JsonProperty("gravatar_id") String gravatarId, @JsonProperty("url") String url, @JsonProperty("html_url") String htmlUrl, @JsonProperty("type") OwnerType type) { this.id = id; this.login = login; this.name = name; this.email = email; this.avatarUrl = avatarUrl; this.gravatarId = gravatarId; this.url = url; this.htmlUrl = htmlUrl; this.type = type; } public Long getId() { return id; } public String getLogin() { return login; } public String getName() { return name; } public String getEmail() { return email; } public String getAvatarUrl() { return avatarUrl; } public String getGravatarId() { return gravatarId; } public String getUrl() { return url; } public String getHtmlUrl() { return htmlUrl; } public OwnerType getType() { return type; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; User that = (User) o; if (id != null ? !id.equals(that.id) : that.id != null) return false; if (login != null ? !login.equals(that.login) : that.login != null) return false; if (name != null ? !name.equals(that.name) : that.name != null) return false; if (email != null ? !email.equals(that.email) : that.email != null) return false; if (avatarUrl != null ? !avatarUrl.equals(that.avatarUrl) : that.avatarUrl != null) return false; if (gravatarId != null ? !gravatarId.equals(that.gravatarId) : that.gravatarId != null) return false; if (url != null ? !url.equals(that.url) : that.url != null) return false; if (htmlUrl != null ? !htmlUrl.equals(that.htmlUrl) : that.htmlUrl != null) return false; if (type != null ? !type.equals(that.type) : that.type != null) return false; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (id != null ? id.hashCode() : 0); result = 31 * result + (login != null ? login.hashCode() : 0); result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (email != null ? email.hashCode() : 0); result = 31 * result + (avatarUrl != null ? avatarUrl.hashCode() : 0); result = 31 * result + (gravatarId != null ? gravatarId.hashCode() : 0); result = 31 * result + (url != null ? url.hashCode() : 0); result = 31 * result + (htmlUrl != null ? htmlUrl.hashCode() : 0); result = 31 * result + (type != null ? type.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return io.flow.github.v0.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static User parseJson(String json) throws IOException { return io.flow.github.v0.android.ApiBuilderObjectMapper.getInstance().readValue( json, User.class); } }