io.leangen.graphql.spqr.spring.autoconfigure.ContextFactoryParams Maven / Gradle / Ivy
The newest version!
package io.leangen.graphql.spqr.spring.autoconfigure;
import io.leangen.graphql.spqr.spring.web.dto.GraphQLRequest;
@SuppressWarnings("WeakerAccess")
public class ContextFactoryParams {
private final GraphQLRequest graphQLRequest;
private final R nativeRequest;
private final Object environment;
private ContextFactoryParams(GraphQLRequest graphQLRequest, R nativeRequest, Object environment) {
this.graphQLRequest = graphQLRequest;
this.nativeRequest = nativeRequest;
this.environment = environment;
}
public GraphQLRequest getGraphQLRequest() {
return graphQLRequest;
}
public R getNativeRequest() {
return nativeRequest;
}
public Object getEnvironment() {
return environment;
}
public static Builder builder() {
return new Builder<>();
}
public static class Builder {
private GraphQLRequest graphQLRequest;
private R nativeRequest;
private Object environment;
public Builder withGraphQLRequest(GraphQLRequest graphQLRequest) {
this.graphQLRequest = graphQLRequest;
return this;
}
public Builder withNativeRequest(R nativeRequest) {
this.nativeRequest = nativeRequest;
return this;
}
public Builder withEnvironment(Object environment) {
this.environment = environment;
return this;
}
public ContextFactoryParams build() {
return new ContextFactoryParams<>(graphQLRequest, nativeRequest, environment);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy