org.eclipse.che.multiuser.keycloak.server.DtoServerImpls Maven / Gradle / Ivy
The newest version!
/*******************************************************************************
* Copyright (c) 2012-2016 Red Hat, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
*******************************************************************************/
// GENERATED SOURCE. DO NOT EDIT.
package org.eclipse.che.multiuser.keycloak.server;
import org.eclipse.che.dto.server.JsonSerializable;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonNull;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.JsonPrimitive;
import java.util.List;
import java.util.Map;
@SuppressWarnings({"unchecked", "cast", "MissingOverride"})
public class DtoServerImpls implements org.eclipse.che.dto.server.DtoFactoryVisitor {
private static final Gson gson = org.eclipse.che.dto.server.DtoFactory.getInstance().getGson();
@Override
public void accept(org.eclipse.che.dto.server.DtoFactory dtoFactory) {
dtoFactory.registerProvider(org.eclipse.che.multiuser.keycloak.shared.dto.KeycloakErrorResponse.class, new org.eclipse.che.dto.server.DtoProvider() {
public Class extends org.eclipse.che.multiuser.keycloak.shared.dto.KeycloakErrorResponse> getImplClass() {
return KeycloakErrorResponseImpl.class;
}
public org.eclipse.che.multiuser.keycloak.shared.dto.KeycloakErrorResponse newInstance() {
return KeycloakErrorResponseImpl.make();
}
public org.eclipse.che.multiuser.keycloak.shared.dto.KeycloakErrorResponse fromJson(String json) {
return KeycloakErrorResponseImpl.fromJsonString(json);
}
public org.eclipse.che.multiuser.keycloak.shared.dto.KeycloakErrorResponse fromJson(com.google.gson.JsonElement json) {
return KeycloakErrorResponseImpl.fromJsonElement(json);
}
public org.eclipse.che.multiuser.keycloak.shared.dto.KeycloakErrorResponse clone(org.eclipse.che.multiuser.keycloak.shared.dto.KeycloakErrorResponse origin) {
return new KeycloakErrorResponseImpl(origin);
}
});
dtoFactory.registerProvider(org.eclipse.che.multiuser.keycloak.shared.dto.KeycloakTokenResponse.class, new org.eclipse.che.dto.server.DtoProvider() {
public Class extends org.eclipse.che.multiuser.keycloak.shared.dto.KeycloakTokenResponse> getImplClass() {
return KeycloakTokenResponseImpl.class;
}
public org.eclipse.che.multiuser.keycloak.shared.dto.KeycloakTokenResponse newInstance() {
return KeycloakTokenResponseImpl.make();
}
public org.eclipse.che.multiuser.keycloak.shared.dto.KeycloakTokenResponse fromJson(String json) {
return KeycloakTokenResponseImpl.fromJsonString(json);
}
public org.eclipse.che.multiuser.keycloak.shared.dto.KeycloakTokenResponse fromJson(com.google.gson.JsonElement json) {
return KeycloakTokenResponseImpl.fromJsonElement(json);
}
public org.eclipse.che.multiuser.keycloak.shared.dto.KeycloakTokenResponse clone(org.eclipse.che.multiuser.keycloak.shared.dto.KeycloakTokenResponse origin) {
return new KeycloakTokenResponseImpl(origin);
}
});
}
@org.eclipse.che.dto.shared.DTOImpl("server")
public static class KeycloakErrorResponseImpl implements org.eclipse.che.multiuser.keycloak.shared.dto.KeycloakErrorResponse, JsonSerializable {
public static KeycloakErrorResponseImpl make() {
return new KeycloakErrorResponseImpl();
}
public KeycloakErrorResponseImpl() {
}
protected java.lang.String errorMessage;
@Override
public java.lang.String getErrorMessage() {
return (java.lang.String)(errorMessage);
}
public void setErrorMessage(java.lang.String v) {
this.errorMessage = v;
}
@Override
public boolean equals(Object o) {
if (!(o instanceof KeycloakErrorResponseImpl)) {
return false;
}
KeycloakErrorResponseImpl other = (KeycloakErrorResponseImpl) o;
if (this.errorMessage != null) {
if (!this.errorMessage.equals(other.errorMessage)) {
return false;
}
} else {
if (other.errorMessage != null) {
return false;
}
}
return true;
}
@Override
public int hashCode() {
int hash = 7;
hash = hash * 31 + (errorMessage != null ? errorMessage.hashCode() : 0);
return hash;
}
@Override
public JsonElement toJsonElement() {
return gson.toJsonTree(this);
}
@Override
public void toJson(java.io.Writer w) {
gson.toJson(this, w);
}
@Override
public String toJson() {
return gson.toJson(this);
}
@Override
public String toString() {
return toJson();
}
public static KeycloakErrorResponseImpl fromJsonElement(JsonElement jsonElem) {
return gson.fromJson(jsonElem, KeycloakErrorResponseImpl.class);
}
public static KeycloakErrorResponseImpl fromJsonString(String jsonString) {
return gson.fromJson(jsonString, KeycloakErrorResponseImpl.class);
}
public KeycloakErrorResponseImpl(org.eclipse.che.multiuser.keycloak.shared.dto.KeycloakErrorResponse origin) {
this.errorMessage = origin.getErrorMessage();
}
public org.eclipse.che.multiuser.keycloak.shared.dto.KeycloakErrorResponse withErrorMessage(java.lang.String v) {
this.errorMessage = v;
return this;
}
}
@org.eclipse.che.dto.shared.DTOImpl("server")
public static class KeycloakTokenResponseImpl implements org.eclipse.che.multiuser.keycloak.shared.dto.KeycloakTokenResponse, JsonSerializable {
public static KeycloakTokenResponseImpl make() {
return new KeycloakTokenResponseImpl();
}
public KeycloakTokenResponseImpl() {
}
protected java.lang.String tokenType;
protected java.lang.String scope;
@com.google.gson.annotations.SerializedName("access_token")
protected java.lang.String accessToken;
@Override
public java.lang.String getTokenType() {
return (java.lang.String)(tokenType);
}
public void setTokenType(java.lang.String v) {
this.tokenType = v;
}
@Override
public java.lang.String getScope() {
return (java.lang.String)(scope);
}
public void setScope(java.lang.String v) {
this.scope = v;
}
@Override
public java.lang.String getAccessToken() {
return (java.lang.String)(accessToken);
}
public void setAccessToken(java.lang.String v) {
this.accessToken = v;
}
@Override
public boolean equals(Object o) {
if (!(o instanceof KeycloakTokenResponseImpl)) {
return false;
}
KeycloakTokenResponseImpl other = (KeycloakTokenResponseImpl) o;
if (this.tokenType != null) {
if (!this.tokenType.equals(other.tokenType)) {
return false;
}
} else {
if (other.tokenType != null) {
return false;
}
}
if (this.scope != null) {
if (!this.scope.equals(other.scope)) {
return false;
}
} else {
if (other.scope != null) {
return false;
}
}
if (this.accessToken != null) {
if (!this.accessToken.equals(other.accessToken)) {
return false;
}
} else {
if (other.accessToken != null) {
return false;
}
}
return true;
}
@Override
public int hashCode() {
int hash = 7;
hash = hash * 31 + (tokenType != null ? tokenType.hashCode() : 0);
hash = hash * 31 + (scope != null ? scope.hashCode() : 0);
hash = hash * 31 + (accessToken != null ? accessToken.hashCode() : 0);
return hash;
}
@Override
public JsonElement toJsonElement() {
return gson.toJsonTree(this);
}
@Override
public void toJson(java.io.Writer w) {
gson.toJson(this, w);
}
@Override
public String toJson() {
return gson.toJson(this);
}
@Override
public String toString() {
return toJson();
}
public static KeycloakTokenResponseImpl fromJsonElement(JsonElement jsonElem) {
return gson.fromJson(jsonElem, KeycloakTokenResponseImpl.class);
}
public static KeycloakTokenResponseImpl fromJsonString(String jsonString) {
return gson.fromJson(jsonString, KeycloakTokenResponseImpl.class);
}
public KeycloakTokenResponseImpl(org.eclipse.che.multiuser.keycloak.shared.dto.KeycloakTokenResponse origin) {
this.tokenType = origin.getTokenType();
this.scope = origin.getScope();
this.accessToken = origin.getAccessToken();
}
public org.eclipse.che.multiuser.keycloak.shared.dto.KeycloakTokenResponse withTokenType(java.lang.String v) {
this.tokenType = v;
return this;
}
public org.eclipse.che.multiuser.keycloak.shared.dto.KeycloakTokenResponse withScope(java.lang.String v) {
this.scope = v;
return this;
}
public org.eclipse.che.multiuser.keycloak.shared.dto.KeycloakTokenResponse withAccessToken(java.lang.String v) {
this.accessToken = v;
return this;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy