com.bloxbean.cardano.gql.SubmitTxMutation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cardano-client-backend-gql Show documentation
Show all versions of cardano-client-backend-gql Show documentation
Cardano Client Library - GraphQL Backend
// 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.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.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
import okio.Buffer;
import okio.BufferedSource;
import okio.ByteString;
import org.jetbrains.annotations.NotNull;
public final class SubmitTxMutation implements Mutation {
public static final String OPERATION_ID = "99223fac660d5c43c01dadbeca12d7ce36ad6aaa14c7749b1bd3f468c5dc08cc";
public static final String QUERY_DOCUMENT = QueryDocumentMinifier.minify(
"mutation SubmitTx($signedTx: String!) {\n"
+ " submitTransaction(transaction: $signedTx) {\n"
+ " __typename\n"
+ " hash\n"
+ " }\n"
+ "}"
);
public static final OperationName OPERATION_NAME = new OperationName() {
@Override
public String name() {
return "SubmitTx";
}
};
private final SubmitTxMutation.Variables variables;
public SubmitTxMutation(@NotNull String signedTx) {
Utils.checkNotNull(signedTx, "signedTx == null");
variables = new SubmitTxMutation.Variables(signedTx);
}
@Override
public String operationId() {
return OPERATION_ID;
}
@Override
public String queryDocument() {
return QUERY_DOCUMENT;
}
@Override
public SubmitTxMutation.Data wrapData(SubmitTxMutation.Data data) {
return data;
}
@Override
public SubmitTxMutation.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 signedTx;
Builder() {
}
public Builder signedTx(@NotNull String signedTx) {
this.signedTx = signedTx;
return this;
}
public SubmitTxMutation build() {
Utils.checkNotNull(signedTx, "signedTx == null");
return new SubmitTxMutation(signedTx);
}
}
public static final class Variables extends Operation.Variables {
private final @NotNull String signedTx;
private final transient Map valueMap = new LinkedHashMap<>();
Variables(@NotNull String signedTx) {
this.signedTx = signedTx;
this.valueMap.put("signedTx", signedTx);
}
public @NotNull String signedTx() {
return signedTx;
}
@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("signedTx", signedTx);
}
};
}
}
/**
* Data from the response after executing this GraphQL operation
*/
public static class Data implements Operation.Data {
static final ResponseField[] $responseFields = {
ResponseField.forObject("submitTransaction", "submitTransaction", new UnmodifiableMapBuilder(1)
.put("transaction", new UnmodifiableMapBuilder(2)
.put("kind", "Variable")
.put("variableName", "signedTx")
.build())
.build(), false, Collections.emptyList())
};
final @NotNull SubmitTransaction submitTransaction;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Data(@NotNull SubmitTransaction submitTransaction) {
this.submitTransaction = Utils.checkNotNull(submitTransaction, "submitTransaction == null");
}
/**
* Submit a signed transaction to the network
*/
public @NotNull SubmitTransaction submitTransaction() {
return this.submitTransaction;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeObject($responseFields[0], submitTransaction.marshaller());
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Data{"
+ "submitTransaction=" + submitTransaction
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Data) {
Data that = (Data) o;
return this.submitTransaction.equals(that.submitTransaction);
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= submitTransaction.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
final SubmitTransaction.Mapper submitTransactionFieldMapper = new SubmitTransaction.Mapper();
@Override
public Data map(ResponseReader reader) {
final SubmitTransaction submitTransaction = reader.readObject($responseFields[0], new ResponseReader.ObjectReader() {
@Override
public SubmitTransaction read(ResponseReader reader) {
return submitTransactionFieldMapper.map(reader);
}
});
return new Data(submitTransaction);
}
}
}
public static class SubmitTransaction {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forString("hash", "hash", null, false, Collections.emptyList())
};
final @NotNull String __typename;
final @NotNull String hash;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public SubmitTransaction(@NotNull String __typename, @NotNull String hash) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.hash = Utils.checkNotNull(hash, "hash == null");
}
public @NotNull String __typename() {
return this.__typename;
}
public @NotNull String hash() {
return this.hash;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeString($responseFields[0], __typename);
writer.writeString($responseFields[1], hash);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "SubmitTransaction{"
+ "__typename=" + __typename + ", "
+ "hash=" + hash
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof SubmitTransaction) {
SubmitTransaction that = (SubmitTransaction) o;
return this.__typename.equals(that.__typename)
&& this.hash.equals(that.hash);
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= hash.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
@Override
public SubmitTransaction map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final String hash = reader.readString($responseFields[1]);
return new SubmitTransaction(__typename, hash);
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy