All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.commercetools.graphql.api.client.CartGraphQLQuery Maven / Gradle / Ivy

There is a newer version: 17.15.1
Show 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 CartGraphQLQuery extends GraphQLQuery {
  public CartGraphQLQuery(String id, String queryName, Set fieldsSet) {
    super("query", queryName);
    if (id != null || fieldsSet.contains("id")) {
        getInput().put("id", id);
    }
  }

  public CartGraphQLQuery() {
    super("query");
  }

  @Override
  public String getOperationName() {
     return "cart";
                    
  }

  public static Builder newRequest() {
    return new Builder();
  }

  public static class Builder {
    private Set fieldsSet = new HashSet<>();

    private String id;

    private String queryName;

    public CartGraphQLQuery build() {
      return new CartGraphQLQuery(id, queryName, fieldsSet);
               
    }

    public Builder id(String id) {
      this.id = id;
      this.fieldsSet.add("id");
      return this;
    }

    public Builder queryName(String queryName) {
      this.queryName = queryName;
      return this;
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy