com.commercetools.graphql.api.client.UpdateProductTailoringGraphQLQuery 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.ProductTailoringUpdateAction;
import com.netflix.graphql.dgs.client.codegen.GraphQLQuery;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class UpdateProductTailoringGraphQLQuery extends GraphQLQuery {
public UpdateProductTailoringGraphQLQuery(String storeKey, String productId, String productKey,
String id, String key, List actions, Long version,
String queryName, Set fieldsSet) {
super("mutation", queryName);
if (storeKey != null || fieldsSet.contains("storeKey")) {
getInput().put("storeKey", storeKey);
}if (productId != null || fieldsSet.contains("productId")) {
getInput().put("productId", productId);
}if (productKey != null || fieldsSet.contains("productKey")) {
getInput().put("productKey", productKey);
}if (id != null || fieldsSet.contains("id")) {
getInput().put("id", id);
}if (key != null || fieldsSet.contains("key")) {
getInput().put("key", key);
}if (actions != null || fieldsSet.contains("actions")) {
getInput().put("actions", actions);
}if (version != null || fieldsSet.contains("version")) {
getInput().put("version", version);
}
}
public UpdateProductTailoringGraphQLQuery() {
super("mutation");
}
@Override
public String getOperationName() {
return "updateProductTailoring";
}
public static Builder newRequest() {
return new Builder();
}
public static class Builder {
private Set fieldsSet = new HashSet<>();
private String storeKey;
private String productId;
private String productKey;
private String id;
private String key;
private List actions;
private Long version;
private String queryName;
public UpdateProductTailoringGraphQLQuery build() {
return new UpdateProductTailoringGraphQLQuery(storeKey, productId, productKey, id, key, actions, version, queryName, fieldsSet);
}
/**
* The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions.
*/
public Builder storeKey(String storeKey) {
this.storeKey = storeKey;
this.fieldsSet.add("storeKey");
return this;
}
/**
* Queries with specified Product ID
*/
public Builder productId(String productId) {
this.productId = productId;
this.fieldsSet.add("productId");
return this;
}
/**
* Queries with specified Product key
*/
public Builder productKey(String productKey) {
this.productKey = productKey;
this.fieldsSet.add("productKey");
return this;
}
/**
* 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 actions(List actions) {
this.actions = actions;
this.fieldsSet.add("actions");
return this;
}
public Builder version(Long version) {
this.version = version;
this.fieldsSet.add("version");
return this;
}
public Builder queryName(String queryName) {
this.queryName = queryName;
return this;
}
}
}