com.commercetools.graphql.api.client.ChannelGraphQLQuery Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commercetools-graphql-api Show documentation
Show all versions of commercetools-graphql-api Show documentation
The e-commerce SDK from commercetools Composable Commerce for Java
The newest version!
package com.commercetools.graphql.api.client;
import com.netflix.graphql.dgs.client.codegen.GraphQLQuery;
import java.lang.Override;
import java.lang.String;
import java.util.HashSet;
import java.util.Set;
public class ChannelGraphQLQuery extends GraphQLQuery {
public ChannelGraphQLQuery(String id, String key, String queryName, Set fieldsSet) {
super("query", queryName);
if (id != null || fieldsSet.contains("id")) {
getInput().put("id", id);
}if (key != null || fieldsSet.contains("key")) {
getInput().put("key", key);
}
}
public ChannelGraphQLQuery() {
super("query");
}
@Override
public String getOperationName() {
return "channel";
}
public static Builder newRequest() {
return new Builder();
}
public static class Builder {
private Set fieldsSet = new HashSet<>();
private String id;
private String key;
private String queryName;
public ChannelGraphQLQuery build() {
return new ChannelGraphQLQuery(id, key, queryName, fieldsSet);
}
/**
* Queries with specified ID
*/
public Builder id(String id) {
this.id = id;
this.fieldsSet.add("id");
return this;
}
/**
* Queries with specified key
*/
public Builder key(String key) {
this.key = key;
this.fieldsSet.add("key");
return this;
}
public Builder queryName(String queryName) {
this.queryName = queryName;
return this;
}
}
}