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

net.nemerosa.ontrack.kdsl.connector.graphql.schema.CreateValidationStampMutation 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.Input;
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 com.fasterxml.jackson.databind.JsonNode;
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.Map;
import net.nemerosa.ontrack.kdsl.connector.graphql.schema.fragment.PayloadUserErrors;
import net.nemerosa.ontrack.kdsl.connector.graphql.schema.fragment.ValidationStampFragment;
import okio.Buffer;
import okio.BufferedSource;
import okio.ByteString;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public final class CreateValidationStampMutation implements Mutation {
  public static final String OPERATION_ID = "507ccc592f574e9392d441fd7b1bdd7ed164e9a4042bb6d5b3e951dfc9485e80";

  public static final String QUERY_DOCUMENT = QueryDocumentMinifier.minify(
    "mutation CreateValidationStamp($branchId: Int!, $name: String!, $description: String!, $dataType: String, $dataTypeConfig: JSON) {\n"
        + "  createValidationStampById(input: {branchId: $branchId, name: $name, description: $description, dataType: $dataType, dataTypeConfig: $dataTypeConfig}) {\n"
        + "    __typename\n"
        + "    validationStamp {\n"
        + "      __typename\n"
        + "      ...ValidationStampFragment\n"
        + "    }\n"
        + "    ...PayloadUserErrors\n"
        + "  }\n"
        + "}\n"
        + "fragment PayloadUserErrors on Payload {\n"
        + "  __typename\n"
        + "  errors {\n"
        + "    __typename\n"
        + "    message\n"
        + "    exception\n"
        + "    location\n"
        + "  }\n"
        + "}\n"
        + "fragment ValidationStampFragment on ValidationStamp {\n"
        + "  __typename\n"
        + "  id\n"
        + "  name\n"
        + "  description\n"
        + "  dataType {\n"
        + "    __typename\n"
        + "    descriptor {\n"
        + "      __typename\n"
        + "      id\n"
        + "    }\n"
        + "    config\n"
        + "  }\n"
        + "}"
  );

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

  private final CreateValidationStampMutation.Variables variables;

  public CreateValidationStampMutation(int branchId, @NotNull String name,
      @NotNull String description, @NotNull Input dataType,
      @NotNull Input dataTypeConfig) {
    Utils.checkNotNull(name, "name == null");
    Utils.checkNotNull(description, "description == null");
    Utils.checkNotNull(dataType, "dataType == null");
    Utils.checkNotNull(dataTypeConfig, "dataTypeConfig == null");
    variables = new CreateValidationStampMutation.Variables(branchId, name, description, dataType, dataTypeConfig);
  }

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

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

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

  @Override
  public CreateValidationStampMutation.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;

    private @NotNull String name;

    private @NotNull String description;

    private Input dataType = Input.absent();

    private Input dataTypeConfig = Input.absent();

    Builder() {
    }

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

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

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

    public Builder dataType(@Nullable String dataType) {
      this.dataType = Input.fromNullable(dataType);
      return this;
    }

    public Builder dataTypeConfig(@Nullable JsonNode dataTypeConfig) {
      this.dataTypeConfig = Input.fromNullable(dataTypeConfig);
      return this;
    }

    public Builder dataTypeInput(@NotNull Input dataType) {
      this.dataType = Utils.checkNotNull(dataType, "dataType == null");
      return this;
    }

    public Builder dataTypeConfigInput(@NotNull Input dataTypeConfig) {
      this.dataTypeConfig = Utils.checkNotNull(dataTypeConfig, "dataTypeConfig == null");
      return this;
    }

    public CreateValidationStampMutation build() {
      Utils.checkNotNull(name, "name == null");
      Utils.checkNotNull(description, "description == null");
      return new CreateValidationStampMutation(branchId, name, description, dataType, dataTypeConfig);
    }
  }

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

    private final @NotNull String name;

    private final @NotNull String description;

    private final Input dataType;

    private final Input dataTypeConfig;

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

    Variables(int branchId, @NotNull String name, @NotNull String description,
        Input dataType, Input dataTypeConfig) {
      this.branchId = branchId;
      this.name = name;
      this.description = description;
      this.dataType = dataType;
      this.dataTypeConfig = dataTypeConfig;
      this.valueMap.put("branchId", branchId);
      this.valueMap.put("name", name);
      this.valueMap.put("description", description);
      if (dataType.defined) {
        this.valueMap.put("dataType", dataType.value);
      }
      if (dataTypeConfig.defined) {
        this.valueMap.put("dataTypeConfig", dataTypeConfig.value);
      }
    }

    public int branchId() {
      return branchId;
    }

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

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

    public Input dataType() {
      return dataType;
    }

    public Input dataTypeConfig() {
      return dataTypeConfig;
    }

    @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);
          writer.writeString("name", name);
          writer.writeString("description", description);
          if (dataType.defined) {
            writer.writeString("dataType", dataType.value);
          }
          if (dataTypeConfig.defined) {
            writer.writeCustom("dataTypeConfig", net.nemerosa.ontrack.kdsl.connector.graphql.schema.type.CustomType.JSON, dataTypeConfig.value != null ? dataTypeConfig.value : null);
          }
        }
      };
    }
  }

  /**
   * Data from the response after executing this GraphQL operation
   */
  public static class Data implements Operation.Data {
    static final ResponseField[] $responseFields = {
      ResponseField.forObject("createValidationStampById", "createValidationStampById", new UnmodifiableMapBuilder(1)
      .put("input", new UnmodifiableMapBuilder(5)
        .put("branchId", new UnmodifiableMapBuilder(2)
          .put("kind", "Variable")
          .put("variableName", "branchId")
          .build())
        .put("name", new UnmodifiableMapBuilder(2)
          .put("kind", "Variable")
          .put("variableName", "name")
          .build())
        .put("description", new UnmodifiableMapBuilder(2)
          .put("kind", "Variable")
          .put("variableName", "description")
          .build())
        .put("dataType", new UnmodifiableMapBuilder(2)
          .put("kind", "Variable")
          .put("variableName", "dataType")
          .build())
        .put("dataTypeConfig", new UnmodifiableMapBuilder(2)
          .put("kind", "Variable")
          .put("variableName", "dataTypeConfig")
          .build())
        .build())
      .build(), true, Collections.emptyList())
    };

    final @Nullable CreateValidationStampById createValidationStampById;

    private transient volatile String $toString;

    private transient volatile int $hashCode;

    private transient volatile boolean $hashCodeMemoized;

    public Data(@Nullable CreateValidationStampById createValidationStampById) {
      this.createValidationStampById = createValidationStampById;
    }

    /**
     * Creates a new validation stamp from a branch ID
     */
    public @Nullable CreateValidationStampById createValidationStampById() {
      return this.createValidationStampById;
    }

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

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

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

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

    public static final class Mapper implements ResponseFieldMapper {
      final CreateValidationStampById.Mapper createValidationStampByIdFieldMapper = new CreateValidationStampById.Mapper();

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

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

    final @NotNull String __typename;

    final @Nullable ValidationStamp validationStamp;

    private final @NotNull Fragments fragments;

    private transient volatile String $toString;

    private transient volatile int $hashCode;

    private transient volatile boolean $hashCodeMemoized;

    public CreateValidationStampById(@NotNull String __typename,
        @Nullable ValidationStamp validationStamp, @NotNull Fragments fragments) {
      this.__typename = Utils.checkNotNull(__typename, "__typename == null");
      this.validationStamp = validationStamp;
      this.fragments = Utils.checkNotNull(fragments, "fragments == null");
    }

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

    /**
     * Created validation stamp
     */
    public @Nullable ValidationStamp validationStamp() {
      return this.validationStamp;
    }

    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], validationStamp != null ? validationStamp.marshaller() : null);
          fragments.marshaller().marshal(writer);
        }
      };
    }

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

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

    @Override
    public int hashCode() {
      if (!$hashCodeMemoized) {
        int h = 1;
        h *= 1000003;
        h ^= __typename.hashCode();
        h *= 1000003;
        h ^= (validationStamp == null) ? 0 : validationStamp.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 ValidationStamp.Mapper validationStampFieldMapper = new ValidationStamp.Mapper();

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

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

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

    final @NotNull String __typename;

    private final @NotNull Fragments fragments;

    private transient volatile String $toString;

    private transient volatile int $hashCode;

    private transient volatile boolean $hashCodeMemoized;

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

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

    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);
          fragments.marshaller().marshal(writer);
        }
      };
    }

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

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

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

    public static class Fragments {
      final @NotNull ValidationStampFragment validationStampFragment;

      private transient volatile String $toString;

      private transient volatile int $hashCode;

      private transient volatile boolean $hashCodeMemoized;

      public Fragments(@NotNull ValidationStampFragment validationStampFragment) {
        this.validationStampFragment = Utils.checkNotNull(validationStampFragment, "validationStampFragment == null");
      }

      public @NotNull ValidationStampFragment validationStampFragment() {
        return this.validationStampFragment;
      }

      public ResponseFieldMarshaller marshaller() {
        return new ResponseFieldMarshaller() {
          @Override
          public void marshal(ResponseWriter writer) {
            writer.writeFragment(validationStampFragment.marshaller());
          }
        };
      }

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

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

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

      public static final class Mapper implements ResponseFieldMapper {
        static final ResponseField[] $responseFields = {
          ResponseField.forFragment("__typename", "__typename", Collections.emptyList())
        };

        final ValidationStampFragment.Mapper validationStampFragmentFieldMapper = new ValidationStampFragment.Mapper();

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

    public static final class Mapper implements ResponseFieldMapper {
      final Fragments.Mapper fragmentsFieldMapper = new Fragments.Mapper();

      @Override
      public ValidationStamp map(ResponseReader reader) {
        final String __typename = reader.readString($responseFields[0]);
        final Fragments fragments = fragmentsFieldMapper.map(reader);
        return new ValidationStamp(__typename, fragments);
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy