com.github.twitch4j.graphql.internal.FetchUserEmoteSetsQuery 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.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.EmoteType;
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 FetchUserEmoteSetsQuery implements Query {
public static final String OPERATION_ID = "a82d6831cab6455d91b299fb745ca71585fccd8a2a0502d1f6caa6d00b26ab7a";
public static final String QUERY_DOCUMENT = QueryDocumentMinifier.minify(
"query fetchUserEmoteSets($id: ID) {\n"
+ " user(id: $id) {\n"
+ " __typename\n"
+ " emoteSets {\n"
+ " __typename\n"
+ " emotes {\n"
+ " __typename\n"
+ " id\n"
+ " modifiers {\n"
+ " __typename\n"
+ " code\n"
+ " }\n"
+ " setID\n"
+ " token\n"
+ " type\n"
+ " }\n"
+ " id\n"
+ " owner {\n"
+ " __typename\n"
+ " id\n"
+ " login\n"
+ " displayName\n"
+ " profileImageURL(width: 50)\n"
+ " }\n"
+ " }\n"
+ " }\n"
+ "}"
);
public static final OperationName OPERATION_NAME = new OperationName() {
@Override
public String name() {
return "fetchUserEmoteSets";
}
};
private final FetchUserEmoteSetsQuery.Variables variables;
public FetchUserEmoteSetsQuery(@NotNull Input id) {
Utils.checkNotNull(id, "id == null");
variables = new FetchUserEmoteSetsQuery.Variables(id);
}
@Override
public String operationId() {
return OPERATION_ID;
}
@Override
public String queryDocument() {
return QUERY_DOCUMENT;
}
@Override
public FetchUserEmoteSetsQuery.Data wrapData(FetchUserEmoteSetsQuery.Data data) {
return data;
}
@Override
public FetchUserEmoteSetsQuery.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 id = Input.absent();
Builder() {
}
public Builder id(@Nullable String id) {
this.id = Input.fromNullable(id);
return this;
}
public Builder idInput(@NotNull Input id) {
this.id = Utils.checkNotNull(id, "id == null");
return this;
}
public FetchUserEmoteSetsQuery build() {
return new FetchUserEmoteSetsQuery(id);
}
}
public static final class Variables extends Operation.Variables {
private final Input id;
private final transient Map valueMap = new LinkedHashMap<>();
Variables(Input id) {
this.id = id;
if (id.defined) {
this.valueMap.put("id", id.value);
}
}
public Input id() {
return id;
}
@Override
public Map valueMap() {
return Collections.unmodifiableMap(valueMap);
}
@Override
public InputFieldMarshaller marshaller() {
return new InputFieldMarshaller() {
@Override
public void marshal(InputFieldWriter writer) throws IOException {
if (id.defined) {
writer.writeCustom("id", com.github.twitch4j.graphql.internal.type.CustomType.ID, id.value != null ? id.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", "id")
.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.forList("emoteSets", "emoteSets", null, true, Collections.emptyList())
};
final @NotNull String __typename;
final @Nullable List emoteSets;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public User(@NotNull String __typename, @Nullable List emoteSets) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.emoteSets = emoteSets;
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* The emote sets this user is entitled to use.
* If no domains are specified, all emote sets will be returned.
* If multiple domains are specified, emotes that belong to either domain are returned (OR).
* If this user is not the current user, it returns nil and a "forbidden" error.
*/
public @Nullable List emoteSets() {
return this.emoteSets;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeString($responseFields[0], __typename);
writer.writeList($responseFields[1], emoteSets, new ResponseWriter.ListWriter() {
@Override
public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
for (Object item : items) {
listItemWriter.writeObject(((EmoteSet) item).marshaller());
}
}
});
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "User{"
+ "__typename=" + __typename + ", "
+ "emoteSets=" + emoteSets
+ "}";
}
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.emoteSets == null) ? (that.emoteSets == null) : this.emoteSets.equals(that.emoteSets));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= (emoteSets == null) ? 0 : emoteSets.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
final EmoteSet.Mapper emoteSetFieldMapper = new EmoteSet.Mapper();
@Override
public User map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final List emoteSets = reader.readList($responseFields[1], new ResponseReader.ListReader() {
@Override
public EmoteSet read(ResponseReader.ListItemReader listItemReader) {
return listItemReader.readObject(new ResponseReader.ObjectReader() {
@Override
public EmoteSet read(ResponseReader reader) {
return emoteSetFieldMapper.map(reader);
}
});
}
});
return new User(__typename, emoteSets);
}
}
}
/**
* Represents a group of emotes.
*/
public static class EmoteSet {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forList("emotes", "emotes", null, true, Collections.emptyList()),
ResponseField.forCustomType("id", "id", null, true, CustomType.ID, Collections.emptyList()),
ResponseField.forObject("owner", "owner", null, true, Collections.emptyList())
};
final @NotNull String __typename;
final @Nullable List emotes;
final @Nullable String id;
final @Nullable Owner owner;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public EmoteSet(@NotNull String __typename, @Nullable List emotes, @Nullable String id,
@Nullable Owner owner) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.emotes = emotes;
this.id = id;
this.owner = owner;
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* The list of emotes which belong to this set.
*/
public @Nullable List emotes() {
return this.emotes;
}
/**
* The emote set's identifier.
*/
public @Nullable String id() {
return this.id;
}
/**
* The channel associated with the emote set. Nil for emote sets not associated
* with an owner (prime, fuel, rewards, etc.).
*/
public @Nullable Owner owner() {
return this.owner;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeString($responseFields[0], __typename);
writer.writeList($responseFields[1], emotes, new ResponseWriter.ListWriter() {
@Override
public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
for (Object item : items) {
listItemWriter.writeObject(((Emote) item).marshaller());
}
}
});
writer.writeCustom((ResponseField.CustomTypeField) $responseFields[2], id);
writer.writeObject($responseFields[3], owner != null ? owner.marshaller() : null);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "EmoteSet{"
+ "__typename=" + __typename + ", "
+ "emotes=" + emotes + ", "
+ "id=" + id + ", "
+ "owner=" + owner
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof EmoteSet) {
EmoteSet that = (EmoteSet) o;
return this.__typename.equals(that.__typename)
&& ((this.emotes == null) ? (that.emotes == null) : this.emotes.equals(that.emotes))
&& ((this.id == null) ? (that.id == null) : this.id.equals(that.id))
&& ((this.owner == null) ? (that.owner == null) : this.owner.equals(that.owner));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= (emotes == null) ? 0 : emotes.hashCode();
h *= 1000003;
h ^= (id == null) ? 0 : id.hashCode();
h *= 1000003;
h ^= (owner == null) ? 0 : owner.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
final Emote.Mapper emoteFieldMapper = new Emote.Mapper();
final Owner.Mapper ownerFieldMapper = new Owner.Mapper();
@Override
public EmoteSet map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final List emotes = reader.readList($responseFields[1], new ResponseReader.ListReader() {
@Override
public Emote read(ResponseReader.ListItemReader listItemReader) {
return listItemReader.readObject(new ResponseReader.ObjectReader() {
@Override
public Emote read(ResponseReader reader) {
return emoteFieldMapper.map(reader);
}
});
}
});
final String id = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[2]);
final Owner owner = reader.readObject($responseFields[3], new ResponseReader.ObjectReader() {
@Override
public Owner read(ResponseReader reader) {
return ownerFieldMapper.map(reader);
}
});
return new EmoteSet(__typename, emotes, id, owner);
}
}
}
public static class Emote {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forCustomType("id", "id", null, true, CustomType.ID, Collections.emptyList()),
ResponseField.forList("modifiers", "modifiers", null, true, Collections.emptyList()),
ResponseField.forCustomType("setID", "setID", null, true, CustomType.ID, Collections.emptyList()),
ResponseField.forString("token", "token", null, true, Collections.emptyList()),
ResponseField.forString("type", "type", null, true, Collections.emptyList())
};
final @NotNull String __typename;
final @Nullable String id;
final @Nullable List modifiers;
final @Nullable String setID;
final @Nullable String token;
final @Nullable EmoteType type;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Emote(@NotNull String __typename, @Nullable String id,
@Nullable List modifiers, @Nullable String setID, @Nullable String token,
@Nullable EmoteType type) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.id = id;
this.modifiers = modifiers;
this.setID = setID;
this.token = token;
this.type = type;
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* The emote's identifier.
* For example, "115847".
*/
public @Nullable String id() {
return this.id;
}
/**
* The list of modifiers a user is entitled to use for an emote.
*/
public @Nullable List modifiers() {
return this.modifiers;
}
/**
* Identifies which set this emote belongs to.
*/
public @Nullable String setID() {
return this.setID;
}
/**
* The text token of the emote.
* For example, "KappaHD".
*/
public @Nullable String token() {
return this.token;
}
/**
* The type of emote that this is.
* For example, a global emote, a turbo emote, a prime emote, a sub emote, etc.
*/
public @Nullable EmoteType type() {
return this.type;
}
@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.writeList($responseFields[2], modifiers, new ResponseWriter.ListWriter() {
@Override
public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
for (Object item : items) {
listItemWriter.writeObject(((Modifier) item).marshaller());
}
}
});
writer.writeCustom((ResponseField.CustomTypeField) $responseFields[3], setID);
writer.writeString($responseFields[4], token);
writer.writeString($responseFields[5], type != null ? type.rawValue() : null);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Emote{"
+ "__typename=" + __typename + ", "
+ "id=" + id + ", "
+ "modifiers=" + modifiers + ", "
+ "setID=" + setID + ", "
+ "token=" + token + ", "
+ "type=" + type
+ "}";
}
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.id == null) ? (that.id == null) : this.id.equals(that.id))
&& ((this.modifiers == null) ? (that.modifiers == null) : this.modifiers.equals(that.modifiers))
&& ((this.setID == null) ? (that.setID == null) : this.setID.equals(that.setID))
&& ((this.token == null) ? (that.token == null) : this.token.equals(that.token))
&& ((this.type == null) ? (that.type == null) : this.type.equals(that.type));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= (id == null) ? 0 : id.hashCode();
h *= 1000003;
h ^= (modifiers == null) ? 0 : modifiers.hashCode();
h *= 1000003;
h ^= (setID == null) ? 0 : setID.hashCode();
h *= 1000003;
h ^= (token == null) ? 0 : token.hashCode();
h *= 1000003;
h ^= (type == null) ? 0 : type.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
final Modifier.Mapper modifierFieldMapper = new Modifier.Mapper();
@Override
public Emote map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final String id = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[1]);
final List modifiers = reader.readList($responseFields[2], new ResponseReader.ListReader() {
@Override
public Modifier read(ResponseReader.ListItemReader listItemReader) {
return listItemReader.readObject(new ResponseReader.ObjectReader() {
@Override
public Modifier read(ResponseReader reader) {
return modifierFieldMapper.map(reader);
}
});
}
});
final String setID = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[3]);
final String token = reader.readString($responseFields[4]);
final String typeStr = reader.readString($responseFields[5]);
final EmoteType type;
if (typeStr != null) {
type = EmoteType.safeValueOf(typeStr);
} else {
type = null;
}
return new Emote(__typename, id, modifiers, setID, token, type);
}
}
}
/**
* The name of an emote modifier and it's abbreviated code.
*/
public static class Modifier {
static final ResponseField[] $responseFields = {
ResponseField.forString("__typename", "__typename", null, false, Collections.emptyList()),
ResponseField.forString("code", "code", null, false, Collections.emptyList())
};
final @NotNull String __typename;
final @NotNull String code;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Modifier(@NotNull String __typename, @NotNull String code) {
this.__typename = Utils.checkNotNull(__typename, "__typename == null");
this.code = Utils.checkNotNull(code, "code == null");
}
public @NotNull String __typename() {
return this.__typename;
}
/**
* The code to use the emote modifier in chat.
*/
public @NotNull String code() {
return this.code;
}
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeString($responseFields[0], __typename);
writer.writeString($responseFields[1], code);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Modifier{"
+ "__typename=" + __typename + ", "
+ "code=" + code
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Modifier) {
Modifier that = (Modifier) o;
return this.__typename.equals(that.__typename)
&& this.code.equals(that.code);
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= code.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
@Override
public Modifier map(ResponseReader reader) {
final String __typename = reader.readString($responseFields[0]);
final String code = reader.readString($responseFields[1]);
return new Modifier(__typename, code);
}
}
}
/**
* Twitch user.
*/
public static class Owner {
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("profileImageURL", "profileImageURL", new UnmodifiableMapBuilder(1)
.put("width", 50)
.build(), true, Collections.emptyList())
};
final @NotNull String __typename;
final @NotNull String id;
final @NotNull String login;
final @NotNull String displayName;
final @Nullable String profileImageURL;
private transient volatile String $toString;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
public Owner(@NotNull String __typename, @NotNull String id, @NotNull String login,
@NotNull String displayName, @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.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 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], profileImageURL);
}
};
}
@Override
public String toString() {
if ($toString == null) {
$toString = "Owner{"
+ "__typename=" + __typename + ", "
+ "id=" + id + ", "
+ "login=" + login + ", "
+ "displayName=" + displayName + ", "
+ "profileImageURL=" + profileImageURL
+ "}";
}
return $toString;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Owner) {
Owner that = (Owner) o;
return this.__typename.equals(that.__typename)
&& this.id.equals(that.id)
&& this.login.equals(that.login)
&& this.displayName.equals(that.displayName)
&& ((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 ^= (profileImageURL == null) ? 0 : profileImageURL.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
public static final class Mapper implements ResponseFieldMapper {
@Override
public Owner 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 profileImageURL = reader.readString($responseFields[4]);
return new Owner(__typename, id, login, displayName, profileImageURL);
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy