/** Generated by the default template from graphql-java-generator */
package com.graphql_java_generator.domain.client.allGraphQLCases;

import java.util.HashMap;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.graphql_java_generator.annotation.GraphQLInputType;
import com.graphql_java_generator.annotation.GraphQLScalar;
import java.util.List;

/**
 *
 * @author generated by graphql-java-generator
 * @see <a href="https://github.com/graphql-java-generator/graphql-java-generator">https://github.com/graphql-java-generator/graphql-java-generator</a>
 */
@GraphQLInputType("SubscriptionTestParam")
@JsonInclude(Include.NON_NULL)
@SuppressWarnings("unused")
public class SubscriptionTestParam 
{


	/**
	 * 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<String, Object> aliasValues = new HashMap<>();

	public SubscriptionTestParam(){
		// No action
	}

	@JsonProperty("errorOnSubscription")
	@GraphQLScalar(fieldName = "errorOnSubscription", graphQLTypeSimpleName = "Boolean", javaClass = java.lang.Boolean.class)
	java.lang.Boolean errorOnSubscription;


	@JsonProperty("errorOnNext")
	@GraphQLScalar(fieldName = "errorOnNext", graphQLTypeSimpleName = "Boolean", javaClass = java.lang.Boolean.class)
	java.lang.Boolean errorOnNext;


	@JsonProperty("completeAfterFirstNotification")
	@GraphQLScalar(fieldName = "completeAfterFirstNotification", graphQLTypeSimpleName = "Boolean", javaClass = java.lang.Boolean.class)
	java.lang.Boolean completeAfterFirstNotification;


	@JsonProperty("closeWebSocketBeforeFirstNotification")
	@GraphQLScalar(fieldName = "closeWebSocketBeforeFirstNotification", graphQLTypeSimpleName = "Boolean", javaClass = java.lang.Boolean.class)
	java.lang.Boolean closeWebSocketBeforeFirstNotification;


	@JsonProperty("messages")
	@GraphQLScalar(fieldName = "messages", graphQLTypeSimpleName = "String", javaClass = java.lang.String.class)
	List<java.lang.String> messages;



	public void setErrorOnSubscription(java.lang.Boolean errorOnSubscription) {
		this.errorOnSubscription = errorOnSubscription;
	}

	public java.lang.Boolean getErrorOnSubscription() {
		return errorOnSubscription;
	}
		

	public void setErrorOnNext(java.lang.Boolean errorOnNext) {
		this.errorOnNext = errorOnNext;
	}

	public java.lang.Boolean getErrorOnNext() {
		return errorOnNext;
	}
		

	public void setCompleteAfterFirstNotification(java.lang.Boolean completeAfterFirstNotification) {
		this.completeAfterFirstNotification = completeAfterFirstNotification;
	}

	public java.lang.Boolean getCompleteAfterFirstNotification() {
		return completeAfterFirstNotification;
	}
		

	public void setCloseWebSocketBeforeFirstNotification(java.lang.Boolean closeWebSocketBeforeFirstNotification) {
		this.closeWebSocketBeforeFirstNotification = closeWebSocketBeforeFirstNotification;
	}

	public java.lang.Boolean getCloseWebSocketBeforeFirstNotification() {
		return closeWebSocketBeforeFirstNotification;
	}
		

	public void setMessages(List<java.lang.String> messages) {
		this.messages = messages;
	}

	public List<java.lang.String> getMessages() {
		return messages;
	}
		

 
	/**
	 * 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. <BR/>
	 * This method <B>should not be used for Custom Scalars</B>, 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 "SubscriptionTestParam {"
				+ "errorOnSubscription: " + errorOnSubscription
				+ ", "
				+ "errorOnNext: " + errorOnNext
				+ ", "
				+ "completeAfterFirstNotification: " + completeAfterFirstNotification
				+ ", "
				+ "closeWebSocketBeforeFirstNotification: " + closeWebSocketBeforeFirstNotification
				+ ", "
				+ "messages: " + messages
        		+ "}";
    }

	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.Boolean errorOnSubscription;
		private java.lang.Boolean errorOnNext;
		private java.lang.Boolean completeAfterFirstNotification;
		private java.lang.Boolean closeWebSocketBeforeFirstNotification;
		private List<java.lang.String> messages;

		public Builder withErrorOnSubscription(java.lang.Boolean errorOnSubscription) {
			this.errorOnSubscription = errorOnSubscription;
			return this;
		}
		public Builder withErrorOnNext(java.lang.Boolean errorOnNext) {
			this.errorOnNext = errorOnNext;
			return this;
		}
		public Builder withCompleteAfterFirstNotification(java.lang.Boolean completeAfterFirstNotification) {
			this.completeAfterFirstNotification = completeAfterFirstNotification;
			return this;
		}
		public Builder withCloseWebSocketBeforeFirstNotification(java.lang.Boolean closeWebSocketBeforeFirstNotification) {
			this.closeWebSocketBeforeFirstNotification = closeWebSocketBeforeFirstNotification;
			return this;
		}
		public Builder withMessages(List<java.lang.String> messages) {
			this.messages = messages;
			return this;
		}

		public SubscriptionTestParam build() {
			SubscriptionTestParam _object = new SubscriptionTestParam();
			_object.setErrorOnSubscription(errorOnSubscription);
			_object.setErrorOnNext(errorOnNext);
			_object.setCompleteAfterFirstNotification(completeAfterFirstNotification);
			_object.setCloseWebSocketBeforeFirstNotification(closeWebSocketBeforeFirstNotification);
			_object.setMessages(messages);
			return _object;
		}
	}
}
