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

com.commercetools.graphql.api.client.CartDiscountFragmentProjection 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.BaseSubProjectionNode;
import java.lang.Override;
import java.lang.String;
import java.util.ArrayList;
import java.util.List;

public class CartDiscountFragmentProjection, ROOT extends BaseSubProjectionNode> extends BaseSubProjectionNode {
  {
    getFields().put("__typename", null);
  }

  public CartDiscountFragmentProjection(PARENT parent, ROOT root) {
    super(parent, root, java.util.Optional.of("CartDiscount"));
  }

  public CartDiscountFragmentProjection __typename() {
    getFields().put("__typename", null);
    return this;
  }

  public StackingModeProjection, ROOT> stackingMode() {
     StackingModeProjection, ROOT> projection = new StackingModeProjection<>(this, getRoot());
     getFields().put("stackingMode", projection);
     return projection;
  }

  public LocalizedStringProjection, ROOT> nameAllLocales(
      ) {
     LocalizedStringProjection, ROOT> projection = new LocalizedStringProjection<>(this, getRoot());
     getFields().put("nameAllLocales", projection);
     return projection;
  }

  public LocalizedStringProjection, ROOT> descriptionAllLocales(
      ) {
     LocalizedStringProjection, ROOT> projection = new LocalizedStringProjection<>(this, getRoot());
     getFields().put("descriptionAllLocales", projection);
     return projection;
  }

  public ReferenceProjection, ROOT> referenceRefs() {
     ReferenceProjection, ROOT> projection = new ReferenceProjection<>(this, getRoot());
     getFields().put("referenceRefs", projection);
     return projection;
  }

  public CustomFieldsTypeProjection, ROOT> custom() {
     CustomFieldsTypeProjection, ROOT> projection = new CustomFieldsTypeProjection<>(this, getRoot());
     getFields().put("custom", projection);
     return projection;
  }

  public KeyReferenceProjection, ROOT> storesRef() {
     KeyReferenceProjection, ROOT> projection = new KeyReferenceProjection<>(this, getRoot());
     getFields().put("storesRef", projection);
     return projection;
  }

  public StoreProjection, ROOT> stores() {
     StoreProjection, ROOT> projection = new StoreProjection<>(this, getRoot());
     getFields().put("stores", projection);
     return projection;
  }

  public CartDiscountValueProjection, ROOT> value() {
     CartDiscountValueProjection, ROOT> projection = new CartDiscountValueProjection<>(this, getRoot());
     getFields().put("value", projection);
     return projection;
  }

  public CartDiscountTargetProjection, ROOT> target() {
     CartDiscountTargetProjection, ROOT> projection = new CartDiscountTargetProjection<>(this, getRoot());
     getFields().put("target", projection);
     return projection;
  }

  public InitiatorProjection, ROOT> createdBy() {
     InitiatorProjection, ROOT> projection = new InitiatorProjection<>(this, getRoot());
     getFields().put("createdBy", projection);
     return projection;
  }

  public InitiatorProjection, ROOT> lastModifiedBy() {
     InitiatorProjection, ROOT> projection = new InitiatorProjection<>(this, getRoot());
     getFields().put("lastModifiedBy", projection);
     return projection;
  }

  public CartDiscountFragmentProjection cartPredicate() {
    getFields().put("cartPredicate", null);
    return this;
  }

  public CartDiscountFragmentProjection validFrom() {
    getFields().put("validFrom", null);
    return this;
  }

  public CartDiscountFragmentProjection validUntil() {
    getFields().put("validUntil", null);
    return this;
  }

  public CartDiscountFragmentProjection isActive() {
    getFields().put("isActive", null);
    return this;
  }

  public CartDiscountFragmentProjection requiresDiscountCode() {
    getFields().put("requiresDiscountCode", null);
    return this;
  }

  public CartDiscountFragmentProjection sortOrder() {
    getFields().put("sortOrder", null);
    return this;
  }

  public CartDiscountFragmentProjection key() {
    getFields().put("key", null);
    return this;
  }

  public CartDiscountFragmentProjection name() {
    getFields().put("name", null);
    return this;
  }

  public CartDiscountFragmentProjection name(String locale, List acceptLanguage) {
    getFields().put("name", null);
    getInputArguments().computeIfAbsent("name", k -> new ArrayList<>());
    InputArgument localeArg = new InputArgument("locale", locale);
    getInputArguments().get("name").add(localeArg);
    InputArgument acceptLanguageArg = new InputArgument("acceptLanguage", acceptLanguage);
    getInputArguments().get("name").add(acceptLanguageArg);
    return this;
  }

  public CartDiscountFragmentProjection description() {
    getFields().put("description", null);
    return this;
  }

  public CartDiscountFragmentProjection description(String locale, List acceptLanguage) {
    getFields().put("description", null);
    getInputArguments().computeIfAbsent("description", k -> new ArrayList<>());
    InputArgument localeArg = new InputArgument("locale", locale);
    getInputArguments().get("description").add(localeArg);
    InputArgument acceptLanguageArg = new InputArgument("acceptLanguage", acceptLanguage);
    getInputArguments().get("description").add(acceptLanguageArg);
    return this;
  }

  public CartDiscountFragmentProjection id() {
    getFields().put("id", null);
    return this;
  }

  public CartDiscountFragmentProjection version() {
    getFields().put("version", null);
    return this;
  }

  public CartDiscountFragmentProjection createdAt() {
    getFields().put("createdAt", null);
    return this;
  }

  public CartDiscountFragmentProjection lastModifiedAt() {
    getFields().put("lastModifiedAt", null);
    return this;
  }

  @Override
  public String toString() {
    StringBuilder builder = new StringBuilder();
    builder.append("... on CartDiscount {");
    getFields().forEach((k, v) -> {
        builder.append(" ").append(k);
        if(v != null) {
            builder.append(" ").append(v.toString());
        }
    });
    builder.append("}");
     
    return builder.toString();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy