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

net.nemerosa.ontrack.kdsl.connector.graphql.schema.GetBranchAutoVersioningConfigQuery Maven / Gradle / Ivy

There is a newer version: 4.4.5
Show newest version
// AUTO-GENERATED FILE. DO NOT MODIFY.
//
// This class was automatically generated by Apollo GraphQL plugin from the GraphQL queries it found.
// It should not be modified by hand.
//
package net.nemerosa.ontrack.kdsl.connector.graphql.schema;

import com.apollographql.apollo.api.Operation;
import com.apollographql.apollo.api.OperationName;
import com.apollographql.apollo.api.Query;
import com.apollographql.apollo.api.Response;
import com.apollographql.apollo.api.ResponseField;
import com.apollographql.apollo.api.ScalarTypeAdapters;
import com.apollographql.apollo.api.internal.InputFieldMarshaller;
import com.apollographql.apollo.api.internal.InputFieldWriter;
import com.apollographql.apollo.api.internal.OperationRequestBodyComposer;
import com.apollographql.apollo.api.internal.QueryDocumentMinifier;
import com.apollographql.apollo.api.internal.ResponseFieldMapper;
import com.apollographql.apollo.api.internal.ResponseFieldMarshaller;
import com.apollographql.apollo.api.internal.ResponseReader;
import com.apollographql.apollo.api.internal.ResponseWriter;
import com.apollographql.apollo.api.internal.SimpleOperationResponseParser;
import com.apollographql.apollo.api.internal.UnmodifiableMapBuilder;
import com.apollographql.apollo.api.internal.Utils;
import com.fasterxml.jackson.databind.JsonNode;
import java.io.IOException;
import java.lang.Boolean;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import net.nemerosa.ontrack.kdsl.connector.graphql.schema.type.AutoApprovalMode;
import net.nemerosa.ontrack.kdsl.connector.graphql.schema.type.CustomType;
import okio.Buffer;
import okio.BufferedSource;
import okio.ByteString;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public final class GetBranchAutoVersioningConfigQuery implements Query {
  public static final String OPERATION_ID = "3924ae7c86873663d6127d790ca8434a76b3ea2048f24cc3fcd5555960b20389";

  public static final String QUERY_DOCUMENT = QueryDocumentMinifier.minify(
    "query GetBranchAutoVersioningConfig($branchId: Int!) {\n"
        + "  branches(id: $branchId) {\n"
        + "    __typename\n"
        + "    autoVersioningConfig {\n"
        + "      __typename\n"
        + "      configurations {\n"
        + "        __typename\n"
        + "        autoApproval\n"
        + "        autoApprovalMode\n"
        + "        postProcessing\n"
        + "        postProcessingConfig\n"
        + "        sourceBranch\n"
        + "        sourceProject\n"
        + "        sourcePromotion\n"
        + "        targetPath\n"
        + "        targetProperty\n"
        + "        targetPropertyRegex\n"
        + "        targetPropertyType\n"
        + "        targetRegex\n"
        + "        upgradeBranchPattern\n"
        + "        validationStamp\n"
        + "      }\n"
        + "    }\n"
        + "  }\n"
        + "}"
  );

  public static final OperationName OPERATION_NAME = new OperationName() {
    @Override
    public String name() {
      return "GetBranchAutoVersioningConfig";
    }
  };

  private final GetBranchAutoVersioningConfigQuery.Variables variables;

  public GetBranchAutoVersioningConfigQuery(int branchId) {
    variables = new GetBranchAutoVersioningConfigQuery.Variables(branchId);
  }

  @Override
  public String operationId() {
    return OPERATION_ID;
  }

  @Override
  public String queryDocument() {
    return QUERY_DOCUMENT;
  }

  @Override
  public GetBranchAutoVersioningConfigQuery.Data wrapData(GetBranchAutoVersioningConfigQuery.Data data) {
    return data;
  }

  @Override
  public GetBranchAutoVersioningConfigQuery.Variables variables() {
    return variables;
  }

  @Override
  public ResponseFieldMapper responseFieldMapper() {
    return new Data.Mapper();
  }

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

  @Override
  public OperationName name() {
    return OPERATION_NAME;
  }

  @Override
  @NotNull
  public Response parse(@NotNull final BufferedSource source,
      @NotNull final ScalarTypeAdapters scalarTypeAdapters) throws IOException {
    return SimpleOperationResponseParser.parse(source, this, scalarTypeAdapters);
  }

  @Override
  @NotNull
  public Response parse(@NotNull final ByteString byteString,
      @NotNull final ScalarTypeAdapters scalarTypeAdapters) throws IOException {
    return parse(new Buffer().write(byteString), scalarTypeAdapters);
  }

  @Override
  @NotNull
  public Response parse(@NotNull final BufferedSource source)
      throws IOException {
    return parse(source, ScalarTypeAdapters.DEFAULT);
  }

  @Override
  @NotNull
  public Response parse(@NotNull final ByteString byteString)
      throws IOException {
    return parse(byteString, ScalarTypeAdapters.DEFAULT);
  }

  @Override
  @NotNull
  public ByteString composeRequestBody(@NotNull final ScalarTypeAdapters scalarTypeAdapters) {
    return OperationRequestBodyComposer.compose(this, false, true, scalarTypeAdapters);
  }

  @NotNull
  @Override
  public ByteString composeRequestBody() {
    return OperationRequestBodyComposer.compose(this, false, true, ScalarTypeAdapters.DEFAULT);
  }

  @Override
  @NotNull
  public ByteString composeRequestBody(final boolean autoPersistQueries,
      final boolean withQueryDocument, @NotNull final ScalarTypeAdapters scalarTypeAdapters) {
    return OperationRequestBodyComposer.compose(this, autoPersistQueries, withQueryDocument, scalarTypeAdapters);
  }

  public static final class Builder {
    private int branchId;

    Builder() {
    }

    public Builder branchId(int branchId) {
      this.branchId = branchId;
      return this;
    }

    public GetBranchAutoVersioningConfigQuery build() {
      return new GetBranchAutoVersioningConfigQuery(branchId);
    }
  }

  public static final class Variables extends Operation.Variables {
    private final int branchId;

    private final transient Map valueMap = new LinkedHashMap<>();

    Variables(int branchId) {
      this.branchId = branchId;
      this.valueMap.put("branchId", branchId);
    }

    public int branchId() {
      return branchId;
    }

    @Override
    public Map valueMap() {
      return Collections.unmodifiableMap(valueMap);
    }

    @Override
    public InputFieldMarshaller marshaller() {
      return new InputFieldMarshaller() {
        @Override
        public void marshal(InputFieldWriter writer) throws IOException {
          writer.writeInt("branchId", branchId);
        }
      };
    }
  }

  /**
   * Data from the response after executing this GraphQL operation
   */
  public static class Data implements Operation.Data {
    static final ResponseField[] $responseFields = {
      ResponseField.forList("branches", "branches", new UnmodifiableMapBuilder(1)
      .put("id", new UnmodifiableMapBuilder(2)
        .put("kind", "Variable")
        .put("variableName", "branchId")
        .build())
      .build(), false, Collections.emptyList())
    };

    final @NotNull List branches;

    private transient volatile String $toString;

    private transient volatile int $hashCode;

    private transient volatile boolean $hashCodeMemoized;

    public Data(@NotNull List branches) {
      this.branches = Utils.checkNotNull(branches, "branches == null");
    }

    public @NotNull List branches() {
      return this.branches;
    }

    @SuppressWarnings({"rawtypes", "unchecked"})
    public ResponseFieldMarshaller marshaller() {
      return new ResponseFieldMarshaller() {
        @Override
        public void marshal(ResponseWriter writer) {
          writer.writeList($responseFields[0], branches, new ResponseWriter.ListWriter() {
            @Override
            public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
              for (Object item : items) {
                listItemWriter.writeObject(((Branch) item).marshaller());
              }
            }
          });
        }
      };
    }

    @Override
    public String toString() {
      if ($toString == null) {
        $toString = "Data{"
          + "branches=" + branches
          + "}";
      }
      return $toString;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (o instanceof Data) {
        Data that = (Data) o;
        return this.branches.equals(that.branches);
      }
      return false;
    }

    @Override
    public int hashCode() {
      if (!$hashCodeMemoized) {
        int h = 1;
        h *= 1000003;
        h ^= branches.hashCode();
        $hashCode = h;
        $hashCodeMemoized = true;
      }
      return $hashCode;
    }

    public static final class Mapper implements ResponseFieldMapper {
      final Branch.Mapper branchFieldMapper = new Branch.Mapper();

      @Override
      public Data map(ResponseReader reader) {
        final List branches = reader.readList($responseFields[0], new ResponseReader.ListReader() {
          @Override
          public Branch read(ResponseReader.ListItemReader listItemReader) {
            return listItemReader.readObject(new ResponseReader.ObjectReader() {
              @Override
              public Branch read(ResponseReader reader) {
                return branchFieldMapper.map(reader);
              }
            });
          }
        });
        return new Data(branches);
      }
    }
  }

  public static class Branch {
    static final ResponseField[] $responseFields = {
      ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
      ResponseField.forObject("autoVersioningConfig", "autoVersioningConfig", null, true, Collections.emptyList())
    };

    final @NotNull String __typename;

    final @Nullable AutoVersioningConfig autoVersioningConfig;

    private transient volatile String $toString;

    private transient volatile int $hashCode;

    private transient volatile boolean $hashCodeMemoized;

    public Branch(@NotNull String __typename, @Nullable AutoVersioningConfig autoVersioningConfig) {
      this.__typename = Utils.checkNotNull(__typename, "__typename == null");
      this.autoVersioningConfig = autoVersioningConfig;
    }

    public @NotNull String __typename() {
      return this.__typename;
    }

    /**
     * Auto versioning configuration
     */
    public @Nullable AutoVersioningConfig autoVersioningConfig() {
      return this.autoVersioningConfig;
    }

    @SuppressWarnings({"rawtypes", "unchecked"})
    public ResponseFieldMarshaller marshaller() {
      return new ResponseFieldMarshaller() {
        @Override
        public void marshal(ResponseWriter writer) {
          writer.writeString($responseFields[0], __typename);
          writer.writeObject($responseFields[1], autoVersioningConfig != null ? autoVersioningConfig.marshaller() : null);
        }
      };
    }

    @Override
    public String toString() {
      if ($toString == null) {
        $toString = "Branch{"
          + "__typename=" + __typename + ", "
          + "autoVersioningConfig=" + autoVersioningConfig
          + "}";
      }
      return $toString;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (o instanceof Branch) {
        Branch that = (Branch) o;
        return this.__typename.equals(that.__typename)
         && ((this.autoVersioningConfig == null) ? (that.autoVersioningConfig == null) : this.autoVersioningConfig.equals(that.autoVersioningConfig));
      }
      return false;
    }

    @Override
    public int hashCode() {
      if (!$hashCodeMemoized) {
        int h = 1;
        h *= 1000003;
        h ^= __typename.hashCode();
        h *= 1000003;
        h ^= (autoVersioningConfig == null) ? 0 : autoVersioningConfig.hashCode();
        $hashCode = h;
        $hashCodeMemoized = true;
      }
      return $hashCode;
    }

    public static final class Mapper implements ResponseFieldMapper {
      final AutoVersioningConfig.Mapper autoVersioningConfigFieldMapper = new AutoVersioningConfig.Mapper();

      @Override
      public Branch map(ResponseReader reader) {
        final String __typename = reader.readString($responseFields[0]);
        final AutoVersioningConfig autoVersioningConfig = reader.readObject($responseFields[1], new ResponseReader.ObjectReader() {
          @Override
          public AutoVersioningConfig read(ResponseReader reader) {
            return autoVersioningConfigFieldMapper.map(reader);
          }
        });
        return new Branch(__typename, autoVersioningConfig);
      }
    }
  }

  /**
   * Configuration of the auto versioning on a branch.
   */
  public static class AutoVersioningConfig {
    static final ResponseField[] $responseFields = {
      ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
      ResponseField.forList("configurations", "configurations", null, false, Collections.emptyList())
    };

    final @NotNull String __typename;

    final @NotNull List configurations;

    private transient volatile String $toString;

    private transient volatile int $hashCode;

    private transient volatile boolean $hashCodeMemoized;

    public AutoVersioningConfig(@NotNull String __typename,
        @NotNull List configurations) {
      this.__typename = Utils.checkNotNull(__typename, "__typename == null");
      this.configurations = Utils.checkNotNull(configurations, "configurations == null");
    }

    public @NotNull String __typename() {
      return this.__typename;
    }

    /**
     * List of configurations
     */
    public @NotNull List configurations() {
      return this.configurations;
    }

    @SuppressWarnings({"rawtypes", "unchecked"})
    public ResponseFieldMarshaller marshaller() {
      return new ResponseFieldMarshaller() {
        @Override
        public void marshal(ResponseWriter writer) {
          writer.writeString($responseFields[0], __typename);
          writer.writeList($responseFields[1], configurations, new ResponseWriter.ListWriter() {
            @Override
            public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
              for (Object item : items) {
                listItemWriter.writeObject(((Configuration) item).marshaller());
              }
            }
          });
        }
      };
    }

    @Override
    public String toString() {
      if ($toString == null) {
        $toString = "AutoVersioningConfig{"
          + "__typename=" + __typename + ", "
          + "configurations=" + configurations
          + "}";
      }
      return $toString;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (o instanceof AutoVersioningConfig) {
        AutoVersioningConfig that = (AutoVersioningConfig) o;
        return this.__typename.equals(that.__typename)
         && this.configurations.equals(that.configurations);
      }
      return false;
    }

    @Override
    public int hashCode() {
      if (!$hashCodeMemoized) {
        int h = 1;
        h *= 1000003;
        h ^= __typename.hashCode();
        h *= 1000003;
        h ^= configurations.hashCode();
        $hashCode = h;
        $hashCodeMemoized = true;
      }
      return $hashCode;
    }

    public static final class Mapper implements ResponseFieldMapper {
      final Configuration.Mapper configurationFieldMapper = new Configuration.Mapper();

      @Override
      public AutoVersioningConfig map(ResponseReader reader) {
        final String __typename = reader.readString($responseFields[0]);
        final List configurations = reader.readList($responseFields[1], new ResponseReader.ListReader() {
          @Override
          public Configuration read(ResponseReader.ListItemReader listItemReader) {
            return listItemReader.readObject(new ResponseReader.ObjectReader() {
              @Override
              public Configuration read(ResponseReader reader) {
                return configurationFieldMapper.map(reader);
              }
            });
          }
        });
        return new AutoVersioningConfig(__typename, configurations);
      }
    }
  }

  /**
   * Configuration of the auto versioning for one source.
   */
  public static class Configuration {
    static final ResponseField[] $responseFields = {
      ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
      ResponseField.forBoolean("autoApproval", "autoApproval", null, true, Collections.emptyList()),
      ResponseField.forString("autoApprovalMode", "autoApprovalMode", null, true, Collections.emptyList()),
      ResponseField.forString("postProcessing", "postProcessing", null, true, Collections.emptyList()),
      ResponseField.forCustomType("postProcessingConfig", "postProcessingConfig", null, true, CustomType.JSON, Collections.emptyList()),
      ResponseField.forString("sourceBranch", "sourceBranch", null, false, Collections.emptyList()),
      ResponseField.forString("sourceProject", "sourceProject", null, false, Collections.emptyList()),
      ResponseField.forString("sourcePromotion", "sourcePromotion", null, false, Collections.emptyList()),
      ResponseField.forString("targetPath", "targetPath", null, false, Collections.emptyList()),
      ResponseField.forString("targetProperty", "targetProperty", null, true, Collections.emptyList()),
      ResponseField.forString("targetPropertyRegex", "targetPropertyRegex", null, true, Collections.emptyList()),
      ResponseField.forString("targetPropertyType", "targetPropertyType", null, true, Collections.emptyList()),
      ResponseField.forString("targetRegex", "targetRegex", null, true, Collections.emptyList()),
      ResponseField.forString("upgradeBranchPattern", "upgradeBranchPattern", null, true, Collections.emptyList()),
      ResponseField.forString("validationStamp", "validationStamp", null, true, Collections.emptyList())
    };

    final @NotNull String __typename;

    final @Nullable Boolean autoApproval;

    final @Nullable AutoApprovalMode autoApprovalMode;

    final @Nullable String postProcessing;

    final @Nullable JsonNode postProcessingConfig;

    final @NotNull String sourceBranch;

    final @NotNull String sourceProject;

    final @NotNull String sourcePromotion;

    final @NotNull String targetPath;

    final @Nullable String targetProperty;

    final @Nullable String targetPropertyRegex;

    final @Nullable String targetPropertyType;

    final @Nullable String targetRegex;

    final @Nullable String upgradeBranchPattern;

    final @Nullable String validationStamp;

    private transient volatile String $toString;

    private transient volatile int $hashCode;

    private transient volatile boolean $hashCodeMemoized;

    public Configuration(@NotNull String __typename, @Nullable Boolean autoApproval,
        @Nullable AutoApprovalMode autoApprovalMode, @Nullable String postProcessing,
        @Nullable JsonNode postProcessingConfig, @NotNull String sourceBranch,
        @NotNull String sourceProject, @NotNull String sourcePromotion, @NotNull String targetPath,
        @Nullable String targetProperty, @Nullable String targetPropertyRegex,
        @Nullable String targetPropertyType, @Nullable String targetRegex,
        @Nullable String upgradeBranchPattern, @Nullable String validationStamp) {
      this.__typename = Utils.checkNotNull(__typename, "__typename == null");
      this.autoApproval = autoApproval;
      this.autoApprovalMode = autoApprovalMode;
      this.postProcessing = postProcessing;
      this.postProcessingConfig = postProcessingConfig;
      this.sourceBranch = Utils.checkNotNull(sourceBranch, "sourceBranch == null");
      this.sourceProject = Utils.checkNotNull(sourceProject, "sourceProject == null");
      this.sourcePromotion = Utils.checkNotNull(sourcePromotion, "sourcePromotion == null");
      this.targetPath = Utils.checkNotNull(targetPath, "targetPath == null");
      this.targetProperty = targetProperty;
      this.targetPropertyRegex = targetPropertyRegex;
      this.targetPropertyType = targetPropertyType;
      this.targetRegex = targetRegex;
      this.upgradeBranchPattern = upgradeBranchPattern;
      this.validationStamp = validationStamp;
    }

    public @NotNull String __typename() {
      return this.__typename;
    }

    /**
     * Check if the PR must be approved automatically or not (`true` by default)
     */
    public @Nullable Boolean autoApproval() {
      return this.autoApproval;
    }

    /**
     * Auto approval mode
     */
    public @Nullable AutoApprovalMode autoApprovalMode() {
      return this.autoApprovalMode;
    }

    /**
     * Type of post processing to launch after the version has been updated
     */
    public @Nullable String postProcessing() {
      return this.postProcessing;
    }

    /**
     * Configuration of the post processing
     */
    public @Nullable JsonNode postProcessingConfig() {
      return this.postProcessingConfig;
    }

    /**
     * Branches to watch using a regular expression
     */
    public @NotNull String sourceBranch() {
      return this.sourceBranch;
    }

    /**
     * Project to watch
     */
    public @NotNull String sourceProject() {
      return this.sourceProject;
    }

    /**
     * Promotion to watch
     */
    public @NotNull String sourcePromotion() {
      return this.sourcePromotion;
    }

    /**
     * Comma-separated list of file to update with the new version
     */
    public @NotNull String targetPath() {
      return this.targetPath;
    }

    /**
     * Optional replacement for the regex, using only a property name
     */
    public @Nullable String targetProperty() {
      return this.targetProperty;
    }

    /**
     * Optional regex to use on the targetProperty value
     */
    public @Nullable String targetPropertyRegex() {
      return this.targetPropertyRegex;
    }

    /**
     * When targetProperty is defined, defines the type of property (defaults to Java properties file, but could be NPM, etc.)
     */
    public @Nullable String targetPropertyType() {
      return this.targetPropertyType;
    }

    /**
     * Regex to use in the target file to identify the line to replace with the new version. The first matching group must be the version.
     */
    public @Nullable String targetRegex() {
      return this.targetRegex;
    }

    /**
     * Prefix to use for the upgrade branch in Git, defaults to `feature/auto-upgrade--`
     */
    public @Nullable String upgradeBranchPattern() {
      return this.upgradeBranchPattern;
    }

    /**
     * Validation stamp to create on auto versioning (optional)
     */
    public @Nullable String validationStamp() {
      return this.validationStamp;
    }

    @SuppressWarnings({"rawtypes", "unchecked"})
    public ResponseFieldMarshaller marshaller() {
      return new ResponseFieldMarshaller() {
        @Override
        public void marshal(ResponseWriter writer) {
          writer.writeString($responseFields[0], __typename);
          writer.writeBoolean($responseFields[1], autoApproval);
          writer.writeString($responseFields[2], autoApprovalMode != null ? autoApprovalMode.rawValue() : null);
          writer.writeString($responseFields[3], postProcessing);
          writer.writeCustom((ResponseField.CustomTypeField) $responseFields[4], postProcessingConfig);
          writer.writeString($responseFields[5], sourceBranch);
          writer.writeString($responseFields[6], sourceProject);
          writer.writeString($responseFields[7], sourcePromotion);
          writer.writeString($responseFields[8], targetPath);
          writer.writeString($responseFields[9], targetProperty);
          writer.writeString($responseFields[10], targetPropertyRegex);
          writer.writeString($responseFields[11], targetPropertyType);
          writer.writeString($responseFields[12], targetRegex);
          writer.writeString($responseFields[13], upgradeBranchPattern);
          writer.writeString($responseFields[14], validationStamp);
        }
      };
    }

    @Override
    public String toString() {
      if ($toString == null) {
        $toString = "Configuration{"
          + "__typename=" + __typename + ", "
          + "autoApproval=" + autoApproval + ", "
          + "autoApprovalMode=" + autoApprovalMode + ", "
          + "postProcessing=" + postProcessing + ", "
          + "postProcessingConfig=" + postProcessingConfig + ", "
          + "sourceBranch=" + sourceBranch + ", "
          + "sourceProject=" + sourceProject + ", "
          + "sourcePromotion=" + sourcePromotion + ", "
          + "targetPath=" + targetPath + ", "
          + "targetProperty=" + targetProperty + ", "
          + "targetPropertyRegex=" + targetPropertyRegex + ", "
          + "targetPropertyType=" + targetPropertyType + ", "
          + "targetRegex=" + targetRegex + ", "
          + "upgradeBranchPattern=" + upgradeBranchPattern + ", "
          + "validationStamp=" + validationStamp
          + "}";
      }
      return $toString;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (o instanceof Configuration) {
        Configuration that = (Configuration) o;
        return this.__typename.equals(that.__typename)
         && ((this.autoApproval == null) ? (that.autoApproval == null) : this.autoApproval.equals(that.autoApproval))
         && ((this.autoApprovalMode == null) ? (that.autoApprovalMode == null) : this.autoApprovalMode.equals(that.autoApprovalMode))
         && ((this.postProcessing == null) ? (that.postProcessing == null) : this.postProcessing.equals(that.postProcessing))
         && ((this.postProcessingConfig == null) ? (that.postProcessingConfig == null) : this.postProcessingConfig.equals(that.postProcessingConfig))
         && this.sourceBranch.equals(that.sourceBranch)
         && this.sourceProject.equals(that.sourceProject)
         && this.sourcePromotion.equals(that.sourcePromotion)
         && this.targetPath.equals(that.targetPath)
         && ((this.targetProperty == null) ? (that.targetProperty == null) : this.targetProperty.equals(that.targetProperty))
         && ((this.targetPropertyRegex == null) ? (that.targetPropertyRegex == null) : this.targetPropertyRegex.equals(that.targetPropertyRegex))
         && ((this.targetPropertyType == null) ? (that.targetPropertyType == null) : this.targetPropertyType.equals(that.targetPropertyType))
         && ((this.targetRegex == null) ? (that.targetRegex == null) : this.targetRegex.equals(that.targetRegex))
         && ((this.upgradeBranchPattern == null) ? (that.upgradeBranchPattern == null) : this.upgradeBranchPattern.equals(that.upgradeBranchPattern))
         && ((this.validationStamp == null) ? (that.validationStamp == null) : this.validationStamp.equals(that.validationStamp));
      }
      return false;
    }

    @Override
    public int hashCode() {
      if (!$hashCodeMemoized) {
        int h = 1;
        h *= 1000003;
        h ^= __typename.hashCode();
        h *= 1000003;
        h ^= (autoApproval == null) ? 0 : autoApproval.hashCode();
        h *= 1000003;
        h ^= (autoApprovalMode == null) ? 0 : autoApprovalMode.hashCode();
        h *= 1000003;
        h ^= (postProcessing == null) ? 0 : postProcessing.hashCode();
        h *= 1000003;
        h ^= (postProcessingConfig == null) ? 0 : postProcessingConfig.hashCode();
        h *= 1000003;
        h ^= sourceBranch.hashCode();
        h *= 1000003;
        h ^= sourceProject.hashCode();
        h *= 1000003;
        h ^= sourcePromotion.hashCode();
        h *= 1000003;
        h ^= targetPath.hashCode();
        h *= 1000003;
        h ^= (targetProperty == null) ? 0 : targetProperty.hashCode();
        h *= 1000003;
        h ^= (targetPropertyRegex == null) ? 0 : targetPropertyRegex.hashCode();
        h *= 1000003;
        h ^= (targetPropertyType == null) ? 0 : targetPropertyType.hashCode();
        h *= 1000003;
        h ^= (targetRegex == null) ? 0 : targetRegex.hashCode();
        h *= 1000003;
        h ^= (upgradeBranchPattern == null) ? 0 : upgradeBranchPattern.hashCode();
        h *= 1000003;
        h ^= (validationStamp == null) ? 0 : validationStamp.hashCode();
        $hashCode = h;
        $hashCodeMemoized = true;
      }
      return $hashCode;
    }

    public static final class Mapper implements ResponseFieldMapper {
      @Override
      public Configuration map(ResponseReader reader) {
        final String __typename = reader.readString($responseFields[0]);
        final Boolean autoApproval = reader.readBoolean($responseFields[1]);
        final String autoApprovalModeStr = reader.readString($responseFields[2]);
        final AutoApprovalMode autoApprovalMode;
        if (autoApprovalModeStr != null) {
          autoApprovalMode = AutoApprovalMode.safeValueOf(autoApprovalModeStr);
        } else {
          autoApprovalMode = null;
        }
        final String postProcessing = reader.readString($responseFields[3]);
        final JsonNode postProcessingConfig = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[4]);
        final String sourceBranch = reader.readString($responseFields[5]);
        final String sourceProject = reader.readString($responseFields[6]);
        final String sourcePromotion = reader.readString($responseFields[7]);
        final String targetPath = reader.readString($responseFields[8]);
        final String targetProperty = reader.readString($responseFields[9]);
        final String targetPropertyRegex = reader.readString($responseFields[10]);
        final String targetPropertyType = reader.readString($responseFields[11]);
        final String targetRegex = reader.readString($responseFields[12]);
        final String upgradeBranchPattern = reader.readString($responseFields[13]);
        final String validationStamp = reader.readString($responseFields[14]);
        return new Configuration(__typename, autoApproval, autoApprovalMode, postProcessing, postProcessingConfig, sourceBranch, sourceProject, sourcePromotion, targetPath, targetProperty, targetPropertyRegex, targetPropertyType, targetRegex, upgradeBranchPattern, validationStamp);
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy