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

net.nemerosa.ontrack.kdsl.connector.graphql.schema.GitHubIngestionBuildLinksByBuildLabelMutation 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.Mutation;
import com.apollographql.apollo.api.Operation;
import com.apollographql.apollo.api.OperationName;
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 java.io.IOException;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import net.nemerosa.ontrack.kdsl.connector.graphql.schema.fragment.PayloadUserErrors;
import net.nemerosa.ontrack.kdsl.connector.graphql.schema.type.GitHubIngestionLink;
import okio.Buffer;
import okio.BufferedSource;
import okio.ByteString;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public final class GitHubIngestionBuildLinksByBuildLabelMutation implements Mutation {
  public static final String OPERATION_ID = "3cb68eaae46fe8bf8fe61cd19c3a599986c9d9423b7567103777dea16f739acc";

  public static final String QUERY_DOCUMENT = QueryDocumentMinifier.minify(
    "mutation GitHubIngestionBuildLinksByBuildLabel($owner: String!, $repository: String!, $buildLabel: String!, $buildLinks: [GitHubIngestionLink!]!) {\n"
        + "  gitHubIngestionBuildLinksByBuildLabel(input: {owner: $owner, repository: $repository, buildLabel: $buildLabel, buildLinks: $buildLinks}) {\n"
        + "    __typename\n"
        + "    payload {\n"
        + "      __typename\n"
        + "      uuid\n"
        + "    }\n"
        + "    ...PayloadUserErrors\n"
        + "  }\n"
        + "}\n"
        + "fragment PayloadUserErrors on Payload {\n"
        + "  __typename\n"
        + "  errors {\n"
        + "    __typename\n"
        + "    message\n"
        + "    exception\n"
        + "    location\n"
        + "  }\n"
        + "}"
  );

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

  private final GitHubIngestionBuildLinksByBuildLabelMutation.Variables variables;

  public GitHubIngestionBuildLinksByBuildLabelMutation(@NotNull String owner,
      @NotNull String repository, @NotNull String buildLabel,
      @NotNull List buildLinks) {
    Utils.checkNotNull(owner, "owner == null");
    Utils.checkNotNull(repository, "repository == null");
    Utils.checkNotNull(buildLabel, "buildLabel == null");
    Utils.checkNotNull(buildLinks, "buildLinks == null");
    variables = new GitHubIngestionBuildLinksByBuildLabelMutation.Variables(owner, repository, buildLabel, buildLinks);
  }

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

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

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

  @Override
  public GitHubIngestionBuildLinksByBuildLabelMutation.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 @NotNull String owner;

    private @NotNull String repository;

    private @NotNull String buildLabel;

    private @NotNull List buildLinks;

    Builder() {
    }

    public Builder owner(@NotNull String owner) {
      this.owner = owner;
      return this;
    }

    public Builder repository(@NotNull String repository) {
      this.repository = repository;
      return this;
    }

    public Builder buildLabel(@NotNull String buildLabel) {
      this.buildLabel = buildLabel;
      return this;
    }

    public Builder buildLinks(@NotNull List buildLinks) {
      this.buildLinks = buildLinks;
      return this;
    }

    public GitHubIngestionBuildLinksByBuildLabelMutation build() {
      Utils.checkNotNull(owner, "owner == null");
      Utils.checkNotNull(repository, "repository == null");
      Utils.checkNotNull(buildLabel, "buildLabel == null");
      Utils.checkNotNull(buildLinks, "buildLinks == null");
      return new GitHubIngestionBuildLinksByBuildLabelMutation(owner, repository, buildLabel, buildLinks);
    }
  }

  public static final class Variables extends Operation.Variables {
    private final @NotNull String owner;

    private final @NotNull String repository;

    private final @NotNull String buildLabel;

    private final @NotNull List buildLinks;

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

    Variables(@NotNull String owner, @NotNull String repository, @NotNull String buildLabel,
        @NotNull List buildLinks) {
      this.owner = owner;
      this.repository = repository;
      this.buildLabel = buildLabel;
      this.buildLinks = buildLinks;
      this.valueMap.put("owner", owner);
      this.valueMap.put("repository", repository);
      this.valueMap.put("buildLabel", buildLabel);
      this.valueMap.put("buildLinks", buildLinks);
    }

    public @NotNull String owner() {
      return owner;
    }

    public @NotNull String repository() {
      return repository;
    }

    public @NotNull String buildLabel() {
      return buildLabel;
    }

    public @NotNull List buildLinks() {
      return buildLinks;
    }

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

    @Override
    public InputFieldMarshaller marshaller() {
      return new InputFieldMarshaller() {
        @Override
        public void marshal(InputFieldWriter writer) throws IOException {
          writer.writeString("owner", owner);
          writer.writeString("repository", repository);
          writer.writeString("buildLabel", buildLabel);
          writer.writeList("buildLinks", new InputFieldWriter.ListWriter() {
            @Override
            public void write(InputFieldWriter.ListItemWriter listItemWriter) throws IOException {
              for (final GitHubIngestionLink $item : buildLinks) {
                listItemWriter.writeObject($item != null ? $item.marshaller() : null);
              }
            }
          });
        }
      };
    }
  }

  /**
   * Data from the response after executing this GraphQL operation
   */
  public static class Data implements Operation.Data {
    static final ResponseField[] $responseFields = {
      ResponseField.forObject("gitHubIngestionBuildLinksByBuildLabel", "gitHubIngestionBuildLinksByBuildLabel", new UnmodifiableMapBuilder(1)
      .put("input", new UnmodifiableMapBuilder(4)
        .put("owner", new UnmodifiableMapBuilder(2)
          .put("kind", "Variable")
          .put("variableName", "owner")
          .build())
        .put("repository", new UnmodifiableMapBuilder(2)
          .put("kind", "Variable")
          .put("variableName", "repository")
          .build())
        .put("buildLabel", new UnmodifiableMapBuilder(2)
          .put("kind", "Variable")
          .put("variableName", "buildLabel")
          .build())
        .put("buildLinks", new UnmodifiableMapBuilder(2)
          .put("kind", "Variable")
          .put("variableName", "buildLinks")
          .build())
        .build())
      .build(), true, Collections.emptyList())
    };

    final @Nullable GitHubIngestionBuildLinksByBuildLabel gitHubIngestionBuildLinksByBuildLabel;

    private transient volatile String $toString;

    private transient volatile int $hashCode;

    private transient volatile boolean $hashCodeMemoized;

    public Data(@Nullable GitHubIngestionBuildLinksByBuildLabel gitHubIngestionBuildLinksByBuildLabel) {
      this.gitHubIngestionBuildLinksByBuildLabel = gitHubIngestionBuildLinksByBuildLabel;
    }

    /**
     * Sets some links on a build identified using its release property (label)
     */
    public @Nullable GitHubIngestionBuildLinksByBuildLabel gitHubIngestionBuildLinksByBuildLabel() {
      return this.gitHubIngestionBuildLinksByBuildLabel;
    }

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

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

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

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

    public static final class Mapper implements ResponseFieldMapper {
      final GitHubIngestionBuildLinksByBuildLabel.Mapper gitHubIngestionBuildLinksByBuildLabelFieldMapper = new GitHubIngestionBuildLinksByBuildLabel.Mapper();

      @Override
      public Data map(ResponseReader reader) {
        final GitHubIngestionBuildLinksByBuildLabel gitHubIngestionBuildLinksByBuildLabel = reader.readObject($responseFields[0], new ResponseReader.ObjectReader() {
          @Override
          public GitHubIngestionBuildLinksByBuildLabel read(ResponseReader reader) {
            return gitHubIngestionBuildLinksByBuildLabelFieldMapper.map(reader);
          }
        });
        return new Data(gitHubIngestionBuildLinksByBuildLabel);
      }
    }
  }

  /**
   * Output type for the gitHubIngestionBuildLinksByBuildLabel mutation.
   */
  public static class GitHubIngestionBuildLinksByBuildLabel {
    static final ResponseField[] $responseFields = {
      ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
      ResponseField.forObject("payload", "payload", null, true, Collections.emptyList()),
      ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList())
    };

    final @NotNull String __typename;

    final @Nullable Payload payload;

    private final @NotNull Fragments fragments;

    private transient volatile String $toString;

    private transient volatile int $hashCode;

    private transient volatile boolean $hashCodeMemoized;

    public GitHubIngestionBuildLinksByBuildLabel(@NotNull String __typename,
        @Nullable Payload payload, @NotNull Fragments fragments) {
      this.__typename = Utils.checkNotNull(__typename, "__typename == null");
      this.payload = payload;
      this.fragments = Utils.checkNotNull(fragments, "fragments == null");
    }

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

    /**
     * Payload being processed in the background
     */
    public @Nullable Payload payload() {
      return this.payload;
    }

    public @NotNull Fragments fragments() {
      return this.fragments;
    }

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

    @Override
    public String toString() {
      if ($toString == null) {
        $toString = "GitHubIngestionBuildLinksByBuildLabel{"
          + "__typename=" + __typename + ", "
          + "payload=" + payload + ", "
          + "fragments=" + fragments
          + "}";
      }
      return $toString;
    }

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

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

    public static class Fragments {
      final @Nullable PayloadUserErrors payloadUserErrors;

      private transient volatile String $toString;

      private transient volatile int $hashCode;

      private transient volatile boolean $hashCodeMemoized;

      public Fragments(@Nullable PayloadUserErrors payloadUserErrors) {
        this.payloadUserErrors = payloadUserErrors;
      }

      public @Nullable PayloadUserErrors payloadUserErrors() {
        return this.payloadUserErrors;
      }

      public ResponseFieldMarshaller marshaller() {
        return new ResponseFieldMarshaller() {
          @Override
          public void marshal(ResponseWriter writer) {
            final PayloadUserErrors $payloadUserErrors = payloadUserErrors;
            if ($payloadUserErrors != null) {
              writer.writeFragment($payloadUserErrors.marshaller());
            }
          }
        };
      }

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

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

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

      public static final class Mapper implements ResponseFieldMapper {
        static final ResponseField[] $responseFields = {
          ResponseField.forFragment("__typename", "__typename", Arrays.asList(
            ResponseField.Condition.typeCondition(new String[] {"CheckAutoVersioningPayload", "CreateBranchOrGetPayload", "CreateBranchPayload", "CreateBuildOrGetPayload", "CreateBuildPayload", "CreateGitHubConfigurationPayload", "CreateProjectOrGetPayload", "CreateProjectPayload", "CreatePromotionLevelByIdPayload", "CreatePromotionRunByIdPayload", "CreatePromotionRunPayload", "CreateValidationRunByIdPayload", "CreateValidationRunPayload", "CreateValidationStampByIdPayload", "CreateWebhookPayload", "DeleteBranchGitConfigPropertyByIdPayload", "DeleteBranchGitConfigPropertyPayload", "DeleteBranchMessagePropertyByIdPayload", "DeleteBranchMessagePropertyPayload", "DeleteBranchMetaInfoPropertyByIdPayload", "DeleteBranchMetaInfoPropertyPayload", "DeleteBuildGitCommitPropertyByIdPayload", "DeleteBuildGitCommitPropertyPayload", "DeleteBuildMessagePropertyByIdPayload", "DeleteBuildMessagePropertyPayload", "DeleteBuildMetaInfoPropertyByIdPayload", "DeleteBuildMetaInfoPropertyPayload", "DeleteBuildReleasePropertyByIdPayload", "DeleteBuildReleasePropertyPayload", "DeleteNotificationRecordsPayload", "DeleteProjectAutoPromotionLevelPropertyByIdPayload", "DeleteProjectAutoPromotionLevelPropertyPayload", "DeleteProjectAutoValidationStampPropertyByIdPayload", "DeleteProjectAutoValidationStampPropertyPayload", "DeleteProjectBitbucketCloudConfigurationPropertyByIdPayload", "DeleteProjectBitbucketCloudConfigurationPropertyPayload", "DeleteProjectBitbucketConfigurationPropertyByIdPayload", "DeleteProjectBitbucketConfigurationPropertyPayload", "DeleteProjectGitHubConfigurationPropertyByIdPayload", "DeleteProjectGitHubConfigurationPropertyPayload", "DeleteProjectGitLabConfigurationPropertyByIdPayload", "DeleteProjectGitLabConfigurationPropertyPayload", "DeleteProjectMessagePropertyByIdPayload", "DeleteProjectMessagePropertyPayload", "DeleteProjectMetaInfoPropertyByIdPayload", "DeleteProjectMetaInfoPropertyPayload", "DeleteProjectPayload", "DeleteProjectStalePropertyByIdPayload", "DeleteProjectStalePropertyPayload", "DeletePromotionLevelAutoPromotionPropertyByIdPayload", "DeletePromotionLevelAutoPromotionPropertyPayload", "DeletePromotionLevelMessagePropertyByIdPayload", "DeletePromotionLevelMessagePropertyPayload", "DeletePromotionLevelMetaInfoPropertyByIdPayload", "DeletePromotionLevelMetaInfoPropertyPayload", "DeletePromotionRunMessagePropertyByIdPayload", "DeletePromotionRunMessagePropertyPayload", "DeletePromotionRunMetaInfoPropertyByIdPayload", "DeletePromotionRunMetaInfoPropertyPayload", "DeleteSubscriptionPayload", "DeleteValidationRunMessagePropertyByIdPayload", "DeleteValidationRunMessagePropertyPayload", "DeleteValidationRunMetaInfoPropertyByIdPayload", "DeleteValidationRunMetaInfoPropertyPayload", "DeleteValidationStampMessagePropertyByIdPayload", "DeleteValidationStampMessagePropertyPayload", "DeleteValidationStampMetaInfoPropertyByIdPayload", "DeleteValidationStampMetaInfoPropertyPayload", "DeleteWebhookPayload", "DisableAccountPayload", "DisableProjectPayload", "DisableSubscriptionPayload", "EnableAccountPayload", "EnableProjectPayload", "EnableSubscriptionPayload", "FavouriteProjectPayload", "GitHubCheckAutoVersioningByBuildLabelPayload", "GitHubCheckAutoVersioningByBuildNamePayload", "GitHubCheckAutoVersioningByRunIdPayload", "GitHubIngestionBuildLinksByBuildLabelPayload", "GitHubIngestionBuildLinksByBuildNamePayload", "GitHubIngestionBuildLinksByRunIdPayload", "GitHubIngestionValidateDataByBuildLabelPayload", "GitHubIngestionValidateDataByBuildNamePayload", "GitHubIngestionValidateDataByRunIdPayload", "LinkBuildByIdPayload", "LinkBuildPayload", "LinksBuildPayload", "LockAccountPayload", "ReloadCascPayload", "SetAutoVersioningConfigByNamePayload", "SetAutoVersioningConfigPayload", "SetBranchGitConfigPropertyByIdPayload", "SetBranchGitConfigPropertyPayload", "SetBranchGitHubIngestionConfigPayload", "SetBranchMessagePropertyByIdPayload", "SetBranchMessagePropertyPayload", "SetBranchMetaInfoPropertyByIdPayload", "SetBranchMetaInfoPropertyPayload", "SetBranchPropertyByIdPayload", "SetBranchPropertyPayload", "SetBuildGitCommitPropertyByIdPayload", "SetBuildGitCommitPropertyPayload", "SetBuildMessagePropertyByIdPayload", "SetBuildMessagePropertyPayload", "SetBuildMetaInfoPropertyByIdPayload", "SetBuildMetaInfoPropertyPayload", "SetBuildPropertyByIdPayload", "SetBuildPropertyPayload", "SetBuildReleasePropertyByIdPayload", "SetBuildReleasePropertyPayload", "SetPreferencesPayload", "SetProjectAutoPromotionLevelPropertyByIdPayload", "SetProjectAutoPromotionLevelPropertyPayload", "SetProjectAutoValidationStampPropertyByIdPayload", "SetProjectAutoValidationStampPropertyPayload", "SetProjectBitbucketCloudConfigurationPropertyByIdPayload", "SetProjectBitbucketCloudConfigurationPropertyPayload", "SetProjectBitbucketConfigurationPropertyByIdPayload", "SetProjectBitbucketConfigurationPropertyPayload", "SetProjectGitHubConfigurationPropertyByIdPayload", "SetProjectGitHubConfigurationPropertyPayload", "SetProjectGitLabConfigurationPropertyByIdPayload", "SetProjectGitLabConfigurationPropertyPayload", "SetProjectMessagePropertyByIdPayload", "SetProjectMessagePropertyPayload", "SetProjectMetaInfoPropertyByIdPayload", "SetProjectMetaInfoPropertyPayload", "SetProjectPropertyByIdPayload", "SetProjectPropertyPayload", "SetProjectStalePropertyByIdPayload", "SetProjectStalePropertyPayload", "SetPromotionLevelAutoPromotionPropertyByIdPayload", "SetPromotionLevelAutoPromotionPropertyPayload", "SetPromotionLevelMessagePropertyByIdPayload", "SetPromotionLevelMessagePropertyPayload", "SetPromotionLevelMetaInfoPropertyByIdPayload", "SetPromotionLevelMetaInfoPropertyPayload", "SetPromotionLevelPropertyByIdPayload", "SetPromotionLevelPropertyPayload", "SetPromotionRunMessagePropertyByIdPayload", "SetPromotionRunMessagePropertyPayload", "SetPromotionRunMetaInfoPropertyByIdPayload", "SetPromotionRunMetaInfoPropertyPayload", "SetPromotionRunPropertyByIdPayload", "SetPromotionRunPropertyPayload", "SetValidationRunMessagePropertyByIdPayload", "SetValidationRunMessagePropertyPayload", "SetValidationRunMetaInfoPropertyByIdPayload", "SetValidationRunMetaInfoPropertyPayload", "SetValidationRunPropertyByIdPayload", "SetValidationRunPropertyPayload", "SetValidationStampMessagePropertyByIdPayload", "SetValidationStampMessagePropertyPayload", "SetValidationStampMetaInfoPropertyByIdPayload", "SetValidationStampMetaInfoPropertyPayload", "SetValidationStampPropertyByIdPayload", "SetValidationStampPropertyPayload", "SetupCHMLValidationStampPayload", "SetupMetricsValidationStampPayload", "SetupPercentageValidationStampPayload", "SetupPromotionLevelPayload", "SetupTestSummaryValidationStampPayload", "SetupValidationStampPayload", "SubscribeToEventsPayload", "UnfavouriteProjectPayload", "UnlockAccountPayload", "UpdateProjectPayload", "ValidateBuildByIdWithCHMLPayload", "ValidateBuildByIdWithMetricsPayload", "ValidateBuildByIdWithPercentagePayload", "ValidateBuildByIdWithTestsPayload", "ValidateBuildWithCHMLPayload", "ValidateBuildWithMetricsPayload", "ValidateBuildWithPercentagePayload", "ValidateBuildWithTestsPayload"})
          ))
        };

        final PayloadUserErrors.Mapper payloadUserErrorsFieldMapper = new PayloadUserErrors.Mapper();

        @Override
        public @NotNull Fragments map(ResponseReader reader) {
          final PayloadUserErrors payloadUserErrors = reader.readFragment($responseFields[0], new ResponseReader.ObjectReader() {
            @Override
            public PayloadUserErrors read(ResponseReader reader) {
              return payloadUserErrorsFieldMapper.map(reader);
            }
          });
          return new Fragments(payloadUserErrors);
        }
      }
    }

    public static final class Mapper implements ResponseFieldMapper {
      final Payload.Mapper payloadFieldMapper = new Payload.Mapper();

      final Fragments.Mapper fragmentsFieldMapper = new Fragments.Mapper();

      @Override
      public GitHubIngestionBuildLinksByBuildLabel map(ResponseReader reader) {
        final String __typename = reader.readString($responseFields[0]);
        final Payload payload = reader.readObject($responseFields[1], new ResponseReader.ObjectReader() {
          @Override
          public Payload read(ResponseReader reader) {
            return payloadFieldMapper.map(reader);
          }
        });
        final Fragments fragments = fragmentsFieldMapper.map(reader);
        return new GitHubIngestionBuildLinksByBuildLabel(__typename, payload, fragments);
      }
    }
  }

  /**
   * GitHubIngestionBuildLinksOutput
   */
  public static class Payload {
    static final ResponseField[] $responseFields = {
      ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
      ResponseField.forString("uuid", "uuid", null, false, Collections.emptyList())
    };

    final @NotNull String __typename;

    final @NotNull String uuid;

    private transient volatile String $toString;

    private transient volatile int $hashCode;

    private transient volatile boolean $hashCodeMemoized;

    public Payload(@NotNull String __typename, @NotNull String uuid) {
      this.__typename = Utils.checkNotNull(__typename, "__typename == null");
      this.uuid = Utils.checkNotNull(uuid, "uuid == null");
    }

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

    /**
     * UUID of the payload being processed in the background
     */
    public @NotNull String uuid() {
      return this.uuid;
    }

    @SuppressWarnings({"rawtypes", "unchecked"})
    public ResponseFieldMarshaller marshaller() {
      return new ResponseFieldMarshaller() {
        @Override
        public void marshal(ResponseWriter writer) {
          writer.writeString($responseFields[0], __typename);
          writer.writeString($responseFields[1], uuid);
        }
      };
    }

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

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

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

    public static final class Mapper implements ResponseFieldMapper {
      @Override
      public Payload map(ResponseReader reader) {
        final String __typename = reader.readString($responseFields[0]);
        final String uuid = reader.readString($responseFields[1]);
        return new Payload(__typename, uuid);
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy