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

com.bloxbean.cardano.gql.TransactionQuery Maven / Gradle / Ivy

There is a newer version: 0.3.0-beta1
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 com.bloxbean.cardano.gql;

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.bloxbean.cardano.gql.type.CustomType;
import java.io.IOException;
import java.lang.Integer;
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 okio.Buffer;
import okio.BufferedSource;
import okio.ByteString;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public final class TransactionQuery implements Query {
  public static final String OPERATION_ID = "c5b8c85bf6f695752bc6c56fa4b44da16bb1affa2f281074fb516c2494b59b5c";

  public static final String QUERY_DOCUMENT = QueryDocumentMinifier.minify(
    "query TransactionQuery($txnhash: Hash32Hex!) {\n"
        + "  transactions(where: {hash: {_eq: $txnhash}}) {\n"
        + "    __typename\n"
        + "    block {\n"
        + "      __typename\n"
        + "      hash\n"
        + "      number\n"
        + "      slotNo\n"
        + "    }\n"
        + "    blockIndex\n"
        + "    fee\n"
        + "    deposit\n"
        + "    size\n"
        + "    invalidBefore\n"
        + "    invalidHereafter\n"
        + "    withdrawals_aggregate {\n"
        + "      __typename\n"
        + "      aggregate {\n"
        + "        __typename\n"
        + "        count\n"
        + "      }\n"
        + "    }\n"
        + "    outputs {\n"
        + "      __typename\n"
        + "      address\n"
        + "      value\n"
        + "      tokens {\n"
        + "        __typename\n"
        + "        quantity\n"
        + "        asset {\n"
        + "          __typename\n"
        + "          assetId\n"
        + "        }\n"
        + "      }\n"
        + "    }\n"
        + "    inputs {\n"
        + "      __typename\n"
        + "      address\n"
        + "      value\n"
        + "      tokens {\n"
        + "        __typename\n"
        + "        quantity\n"
        + "        asset {\n"
        + "          __typename\n"
        + "          assetId\n"
        + "        }\n"
        + "      }\n"
        + "    }\n"
        + "  }\n"
        + "}"
  );

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

  private final TransactionQuery.Variables variables;

  public TransactionQuery(@NotNull Object txnhash) {
    Utils.checkNotNull(txnhash, "txnhash == null");
    variables = new TransactionQuery.Variables(txnhash);
  }

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

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

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

  @Override
  public TransactionQuery.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 Object txnhash;

    Builder() {
    }

    public Builder txnhash(@NotNull Object txnhash) {
      this.txnhash = txnhash;
      return this;
    }

    public TransactionQuery build() {
      Utils.checkNotNull(txnhash, "txnhash == null");
      return new TransactionQuery(txnhash);
    }
  }

  public static final class Variables extends Operation.Variables {
    private final @NotNull Object txnhash;

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

    Variables(@NotNull Object txnhash) {
      this.txnhash = txnhash;
      this.valueMap.put("txnhash", txnhash);
    }

    public @NotNull Object txnhash() {
      return txnhash;
    }

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

    @Override
    public InputFieldMarshaller marshaller() {
      return new InputFieldMarshaller() {
        @Override
        public void marshal(InputFieldWriter writer) throws IOException {
          writer.writeCustom("txnhash", com.bloxbean.cardano.gql.type.CustomType.HASH32HEX, txnhash);
        }
      };
    }
  }

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

    final @NotNull List transactions;

    private transient volatile String $toString;

    private transient volatile int $hashCode;

    private transient volatile boolean $hashCodeMemoized;

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

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

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

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

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

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

    public static final class Mapper implements ResponseFieldMapper {
      final Transaction.Mapper transactionFieldMapper = new Transaction.Mapper();

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

  public static class Transaction {
    static final ResponseField[] $responseFields = {
      ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
      ResponseField.forObject("block", "block", null, true, Collections.emptyList()),
      ResponseField.forInt("blockIndex", "blockIndex", null, false, Collections.emptyList()),
      ResponseField.forCustomType("fee", "fee", null, false, CustomType.BIGINT, Collections.emptyList()),
      ResponseField.forCustomType("deposit", "deposit", null, false, CustomType.BIGINT, Collections.emptyList()),
      ResponseField.forCustomType("size", "size", null, false, CustomType.BIGINT, Collections.emptyList()),
      ResponseField.forString("invalidBefore", "invalidBefore", null, true, Collections.emptyList()),
      ResponseField.forString("invalidHereafter", "invalidHereafter", null, true, Collections.emptyList()),
      ResponseField.forObject("withdrawals_aggregate", "withdrawals_aggregate", null, false, Collections.emptyList()),
      ResponseField.forList("outputs", "outputs", null, false, Collections.emptyList()),
      ResponseField.forList("inputs", "inputs", null, false, Collections.emptyList())
    };

    final @NotNull String __typename;

    final @Nullable Block block;

    final int blockIndex;

    final @NotNull Object fee;

    final @NotNull Object deposit;

    final @NotNull Object size;

    final @Nullable String invalidBefore;

    final @Nullable String invalidHereafter;

    final @NotNull Withdrawals_aggregate withdrawals_aggregate;

    final @NotNull List outputs;

    final @NotNull List inputs;

    private transient volatile String $toString;

    private transient volatile int $hashCode;

    private transient volatile boolean $hashCodeMemoized;

    public Transaction(@NotNull String __typename, @Nullable Block block, int blockIndex,
        @NotNull Object fee, @NotNull Object deposit, @NotNull Object size,
        @Nullable String invalidBefore, @Nullable String invalidHereafter,
        @NotNull Withdrawals_aggregate withdrawals_aggregate, @NotNull List outputs,
        @NotNull List inputs) {
      this.__typename = Utils.checkNotNull(__typename, "__typename == null");
      this.block = block;
      this.blockIndex = blockIndex;
      this.fee = Utils.checkNotNull(fee, "fee == null");
      this.deposit = Utils.checkNotNull(deposit, "deposit == null");
      this.size = Utils.checkNotNull(size, "size == null");
      this.invalidBefore = invalidBefore;
      this.invalidHereafter = invalidHereafter;
      this.withdrawals_aggregate = Utils.checkNotNull(withdrawals_aggregate, "withdrawals_aggregate == null");
      this.outputs = Utils.checkNotNull(outputs, "outputs == null");
      this.inputs = Utils.checkNotNull(inputs, "inputs == null");
    }

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

    public @Nullable Block block() {
      return this.block;
    }

    public int blockIndex() {
      return this.blockIndex;
    }

    public @NotNull Object fee() {
      return this.fee;
    }

    public @NotNull Object deposit() {
      return this.deposit;
    }

    public @NotNull Object size() {
      return this.size;
    }

    public @Nullable String invalidBefore() {
      return this.invalidBefore;
    }

    public @Nullable String invalidHereafter() {
      return this.invalidHereafter;
    }

    public @NotNull Withdrawals_aggregate withdrawals_aggregate() {
      return this.withdrawals_aggregate;
    }

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

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

    @SuppressWarnings({"rawtypes", "unchecked"})
    public ResponseFieldMarshaller marshaller() {
      return new ResponseFieldMarshaller() {
        @Override
        public void marshal(ResponseWriter writer) {
          writer.writeString($responseFields[0], __typename);
          writer.writeObject($responseFields[1], block != null ? block.marshaller() : null);
          writer.writeInt($responseFields[2], blockIndex);
          writer.writeCustom((ResponseField.CustomTypeField) $responseFields[3], fee);
          writer.writeCustom((ResponseField.CustomTypeField) $responseFields[4], deposit);
          writer.writeCustom((ResponseField.CustomTypeField) $responseFields[5], size);
          writer.writeString($responseFields[6], invalidBefore);
          writer.writeString($responseFields[7], invalidHereafter);
          writer.writeObject($responseFields[8], withdrawals_aggregate.marshaller());
          writer.writeList($responseFields[9], outputs, new ResponseWriter.ListWriter() {
            @Override
            public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
              for (Object item : items) {
                listItemWriter.writeObject(((Output) item).marshaller());
              }
            }
          });
          writer.writeList($responseFields[10], inputs, new ResponseWriter.ListWriter() {
            @Override
            public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
              for (Object item : items) {
                listItemWriter.writeObject(((Input) item).marshaller());
              }
            }
          });
        }
      };
    }

    @Override
    public String toString() {
      if ($toString == null) {
        $toString = "Transaction{"
          + "__typename=" + __typename + ", "
          + "block=" + block + ", "
          + "blockIndex=" + blockIndex + ", "
          + "fee=" + fee + ", "
          + "deposit=" + deposit + ", "
          + "size=" + size + ", "
          + "invalidBefore=" + invalidBefore + ", "
          + "invalidHereafter=" + invalidHereafter + ", "
          + "withdrawals_aggregate=" + withdrawals_aggregate + ", "
          + "outputs=" + outputs + ", "
          + "inputs=" + inputs
          + "}";
      }
      return $toString;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (o instanceof Transaction) {
        Transaction that = (Transaction) o;
        return this.__typename.equals(that.__typename)
         && ((this.block == null) ? (that.block == null) : this.block.equals(that.block))
         && this.blockIndex == that.blockIndex
         && this.fee.equals(that.fee)
         && this.deposit.equals(that.deposit)
         && this.size.equals(that.size)
         && ((this.invalidBefore == null) ? (that.invalidBefore == null) : this.invalidBefore.equals(that.invalidBefore))
         && ((this.invalidHereafter == null) ? (that.invalidHereafter == null) : this.invalidHereafter.equals(that.invalidHereafter))
         && this.withdrawals_aggregate.equals(that.withdrawals_aggregate)
         && this.outputs.equals(that.outputs)
         && this.inputs.equals(that.inputs);
      }
      return false;
    }

    @Override
    public int hashCode() {
      if (!$hashCodeMemoized) {
        int h = 1;
        h *= 1000003;
        h ^= __typename.hashCode();
        h *= 1000003;
        h ^= (block == null) ? 0 : block.hashCode();
        h *= 1000003;
        h ^= blockIndex;
        h *= 1000003;
        h ^= fee.hashCode();
        h *= 1000003;
        h ^= deposit.hashCode();
        h *= 1000003;
        h ^= size.hashCode();
        h *= 1000003;
        h ^= (invalidBefore == null) ? 0 : invalidBefore.hashCode();
        h *= 1000003;
        h ^= (invalidHereafter == null) ? 0 : invalidHereafter.hashCode();
        h *= 1000003;
        h ^= withdrawals_aggregate.hashCode();
        h *= 1000003;
        h ^= outputs.hashCode();
        h *= 1000003;
        h ^= inputs.hashCode();
        $hashCode = h;
        $hashCodeMemoized = true;
      }
      return $hashCode;
    }

    public static final class Mapper implements ResponseFieldMapper {
      final Block.Mapper blockFieldMapper = new Block.Mapper();

      final Withdrawals_aggregate.Mapper withdrawals_aggregateFieldMapper = new Withdrawals_aggregate.Mapper();

      final Output.Mapper outputFieldMapper = new Output.Mapper();

      final Input.Mapper inputFieldMapper = new Input.Mapper();

      @Override
      public Transaction map(ResponseReader reader) {
        final String __typename = reader.readString($responseFields[0]);
        final Block block = reader.readObject($responseFields[1], new ResponseReader.ObjectReader() {
          @Override
          public Block read(ResponseReader reader) {
            return blockFieldMapper.map(reader);
          }
        });
        final int blockIndex = reader.readInt($responseFields[2]);
        final Object fee = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[3]);
        final Object deposit = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[4]);
        final Object size = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[5]);
        final String invalidBefore = reader.readString($responseFields[6]);
        final String invalidHereafter = reader.readString($responseFields[7]);
        final Withdrawals_aggregate withdrawals_aggregate = reader.readObject($responseFields[8], new ResponseReader.ObjectReader() {
          @Override
          public Withdrawals_aggregate read(ResponseReader reader) {
            return withdrawals_aggregateFieldMapper.map(reader);
          }
        });
        final List outputs = reader.readList($responseFields[9], new ResponseReader.ListReader() {
          @Override
          public Output read(ResponseReader.ListItemReader listItemReader) {
            return listItemReader.readObject(new ResponseReader.ObjectReader() {
              @Override
              public Output read(ResponseReader reader) {
                return outputFieldMapper.map(reader);
              }
            });
          }
        });
        final List inputs = reader.readList($responseFields[10], new ResponseReader.ListReader() {
          @Override
          public Input read(ResponseReader.ListItemReader listItemReader) {
            return listItemReader.readObject(new ResponseReader.ObjectReader() {
              @Override
              public Input read(ResponseReader reader) {
                return inputFieldMapper.map(reader);
              }
            });
          }
        });
        return new Transaction(__typename, block, blockIndex, fee, deposit, size, invalidBefore, invalidHereafter, withdrawals_aggregate, outputs, inputs);
      }
    }
  }

  public static class Block {
    static final ResponseField[] $responseFields = {
      ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
      ResponseField.forCustomType("hash", "hash", null, false, CustomType.HASH32HEX, Collections.emptyList()),
      ResponseField.forInt("number", "number", null, true, Collections.emptyList()),
      ResponseField.forInt("slotNo", "slotNo", null, true, Collections.emptyList())
    };

    final @NotNull String __typename;

    final @NotNull Object hash;

    final @Nullable Integer number;

    final @Nullable Integer slotNo;

    private transient volatile String $toString;

    private transient volatile int $hashCode;

    private transient volatile boolean $hashCodeMemoized;

    public Block(@NotNull String __typename, @NotNull Object hash, @Nullable Integer number,
        @Nullable Integer slotNo) {
      this.__typename = Utils.checkNotNull(__typename, "__typename == null");
      this.hash = Utils.checkNotNull(hash, "hash == null");
      this.number = number;
      this.slotNo = slotNo;
    }

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

    public @NotNull Object hash() {
      return this.hash;
    }

    public @Nullable Integer number() {
      return this.number;
    }

    /**
     * Ouroboros Classic Epoch Boundary blocks (EBB) do not have a slot number
     */
    public @Nullable Integer slotNo() {
      return this.slotNo;
    }

    @SuppressWarnings({"rawtypes", "unchecked"})
    public ResponseFieldMarshaller marshaller() {
      return new ResponseFieldMarshaller() {
        @Override
        public void marshal(ResponseWriter writer) {
          writer.writeString($responseFields[0], __typename);
          writer.writeCustom((ResponseField.CustomTypeField) $responseFields[1], hash);
          writer.writeInt($responseFields[2], number);
          writer.writeInt($responseFields[3], slotNo);
        }
      };
    }

    @Override
    public String toString() {
      if ($toString == null) {
        $toString = "Block{"
          + "__typename=" + __typename + ", "
          + "hash=" + hash + ", "
          + "number=" + number + ", "
          + "slotNo=" + slotNo
          + "}";
      }
      return $toString;
    }

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

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

    public static final class Mapper implements ResponseFieldMapper {
      @Override
      public Block map(ResponseReader reader) {
        final String __typename = reader.readString($responseFields[0]);
        final Object hash = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[1]);
        final Integer number = reader.readInt($responseFields[2]);
        final Integer slotNo = reader.readInt($responseFields[3]);
        return new Block(__typename, hash, number, slotNo);
      }
    }
  }

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

    final @NotNull String __typename;

    final @NotNull Aggregate aggregate;

    private transient volatile String $toString;

    private transient volatile int $hashCode;

    private transient volatile boolean $hashCodeMemoized;

    public Withdrawals_aggregate(@NotNull String __typename, @NotNull Aggregate aggregate) {
      this.__typename = Utils.checkNotNull(__typename, "__typename == null");
      this.aggregate = Utils.checkNotNull(aggregate, "aggregate == null");
    }

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

    public @NotNull Aggregate aggregate() {
      return this.aggregate;
    }

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

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

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

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

    public static final class Mapper implements ResponseFieldMapper {
      final Aggregate.Mapper aggregateFieldMapper = new Aggregate.Mapper();

      @Override
      public Withdrawals_aggregate map(ResponseReader reader) {
        final String __typename = reader.readString($responseFields[0]);
        final Aggregate aggregate = reader.readObject($responseFields[1], new ResponseReader.ObjectReader() {
          @Override
          public Aggregate read(ResponseReader reader) {
            return aggregateFieldMapper.map(reader);
          }
        });
        return new Withdrawals_aggregate(__typename, aggregate);
      }
    }
  }

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

    final @NotNull String __typename;

    final @NotNull String count;

    private transient volatile String $toString;

    private transient volatile int $hashCode;

    private transient volatile boolean $hashCodeMemoized;

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

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

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

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

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

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

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

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

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

    final @NotNull String __typename;

    final @NotNull String address;

    final @NotNull String value;

    final @NotNull List tokens;

    private transient volatile String $toString;

    private transient volatile int $hashCode;

    private transient volatile boolean $hashCodeMemoized;

    public Output(@NotNull String __typename, @NotNull String address, @NotNull String value,
        @NotNull List tokens) {
      this.__typename = Utils.checkNotNull(__typename, "__typename == null");
      this.address = Utils.checkNotNull(address, "address == null");
      this.value = Utils.checkNotNull(value, "value == null");
      this.tokens = Utils.checkNotNull(tokens, "tokens == null");
    }

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

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

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

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

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

    @Override
    public String toString() {
      if ($toString == null) {
        $toString = "Output{"
          + "__typename=" + __typename + ", "
          + "address=" + address + ", "
          + "value=" + value + ", "
          + "tokens=" + tokens
          + "}";
      }
      return $toString;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (o instanceof Output) {
        Output that = (Output) o;
        return this.__typename.equals(that.__typename)
         && this.address.equals(that.address)
         && this.value.equals(that.value)
         && this.tokens.equals(that.tokens);
      }
      return false;
    }

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

    public static final class Mapper implements ResponseFieldMapper {
      final Token.Mapper tokenFieldMapper = new Token.Mapper();

      @Override
      public Output map(ResponseReader reader) {
        final String __typename = reader.readString($responseFields[0]);
        final String address = reader.readString($responseFields[1]);
        final String value = reader.readString($responseFields[2]);
        final List tokens = reader.readList($responseFields[3], new ResponseReader.ListReader() {
          @Override
          public Token read(ResponseReader.ListItemReader listItemReader) {
            return listItemReader.readObject(new ResponseReader.ObjectReader() {
              @Override
              public Token read(ResponseReader reader) {
                return tokenFieldMapper.map(reader);
              }
            });
          }
        });
        return new Output(__typename, address, value, tokens);
      }
    }
  }

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

    final @NotNull String __typename;

    final @NotNull String quantity;

    final @NotNull Asset asset;

    private transient volatile String $toString;

    private transient volatile int $hashCode;

    private transient volatile boolean $hashCodeMemoized;

    public Token(@NotNull String __typename, @NotNull String quantity, @NotNull Asset asset) {
      this.__typename = Utils.checkNotNull(__typename, "__typename == null");
      this.quantity = Utils.checkNotNull(quantity, "quantity == null");
      this.asset = Utils.checkNotNull(asset, "asset == null");
    }

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

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

    public @NotNull Asset asset() {
      return this.asset;
    }

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

    @Override
    public String toString() {
      if ($toString == null) {
        $toString = "Token{"
          + "__typename=" + __typename + ", "
          + "quantity=" + quantity + ", "
          + "asset=" + asset
          + "}";
      }
      return $toString;
    }

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

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

    public static final class Mapper implements ResponseFieldMapper {
      final Asset.Mapper assetFieldMapper = new Asset.Mapper();

      @Override
      public Token map(ResponseReader reader) {
        final String __typename = reader.readString($responseFields[0]);
        final String quantity = reader.readString($responseFields[1]);
        final Asset asset = reader.readObject($responseFields[2], new ResponseReader.ObjectReader() {
          @Override
          public Asset read(ResponseReader reader) {
            return assetFieldMapper.map(reader);
          }
        });
        return new Token(__typename, quantity, asset);
      }
    }
  }

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

    final @NotNull String __typename;

    final @NotNull Object assetId;

    private transient volatile String $toString;

    private transient volatile int $hashCode;

    private transient volatile boolean $hashCodeMemoized;

    public Asset(@NotNull String __typename, @NotNull Object assetId) {
      this.__typename = Utils.checkNotNull(__typename, "__typename == null");
      this.assetId = Utils.checkNotNull(assetId, "assetId == null");
    }

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

    public @NotNull Object assetId() {
      return this.assetId;
    }

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

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

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

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

    public static final class Mapper implements ResponseFieldMapper {
      @Override
      public Asset map(ResponseReader reader) {
        final String __typename = reader.readString($responseFields[0]);
        final Object assetId = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[1]);
        return new Asset(__typename, assetId);
      }
    }
  }

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

    final @NotNull String __typename;

    final @NotNull String address;

    final @NotNull String value;

    final @NotNull List tokens;

    private transient volatile String $toString;

    private transient volatile int $hashCode;

    private transient volatile boolean $hashCodeMemoized;

    public Input(@NotNull String __typename, @NotNull String address, @NotNull String value,
        @NotNull List tokens) {
      this.__typename = Utils.checkNotNull(__typename, "__typename == null");
      this.address = Utils.checkNotNull(address, "address == null");
      this.value = Utils.checkNotNull(value, "value == null");
      this.tokens = Utils.checkNotNull(tokens, "tokens == null");
    }

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

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

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

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

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

    @Override
    public String toString() {
      if ($toString == null) {
        $toString = "Input{"
          + "__typename=" + __typename + ", "
          + "address=" + address + ", "
          + "value=" + value + ", "
          + "tokens=" + tokens
          + "}";
      }
      return $toString;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (o instanceof Input) {
        Input that = (Input) o;
        return this.__typename.equals(that.__typename)
         && this.address.equals(that.address)
         && this.value.equals(that.value)
         && this.tokens.equals(that.tokens);
      }
      return false;
    }

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

    public static final class Mapper implements ResponseFieldMapper {
      final Token1.Mapper token1FieldMapper = new Token1.Mapper();

      @Override
      public Input map(ResponseReader reader) {
        final String __typename = reader.readString($responseFields[0]);
        final String address = reader.readString($responseFields[1]);
        final String value = reader.readString($responseFields[2]);
        final List tokens = reader.readList($responseFields[3], new ResponseReader.ListReader() {
          @Override
          public Token1 read(ResponseReader.ListItemReader listItemReader) {
            return listItemReader.readObject(new ResponseReader.ObjectReader() {
              @Override
              public Token1 read(ResponseReader reader) {
                return token1FieldMapper.map(reader);
              }
            });
          }
        });
        return new Input(__typename, address, value, tokens);
      }
    }
  }

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

    final @NotNull String __typename;

    final @NotNull String quantity;

    final @NotNull Asset1 asset;

    private transient volatile String $toString;

    private transient volatile int $hashCode;

    private transient volatile boolean $hashCodeMemoized;

    public Token1(@NotNull String __typename, @NotNull String quantity, @NotNull Asset1 asset) {
      this.__typename = Utils.checkNotNull(__typename, "__typename == null");
      this.quantity = Utils.checkNotNull(quantity, "quantity == null");
      this.asset = Utils.checkNotNull(asset, "asset == null");
    }

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

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

    public @NotNull Asset1 asset() {
      return this.asset;
    }

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

    @Override
    public String toString() {
      if ($toString == null) {
        $toString = "Token1{"
          + "__typename=" + __typename + ", "
          + "quantity=" + quantity + ", "
          + "asset=" + asset
          + "}";
      }
      return $toString;
    }

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

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

    public static final class Mapper implements ResponseFieldMapper {
      final Asset1.Mapper asset1FieldMapper = new Asset1.Mapper();

      @Override
      public Token1 map(ResponseReader reader) {
        final String __typename = reader.readString($responseFields[0]);
        final String quantity = reader.readString($responseFields[1]);
        final Asset1 asset = reader.readObject($responseFields[2], new ResponseReader.ObjectReader() {
          @Override
          public Asset1 read(ResponseReader reader) {
            return asset1FieldMapper.map(reader);
          }
        });
        return new Token1(__typename, quantity, asset);
      }
    }
  }

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

    final @NotNull String __typename;

    final @NotNull Object assetId;

    private transient volatile String $toString;

    private transient volatile int $hashCode;

    private transient volatile boolean $hashCodeMemoized;

    public Asset1(@NotNull String __typename, @NotNull Object assetId) {
      this.__typename = Utils.checkNotNull(__typename, "__typename == null");
      this.assetId = Utils.checkNotNull(assetId, "assetId == null");
    }

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

    public @NotNull Object assetId() {
      return this.assetId;
    }

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

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

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

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

    public static final class Mapper implements ResponseFieldMapper {
      @Override
      public Asset1 map(ResponseReader reader) {
        final String __typename = reader.readString($responseFields[0]);
        final Object assetId = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[1]);
        return new Asset1(__typename, assetId);
      }
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy