Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.github.twitch4j.graphql.internal.FetchVideoCommentsQuery Maven / Gradle / Ivy
// 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.github.twitch4j.graphql.internal;
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.github.twitch4j.graphql.internal.type.CustomType;
import com.github.twitch4j.graphql.internal.type.VideoCommentSource;
import com.github.twitch4j.graphql.internal.type.VideoCommentState;
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 FetchVideoCommentsQuery implements Query {
public static final String OPERATION_ID = "05ddeecbe88ff96bc02e9cc15fba0c2cdee3266a2a008a7c5af6f0aa61737d7c";
public static final String QUERY_DOCUMENT = QueryDocumentMinifier.minify(
"query fetchVideoComments($first: Int, $after: Cursor, $last: Int, $Before: Cursor, $id: String, $videoID: String, $channelID: String) {\n"
+ " videoComments(first: $first, after: $after, last: $last, Before: $Before, id: $id, videoID: $videoID, channelID: $channelID) {\n"
+ " __typename\n"
+ " edges {\n"
+ " __typename\n"
+ " cursor\n"
+ " node {\n"
+ " __typename\n"
+ " commenter {\n"
+ " __typename\n"
+ " id\n"
+ " login\n"
+ " displayName\n"
+ " description\n"
+ " createdAt\n"
+ " updatedAt\n"
+ " profileImageURL(width: 300)\n"
+ " }\n"
+ " contentOffsetSeconds\n"
+ " createdAt\n"
+ " id\n"
+ " message {\n"
+ " __typename\n"
+ " fragments {\n"
+ " __typename\n"
+ " emote {\n"
+ " __typename\n"
+ " emoteID\n"
+ " from\n"
+ " id\n"
+ " setID\n"
+ " to\n"
+ " }\n"
+ " mention {\n"
+ " __typename\n"
+ " id\n"
+ " displayName\n"
+ " login\n"
+ " }\n"
+ " text\n"
+ " }\n"
+ " userBadges {\n"
+ " __typename\n"
+ " clickURL\n"
+ " description\n"
+ " id\n"
+ " imageURL\n"
+ " setID\n"
+ " title\n"
+ " version\n"
+ " }\n"
+ " userColor\n"
+ " }\n"
+ " source\n"
+ " state\n"
+ " updatedAt\n"
+ " video {\n"
+ " __typename\n"
+ " id\n"
+ " }\n"
+ " }\n"
+ " }\n"
+ " pageInfo {\n"
+ " __typename\n"
+ " hasNextPage\n"
+ " hasPreviousPage\n"
+ " }\n"
+ " }\n"
+ "}"
);
public static final OperationName OPERATION_NAME = new OperationName() {
@Override
public String name() {
return "fetchVideoComments";
}
};
private final FetchVideoCommentsQuery.Variables variables;
public FetchVideoCommentsQuery(@NotNull Input first, @NotNull Input after,
@NotNull Input last, @NotNull Input before, @NotNull Input id,
@NotNull Input videoID, @NotNull Input channelID) {
Utils.checkNotNull(first, "first == null");
Utils.checkNotNull(after, "after == null");
Utils.checkNotNull(last, "last == null");
Utils.checkNotNull(before, "before == null");
Utils.checkNotNull(id, "id == null");
Utils.checkNotNull(videoID, "videoID == null");
Utils.checkNotNull(channelID, "channelID == null");
variables = new FetchVideoCommentsQuery.Variables(first, after, last, before, id, videoID, channelID);
}
@Override
public String operationId() {
return OPERATION_ID;
}
@Override
public String queryDocument() {
return QUERY_DOCUMENT;
}
@Override
public FetchVideoCommentsQuery.Data wrapData(FetchVideoCommentsQuery.Data data) {
return data;
}
@Override
public FetchVideoCommentsQuery.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 Input first = Input.absent();
private Input after = Input.absent();
private Input last = Input.absent();
private Input before = Input.absent();
private Input id = Input.absent();
private Input videoID = Input.absent();
private Input channelID = Input.absent();
Builder() {
}
public Builder first(@Nullable Integer first) {
this.first = Input.fromNullable(first);
return this;
}
public Builder after(@Nullable Object after) {
this.after = Input.fromNullable(after);
return this;
}
public Builder last(@Nullable Integer last) {
this.last = Input.fromNullable(last);
return this;
}
public Builder before(@Nullable Object before) {
this.before = Input.fromNullable(before);
return this;
}
public Builder id(@Nullable String id) {
this.id = Input.fromNullable(id);
return this;
}
public Builder videoID(@Nullable String videoID) {
this.videoID = Input.fromNullable(videoID);
return this;
}
public Builder channelID(@Nullable String channelID) {
this.channelID = Input.fromNullable(channelID);
return this;
}
public Builder firstInput(@NotNull Input first) {
this.first = Utils.checkNotNull(first, "first == null");
return this;
}
public Builder afterInput(@NotNull Input after) {
this.after = Utils.checkNotNull(after, "after == null");
return this;
}
public Builder lastInput(@NotNull Input last) {
this.last = Utils.checkNotNull(last, "last == null");
return this;
}
public Builder beforeInput(@NotNull Input before) {
this.before = Utils.checkNotNull(before, "before == null");
return this;
}
public Builder idInput(@NotNull Input id) {
this.id = Utils.checkNotNull(id, "id == null");
return this;
}
public Builder videoIDInput(@NotNull Input videoID) {
this.videoID = Utils.checkNotNull(videoID, "videoID == null");
return this;
}
public Builder channelIDInput(@NotNull Input channelID) {
this.channelID = Utils.checkNotNull(channelID, "channelID == null");
return this;
}
public FetchVideoCommentsQuery build() {
return new FetchVideoCommentsQuery(first, after, last, before, id, videoID, channelID);
}
}
public static final class Variables extends Operation.Variables {
private final Input first;
private final Input after;
private final Input last;
private final Input before;
private final Input id;
private final Input videoID;
private final Input channelID;
private final transient Map valueMap = new LinkedHashMap<>();
Variables(Input first, Input after, Input last, Input before,
Input id, Input videoID, Input channelID) {
this.first = first;
this.after = after;
this.last = last;
this.before = before;
this.id = id;
this.videoID = videoID;
this.channelID = channelID;
if (first.defined) {
this.valueMap.put("first", first.value);
}
if (after.defined) {
this.valueMap.put("after", after.value);
}
if (last.defined) {
this.valueMap.put("last", last.value);
}
if (before.defined) {
this.valueMap.put("Before", before.value);
}
if (id.defined) {
this.valueMap.put("id", id.value);
}
if (videoID.defined) {
this.valueMap.put("videoID", videoID.value);
}
if (channelID.defined) {
this.valueMap.put("channelID", channelID.value);
}
}
public Input first() {
return first;
}
public Input after() {
return after;
}
public Input last() {
return last;
}
public Input before() {
return before;
}
public Input id() {
return id;
}
public Input videoID() {
return videoID;
}
public Input channelID() {
return channelID;
}
@Override
public Map valueMap() {
return Collections.unmodifiableMap(valueMap);
}
@Override
public InputFieldMarshaller marshaller() {
return new InputFieldMarshaller() {
@Override
public void marshal(InputFieldWriter writer) throws IOException {
if (first.defined) {
writer.writeInt("first", first.value);
}
if (after.defined) {
writer.writeCustom("after", com.github.twitch4j.graphql.internal.type.CustomType.CURSOR, after.value != null ? after.value : null);
}
if (last.defined) {
writer.writeInt("last", last.value);
}
if (before.defined) {
writer.writeCustom("before", com.github.twitch4j.graphql.internal.type.CustomType.CURSOR, before.value != null ? before.value : null);
}
if (id.defined) {
writer.writeString("id", id.value);
}
if (videoID.defined) {
writer.writeString("videoID", videoID.value);
}
if (channelID.defined) {
writer.writeString("channelID", channelID.value);
}
}
};
}
}
/**
* Data from the response after executing this GraphQL operation
*/
public static class Data implements Operation.Data {
static final ResponseField[] $responseFields = {
ResponseField.forObject("videoComments", "videoComments", new UnmodifiableMapBuilder(7)
.put("first", new UnmodifiableMapBuilder(2)
.put("kind", "Variable")
.put("variableName", "first")
.build())
.put("after", new UnmodifiableMapBuilder(2)
.put("kind", "Variable")
.put("variableName", "after")
.build())
.put("last", new UnmodifiableMapBuilder(2)
.put("kind", "Variable")
.put("variableName", "last")
.build())
.put("Before", new UnmodifiableMapBuilder(2)
.put("kind", "Variable")
.put("variableName", "Before")
.build())
.put("id", new UnmodifiableMapBuilder(2)
.put("kind", "Variable")
.put("variableName", "id")
.build())
.put("videoID", new UnmodifiableMapBuilder(2)
.put("kind", "Variable")
.put("variableName", "videoID")
.build())
.put("channelID", new UnmodifiableMapBuilder(2)
.put("kind", "Variable")
.put("variableName", "channelID")
.build())
.build(), true, Collections.emptyList())
};
final @Nullable VideoComments videoComments;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Data(@Nullable VideoComments videoComments) {
this.videoComments = videoComments;
}
/**
* A paginated list of comments against id, videoID, or channelID.
*/
public @Nullable VideoComments videoComments() {
return this.videoComments;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeObject($responseFields[0], videoComments != null ? videoComments.marshaller() : null);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Data{"
+ "videoComments=" + videoComments
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Data) {
Data that = (Data) o;
return ((this.videoComments == null) ? (that.videoComments == null) : this.videoComments.equals(that.videoComments));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= (videoComments == null) ? 0 : videoComments.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
final VideoComments.Mapper videoCommentsFieldMapper = new VideoComments.Mapper();
@Override
public Data map(ResponseReader reader) {
final VideoComments videoComments = reader.readObject($responseFields[0], new ResponseReader.ObjectReader() {
@Override
public VideoComments read(ResponseReader reader) {
return videoCommentsFieldMapper.map(reader);
}
});
return new Data(videoComments);
}
}
}
/**
* Paginated list of comments.
*/
public static class VideoComments {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forList("edges", "edges", null, true, Collections.emptyList()),
ResponseField.forObject("pageInfo", "pageInfo", null, false, Collections.emptyList())
};
final @NotNull String __typename;
final @Nullable List edges;
final @NotNull PageInfo pageInfo;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public VideoComments(@NotNull String __typename, @Nullable List edges,
@NotNull PageInfo pageInfo) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.edges = edges;
this.pageInfo = Utils.checkNotNull(pageInfo, "pageInfo == null");
}
public @NotNull String __typename() {
return this.__typename;
}
public @Nullable List edges() {
return this.edges;
}
public @NotNull PageInfo pageInfo() {
return this.pageInfo;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeString($responseFields[0], __typename);
writer.writeList($responseFields[1], edges, new ResponseWriter.ListWriter() {
@Override
public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
for (Object item : items) {
listItemWriter.writeObject(((Edge) item).marshaller());
}
}
});
writer.writeObject($responseFields[2], pageInfo.marshaller());
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "VideoComments{"
+ "__typename=" + __typename + ", "
+ "edges=" + edges + ", "
+ "pageInfo=" + pageInfo
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof VideoComments) {
VideoComments that = (VideoComments) o;
return this.__typename.equals(that.__typename)
&& ((this.edges == null) ? (that.edges == null) : this.edges.equals(that.edges))
&& this.pageInfo.equals(that.pageInfo);
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= (edges == null) ? 0 : edges.hashCode();
h *= 1000003;
h ^= pageInfo.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
final Edge.Mapper edgeFieldMapper = new Edge.Mapper();
final PageInfo.Mapper pageInfoFieldMapper = new PageInfo.Mapper();
@Override
public VideoComments map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final List edges = reader.readList($responseFields[1], new ResponseReader.ListReader() {
@Override
public Edge read(ResponseReader.ListItemReader listItemReader) {
return listItemReader.readObject(new ResponseReader.ObjectReader() {
@Override
public Edge read(ResponseReader reader) {
return edgeFieldMapper.map(reader);
}
});
}
});
final PageInfo pageInfo = reader.readObject($responseFields[2], new ResponseReader.ObjectReader() {
@Override
public PageInfo read(ResponseReader reader) {
return pageInfoFieldMapper.map(reader);
}
});
return new VideoComments(__typename, edges, pageInfo);
}
}
}
/**
* Video comment edge with cursor and the comment node.
*/
public static class Edge {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forCustomType("cursor", "cursor", null, true, CustomType.CURSOR, Collections.emptyList()),
ResponseField.forObject("node", "node", null, true, Collections.emptyList())
};
final @NotNull String __typename;
final @Nullable Object cursor;
final @Nullable Node node;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Edge(@NotNull String __typename, @Nullable Object cursor, @Nullable Node node) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.cursor = cursor;
this.node = node;
}
public @NotNull String __typename() {
return this.__typename;
}
public @Nullable Object cursor() {
return this.cursor;
}
public @Nullable Node node() {
return this.node;
}
@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], cursor);
writer.writeObject($responseFields[2], node != null ? node.marshaller() : null);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Edge{"
+ "__typename=" + __typename + ", "
+ "cursor=" + cursor + ", "
+ "node=" + node
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Edge) {
Edge that = (Edge) o;
return this.__typename.equals(that.__typename)
&& ((this.cursor == null) ? (that.cursor == null) : this.cursor.equals(that.cursor))
&& ((this.node == null) ? (that.node == null) : this.node.equals(that.node));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= (cursor == null) ? 0 : cursor.hashCode();
h *= 1000003;
h ^= (node == null) ? 0 : node.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
final Node.Mapper nodeFieldMapper = new Node.Mapper();
@Override
public Edge map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final Object cursor = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[1]);
final Node node = reader.readObject($responseFields[2], new ResponseReader.ObjectReader() {
@Override
public Node read(ResponseReader reader) {
return nodeFieldMapper.map(reader);
}
});
return new Edge(__typename, cursor, node);
}
}
}
/**
* Comment on a video.
*/
public static class Node {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forObject("commenter", "commenter", null, true, Collections.emptyList()),
ResponseField.forInt("contentOffsetSeconds", "contentOffsetSeconds", null, false, Collections.emptyList()),
ResponseField.forCustomType("createdAt", "createdAt", null, false, CustomType.TIME, Collections.emptyList()),
ResponseField.forCustomType("id", "id", null, false, CustomType.ID, Collections.emptyList()),
ResponseField.forObject("message", "message", null, true, Collections.emptyList()),
ResponseField.forString("source", "source", null, false, Collections.emptyList()),
ResponseField.forString("state", "state", null, false, Collections.emptyList()),
ResponseField.forCustomType("updatedAt", "updatedAt", null, false, CustomType.TIME, Collections.emptyList()),
ResponseField.forObject("video", "video", null, true, Collections.emptyList())
};
final @NotNull String __typename;
final @Nullable Commenter commenter;
final int contentOffsetSeconds;
final @NotNull Object createdAt;
final @NotNull String id;
final @Nullable Message message;
final @NotNull VideoCommentSource source;
final @NotNull VideoCommentState state;
final @NotNull Object updatedAt;
final @Nullable Video video;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Node(@NotNull String __typename, @Nullable Commenter commenter, int contentOffsetSeconds,
@NotNull Object createdAt, @NotNull String id, @Nullable Message message,
@NotNull VideoCommentSource source, @NotNull VideoCommentState state,
@NotNull Object updatedAt, @Nullable Video video) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.commenter = commenter;
this.contentOffsetSeconds = contentOffsetSeconds;
this.createdAt = Utils.checkNotNull(createdAt, "createdAt == null");
this.id = Utils.checkNotNull(id, "id == null");
this.message = message;
this.source = Utils.checkNotNull(source, "source == null");
this.state = Utils.checkNotNull(state, "state == null");
this.updatedAt = Utils.checkNotNull(updatedAt, "updatedAt == null");
this.video = video;
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* Author of the comment.
*/
public @Nullable Commenter commenter() {
return this.commenter;
}
/**
* Position of the video where this comment was added.
*/
public int contentOffsetSeconds() {
return this.contentOffsetSeconds;
}
/**
* The time the comment was created.
*/
public @NotNull Object createdAt() {
return this.createdAt;
}
/**
* The comments's unique identifier.
*/
public @NotNull String id() {
return this.id;
}
/**
* The message of the comment.
*/
public @Nullable Message message() {
return this.message;
}
/**
* Where the comment originated.
*/
public @NotNull VideoCommentSource source() {
return this.source;
}
/**
* Current state of the comment.
*/
public @NotNull VideoCommentState state() {
return this.state;
}
/**
* The last time this comment was updated.
*/
public @NotNull Object updatedAt() {
return this.updatedAt;
}
/**
* The video on which this comment was added.
*/
public @Nullable Video video() {
return this.video;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeString($responseFields[0], __typename);
writer.writeObject($responseFields[1], commenter != null ? commenter.marshaller() : null);
writer.writeInt($responseFields[2], contentOffsetSeconds);
writer.writeCustom((ResponseField.CustomTypeField) $responseFields[3], createdAt);
writer.writeCustom((ResponseField.CustomTypeField) $responseFields[4], id);
writer.writeObject($responseFields[5], message != null ? message.marshaller() : null);
writer.writeString($responseFields[6], source.rawValue());
writer.writeString($responseFields[7], state.rawValue());
writer.writeCustom((ResponseField.CustomTypeField) $responseFields[8], updatedAt);
writer.writeObject($responseFields[9], video != null ? video.marshaller() : null);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Node{"
+ "__typename=" + __typename + ", "
+ "commenter=" + commenter + ", "
+ "contentOffsetSeconds=" + contentOffsetSeconds + ", "
+ "createdAt=" + createdAt + ", "
+ "id=" + id + ", "
+ "message=" + message + ", "
+ "source=" + source + ", "
+ "state=" + state + ", "
+ "updatedAt=" + updatedAt + ", "
+ "video=" + video
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Node) {
Node that = (Node) o;
return this.__typename.equals(that.__typename)
&& ((this.commenter == null) ? (that.commenter == null) : this.commenter.equals(that.commenter))
&& this.contentOffsetSeconds == that.contentOffsetSeconds
&& this.createdAt.equals(that.createdAt)
&& this.id.equals(that.id)
&& ((this.message == null) ? (that.message == null) : this.message.equals(that.message))
&& this.source.equals(that.source)
&& this.state.equals(that.state)
&& this.updatedAt.equals(that.updatedAt)
&& ((this.video == null) ? (that.video == null) : this.video.equals(that.video));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= (commenter == null) ? 0 : commenter.hashCode();
h *= 1000003;
h ^= contentOffsetSeconds;
h *= 1000003;
h ^= createdAt.hashCode();
h *= 1000003;
h ^= id.hashCode();
h *= 1000003;
h ^= (message == null) ? 0 : message.hashCode();
h *= 1000003;
h ^= source.hashCode();
h *= 1000003;
h ^= state.hashCode();
h *= 1000003;
h ^= updatedAt.hashCode();
h *= 1000003;
h ^= (video == null) ? 0 : video.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
final Commenter.Mapper commenterFieldMapper = new Commenter.Mapper();
final Message.Mapper messageFieldMapper = new Message.Mapper();
final Video.Mapper videoFieldMapper = new Video.Mapper();
@Override
public Node map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final Commenter commenter = reader.readObject($responseFields[1], new ResponseReader.ObjectReader() {
@Override
public Commenter read(ResponseReader reader) {
return commenterFieldMapper.map(reader);
}
});
final int contentOffsetSeconds = reader.readInt($responseFields[2]);
final Object createdAt = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[3]);
final String id = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[4]);
final Message message = reader.readObject($responseFields[5], new ResponseReader.ObjectReader() {
@Override
public Message read(ResponseReader reader) {
return messageFieldMapper.map(reader);
}
});
final String sourceStr = reader.readString($responseFields[6]);
final VideoCommentSource source;
if (sourceStr != null) {
source = VideoCommentSource.safeValueOf(sourceStr);
} else {
source = null;
}
final String stateStr = reader.readString($responseFields[7]);
final VideoCommentState state;
if (stateStr != null) {
state = VideoCommentState.safeValueOf(stateStr);
} else {
state = null;
}
final Object updatedAt = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[8]);
final Video video = reader.readObject($responseFields[9], new ResponseReader.ObjectReader() {
@Override
public Video read(ResponseReader reader) {
return videoFieldMapper.map(reader);
}
});
return new Node(__typename, commenter, contentOffsetSeconds, createdAt, id, message, source, state, updatedAt, video);
}
}
}
/**
* Twitch user.
*/
public static class Commenter {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forCustomType("id", "id", null, false, CustomType.ID, Collections.emptyList()),
ResponseField.forString("login", "login", null, false, Collections.emptyList()),
ResponseField.forString("displayName", "displayName", null, false, Collections.emptyList()),
ResponseField.forString("description", "description", null, true, Collections.emptyList()),
ResponseField.forCustomType("createdAt", "createdAt", null, false, CustomType.TIME, Collections.emptyList()),
ResponseField.forCustomType("updatedAt", "updatedAt", null, true, CustomType.TIME, Collections.emptyList()),
ResponseField.forString("profileImageURL", "profileImageURL", new UnmodifiableMapBuilder(1)
.put("width", 300)
.build(), true, Collections.emptyList())
};
final @NotNull String __typename;
final @NotNull String id;
final @NotNull String login;
final @NotNull String displayName;
final @Nullable String description;
final @NotNull Object createdAt;
final @Nullable Object updatedAt;
final @Nullable String profileImageURL;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Commenter(@NotNull String __typename, @NotNull String id, @NotNull String login,
@NotNull String displayName, @Nullable String description, @NotNull Object createdAt,
@Nullable Object updatedAt, @Nullable String profileImageURL) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.id = Utils.checkNotNull(id, "id == null");
this.login = Utils.checkNotNull(login, "login == null");
this.displayName = Utils.checkNotNull(displayName, "displayName == null");
this.description = description;
this.createdAt = Utils.checkNotNull(createdAt, "createdAt == null");
this.updatedAt = updatedAt;
this.profileImageURL = profileImageURL;
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* The user's unique identifier.
*/
public @NotNull String id() {
return this.id;
}
/**
* The user's standard alphanumeric Twitch name.
*/
public @NotNull String login() {
return this.login;
}
/**
* A user-styled version of their login.
* For international users, this could be the user's login with localized characters.
*/
public @NotNull String displayName() {
return this.displayName;
}
/**
* A user-provided blurb describing themselves.
* Returns null when a description has not been set.
*/
public @Nullable String description() {
return this.description;
}
/**
* When the user created their account.
*/
public @NotNull Object createdAt() {
return this.createdAt;
}
/**
* When the user last updated their account.
* Returns null when the user's account has never been updated.
*/
public @Nullable Object updatedAt() {
return this.updatedAt;
}
/**
* A URL to the user's profile image.
* Valid widths are 28, 50, 70, 96, 150, 300, and 600.
* The image height will be the same as the given width.
*/
public @Nullable String profileImageURL() {
return this.profileImageURL;
}
@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], id);
writer.writeString($responseFields[2], login);
writer.writeString($responseFields[3], displayName);
writer.writeString($responseFields[4], description);
writer.writeCustom((ResponseField.CustomTypeField) $responseFields[5], createdAt);
writer.writeCustom((ResponseField.CustomTypeField) $responseFields[6], updatedAt);
writer.writeString($responseFields[7], profileImageURL);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Commenter{"
+ "__typename=" + __typename + ", "
+ "id=" + id + ", "
+ "login=" + login + ", "
+ "displayName=" + displayName + ", "
+ "description=" + description + ", "
+ "createdAt=" + createdAt + ", "
+ "updatedAt=" + updatedAt + ", "
+ "profileImageURL=" + profileImageURL
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Commenter) {
Commenter that = (Commenter) o;
return this.__typename.equals(that.__typename)
&& this.id.equals(that.id)
&& this.login.equals(that.login)
&& this.displayName.equals(that.displayName)
&& ((this.description == null) ? (that.description == null) : this.description.equals(that.description))
&& this.createdAt.equals(that.createdAt)
&& ((this.updatedAt == null) ? (that.updatedAt == null) : this.updatedAt.equals(that.updatedAt))
&& ((this.profileImageURL == null) ? (that.profileImageURL == null) : this.profileImageURL.equals(that.profileImageURL));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= id.hashCode();
h *= 1000003;
h ^= login.hashCode();
h *= 1000003;
h ^= displayName.hashCode();
h *= 1000003;
h ^= (description == null) ? 0 : description.hashCode();
h *= 1000003;
h ^= createdAt.hashCode();
h *= 1000003;
h ^= (updatedAt == null) ? 0 : updatedAt.hashCode();
h *= 1000003;
h ^= (profileImageURL == null) ? 0 : profileImageURL.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
@Override
public Commenter map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final String id = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[1]);
final String login = reader.readString($responseFields[2]);
final String displayName = reader.readString($responseFields[3]);
final String description = reader.readString($responseFields[4]);
final Object createdAt = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[5]);
final Object updatedAt = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[6]);
final String profileImageURL = reader.readString($responseFields[7]);
return new Commenter(__typename, id, login, displayName, description, createdAt, updatedAt, profileImageURL);
}
}
}
/**
* Represents the message of a comment.
*/
public static class Message {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forList("fragments", "fragments", null, true, Collections.emptyList()),
ResponseField.forList("userBadges", "userBadges", null, true, Collections.emptyList()),
ResponseField.forString("userColor", "userColor", null, true, Collections.emptyList())
};
final @NotNull String __typename;
final @Nullable List fragments;
final @Nullable List userBadges;
final @Nullable String userColor;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Message(@NotNull String __typename, @Nullable List fragments,
@Nullable List userBadges, @Nullable String userColor) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.fragments = fragments;
this.userBadges = userBadges;
this.userColor = userColor;
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* Parts of the message body with meta info.
*/
public @Nullable List fragments() {
return this.fragments;
}
/**
* List of badges the comment author had selected for use at the time of the comment.
*/
public @Nullable List userBadges() {
return this.userBadges;
}
/**
* Text color preferences of comment's author.
*/
public @Nullable String userColor() {
return this.userColor;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeString($responseFields[0], __typename);
writer.writeList($responseFields[1], fragments, new ResponseWriter.ListWriter() {
@Override
public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
for (Object item : items) {
listItemWriter.writeObject(((Fragment) item).marshaller());
}
}
});
writer.writeList($responseFields[2], userBadges, new ResponseWriter.ListWriter() {
@Override
public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
for (Object item : items) {
listItemWriter.writeObject(((UserBadge) item).marshaller());
}
}
});
writer.writeString($responseFields[3], userColor);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Message{"
+ "__typename=" + __typename + ", "
+ "fragments=" + fragments + ", "
+ "userBadges=" + userBadges + ", "
+ "userColor=" + userColor
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Message) {
Message that = (Message) o;
return this.__typename.equals(that.__typename)
&& ((this.fragments == null) ? (that.fragments == null) : this.fragments.equals(that.fragments))
&& ((this.userBadges == null) ? (that.userBadges == null) : this.userBadges.equals(that.userBadges))
&& ((this.userColor == null) ? (that.userColor == null) : this.userColor.equals(that.userColor));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= (fragments == null) ? 0 : fragments.hashCode();
h *= 1000003;
h ^= (userBadges == null) ? 0 : userBadges.hashCode();
h *= 1000003;
h ^= (userColor == null) ? 0 : userColor.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
final Fragment.Mapper fragmentFieldMapper = new Fragment.Mapper();
final UserBadge.Mapper userBadgeFieldMapper = new UserBadge.Mapper();
@Override
public Message map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final List fragments = reader.readList($responseFields[1], new ResponseReader.ListReader() {
@Override
public Fragment read(ResponseReader.ListItemReader listItemReader) {
return listItemReader.readObject(new ResponseReader.ObjectReader() {
@Override
public Fragment read(ResponseReader reader) {
return fragmentFieldMapper.map(reader);
}
});
}
});
final List userBadges = reader.readList($responseFields[2], new ResponseReader.ListReader() {
@Override
public UserBadge read(ResponseReader.ListItemReader listItemReader) {
return listItemReader.readObject(new ResponseReader.ObjectReader() {
@Override
public UserBadge read(ResponseReader reader) {
return userBadgeFieldMapper.map(reader);
}
});
}
});
final String userColor = reader.readString($responseFields[3]);
return new Message(__typename, fragments, userBadges, userColor);
}
}
}
/**
* Represents a part of the message body with meta info.
*/
public static class Fragment {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forObject("emote", "emote", null, true, Collections.emptyList()),
ResponseField.forObject("mention", "mention", null, true, Collections.emptyList()),
ResponseField.forString("text", "text", null, false, Collections.emptyList())
};
final @NotNull String __typename;
final @Nullable Emote emote;
final @Nullable Mention mention;
final @NotNull String text;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Fragment(@NotNull String __typename, @Nullable Emote emote, @Nullable Mention mention,
@NotNull String text) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.emote = emote;
this.mention = mention;
this.text = Utils.checkNotNull(text, "text == null");
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* Embedded emote info.
*/
public @Nullable Emote emote() {
return this.emote;
}
/**
* User which was mentioned.
*/
public @Nullable Mention mention() {
return this.mention;
}
/**
* Raw text of the comment.
*/
public @NotNull String text() {
return this.text;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeString($responseFields[0], __typename);
writer.writeObject($responseFields[1], emote != null ? emote.marshaller() : null);
writer.writeObject($responseFields[2], mention != null ? mention.marshaller() : null);
writer.writeString($responseFields[3], text);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Fragment{"
+ "__typename=" + __typename + ", "
+ "emote=" + emote + ", "
+ "mention=" + mention + ", "
+ "text=" + text
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Fragment) {
Fragment that = (Fragment) o;
return this.__typename.equals(that.__typename)
&& ((this.emote == null) ? (that.emote == null) : this.emote.equals(that.emote))
&& ((this.mention == null) ? (that.mention == null) : this.mention.equals(that.mention))
&& this.text.equals(that.text);
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= (emote == null) ? 0 : emote.hashCode();
h *= 1000003;
h ^= (mention == null) ? 0 : mention.hashCode();
h *= 1000003;
h ^= text.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
final Emote.Mapper emoteFieldMapper = new Emote.Mapper();
final Mention.Mapper mentionFieldMapper = new Mention.Mapper();
@Override
public Fragment map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final Emote emote = reader.readObject($responseFields[1], new ResponseReader.ObjectReader() {
@Override
public Emote read(ResponseReader reader) {
return emoteFieldMapper.map(reader);
}
});
final Mention mention = reader.readObject($responseFields[2], new ResponseReader.ObjectReader() {
@Override
public Mention read(ResponseReader reader) {
return mentionFieldMapper.map(reader);
}
});
final String text = reader.readString($responseFields[3]);
return new Fragment(__typename, emote, mention, text);
}
}
}
/**
* EmbeddedEmote is an encoding format used to describe an emote embedded in a string of text.
*
* Example:
* body = "hey KappaHD"
* from = 4
* to = 10
*
* "KappaHD" will be replaced with the KappaHD emote image.
*/
public static class Emote {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forCustomType("emoteID", "emoteID", null, true, CustomType.ID, Collections.emptyList()),
ResponseField.forInt("from", "from", null, true, Collections.emptyList()),
ResponseField.forCustomType("id", "id", null, true, CustomType.ID, Collections.emptyList()),
ResponseField.forCustomType("setID", "setID", null, true, CustomType.ID, Collections.emptyList()),
ResponseField.forInt("to", "to", null, true, Collections.emptyList())
};
final @NotNull String __typename;
final @Nullable String emoteID;
final @Nullable Integer from;
final @Nullable String id;
final @Nullable String setID;
final @Nullable Integer to;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Emote(@NotNull String __typename, @Nullable String emoteID, @Nullable Integer from,
@Nullable String id, @Nullable String setID, @Nullable Integer to) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.emoteID = emoteID;
this.from = from;
this.id = id;
this.setID = setID;
this.to = to;
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* The emote's identifier, for example "115847" -> KappaHD.
*/
public @Nullable String emoteID() {
return this.emoteID;
}
/**
* from is the index of the string where replacement starts.
*/
public @Nullable Integer from() {
return this.from;
}
public @Nullable String id() {
return this.id;
}
/**
* setID is the identifier of the set this emote is in.
*/
public @Nullable String setID() {
return this.setID;
}
/**
* to is the index of the string where replacement ends.
*/
public @Nullable Integer to() {
return this.to;
}
@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], emoteID);
writer.writeInt($responseFields[2], from);
writer.writeCustom((ResponseField.CustomTypeField) $responseFields[3], id);
writer.writeCustom((ResponseField.CustomTypeField) $responseFields[4], setID);
writer.writeInt($responseFields[5], to);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Emote{"
+ "__typename=" + __typename + ", "
+ "emoteID=" + emoteID + ", "
+ "from=" + from + ", "
+ "id=" + id + ", "
+ "setID=" + setID + ", "
+ "to=" + to
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Emote) {
Emote that = (Emote) o;
return this.__typename.equals(that.__typename)
&& ((this.emoteID == null) ? (that.emoteID == null) : this.emoteID.equals(that.emoteID))
&& ((this.from == null) ? (that.from == null) : this.from.equals(that.from))
&& ((this.id == null) ? (that.id == null) : this.id.equals(that.id))
&& ((this.setID == null) ? (that.setID == null) : this.setID.equals(that.setID))
&& ((this.to == null) ? (that.to == null) : this.to.equals(that.to));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= (emoteID == null) ? 0 : emoteID.hashCode();
h *= 1000003;
h ^= (from == null) ? 0 : from.hashCode();
h *= 1000003;
h ^= (id == null) ? 0 : id.hashCode();
h *= 1000003;
h ^= (setID == null) ? 0 : setID.hashCode();
h *= 1000003;
h ^= (to == null) ? 0 : to.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
@Override
public Emote map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final String emoteID = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[1]);
final Integer from = reader.readInt($responseFields[2]);
final String id = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[3]);
final String setID = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[4]);
final Integer to = reader.readInt($responseFields[5]);
return new Emote(__typename, emoteID, from, id, setID, to);
}
}
}
/**
* Twitch user.
*/
public static class Mention {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forCustomType("id", "id", null, false, CustomType.ID, Collections.emptyList()),
ResponseField.forString("displayName", "displayName", null, false, Collections.emptyList()),
ResponseField.forString("login", "login", null, false, Collections.emptyList())
};
final @NotNull String __typename;
final @NotNull String id;
final @NotNull String displayName;
final @NotNull String login;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Mention(@NotNull String __typename, @NotNull String id, @NotNull String displayName,
@NotNull String login) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.id = Utils.checkNotNull(id, "id == null");
this.displayName = Utils.checkNotNull(displayName, "displayName == null");
this.login = Utils.checkNotNull(login, "login == null");
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* The user's unique identifier.
*/
public @NotNull String id() {
return this.id;
}
/**
* A user-styled version of their login.
* For international users, this could be the user's login with localized characters.
*/
public @NotNull String displayName() {
return this.displayName;
}
/**
* The user's standard alphanumeric Twitch name.
*/
public @NotNull String login() {
return this.login;
}
@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], id);
writer.writeString($responseFields[2], displayName);
writer.writeString($responseFields[3], login);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Mention{"
+ "__typename=" + __typename + ", "
+ "id=" + id + ", "
+ "displayName=" + displayName + ", "
+ "login=" + login
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Mention) {
Mention that = (Mention) o;
return this.__typename.equals(that.__typename)
&& this.id.equals(that.id)
&& this.displayName.equals(that.displayName)
&& this.login.equals(that.login);
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= id.hashCode();
h *= 1000003;
h ^= displayName.hashCode();
h *= 1000003;
h ^= login.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
@Override
public Mention map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final String id = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[1]);
final String displayName = reader.readString($responseFields[2]);
final String login = reader.readString($responseFields[3]);
return new Mention(__typename, id, displayName, login);
}
}
}
/**
* Communicates a user's status in chat.
*/
public static class UserBadge {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forString("clickURL", "clickURL", null, true, Collections.emptyList()),
ResponseField.forString("description", "description", null, false, Collections.emptyList()),
ResponseField.forCustomType("id", "id", null, false, CustomType.ID, Collections.emptyList()),
ResponseField.forString("imageURL", "imageURL", null, false, Collections.emptyList()),
ResponseField.forCustomType("setID", "setID", null, false, CustomType.ID, Collections.emptyList()),
ResponseField.forString("title", "title", null, false, Collections.emptyList()),
ResponseField.forString("version", "version", null, false, Collections.emptyList())
};
final @NotNull String __typename;
final @Nullable String clickURL;
final @NotNull String description;
final @NotNull String id;
final @NotNull String imageURL;
final @NotNull String setID;
final @NotNull String title;
final @NotNull String version;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public UserBadge(@NotNull String __typename, @Nullable String clickURL,
@NotNull String description, @NotNull String id, @NotNull String imageURL,
@NotNull String setID, @NotNull String title, @NotNull String version) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.clickURL = clickURL;
this.description = Utils.checkNotNull(description, "description == null");
this.id = Utils.checkNotNull(id, "id == null");
this.imageURL = Utils.checkNotNull(imageURL, "imageURL == null");
this.setID = Utils.checkNotNull(setID, "setID == null");
this.title = Utils.checkNotNull(title, "title == null");
this.version = Utils.checkNotNull(version, "version == null");
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* The URL to redirect to if the badge's onClickAction is VISIT_URL.
*/
public @Nullable String clickURL() {
return this.clickURL;
}
/**
* A localized, human-friendly description of the badge.
* Defaults to English if no translation exists for the requested locale.
*/
public @NotNull String description() {
return this.description;
}
/**
* The badge's unique identifier.
*/
public @NotNull String id() {
return this.id;
}
/**
* A URL to the badge's image.
*/
public @NotNull String imageURL() {
return this.imageURL;
}
/**
* The identifier of the set which this badge belongs (e.g. "subscriber").
*/
public @NotNull String setID() {
return this.setID;
}
/**
* A localized, human-friendly title for the badge.
* Defaults to English if no translation exists for the requested locale.
*/
public @NotNull String title() {
return this.title;
}
/**
* The badge's version (e.g. "1mo").
*/
public @NotNull String version() {
return this.version;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeString($responseFields[0], __typename);
writer.writeString($responseFields[1], clickURL);
writer.writeString($responseFields[2], description);
writer.writeCustom((ResponseField.CustomTypeField) $responseFields[3], id);
writer.writeString($responseFields[4], imageURL);
writer.writeCustom((ResponseField.CustomTypeField) $responseFields[5], setID);
writer.writeString($responseFields[6], title);
writer.writeString($responseFields[7], version);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "UserBadge{"
+ "__typename=" + __typename + ", "
+ "clickURL=" + clickURL + ", "
+ "description=" + description + ", "
+ "id=" + id + ", "
+ "imageURL=" + imageURL + ", "
+ "setID=" + setID + ", "
+ "title=" + title + ", "
+ "version=" + version
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof UserBadge) {
UserBadge that = (UserBadge) o;
return this.__typename.equals(that.__typename)
&& ((this.clickURL == null) ? (that.clickURL == null) : this.clickURL.equals(that.clickURL))
&& this.description.equals(that.description)
&& this.id.equals(that.id)
&& this.imageURL.equals(that.imageURL)
&& this.setID.equals(that.setID)
&& this.title.equals(that.title)
&& this.version.equals(that.version);
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= (clickURL == null) ? 0 : clickURL.hashCode();
h *= 1000003;
h ^= description.hashCode();
h *= 1000003;
h ^= id.hashCode();
h *= 1000003;
h ^= imageURL.hashCode();
h *= 1000003;
h ^= setID.hashCode();
h *= 1000003;
h ^= title.hashCode();
h *= 1000003;
h ^= version.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
@Override
public UserBadge map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final String clickURL = reader.readString($responseFields[1]);
final String description = reader.readString($responseFields[2]);
final String id = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[3]);
final String imageURL = reader.readString($responseFields[4]);
final String setID = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[5]);
final String title = reader.readString($responseFields[6]);
final String version = reader.readString($responseFields[7]);
return new UserBadge(__typename, clickURL, description, id, imageURL, setID, title, version);
}
}
}
public static class Video {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forCustomType("id", "id", null, false, CustomType.ID, Collections.emptyList())
};
final @NotNull String __typename;
final @NotNull String id;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Video(@NotNull String __typename, @NotNull String id) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.id = Utils.checkNotNull(id, "id == null");
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* The video's identifier.
*/
public @NotNull String id() {
return this.id;
}
@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], id);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Video{"
+ "__typename=" + __typename + ", "
+ "id=" + id
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Video) {
Video that = (Video) o;
return this.__typename.equals(that.__typename)
&& this.id.equals(that.id);
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= id.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
@Override
public Video map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final String id = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[1]);
return new Video(__typename, id);
}
}
}
/**
* PageInfo is a special field which contains information about the page,
* specifically the cursors which the page starts and ends, and whether or
* not the client can forward-paginate or backward-paginate.
*
* This is part of the Relay Cursor Connections Specification:
* https://facebook.github.io/relay/graphql/connections.htm.
*/
public static class PageInfo {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forBoolean("hasNextPage", "hasNextPage", null, false, Collections.emptyList()),
ResponseField.forBoolean("hasPreviousPage", "hasPreviousPage", null, false, Collections.emptyList())
};
final @NotNull String __typename;
final boolean hasNextPage;
final boolean hasPreviousPage;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public PageInfo(@NotNull String __typename, boolean hasNextPage, boolean hasPreviousPage) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.hasNextPage = hasNextPage;
this.hasPreviousPage = hasPreviousPage;
}
public @NotNull String __typename() {
return this.__typename;
}
public boolean hasNextPage() {
return this.hasNextPage;
}
public boolean hasPreviousPage() {
return this.hasPreviousPage;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeString($responseFields[0], __typename);
writer.writeBoolean($responseFields[1], hasNextPage);
writer.writeBoolean($responseFields[2], hasPreviousPage);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "PageInfo{"
+ "__typename=" + __typename + ", "
+ "hasNextPage=" + hasNextPage + ", "
+ "hasPreviousPage=" + hasPreviousPage
+ "}";
}
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.hasNextPage == that.hasNextPage
&& this.hasPreviousPage == that.hasPreviousPage;
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= Boolean.valueOf(hasNextPage).hashCode();
h *= 1000003;
h ^= Boolean.valueOf(hasPreviousPage).hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
@Override
public PageInfo map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final boolean hasNextPage = reader.readBoolean($responseFields[1]);
final boolean hasPreviousPage = reader.readBoolean($responseFields[2]);
return new PageInfo(__typename, hasNextPage, hasPreviousPage);
}
}
}
}