org.allGraphQLCases.client.pojo.__Schema Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graphql-maven-plugin-samples-allGraphQLCases-pojo-client Show documentation
Show all versions of graphql-maven-plugin-samples-allGraphQLCases-pojo-client Show documentation
This module do integration tests for the generatePojo goal, in client mode
The newest version!
/** Generated by the default template from graphql-java-generator */
package org.allGraphQLCases.client.pojo;
import java.util.HashMap;
import java.util.Map;
import com.graphql_java_generator.annotation.GraphQLNonScalar;
import com.graphql_java_generator.annotation.GraphQLObjectType;
import com.graphql_java_generator.annotation.GraphQLScalar;
import java.util.List;
import com.graphql_java_generator.annotation.GraphQLDirective;
/**
*
* @author generated by graphql-java-generator
* @see https://github.com/graphql-java-generator/graphql-java-generator
*/
@GraphQLObjectType("__Schema")
@SuppressWarnings("unused")
public class __Schema
{
/**
* This map contains the deserialized values for the alias, as parsed from the json response from the GraphQL
* server. The key is the alias name, the value is the deserialiazed value (taking into account custom scalars,
* lists, ...)
*/
@com.graphql_java_generator.annotation.GraphQLIgnore
Map aliasValues = new HashMap<>();
public __Schema(){
// No action
}
@GraphQLScalar( fieldName = "description", graphQLTypeSimpleName = "String", javaClass = java.lang.String.class, listDepth = 0)
java.lang.String description;
@GraphQLNonScalar( fieldName = "types", graphQLTypeSimpleName = "__Type", javaClass = org.allGraphQLCases.client.pojo.__Type.class, listDepth = 1)
List types;
@GraphQLNonScalar( fieldName = "queryType", graphQLTypeSimpleName = "__Type", javaClass = org.allGraphQLCases.client.pojo.__Type.class, listDepth = 0)
org.allGraphQLCases.client.pojo.__Type queryType;
@GraphQLNonScalar( fieldName = "mutationType", graphQLTypeSimpleName = "__Type", javaClass = org.allGraphQLCases.client.pojo.__Type.class, listDepth = 0)
org.allGraphQLCases.client.pojo.__Type mutationType;
@GraphQLNonScalar( fieldName = "subscriptionType", graphQLTypeSimpleName = "__Type", javaClass = org.allGraphQLCases.client.pojo.__Type.class, listDepth = 0)
org.allGraphQLCases.client.pojo.__Type subscriptionType;
@GraphQLNonScalar( fieldName = "directives", graphQLTypeSimpleName = "__Directive", javaClass = org.allGraphQLCases.client.pojo.__Directive.class, listDepth = 1)
List directives;
@GraphQLScalar( fieldName = "__typename", graphQLTypeSimpleName = "String", javaClass = java.lang.String.class, listDepth = 0)
java.lang.String __typename;
public void setDescription(java.lang.String description) {
this.description = description;
}
public java.lang.String getDescription() {
return description;
}
public void setTypes(List types) {
this.types = types;
}
public List getTypes() {
return types;
}
public void setQueryType(org.allGraphQLCases.client.pojo.__Type queryType) {
this.queryType = queryType;
}
public org.allGraphQLCases.client.pojo.__Type getQueryType() {
return queryType;
}
public void setMutationType(org.allGraphQLCases.client.pojo.__Type mutationType) {
this.mutationType = mutationType;
}
public org.allGraphQLCases.client.pojo.__Type getMutationType() {
return mutationType;
}
public void setSubscriptionType(org.allGraphQLCases.client.pojo.__Type subscriptionType) {
this.subscriptionType = subscriptionType;
}
public org.allGraphQLCases.client.pojo.__Type getSubscriptionType() {
return subscriptionType;
}
public void setDirectives(List directives) {
this.directives = directives;
}
public List getDirectives() {
return directives;
}
public void set__typename(java.lang.String __typename) {
this.__typename = __typename;
}
public java.lang.String get__typename() {
return __typename;
}
/**
* This method is called during the json deserialization process, by the {@link GraphQLObjectMapper}, each time an
* alias value is read from the json.
*
* @param aliasName
* @param aliasDeserializedValue
*/
public void setAliasValue(String aliasName, Object aliasDeserializedValue) {
aliasValues.put(aliasName, aliasDeserializedValue);
}
/**
* Retrieves the value for the given alias, as it has been received for this object in the GraphQL response.
* This method should not be used for Custom Scalars, as the parser doesn't know if this alias is a custom
* scalar, and which custom scalar to use at deserialization time. In most case, a value will then be provided by
* this method with a basis json deserialization, but this value won't be the proper custom scalar value.
*
* @param alias
* @return
*/
public Object getAliasValue(String alias) {
return aliasValues.get(alias);
}
public String toString() {
return "__Schema {"
+ "description: " + description
+ ", "
+ "types: " + types
+ ", "
+ "queryType: " + queryType
+ ", "
+ "mutationType: " + mutationType
+ ", "
+ "subscriptionType: " + subscriptionType
+ ", "
+ "directives: " + directives
+ ", "
+ "__typename: " + __typename
+ "}";
}
public static Builder builder() {
return new Builder();
}
/**
* The Builder that helps building instance of this POJO. You can get an instance of this class, by calling the
* {@link #builder()}
*/
public static class Builder {
private java.lang.String description;
private List types;
private org.allGraphQLCases.client.pojo.__Type queryType;
private org.allGraphQLCases.client.pojo.__Type mutationType;
private org.allGraphQLCases.client.pojo.__Type subscriptionType;
private List directives;
public Builder withDescription(java.lang.String description) {
this.description = description;
return this;
}
public Builder withTypes(List types) {
this.types = types;
return this;
}
public Builder withQueryType(org.allGraphQLCases.client.pojo.__Type queryType) {
this.queryType = queryType;
return this;
}
public Builder withMutationType(org.allGraphQLCases.client.pojo.__Type mutationType) {
this.mutationType = mutationType;
return this;
}
public Builder withSubscriptionType(org.allGraphQLCases.client.pojo.__Type subscriptionType) {
this.subscriptionType = subscriptionType;
return this;
}
public Builder withDirectives(List directives) {
this.directives = directives;
return this;
}
public __Schema build() {
__Schema _object = new __Schema();
_object.setDescription(description);
_object.setTypes(types);
_object.setQueryType(queryType);
_object.setMutationType(mutationType);
_object.setSubscriptionType(subscriptionType);
_object.setDirectives(directives);
_object.set__typename("__Schema");
return _object;
}
}
}