com.github.twitch4j.graphql.internal.FetchChattersQuery Maven / Gradle / Ivy
The newest version!
// AUTO-GENERATED FILE. DO NOT MODIFY.
//
// This class was automatically generated by Apollo GraphQL plugin from the GraphQL queries it found.
// It should not be modified by hand.
//
package com.github.twitch4j.graphql.internal;
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 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 FetchChattersQuery implements Query {
public static final String OPERATION_ID = "ee5932887a0e559ea595e6212033265b2ca9c656b925d37d47acc72050b5ee5d";
public static final String QUERY_DOCUMENT = QueryDocumentMinifier.minify(
"query fetchChatters($login: String!) {\n"
+ " channel(name: $login) {\n"
+ " __typename\n"
+ " chatters {\n"
+ " __typename\n"
+ " broadcasters {\n"
+ " __typename\n"
+ " login\n"
+ " }\n"
+ " staff {\n"
+ " __typename\n"
+ " login\n"
+ " }\n"
+ " vips {\n"
+ " __typename\n"
+ " login\n"
+ " }\n"
+ " moderators {\n"
+ " __typename\n"
+ " login\n"
+ " }\n"
+ " viewers {\n"
+ " __typename\n"
+ " login\n"
+ " }\n"
+ " count\n"
+ " }\n"
+ " }\n"
+ "}"
);
public static final OperationName OPERATION_NAME = new OperationName() {
@Override
public String name() {
return "fetchChatters";
}
};
private final FetchChattersQuery.Variables variables;
public FetchChattersQuery(@NotNull String login) {
Utils.checkNotNull(login, "login == null");
variables = new FetchChattersQuery.Variables(login);
}
@Override
public String operationId() {
return OPERATION_ID;
}
@Override
public String queryDocument() {
return QUERY_DOCUMENT;
}
@Override
public FetchChattersQuery.Data wrapData(FetchChattersQuery.Data data) {
return data;
}
@Override
public FetchChattersQuery.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 login;
Builder() {
}
public Builder login(@NotNull String login) {
this.login = login;
return this;
}
public FetchChattersQuery build() {
Utils.checkNotNull(login, "login == null");
return new FetchChattersQuery(login);
}
}
public static final class Variables extends Operation.Variables {
private final @NotNull String login;
private final transient Map valueMap = new LinkedHashMap<>();
Variables(@NotNull String login) {
this.login = login;
this.valueMap.put("login", login);
}
public @NotNull String login() {
return login;
}
@Override
public Map valueMap() {
return Collections.unmodifiableMap(valueMap);
}
@Override
public InputFieldMarshaller marshaller() {
return new InputFieldMarshaller() {
@Override
public void marshal(InputFieldWriter writer) throws IOException {
writer.writeString("login", login);
}
};
}
}
/**
* Data from the response after executing this GraphQL operation
*/
public static class Data implements Operation.Data {
static final ResponseField[] $responseFields = {
ResponseField.forObject("channel", "channel", new UnmodifiableMapBuilder(1)
.put("name", new UnmodifiableMapBuilder(2)
.put("kind", "Variable")
.put("variableName", "login")
.build())
.build(), true, Collections.emptyList())
};
final @Nullable Channel channel;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Data(@Nullable Channel channel) {
this.channel = channel;
}
/**
* Get a channel by ID or name.
*/
public @Nullable Channel channel() {
return this.channel;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeObject($responseFields[0], channel != null ? channel.marshaller() : null);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Data{"
+ "channel=" + channel
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Data) {
Data that = (Data) o;
return ((this.channel == null) ? (that.channel == null) : this.channel.equals(that.channel));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= (channel == null) ? 0 : channel.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
final Channel.Mapper channelFieldMapper = new Channel.Mapper();
@Override
public Data map(ResponseReader reader) {
final Channel channel = reader.readObject($responseFields[0], new ResponseReader.ObjectReader() {
@Override
public Channel read(ResponseReader reader) {
return channelFieldMapper.map(reader);
}
});
return new Data(channel);
}
}
}
/**
* A User's place on Twitch.
*/
public static class Channel {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forObject("chatters", "chatters", null, true, Collections.emptyList())
};
final @NotNull String __typename;
final @Nullable Chatters chatters;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Channel(@NotNull String __typename, @Nullable Chatters chatters) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.chatters = chatters;
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* Get the chatters on this channel.
*/
public @Nullable Chatters chatters() {
return this.chatters;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeString($responseFields[0], __typename);
writer.writeObject($responseFields[1], chatters != null ? chatters.marshaller() : null);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Channel{"
+ "__typename=" + __typename + ", "
+ "chatters=" + chatters
+ "}";
}
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.chatters == null) ? (that.chatters == null) : this.chatters.equals(that.chatters));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= (chatters == null) ? 0 : chatters.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
final Chatters.Mapper chattersFieldMapper = new Chatters.Mapper();
@Override
public Channel map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final Chatters chatters = reader.readObject($responseFields[1], new ResponseReader.ObjectReader() {
@Override
public Chatters read(ResponseReader reader) {
return chattersFieldMapper.map(reader);
}
});
return new Channel(__typename, chatters);
}
}
}
/**
* Information about the active chatters on a channel.
*/
public static class Chatters {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forList("broadcasters", "broadcasters", null, false, Collections.emptyList()),
ResponseField.forList("staff", "staff", null, false, Collections.emptyList()),
ResponseField.forList("vips", "vips", null, false, Collections.emptyList()),
ResponseField.forList("moderators", "moderators", null, false, Collections.emptyList()),
ResponseField.forList("viewers", "viewers", null, false, Collections.emptyList()),
ResponseField.forInt("count", "count", null, false, Collections.emptyList())
};
final @NotNull String __typename;
final @NotNull List broadcasters;
final @NotNull List staff;
final @NotNull List vips;
final @NotNull List moderators;
final @NotNull List viewers;
final int count;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Chatters(@NotNull String __typename, @NotNull List broadcasters,
@NotNull List staff, @NotNull List vips, @NotNull List moderators,
@NotNull List viewers, int count) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.broadcasters = Utils.checkNotNull(broadcasters, "broadcasters == null");
this.staff = Utils.checkNotNull(staff, "staff == null");
this.vips = Utils.checkNotNull(vips, "vips == null");
this.moderators = Utils.checkNotNull(moderators, "moderators == null");
this.viewers = Utils.checkNotNull(viewers, "viewers == null");
this.count = count;
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* List with the broadcaster.
*/
public @NotNull List broadcasters() {
return this.broadcasters;
}
/**
* List of active staff members.
*/
public @NotNull List staff() {
return this.staff;
}
/**
* List of active VIPs.
*/
public @NotNull List vips() {
return this.vips;
}
/**
* List of active moderators.
*/
public @NotNull List moderators() {
return this.moderators;
}
/**
* List of active viewers.
*/
public @NotNull List viewers() {
return this.viewers;
}
/**
* Number of active chatters.
*/
public int count() {
return this.count;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeString($responseFields[0], __typename);
writer.writeList($responseFields[1], broadcasters, new ResponseWriter.ListWriter() {
@Override
public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
for (Object item : items) {
listItemWriter.writeObject(((Broadcaster) item).marshaller());
}
}
});
writer.writeList($responseFields[2], staff, new ResponseWriter.ListWriter() {
@Override
public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
for (Object item : items) {
listItemWriter.writeObject(((Staff) item).marshaller());
}
}
});
writer.writeList($responseFields[3], vips, new ResponseWriter.ListWriter() {
@Override
public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
for (Object item : items) {
listItemWriter.writeObject(((Vip) item).marshaller());
}
}
});
writer.writeList($responseFields[4], moderators, new ResponseWriter.ListWriter() {
@Override
public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
for (Object item : items) {
listItemWriter.writeObject(((Moderator) item).marshaller());
}
}
});
writer.writeList($responseFields[5], viewers, new ResponseWriter.ListWriter() {
@Override
public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
for (Object item : items) {
listItemWriter.writeObject(((Viewer) item).marshaller());
}
}
});
writer.writeInt($responseFields[6], count);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Chatters{"
+ "__typename=" + __typename + ", "
+ "broadcasters=" + broadcasters + ", "
+ "staff=" + staff + ", "
+ "vips=" + vips + ", "
+ "moderators=" + moderators + ", "
+ "viewers=" + viewers + ", "
+ "count=" + count
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Chatters) {
Chatters that = (Chatters) o;
return this.__typename.equals(that.__typename)
&& this.broadcasters.equals(that.broadcasters)
&& this.staff.equals(that.staff)
&& this.vips.equals(that.vips)
&& this.moderators.equals(that.moderators)
&& this.viewers.equals(that.viewers)
&& this.count == that.count;
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= broadcasters.hashCode();
h *= 1000003;
h ^= staff.hashCode();
h *= 1000003;
h ^= vips.hashCode();
h *= 1000003;
h ^= moderators.hashCode();
h *= 1000003;
h ^= viewers.hashCode();
h *= 1000003;
h ^= count;
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
final Broadcaster.Mapper broadcasterFieldMapper = new Broadcaster.Mapper();
final Staff.Mapper staffFieldMapper = new Staff.Mapper();
final Vip.Mapper vipFieldMapper = new Vip.Mapper();
final Moderator.Mapper moderatorFieldMapper = new Moderator.Mapper();
final Viewer.Mapper viewerFieldMapper = new Viewer.Mapper();
@Override
public Chatters map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final List broadcasters = reader.readList($responseFields[1], new ResponseReader.ListReader() {
@Override
public Broadcaster read(ResponseReader.ListItemReader listItemReader) {
return listItemReader.readObject(new ResponseReader.ObjectReader() {
@Override
public Broadcaster read(ResponseReader reader) {
return broadcasterFieldMapper.map(reader);
}
});
}
});
final List staff = reader.readList($responseFields[2], new ResponseReader.ListReader() {
@Override
public Staff read(ResponseReader.ListItemReader listItemReader) {
return listItemReader.readObject(new ResponseReader.ObjectReader() {
@Override
public Staff read(ResponseReader reader) {
return staffFieldMapper.map(reader);
}
});
}
});
final List vips = reader.readList($responseFields[3], new ResponseReader.ListReader() {
@Override
public Vip read(ResponseReader.ListItemReader listItemReader) {
return listItemReader.readObject(new ResponseReader.ObjectReader() {
@Override
public Vip read(ResponseReader reader) {
return vipFieldMapper.map(reader);
}
});
}
});
final List moderators = reader.readList($responseFields[4], new ResponseReader.ListReader() {
@Override
public Moderator read(ResponseReader.ListItemReader listItemReader) {
return listItemReader.readObject(new ResponseReader.ObjectReader() {
@Override
public Moderator read(ResponseReader reader) {
return moderatorFieldMapper.map(reader);
}
});
}
});
final List viewers = reader.readList($responseFields[5], new ResponseReader.ListReader() {
@Override
public Viewer read(ResponseReader.ListItemReader listItemReader) {
return listItemReader.readObject(new ResponseReader.ObjectReader() {
@Override
public Viewer read(ResponseReader reader) {
return viewerFieldMapper.map(reader);
}
});
}
});
final int count = reader.readInt($responseFields[6]);
return new Chatters(__typename, broadcasters, staff, vips, moderators, viewers, count);
}
}
}
/**
* User info about the chatter.
*/
public static class Broadcaster {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forString("login", "login", null, false, Collections.emptyList())
};
final @NotNull String __typename;
final @NotNull String login;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Broadcaster(@NotNull String __typename, @NotNull String login) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.login = Utils.checkNotNull(login, "login == null");
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* User login of the chatter.
*/
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.writeString($responseFields[1], login);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Broadcaster{"
+ "__typename=" + __typename + ", "
+ "login=" + login
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Broadcaster) {
Broadcaster that = (Broadcaster) o;
return this.__typename.equals(that.__typename)
&& this.login.equals(that.login);
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= login.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
@Override
public Broadcaster map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final String login = reader.readString($responseFields[1]);
return new Broadcaster(__typename, login);
}
}
}
/**
* User info about the chatter.
*/
public static class Staff {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forString("login", "login", null, false, Collections.emptyList())
};
final @NotNull String __typename;
final @NotNull String login;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Staff(@NotNull String __typename, @NotNull String login) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.login = Utils.checkNotNull(login, "login == null");
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* User login of the chatter.
*/
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.writeString($responseFields[1], login);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Staff{"
+ "__typename=" + __typename + ", "
+ "login=" + login
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Staff) {
Staff that = (Staff) o;
return this.__typename.equals(that.__typename)
&& this.login.equals(that.login);
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= login.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
@Override
public Staff map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final String login = reader.readString($responseFields[1]);
return new Staff(__typename, login);
}
}
}
/**
* User info about the chatter.
*/
public static class Vip {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forString("login", "login", null, false, Collections.emptyList())
};
final @NotNull String __typename;
final @NotNull String login;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Vip(@NotNull String __typename, @NotNull String login) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.login = Utils.checkNotNull(login, "login == null");
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* User login of the chatter.
*/
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.writeString($responseFields[1], login);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Vip{"
+ "__typename=" + __typename + ", "
+ "login=" + login
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Vip) {
Vip that = (Vip) o;
return this.__typename.equals(that.__typename)
&& this.login.equals(that.login);
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= login.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
@Override
public Vip map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final String login = reader.readString($responseFields[1]);
return new Vip(__typename, login);
}
}
}
/**
* User info about the chatter.
*/
public static class Moderator {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forString("login", "login", null, false, Collections.emptyList())
};
final @NotNull String __typename;
final @NotNull String login;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Moderator(@NotNull String __typename, @NotNull String login) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.login = Utils.checkNotNull(login, "login == null");
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* User login of the chatter.
*/
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.writeString($responseFields[1], login);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Moderator{"
+ "__typename=" + __typename + ", "
+ "login=" + login
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Moderator) {
Moderator that = (Moderator) o;
return this.__typename.equals(that.__typename)
&& this.login.equals(that.login);
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= login.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
@Override
public Moderator map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final String login = reader.readString($responseFields[1]);
return new Moderator(__typename, login);
}
}
}
/**
* User info about the chatter.
*/
public static class Viewer {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forString("login", "login", null, false, Collections.emptyList())
};
final @NotNull String __typename;
final @NotNull String login;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Viewer(@NotNull String __typename, @NotNull String login) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.login = Utils.checkNotNull(login, "login == null");
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* User login of the chatter.
*/
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.writeString($responseFields[1], login);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Viewer{"
+ "__typename=" + __typename + ", "
+ "login=" + login
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Viewer) {
Viewer that = (Viewer) o;
return this.__typename.equals(that.__typename)
&& this.login.equals(that.login);
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= login.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
@Override
public Viewer map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final String login = reader.readString($responseFields[1]);
return new Viewer(__typename, login);
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy