com.commercetools.graphql.api.client.CreateCustomerGroupGraphQLQuery 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
package com.commercetools.graphql.api.client;
import com.commercetools.graphql.api.types.CustomerGroupDraft;
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 CreateCustomerGroupGraphQLQuery extends GraphQLQuery {
public CreateCustomerGroupGraphQLQuery(CustomerGroupDraft draft, String queryName,
Set fieldsSet) {
super("mutation", queryName);
if (draft != null || fieldsSet.contains("draft")) {
getInput().put("draft", draft);
}
}
public CreateCustomerGroupGraphQLQuery() {
super("mutation");
}
@Override
public String getOperationName() {
return "createCustomerGroup";
}
public static Builder newRequest() {
return new Builder();
}
public static class Builder {
private Set fieldsSet = new HashSet<>();
private CustomerGroupDraft draft;
private String queryName;
public CreateCustomerGroupGraphQLQuery build() {
return new CreateCustomerGroupGraphQLQuery(draft, queryName, fieldsSet);
}
public Builder draft(CustomerGroupDraft draft) {
this.draft = draft;
this.fieldsSet.add("draft");
return this;
}
public Builder queryName(String queryName) {
this.queryName = queryName;
return this;
}
}
}