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.FetchModCommentsQuery 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 java.io.IOException;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.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 FetchModCommentsQuery implements Query {
public static final String OPERATION_ID = "e22298d9542b0c95875eb38c58bf6ba6f0aa031280e82076e80c52b1a7d57337";
public static final String QUERY_DOCUMENT = QueryDocumentMinifier.minify(
"query fetchModComments($channelID: ID!, $targetID: ID!, $after: Cursor) {\n"
+ " user(id: $channelID) {\n"
+ " __typename\n"
+ " modLogs {\n"
+ " __typename\n"
+ " comments(targetID: $targetID, after: $after) {\n"
+ " __typename\n"
+ " edges {\n"
+ " __typename\n"
+ " node {\n"
+ " __typename\n"
+ " author {\n"
+ " __typename\n"
+ " id\n"
+ " login\n"
+ " displayName\n"
+ " }\n"
+ " channel {\n"
+ " __typename\n"
+ " id\n"
+ " }\n"
+ " details {\n"
+ " __typename\n"
+ " text\n"
+ " }\n"
+ " id\n"
+ " target {\n"
+ " __typename\n"
+ " id\n"
+ " login\n"
+ " displayName\n"
+ " }\n"
+ " timestamp\n"
+ " }\n"
+ " cursor\n"
+ " }\n"
+ " }\n"
+ " }\n"
+ " }\n"
+ "}"
);
public static final OperationName OPERATION_NAME = new OperationName() {
@Override
public String name() {
return "fetchModComments";
}
};
private final FetchModCommentsQuery.Variables variables;
public FetchModCommentsQuery(@NotNull String channelID, @NotNull String targetID,
@NotNull Input after) {
Utils.checkNotNull(channelID, "channelID == null");
Utils.checkNotNull(targetID, "targetID == null");
Utils.checkNotNull(after, "after == null");
variables = new FetchModCommentsQuery.Variables(channelID, targetID, after);
}
@Override
public String operationId() {
return OPERATION_ID;
}
@Override
public String queryDocument() {
return QUERY_DOCUMENT;
}
@Override
public FetchModCommentsQuery.Data wrapData(FetchModCommentsQuery.Data data) {
return data;
}
@Override
public FetchModCommentsQuery.Variables variables() {
return variables;
}
@Override
public ResponseFieldMapper responseFieldMapper() {
return new Data.Mapper();
}
public static Builder builder() {
return new Builder();
}
@Override
public OperationName name() {
return OPERATION_NAME;
}
@Override
@NotNull
public Response parse(@NotNull final BufferedSource source,
@NotNull final ScalarTypeAdapters scalarTypeAdapters) throws IOException {
return SimpleOperationResponseParser.parse(source, this, scalarTypeAdapters);
}
@Override
@NotNull
public Response parse(@NotNull final ByteString byteString,
@NotNull final ScalarTypeAdapters scalarTypeAdapters) throws IOException {
return parse(new Buffer().write(byteString), scalarTypeAdapters);
}
@Override
@NotNull
public Response parse(@NotNull final BufferedSource source) throws
IOException {
return parse(source, ScalarTypeAdapters.DEFAULT);
}
@Override
@NotNull
public Response parse(@NotNull final ByteString byteString) throws
IOException {
return parse(byteString, ScalarTypeAdapters.DEFAULT);
}
@Override
@NotNull
public ByteString composeRequestBody(@NotNull final ScalarTypeAdapters scalarTypeAdapters) {
return OperationRequestBodyComposer.compose(this, false, true, scalarTypeAdapters);
}
@NotNull
@Override
public ByteString composeRequestBody() {
return OperationRequestBodyComposer.compose(this, false, true, ScalarTypeAdapters.DEFAULT);
}
@Override
@NotNull
public ByteString composeRequestBody(final boolean autoPersistQueries,
final boolean withQueryDocument, @NotNull final ScalarTypeAdapters scalarTypeAdapters) {
return OperationRequestBodyComposer.compose(this, autoPersistQueries, withQueryDocument, scalarTypeAdapters);
}
public static final class Builder {
private @NotNull String channelID;
private @NotNull String targetID;
private Input after = Input.absent();
Builder() {
}
public Builder channelID(@NotNull String channelID) {
this.channelID = channelID;
return this;
}
public Builder targetID(@NotNull String targetID) {
this.targetID = targetID;
return this;
}
public Builder after(@Nullable Object after) {
this.after = Input.fromNullable(after);
return this;
}
public Builder afterInput(@NotNull Input after) {
this.after = Utils.checkNotNull(after, "after == null");
return this;
}
public FetchModCommentsQuery build() {
Utils.checkNotNull(channelID, "channelID == null");
Utils.checkNotNull(targetID, "targetID == null");
return new FetchModCommentsQuery(channelID, targetID, after);
}
}
public static final class Variables extends Operation.Variables {
private final @NotNull String channelID;
private final @NotNull String targetID;
private final Input after;
private final transient Map valueMap = new LinkedHashMap<>();
Variables(@NotNull String channelID, @NotNull String targetID, Input after) {
this.channelID = channelID;
this.targetID = targetID;
this.after = after;
this.valueMap.put("channelID", channelID);
this.valueMap.put("targetID", targetID);
if (after.defined) {
this.valueMap.put("after", after.value);
}
}
public @NotNull String channelID() {
return channelID;
}
public @NotNull String targetID() {
return targetID;
}
public Input after() {
return after;
}
@Override
public Map valueMap() {
return Collections.unmodifiableMap(valueMap);
}
@Override
public InputFieldMarshaller marshaller() {
return new InputFieldMarshaller() {
@Override
public void marshal(InputFieldWriter writer) throws IOException {
writer.writeCustom("channelID", com.github.twitch4j.graphql.internal.type.CustomType.ID, channelID);
writer.writeCustom("targetID", com.github.twitch4j.graphql.internal.type.CustomType.ID, targetID);
if (after.defined) {
writer.writeCustom("after", com.github.twitch4j.graphql.internal.type.CustomType.CURSOR, after.value != null ? after.value : null);
}
}
};
}
}
/**
* Data from the response after executing this GraphQL operation
*/
public static class Data implements Operation.Data {
static final ResponseField[] $responseFields = {
ResponseField.forObject("user", "user", new UnmodifiableMapBuilder(1)
.put("id", new UnmodifiableMapBuilder(2)
.put("kind", "Variable")
.put("variableName", "channelID")
.build())
.build(), true, Collections.emptyList())
};
final @Nullable User user;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Data(@Nullable User user) {
this.user = user;
}
/**
* Get a user by their ID or login.
* If no ID or login is provided, null is returned.
* Lookup type can tell the resolver to include all users (inclusing deleted and
* suspended accounts) on the lookup, defaults to only retrieve active users.
*/
public @Nullable User user() {
return this.user;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeObject($responseFields[0], user != null ? user.marshaller() : null);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Data{"
+ "user=" + user
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Data) {
Data that = (Data) o;
return ((this.user == null) ? (that.user == null) : this.user.equals(that.user));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= (user == null) ? 0 : user.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
final User.Mapper userFieldMapper = new User.Mapper();
@Override
public Data map(ResponseReader reader) {
final User user = reader.readObject($responseFields[0], new ResponseReader.ObjectReader() {
@Override
public User read(ResponseReader reader) {
return userFieldMapper.map(reader);
}
});
return new Data(user);
}
}
}
/**
* Twitch user.
*/
public static class User {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forObject("modLogs", "modLogs", null, true, Collections.emptyList())
};
final @NotNull String __typename;
final @Nullable ModLogs modLogs;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public User(@NotNull String __typename, @Nullable ModLogs modLogs) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.modLogs = modLogs;
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* Returns a resolver to query different subsets of the moderation logs.
*/
public @Nullable ModLogs modLogs() {
return this.modLogs;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeString($responseFields[0], __typename);
writer.writeObject($responseFields[1], modLogs != null ? modLogs.marshaller() : null);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "User{"
+ "__typename=" + __typename + ", "
+ "modLogs=" + modLogs
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof User) {
User that = (User) o;
return this.__typename.equals(that.__typename)
&& ((this.modLogs == null) ? (that.modLogs == null) : this.modLogs.equals(that.modLogs));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= (modLogs == null) ? 0 : modLogs.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
final ModLogs.Mapper modLogsFieldMapper = new ModLogs.Mapper();
@Override
public User map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final ModLogs modLogs = reader.readObject($responseFields[1], new ResponseReader.ObjectReader() {
@Override
public ModLogs read(ResponseReader reader) {
return modLogsFieldMapper.map(reader);
}
});
return new User(__typename, modLogs);
}
}
}
/**
* An interface to query subsets of the moderation logs information for a given channel.
*/
public static class ModLogs {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forObject("comments", "comments", new UnmodifiableMapBuilder(2)
.put("targetID", new UnmodifiableMapBuilder(2)
.put("kind", "Variable")
.put("variableName", "targetID")
.build())
.put("after", new UnmodifiableMapBuilder(2)
.put("kind", "Variable")
.put("variableName", "after")
.build())
.build(), true, Collections.emptyList())
};
final @NotNull String __typename;
final @Nullable Comments comments;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public ModLogs(@NotNull String __typename, @Nullable Comments comments) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.comments = comments;
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* The comments left by moderators on a specified user on the given channel.
*/
public @Nullable Comments comments() {
return this.comments;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeString($responseFields[0], __typename);
writer.writeObject($responseFields[1], comments != null ? comments.marshaller() : null);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "ModLogs{"
+ "__typename=" + __typename + ", "
+ "comments=" + comments
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof ModLogs) {
ModLogs that = (ModLogs) o;
return this.__typename.equals(that.__typename)
&& ((this.comments == null) ? (that.comments == null) : this.comments.equals(that.comments));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= (comments == null) ? 0 : comments.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
final Comments.Mapper commentsFieldMapper = new Comments.Mapper();
@Override
public ModLogs map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final Comments comments = reader.readObject($responseFields[1], new ResponseReader.ObjectReader() {
@Override
public Comments read(ResponseReader reader) {
return commentsFieldMapper.map(reader);
}
});
return new ModLogs(__typename, comments);
}
}
}
/**
* Paginated list of moderator comments on a user in a channel.
*/
public static class Comments {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forList("edges", "edges", null, true, Collections.emptyList())
};
final @NotNull String __typename;
final @Nullable List edges;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Comments(@NotNull String __typename, @Nullable List edges) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.edges = edges;
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* The elements of the list.
*/
public @Nullable List edges() {
return this.edges;
}
@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());
}
}
});
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Comments{"
+ "__typename=" + __typename + ", "
+ "edges=" + edges
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Comments) {
Comments that = (Comments) o;
return this.__typename.equals(that.__typename)
&& ((this.edges == null) ? (that.edges == null) : this.edges.equals(that.edges));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= (edges == null) ? 0 : edges.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
final Edge.Mapper edgeFieldMapper = new Edge.Mapper();
@Override
public Comments 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);
}
});
}
});
return new Comments(__typename, edges);
}
}
}
/**
* Element in a list of moderator comments on a user in a channel.
*/
public static class Edge {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forObject("node", "node", null, true, Collections.emptyList()),
ResponseField.forCustomType("cursor", "cursor", null, false, CustomType.CURSOR, Collections.emptyList())
};
final @NotNull String __typename;
final @Nullable Node node;
final @NotNull Object cursor;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Edge(@NotNull String __typename, @Nullable Node node, @NotNull Object cursor) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.node = node;
this.cursor = Utils.checkNotNull(cursor, "cursor == null");
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* A moderator comment on a user in a channel.
*/
public @Nullable Node node() {
return this.node;
}
/**
* Opaque cursor describing this edge's position in the paginated list.
*/
public @NotNull Object cursor() {
return this.cursor;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeString($responseFields[0], __typename);
writer.writeObject($responseFields[1], node != null ? node.marshaller() : null);
writer.writeCustom((ResponseField.CustomTypeField) $responseFields[2], cursor);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Edge{"
+ "__typename=" + __typename + ", "
+ "node=" + node + ", "
+ "cursor=" + cursor
+ "}";
}
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.node == null) ? (that.node == null) : this.node.equals(that.node))
&& this.cursor.equals(that.cursor);
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= (node == null) ? 0 : node.hashCode();
h *= 1000003;
h ^= cursor.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 Node node = reader.readObject($responseFields[1], new ResponseReader.ObjectReader() {
@Override
public Node read(ResponseReader reader) {
return nodeFieldMapper.map(reader);
}
});
final Object cursor = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[2]);
return new Edge(__typename, node, cursor);
}
}
}
/**
* ModLogsCommentsEntry defines an entry of a user's moderation history on a channel.
*/
public static class Node {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forObject("author", "author", null, true, Collections.emptyList()),
ResponseField.forObject("channel", "channel", null, true, Collections.emptyList()),
ResponseField.forObject("details", "details", null, true, Collections.emptyList()),
ResponseField.forCustomType("id", "id", null, false, CustomType.ID, Collections.emptyList()),
ResponseField.forObject("target", "target", null, true, Collections.emptyList()),
ResponseField.forCustomType("timestamp", "timestamp", null, false, CustomType.TIME, Collections.emptyList())
};
final @NotNull String __typename;
final @Nullable Author author;
final @Nullable Channel channel;
final @Nullable Details details;
final @NotNull String id;
final @Nullable Target target;
final @NotNull Object timestamp;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Node(@NotNull String __typename, @Nullable Author author, @Nullable Channel channel,
@Nullable Details details, @NotNull String id, @Nullable Target target,
@NotNull Object timestamp) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.author = author;
this.channel = channel;
this.details = details;
this.id = Utils.checkNotNull(id, "id == null");
this.target = target;
this.timestamp = Utils.checkNotNull(timestamp, "timestamp == null");
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* Author is the moderator that created the comment.
*/
public @Nullable Author author() {
return this.author;
}
/**
* Channel is where the moderator comment was created.
*/
public @Nullable Channel channel() {
return this.channel;
}
/**
* Details about the moderator comment.
*/
public @Nullable Details details() {
return this.details;
}
/**
* UUID of the moderator comment.
*/
public @NotNull String id() {
return this.id;
}
/**
* Target is the target user of the moderator comment.
*/
public @Nullable Target target() {
return this.target;
}
/**
* Timestamp when comment was created.
*/
public @NotNull Object timestamp() {
return this.timestamp;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeString($responseFields[0], __typename);
writer.writeObject($responseFields[1], author != null ? author.marshaller() : null);
writer.writeObject($responseFields[2], channel != null ? channel.marshaller() : null);
writer.writeObject($responseFields[3], details != null ? details.marshaller() : null);
writer.writeCustom((ResponseField.CustomTypeField) $responseFields[4], id);
writer.writeObject($responseFields[5], target != null ? target.marshaller() : null);
writer.writeCustom((ResponseField.CustomTypeField) $responseFields[6], timestamp);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Node{"
+ "__typename=" + __typename + ", "
+ "author=" + author + ", "
+ "channel=" + channel + ", "
+ "details=" + details + ", "
+ "id=" + id + ", "
+ "target=" + target + ", "
+ "timestamp=" + timestamp
+ "}";
}
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.author == null) ? (that.author == null) : this.author.equals(that.author))
&& ((this.channel == null) ? (that.channel == null) : this.channel.equals(that.channel))
&& ((this.details == null) ? (that.details == null) : this.details.equals(that.details))
&& this.id.equals(that.id)
&& ((this.target == null) ? (that.target == null) : this.target.equals(that.target))
&& this.timestamp.equals(that.timestamp);
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= (author == null) ? 0 : author.hashCode();
h *= 1000003;
h ^= (channel == null) ? 0 : channel.hashCode();
h *= 1000003;
h ^= (details == null) ? 0 : details.hashCode();
h *= 1000003;
h ^= id.hashCode();
h *= 1000003;
h ^= (target == null) ? 0 : target.hashCode();
h *= 1000003;
h ^= timestamp.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
final Author.Mapper authorFieldMapper = new Author.Mapper();
final Channel.Mapper channelFieldMapper = new Channel.Mapper();
final Details.Mapper detailsFieldMapper = new Details.Mapper();
final Target.Mapper targetFieldMapper = new Target.Mapper();
@Override
public Node map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final Author author = reader.readObject($responseFields[1], new ResponseReader.ObjectReader() {
@Override
public Author read(ResponseReader reader) {
return authorFieldMapper.map(reader);
}
});
final Channel channel = reader.readObject($responseFields[2], new ResponseReader.ObjectReader() {
@Override
public Channel read(ResponseReader reader) {
return channelFieldMapper.map(reader);
}
});
final Details details = reader.readObject($responseFields[3], new ResponseReader.ObjectReader() {
@Override
public Details read(ResponseReader reader) {
return detailsFieldMapper.map(reader);
}
});
final String id = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[4]);
final Target target = reader.readObject($responseFields[5], new ResponseReader.ObjectReader() {
@Override
public Target read(ResponseReader reader) {
return targetFieldMapper.map(reader);
}
});
final Object timestamp = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[6]);
return new Node(__typename, author, channel, details, id, target, timestamp);
}
}
}
/**
* Twitch user.
*/
public static class Author {
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())
};
final @NotNull String __typename;
final @NotNull String id;
final @NotNull String login;
final @NotNull String displayName;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Author(@NotNull String __typename, @NotNull String id, @NotNull String login,
@NotNull String displayName) {
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");
}
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;
}
@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);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Author{"
+ "__typename=" + __typename + ", "
+ "id=" + id + ", "
+ "login=" + login + ", "
+ "displayName=" + displayName
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Author) {
Author that = (Author) o;
return this.__typename.equals(that.__typename)
&& this.id.equals(that.id)
&& this.login.equals(that.login)
&& this.displayName.equals(that.displayName);
}
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();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
@Override
public Author 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]);
return new Author(__typename, id, login, displayName);
}
}
}
/**
* Twitch user.
*/
public static class Channel {
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 Channel(@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 user's unique 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 = "Channel{"
+ "__typename=" + __typename + ", "
+ "id=" + id
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Channel) {
Channel that = (Channel) 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 Channel map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final String id = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[1]);
return new Channel(__typename, id);
}
}
}
/**
* ModLogsCommentDetails contains the details of a moderator comment.
*/
public static class Details {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forString("text", "text", null, true, Collections.emptyList())
};
final @NotNull String __typename;
final @Nullable String text;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Details(@NotNull String __typename, @Nullable String text) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.text = text;
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* Body of the comment.
*/
public @Nullable 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.writeString($responseFields[1], text);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Details{"
+ "__typename=" + __typename + ", "
+ "text=" + text
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Details) {
Details that = (Details) o;
return this.__typename.equals(that.__typename)
&& ((this.text == null) ? (that.text == null) : this.text.equals(that.text));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= (text == null) ? 0 : text.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
@Override
public Details map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final String text = reader.readString($responseFields[1]);
return new Details(__typename, text);
}
}
}
/**
* Twitch user.
*/
public static class Target {
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())
};
final @NotNull String __typename;
final @NotNull String id;
final @NotNull String login;
final @NotNull String displayName;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Target(@NotNull String __typename, @NotNull String id, @NotNull String login,
@NotNull String displayName) {
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");
}
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;
}
@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);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Target{"
+ "__typename=" + __typename + ", "
+ "id=" + id + ", "
+ "login=" + login + ", "
+ "displayName=" + displayName
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Target) {
Target that = (Target) o;
return this.__typename.equals(that.__typename)
&& this.id.equals(that.id)
&& this.login.equals(that.login)
&& this.displayName.equals(that.displayName);
}
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();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
@Override
public Target 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]);
return new Target(__typename, id, login, displayName);
}
}
}
}