net.nemerosa.ontrack.kdsl.connector.graphql.schema.AutoVersioningAuditEntriesQuery Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ontrack-kdsl Show documentation
Show all versions of ontrack-kdsl Show documentation
Ontrack module: ontrack-kdsl
// 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.Operation;
import com.apollographql.apollo.api.OperationName;
import com.apollographql.apollo.api.Query;
import com.apollographql.apollo.api.Response;
import com.apollographql.apollo.api.ResponseField;
import com.apollographql.apollo.api.ScalarTypeAdapters;
import com.apollographql.apollo.api.internal.InputFieldMarshaller;
import com.apollographql.apollo.api.internal.InputFieldWriter;
import com.apollographql.apollo.api.internal.OperationRequestBodyComposer;
import com.apollographql.apollo.api.internal.QueryDocumentMinifier;
import com.apollographql.apollo.api.internal.ResponseFieldMapper;
import com.apollographql.apollo.api.internal.ResponseFieldMarshaller;
import com.apollographql.apollo.api.internal.ResponseReader;
import com.apollographql.apollo.api.internal.ResponseWriter;
import com.apollographql.apollo.api.internal.SimpleOperationResponseParser;
import com.apollographql.apollo.api.internal.UnmodifiableMapBuilder;
import com.apollographql.apollo.api.internal.Utils;
import com.fasterxml.jackson.databind.JsonNode;
import java.io.IOException;
import java.lang.Boolean;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import net.nemerosa.ontrack.kdsl.connector.graphql.schema.fragment.PageInfoContent;
import net.nemerosa.ontrack.kdsl.connector.graphql.schema.type.AutoVersioningAuditState;
import net.nemerosa.ontrack.kdsl.connector.graphql.schema.type.CustomType;
import okio.Buffer;
import okio.BufferedSource;
import okio.ByteString;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public final class AutoVersioningAuditEntriesQuery implements Query {
public static final String OPERATION_ID = "45720f88655e68212eee8cbce9bd71e9cc44dbf136369da3508959a2f8ce01ba";
public static final String QUERY_DOCUMENT = QueryDocumentMinifier.minify(
"query AutoVersioningAuditEntries($offset: Int! = 0, $size: Int! = 10, $source: String = null, $project: String = null, $branch: String = null, $version: String = null) {\n"
+ " autoVersioningAuditEntries(offset: $offset, size: $size, filter: {source: $source, project: $project, branch: $branch, version: $version}) {\n"
+ " __typename\n"
+ " pageInfo {\n"
+ " __typename\n"
+ " ...PageInfoContent\n"
+ " }\n"
+ " pageItems {\n"
+ " __typename\n"
+ " order {\n"
+ " __typename\n"
+ " uuid\n"
+ " }\n"
+ " running\n"
+ " mostRecentState {\n"
+ " __typename\n"
+ " data\n"
+ " state\n"
+ " }\n"
+ " audit {\n"
+ " __typename\n"
+ " data\n"
+ " state\n"
+ " }\n"
+ " routing\n"
+ " queue\n"
+ " }\n"
+ " }\n"
+ "}\n"
+ "fragment PageInfoContent on PageInfo {\n"
+ " __typename\n"
+ " totalSize\n"
+ " currentOffset\n"
+ " currentSize\n"
+ " previousPage {\n"
+ " __typename\n"
+ " offset\n"
+ " size\n"
+ " }\n"
+ " nextPage {\n"
+ " __typename\n"
+ " offset\n"
+ " size\n"
+ " }\n"
+ " pageTotal\n"
+ " pageIndex\n"
+ "}"
);
public static final OperationName OPERATION_NAME = new OperationName() {
@Override
public String name() {
return "AutoVersioningAuditEntries";
}
};
private final AutoVersioningAuditEntriesQuery.Variables variables;
public AutoVersioningAuditEntriesQuery(int offset, int size, @NotNull Input source,
@NotNull Input project, @NotNull Input branch,
@NotNull Input version) {
Utils.checkNotNull(source, "source == null");
Utils.checkNotNull(project, "project == null");
Utils.checkNotNull(branch, "branch == null");
Utils.checkNotNull(version, "version == null");
variables = new AutoVersioningAuditEntriesQuery.Variables(offset, size, source, project, branch, version);
}
@Override
public String operationId() {
return OPERATION_ID;
}
@Override
public String queryDocument() {
return QUERY_DOCUMENT;
}
@Override
public AutoVersioningAuditEntriesQuery.Data wrapData(AutoVersioningAuditEntriesQuery.Data data) {
return data;
}
@Override
public AutoVersioningAuditEntriesQuery.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 offset;
private int size;
private Input source = Input.absent();
private Input project = Input.absent();
private Input branch = Input.absent();
private Input version = Input.absent();
Builder() {
}
public Builder offset(int offset) {
this.offset = offset;
return this;
}
public Builder size(int size) {
this.size = size;
return this;
}
public Builder source(@Nullable String source) {
this.source = Input.fromNullable(source);
return this;
}
public Builder project(@Nullable String project) {
this.project = Input.fromNullable(project);
return this;
}
public Builder branch(@Nullable String branch) {
this.branch = Input.fromNullable(branch);
return this;
}
public Builder version(@Nullable String version) {
this.version = Input.fromNullable(version);
return this;
}
public Builder sourceInput(@NotNull Input source) {
this.source = Utils.checkNotNull(source, "source == null");
return this;
}
public Builder projectInput(@NotNull Input project) {
this.project = Utils.checkNotNull(project, "project == null");
return this;
}
public Builder branchInput(@NotNull Input branch) {
this.branch = Utils.checkNotNull(branch, "branch == null");
return this;
}
public Builder versionInput(@NotNull Input version) {
this.version = Utils.checkNotNull(version, "version == null");
return this;
}
public AutoVersioningAuditEntriesQuery build() {
return new AutoVersioningAuditEntriesQuery(offset, size, source, project, branch, version);
}
}
public static final class Variables extends Operation.Variables {
private final int offset;
private final int size;
private final Input source;
private final Input project;
private final Input branch;
private final Input version;
private final transient Map valueMap = new LinkedHashMap<>();
Variables(int offset, int size, Input source, Input project,
Input branch, Input version) {
this.offset = offset;
this.size = size;
this.source = source;
this.project = project;
this.branch = branch;
this.version = version;
this.valueMap.put("offset", offset);
this.valueMap.put("size", size);
if (source.defined) {
this.valueMap.put("source", source.value);
}
if (project.defined) {
this.valueMap.put("project", project.value);
}
if (branch.defined) {
this.valueMap.put("branch", branch.value);
}
if (version.defined) {
this.valueMap.put("version", version.value);
}
}
public int offset() {
return offset;
}
public int size() {
return size;
}
public Input source() {
return source;
}
public Input project() {
return project;
}
public Input branch() {
return branch;
}
public Input version() {
return version;
}
@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("offset", offset);
writer.writeInt("size", size);
if (source.defined) {
writer.writeString("source", source.value);
}
if (project.defined) {
writer.writeString("project", project.value);
}
if (branch.defined) {
writer.writeString("branch", branch.value);
}
if (version.defined) {
writer.writeString("version", version.value);
}
}
};
}
}
/**
* Data from the response after executing this GraphQL operation
*/
public static class Data implements Operation.Data {
static final ResponseField[] $responseFields = {
ResponseField.forObject("autoVersioningAuditEntries", "autoVersioningAuditEntries", new UnmodifiableMapBuilder(3)
.put("offset", new UnmodifiableMapBuilder(2)
.put("kind", "Variable")
.put("variableName", "offset")
.build())
.put("size", new UnmodifiableMapBuilder(2)
.put("kind", "Variable")
.put("variableName", "size")
.build())
.put("filter", new UnmodifiableMapBuilder(4)
.put("source", new UnmodifiableMapBuilder(2)
.put("kind", "Variable")
.put("variableName", "source")
.build())
.put("project", new UnmodifiableMapBuilder(2)
.put("kind", "Variable")
.put("variableName", "project")
.build())
.put("branch", new UnmodifiableMapBuilder(2)
.put("kind", "Variable")
.put("variableName", "branch")
.build())
.put("version", new UnmodifiableMapBuilder(2)
.put("kind", "Variable")
.put("variableName", "version")
.build())
.build())
.build(), true, Collections.emptyList())
};
final @Nullable AutoVersioningAuditEntries autoVersioningAuditEntries;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Data(@Nullable AutoVersioningAuditEntries autoVersioningAuditEntries) {
this.autoVersioningAuditEntries = autoVersioningAuditEntries;
}
/**
* List of audit entries for auto versioning processing orders
*/
public @Nullable AutoVersioningAuditEntries autoVersioningAuditEntries() {
return this.autoVersioningAuditEntries;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeObject($responseFields[0], autoVersioningAuditEntries != null ? autoVersioningAuditEntries.marshaller() : null);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Data{"
+ "autoVersioningAuditEntries=" + autoVersioningAuditEntries
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Data) {
Data that = (Data) o;
return ((this.autoVersioningAuditEntries == null) ? (that.autoVersioningAuditEntries == null) : this.autoVersioningAuditEntries.equals(that.autoVersioningAuditEntries));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= (autoVersioningAuditEntries == null) ? 0 : autoVersioningAuditEntries.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
final AutoVersioningAuditEntries.Mapper autoVersioningAuditEntriesFieldMapper = new AutoVersioningAuditEntries.Mapper();
@Override
public Data map(ResponseReader reader) {
final AutoVersioningAuditEntries autoVersioningAuditEntries = reader.readObject($responseFields[0], new ResponseReader.ObjectReader() {
@Override
public AutoVersioningAuditEntries read(ResponseReader reader) {
return autoVersioningAuditEntriesFieldMapper.map(reader);
}
});
return new Data(autoVersioningAuditEntries);
}
}
}
public static class AutoVersioningAuditEntries {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forObject("pageInfo", "pageInfo", null, true, Collections.emptyList()),
ResponseField.forList("pageItems", "pageItems", null, false, Collections.emptyList())
};
final @NotNull String __typename;
final @Nullable PageInfo pageInfo;
final @NotNull List pageItems;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public AutoVersioningAuditEntries(@NotNull String __typename, @Nullable PageInfo pageInfo,
@NotNull List pageItems) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.pageInfo = pageInfo;
this.pageItems = Utils.checkNotNull(pageItems, "pageItems == null");
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* Information about the current page
*/
public @Nullable PageInfo pageInfo() {
return this.pageInfo;
}
/**
* Items in the current page
*/
public @NotNull List pageItems() {
return this.pageItems;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeString($responseFields[0], __typename);
writer.writeObject($responseFields[1], pageInfo != null ? pageInfo.marshaller() : null);
writer.writeList($responseFields[2], pageItems, new ResponseWriter.ListWriter() {
@Override
public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
for (Object item : items) {
listItemWriter.writeObject(((PageItem) item).marshaller());
}
}
});
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "AutoVersioningAuditEntries{"
+ "__typename=" + __typename + ", "
+ "pageInfo=" + pageInfo + ", "
+ "pageItems=" + pageItems
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof AutoVersioningAuditEntries) {
AutoVersioningAuditEntries that = (AutoVersioningAuditEntries) o;
return this.__typename.equals(that.__typename)
&& ((this.pageInfo == null) ? (that.pageInfo == null) : this.pageInfo.equals(that.pageInfo))
&& this.pageItems.equals(that.pageItems);
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= (pageInfo == null) ? 0 : pageInfo.hashCode();
h *= 1000003;
h ^= pageItems.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
final PageInfo.Mapper pageInfoFieldMapper = new PageInfo.Mapper();
final PageItem.Mapper pageItemFieldMapper = new PageItem.Mapper();
@Override
public AutoVersioningAuditEntries map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final PageInfo pageInfo = reader.readObject($responseFields[1], new ResponseReader.ObjectReader() {
@Override
public PageInfo read(ResponseReader reader) {
return pageInfoFieldMapper.map(reader);
}
});
final List pageItems = reader.readList($responseFields[2], new ResponseReader.ListReader() {
@Override
public PageItem read(ResponseReader.ListItemReader listItemReader) {
return listItemReader.readObject(new ResponseReader.ObjectReader() {
@Override
public PageItem read(ResponseReader reader) {
return pageItemFieldMapper.map(reader);
}
});
}
});
return new AutoVersioningAuditEntries(__typename, pageInfo, pageItems);
}
}
}
public static class PageInfo {
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 PageInfo(@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 = "PageInfo{"
+ "__typename=" + __typename + ", "
+ "fragments=" + fragments
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof PageInfo) {
PageInfo that = (PageInfo) 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 PageInfoContent pageInfoContent;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Fragments(@NotNull PageInfoContent pageInfoContent) {
this.pageInfoContent = Utils.checkNotNull(pageInfoContent, "pageInfoContent == null");
}
public @NotNull PageInfoContent pageInfoContent() {
return this.pageInfoContent;
}
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeFragment(pageInfoContent.marshaller());
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Fragments{"
+ "pageInfoContent=" + pageInfoContent
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Fragments) {
Fragments that = (Fragments) o;
return this.pageInfoContent.equals(that.pageInfoContent);
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= pageInfoContent.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 PageInfoContent.Mapper pageInfoContentFieldMapper = new PageInfoContent.Mapper();
@Override
public @NotNull Fragments map(ResponseReader reader) {
final PageInfoContent pageInfoContent = reader.readFragment($responseFields[0], new ResponseReader.ObjectReader() {
@Override
public PageInfoContent read(ResponseReader reader) {
return pageInfoContentFieldMapper.map(reader);
}
});
return new Fragments(pageInfoContent);
}
}
}
public static final class Mapper implements ResponseFieldMapper {
final Fragments.Mapper fragmentsFieldMapper = new Fragments.Mapper();
@Override
public PageInfo map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final Fragments fragments = fragmentsFieldMapper.map(reader);
return new PageInfo(__typename, fragments);
}
}
}
/**
* Audit entry for an auto versioning processing order.
*/
public static class PageItem {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forObject("order", "order", null, false, Collections.emptyList()),
ResponseField.forBoolean("running", "running", null, true, Collections.emptyList()),
ResponseField.forObject("mostRecentState", "mostRecentState", null, false, Collections.emptyList()),
ResponseField.forList("audit", "audit", null, false, Collections.emptyList()),
ResponseField.forString("routing", "routing", null, false, Collections.emptyList()),
ResponseField.forString("queue", "queue", null, true, Collections.emptyList())
};
final @NotNull String __typename;
final @NotNull Order order;
final @Nullable Boolean running;
final @NotNull MostRecentState mostRecentState;
final @NotNull List audit;
final @NotNull String routing;
final @Nullable String queue;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public PageItem(@NotNull String __typename, @NotNull Order order, @Nullable Boolean running,
@NotNull MostRecentState mostRecentState, @NotNull List audit,
@NotNull String routing, @Nullable String queue) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.order = Utils.checkNotNull(order, "order == null");
this.running = running;
this.mostRecentState = Utils.checkNotNull(mostRecentState, "mostRecentState == null");
this.audit = Utils.checkNotNull(audit, "audit == null");
this.routing = Utils.checkNotNull(routing, "routing == null");
this.queue = queue;
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* Associated auto versioning order
*/
public @NotNull Order order() {
return this.order;
}
/**
* Running state
*/
public @Nullable Boolean running() {
return this.running;
}
/**
* Most recent state
*/
public @NotNull MostRecentState mostRecentState() {
return this.mostRecentState;
}
/**
* History of the different states
*/
public @NotNull List audit() {
return this.audit;
}
/**
* Queue routing key used for this order
*/
public @NotNull String routing() {
return this.routing;
}
/**
* Actual queue where the order was posted
*/
public @Nullable String queue() {
return this.queue;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeString($responseFields[0], __typename);
writer.writeObject($responseFields[1], order.marshaller());
writer.writeBoolean($responseFields[2], running);
writer.writeObject($responseFields[3], mostRecentState.marshaller());
writer.writeList($responseFields[4], audit, new ResponseWriter.ListWriter() {
@Override
public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
for (Object item : items) {
listItemWriter.writeObject(((Audit) item).marshaller());
}
}
});
writer.writeString($responseFields[5], routing);
writer.writeString($responseFields[6], queue);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "PageItem{"
+ "__typename=" + __typename + ", "
+ "order=" + order + ", "
+ "running=" + running + ", "
+ "mostRecentState=" + mostRecentState + ", "
+ "audit=" + audit + ", "
+ "routing=" + routing + ", "
+ "queue=" + queue
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof PageItem) {
PageItem that = (PageItem) o;
return this.__typename.equals(that.__typename)
&& this.order.equals(that.order)
&& ((this.running == null) ? (that.running == null) : this.running.equals(that.running))
&& this.mostRecentState.equals(that.mostRecentState)
&& this.audit.equals(that.audit)
&& this.routing.equals(that.routing)
&& ((this.queue == null) ? (that.queue == null) : this.queue.equals(that.queue));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= order.hashCode();
h *= 1000003;
h ^= (running == null) ? 0 : running.hashCode();
h *= 1000003;
h ^= mostRecentState.hashCode();
h *= 1000003;
h ^= audit.hashCode();
h *= 1000003;
h ^= routing.hashCode();
h *= 1000003;
h ^= (queue == null) ? 0 : queue.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
final Order.Mapper orderFieldMapper = new Order.Mapper();
final MostRecentState.Mapper mostRecentStateFieldMapper = new MostRecentState.Mapper();
final Audit.Mapper auditFieldMapper = new Audit.Mapper();
@Override
public PageItem map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final Order order = reader.readObject($responseFields[1], new ResponseReader.ObjectReader() {
@Override
public Order read(ResponseReader reader) {
return orderFieldMapper.map(reader);
}
});
final Boolean running = reader.readBoolean($responseFields[2]);
final MostRecentState mostRecentState = reader.readObject($responseFields[3], new ResponseReader.ObjectReader() {
@Override
public MostRecentState read(ResponseReader reader) {
return mostRecentStateFieldMapper.map(reader);
}
});
final List audit = reader.readList($responseFields[4], new ResponseReader.ListReader() {
@Override
public Audit read(ResponseReader.ListItemReader listItemReader) {
return listItemReader.readObject(new ResponseReader.ObjectReader() {
@Override
public Audit read(ResponseReader reader) {
return auditFieldMapper.map(reader);
}
});
}
});
final String routing = reader.readString($responseFields[5]);
final String queue = reader.readString($responseFields[6]);
return new PageItem(__typename, order, running, mostRecentState, audit, routing, queue);
}
}
}
/**
* Auto versioning processing order
*/
public static class Order {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forString("uuid", "uuid", null, false, Collections.emptyList())
};
final @NotNull String __typename;
final @NotNull String uuid;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Order(@NotNull String __typename, @NotNull String uuid) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.uuid = Utils.checkNotNull(uuid, "uuid == null");
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* UUID for the processing order
*/
public @NotNull String uuid() {
return this.uuid;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeString($responseFields[0], __typename);
writer.writeString($responseFields[1], uuid);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Order{"
+ "__typename=" + __typename + ", "
+ "uuid=" + uuid
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Order) {
Order that = (Order) o;
return this.__typename.equals(that.__typename)
&& this.uuid.equals(that.uuid);
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= uuid.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
@Override
public Order map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final String uuid = reader.readString($responseFields[1]);
return new Order(__typename, uuid);
}
}
}
/**
* Audit entry for an auto versioning order
*/
public static class MostRecentState {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forCustomType("data", "data", null, false, CustomType.JSON, Collections.emptyList()),
ResponseField.forString("state", "state", null, false, Collections.emptyList())
};
final @NotNull String __typename;
final @NotNull JsonNode data;
final @NotNull AutoVersioningAuditState state;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public MostRecentState(@NotNull String __typename, @NotNull JsonNode data,
@NotNull AutoVersioningAuditState state) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.data = Utils.checkNotNull(data, "data == null");
this.state = Utils.checkNotNull(state, "state == null");
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* Associated data
*/
public @NotNull JsonNode data() {
return this.data;
}
/**
* State of the processing
*/
public @NotNull AutoVersioningAuditState state() {
return this.state;
}
@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], data);
writer.writeString($responseFields[2], state.rawValue());
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "MostRecentState{"
+ "__typename=" + __typename + ", "
+ "data=" + data + ", "
+ "state=" + state
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof MostRecentState) {
MostRecentState that = (MostRecentState) o;
return this.__typename.equals(that.__typename)
&& this.data.equals(that.data)
&& this.state.equals(that.state);
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= data.hashCode();
h *= 1000003;
h ^= state.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
@Override
public MostRecentState map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final JsonNode data = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[1]);
final String stateStr = reader.readString($responseFields[2]);
final AutoVersioningAuditState state;
if (stateStr != null) {
state = AutoVersioningAuditState.safeValueOf(stateStr);
} else {
state = null;
}
return new MostRecentState(__typename, data, state);
}
}
}
/**
* Audit entry for an auto versioning order
*/
public static class Audit {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forCustomType("data", "data", null, false, CustomType.JSON, Collections.emptyList()),
ResponseField.forString("state", "state", null, false, Collections.emptyList())
};
final @NotNull String __typename;
final @NotNull JsonNode data;
final @NotNull AutoVersioningAuditState state;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Audit(@NotNull String __typename, @NotNull JsonNode data,
@NotNull AutoVersioningAuditState state) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.data = Utils.checkNotNull(data, "data == null");
this.state = Utils.checkNotNull(state, "state == null");
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* Associated data
*/
public @NotNull JsonNode data() {
return this.data;
}
/**
* State of the processing
*/
public @NotNull AutoVersioningAuditState state() {
return this.state;
}
@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], data);
writer.writeString($responseFields[2], state.rawValue());
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Audit{"
+ "__typename=" + __typename + ", "
+ "data=" + data + ", "
+ "state=" + state
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Audit) {
Audit that = (Audit) o;
return this.__typename.equals(that.__typename)
&& this.data.equals(that.data)
&& this.state.equals(that.state);
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= data.hashCode();
h *= 1000003;
h ^= state.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
@Override
public Audit map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final JsonNode data = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[1]);
final String stateStr = reader.readString($responseFields[2]);
final AutoVersioningAuditState state;
if (stateStr != null) {
state = AutoVersioningAuditState.safeValueOf(stateStr);
} else {
state = null;
}
return new Audit(__typename, data, state);
}
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy