![JAR search and dependency download from the Maven repository](/logo.png)
org.allGraphQLCases.client.pojo.CharacterInput 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.GraphQLInputType;
import com.graphql_java_generator.annotation.GraphQLNonScalar;
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
*/
@GraphQLInputType("CharacterInput")
@SuppressWarnings("unused")
public class CharacterInput
{
/**
* 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 CharacterInput(){
// No action
}
@GraphQLScalar( fieldName = "name", graphQLTypeSimpleName = "String", javaClass = java.lang.String.class, listDepth = 0)
java.lang.String name;
@GraphQLNonScalar( fieldName = "friends", graphQLTypeSimpleName = "CharacterInput", javaClass = org.allGraphQLCases.client.pojo.CharacterInput.class, listDepth = 1)
List friends;
@GraphQLScalar( fieldName = "appearsIn", graphQLTypeSimpleName = "Episode", javaClass = org.allGraphQLCases.client.pojo.Episode.class, listDepth = 1)
List appearsIn;
@GraphQLScalar( fieldName = "type", graphQLTypeSimpleName = "String", javaClass = java.lang.String.class, listDepth = 0)
java.lang.String type;
public void setName(java.lang.String name) {
this.name = name;
}
public java.lang.String getName() {
return name;
}
public void setFriends(List friends) {
this.friends = friends;
}
public List getFriends() {
return friends;
}
public void setAppearsIn(List appearsIn) {
this.appearsIn = appearsIn;
}
public List getAppearsIn() {
return appearsIn;
}
public void setType(java.lang.String type) {
this.type = type;
}
public java.lang.String getType() {
return type;
}
/**
* 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 "CharacterInput {"
+ "name: " + name
+ ", "
+ "friends: " + friends
+ ", "
+ "appearsIn: " + appearsIn
+ ", "
+ "type: " + type
+ "}";
}
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 name;
private List friends;
private List appearsIn;
private java.lang.String type;
public Builder withName(java.lang.String name) {
this.name = name;
return this;
}
public Builder withFriends(List friends) {
this.friends = friends;
return this;
}
public Builder withAppearsIn(List appearsIn) {
this.appearsIn = appearsIn;
return this;
}
public Builder withType(java.lang.String type) {
this.type = type;
return this;
}
public CharacterInput build() {
CharacterInput _object = new CharacterInput();
_object.setName(name);
_object.setFriends(friends);
_object.setAppearsIn(appearsIn);
_object.setType(type);
return _object;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy