Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Generated("Apollo GraphQL")
- public final class RandomWebmQuery implements Query<RandomWebmQuery.Data, RandomWebmQuery.Data, Operation.Variables> {
- public static final String OPERATION_DEFINITION = "query RandomWebm {\n"
- + " getWebm {\n"
- + " __typename\n"
- + " id\n"
- + " source\n"
- + " views\n"
- + " url\n"
- + " likes\n"
- + " dislikes\n"
- + " createdAt\n"
- + " tags {\n"
- + " __typename\n"
- + " id\n"
- + " name\n"
- + " }\n"
- + " }\n"
- + "}";
- public static final String QUERY_DOCUMENT = OPERATION_DEFINITION;
- private static final OperationName OPERATION_NAME = new OperationName() {
- @Override
- public String name() {
- return "RandomWebm";
- }
- };
- private final Operation.Variables variables;
- public RandomWebmQuery() {
- this.variables = Operation.EMPTY_VARIABLES;
- }
- @Override
- public String operationId() {
- return "64e1e7e3e3e286adb0040c9b49a6d7261da0968e475136f94450b74af6443d1c";
- }
- @Override
- public String queryDocument() {
- return QUERY_DOCUMENT;
- }
- @Override
- public RandomWebmQuery.Data wrapData(RandomWebmQuery.Data data) {
- return data;
- }
- @Override
- public Operation.Variables variables() {
- return variables;
- }
- @Override
- public ResponseFieldMapper<RandomWebmQuery.Data> responseFieldMapper() {
- return new Data.Mapper();
- }
- public static Builder builder() {
- return new Builder();
- }
- @Override
- public OperationName name() {
- return OPERATION_NAME;
- }
- public static final class Builder {
- Builder() {
- }
- public RandomWebmQuery build() {
- return new RandomWebmQuery();
- }
- }
- public static class Data implements Operation.Data {
- static final ResponseField[] $responseFields = {
- ResponseField.forObject("getWebm", "getWebm", null, true, Collections.<ResponseField.Condition>emptyList())
- };
- final @Nullable GetWebm getWebm;
- private volatile String $toString;
- private volatile int $hashCode;
- private volatile boolean $hashCodeMemoized;
- public Data(@Nullable GetWebm getWebm) {
- this.getWebm = getWebm;
- }
- public @Nullable GetWebm getWebm() {
- return this.getWebm;
- }
- public ResponseFieldMarshaller marshaller() {
- return new ResponseFieldMarshaller() {
- @Override
- public void marshal(ResponseWriter writer) {
- writer.writeObject($responseFields[0], getWebm != null ? getWebm.marshaller() : null);
- }
- };
- }
- @Override
- public String toString() {
- if ($toString == null) {
- $toString = "Data{"
- + "getWebm=" + getWebm
- + "}";
- }
- return $toString;
- }
- @Override
- public boolean equals(Object o) {
- if (o == this) {
- return true;
- }
- if (o instanceof Data) {
- Data that = (Data) o;
- return ((this.getWebm == null) ? (that.getWebm == null) : this.getWebm.equals(that.getWebm));
- }
- return false;
- }
- @Override
- public int hashCode() {
- if (!$hashCodeMemoized) {
- int h = 1;
- h *= 1000003;
- h ^= (getWebm == null) ? 0 : getWebm.hashCode();
- $hashCode = h;
- $hashCodeMemoized = true;
- }
- return $hashCode;
- }
- public static final class Mapper implements ResponseFieldMapper<Data> {
- final GetWebm.Mapper getWebmFieldMapper = new GetWebm.Mapper();
- @Override
- public Data map(ResponseReader reader) {
- final GetWebm getWebm = reader.readObject($responseFields[0], new ResponseReader.ObjectReader<GetWebm>() {
- @Override
- public GetWebm read(ResponseReader reader) {
- return getWebmFieldMapper.map(reader);
- }
- });
- return new Data(getWebm);
- }
- }
- }
- public static class GetWebm {
- static final ResponseField[] $responseFields = {
- ResponseField.forString("__typename", "__typename", null, false, Collections.<ResponseField.Condition>emptyList()),
- ResponseField.forCustomType("id", "id", null, false, CustomType.ID, Collections.<ResponseField.Condition>emptyList()),
- ResponseField.forString("source", "source", null, true, Collections.<ResponseField.Condition>emptyList()),
- ResponseField.forInt("views", "views", null, false, Collections.<ResponseField.Condition>emptyList()),
- ResponseField.forString("url", "url", null, false, Collections.<ResponseField.Condition>emptyList()),
- ResponseField.forInt("likes", "likes", null, false, Collections.<ResponseField.Condition>emptyList()),
- ResponseField.forInt("dislikes", "dislikes", null, false, Collections.<ResponseField.Condition>emptyList()),
- ResponseField.forString("createdAt", "createdAt", null, false, Collections.<ResponseField.Condition>emptyList()),
- ResponseField.forObjectList("tags", "tags", null, true, Collections.<ResponseField.Condition>emptyList())
- };
- final @Nonnull String __typename;
- final @Nonnull String id;
- final @Nullable String source;
- final int views;
- final @Nonnull String url;
- final int likes;
- final int dislikes;
- final @Nonnull String createdAt;
- final @Nullable List<Tag> tags;
- private volatile String $toString;
- private volatile int $hashCode;
- private volatile boolean $hashCodeMemoized;
- public GetWebm(@Nonnull String __typename, @Nonnull String id, @Nullable String source,
- int views, @Nonnull String url, int likes, int dislikes, @Nonnull String createdAt,
- @Nullable List<Tag> tags) {
- this.__typename = Utils.checkNotNull(__typename, "__typename == null");
- this.id = Utils.checkNotNull(id, "id == null");
- this.source = source;
- this.views = views;
- this.url = Utils.checkNotNull(url, "url == null");
- this.likes = likes;
- this.dislikes = dislikes;
- this.createdAt = Utils.checkNotNull(createdAt, "createdAt == null");
- this.tags = tags;
- }
- public @Nonnull String __typename() {
- return this.__typename;
- }
- public @Nonnull String id() {
- return this.id;
- }
- public @Nullable String source() {
- return this.source;
- }
- public int views() {
- return this.views;
- }
- public @Nonnull String url() {
- return this.url;
- }
- public int likes() {
- return this.likes;
- }
- public int dislikes() {
- return this.dislikes;
- }
- public @Nonnull String createdAt() {
- return this.createdAt;
- }
- public @Nullable List<Tag> tags() {
- return this.tags;
- }
- 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], source);
- writer.writeInt($responseFields[3], views);
- writer.writeString($responseFields[4], url);
- writer.writeInt($responseFields[5], likes);
- writer.writeInt($responseFields[6], dislikes);
- writer.writeString($responseFields[7], createdAt);
- writer.writeList($responseFields[8], tags != null ? new ResponseWriter.ListWriter() {
- @Override
- public void write(ResponseWriter.ListItemWriter listItemWriter) {
- for (Tag $item : tags) {
- listItemWriter.writeObject($item.marshaller());
- }
- }
- } : null);
- }
- };
- }
- @Override
- public String toString() {
- if ($toString == null) {
- $toString = "GetWebm{"
- + "__typename=" + __typename + ", "
- + "id=" + id + ", "
- + "source=" + source + ", "
- + "views=" + views + ", "
- + "url=" + url + ", "
- + "likes=" + likes + ", "
- + "dislikes=" + dislikes + ", "
- + "createdAt=" + createdAt + ", "
- + "tags=" + tags
- + "}";
- }
- return $toString;
- }
- @Override
- public boolean equals(Object o) {
- if (o == this) {
- return true;
- }
- if (o instanceof GetWebm) {
- GetWebm that = (GetWebm) o;
- return this.__typename.equals(that.__typename)
- && this.id.equals(that.id)
- && ((this.source == null) ? (that.source == null) : this.source.equals(that.source))
- && this.views == that.views
- && this.url.equals(that.url)
- && this.likes == that.likes
- && this.dislikes == that.dislikes
- && this.createdAt.equals(that.createdAt)
- && ((this.tags == null) ? (that.tags == null) : this.tags.equals(that.tags));
- }
- return false;
- }
- @Override
- public int hashCode() {
- if (!$hashCodeMemoized) {
- int h = 1;
- h *= 1000003;
- h ^= __typename.hashCode();
- h *= 1000003;
- h ^= id.hashCode();
- h *= 1000003;
- h ^= (source == null) ? 0 : source.hashCode();
- h *= 1000003;
- h ^= views;
- h *= 1000003;
- h ^= url.hashCode();
- h *= 1000003;
- h ^= likes;
- h *= 1000003;
- h ^= dislikes;
- h *= 1000003;
- h ^= createdAt.hashCode();
- h *= 1000003;
- h ^= (tags == null) ? 0 : tags.hashCode();
- $hashCode = h;
- $hashCodeMemoized = true;
- }
- return $hashCode;
- }
- public static final class Mapper implements ResponseFieldMapper<GetWebm> {
- final Tag.Mapper tagFieldMapper = new Tag.Mapper();
- @Override
- public GetWebm map(ResponseReader reader) {
- final String __typename = reader.readString($responseFields[0]);
- final String id = reader.readCustomType((ResponseField.CustomTypeField) $responseFields[1]);
- final String source = reader.readString($responseFields[2]);
- final int views = reader.readInt($responseFields[3]);
- final String url = reader.readString($responseFields[4]);
- final int likes = reader.readInt($responseFields[5]);
- final int dislikes = reader.readInt($responseFields[6]);
- final String createdAt = reader.readString($responseFields[7]);
- final List<Tag> tags = reader.readList($responseFields[8], new ResponseReader.ListReader<Tag>() {
- @Override
- public Tag read(ResponseReader.ListItemReader reader) {
- return reader.readObject(new ResponseReader.ObjectReader<Tag>() {
- @Override
- public Tag read(ResponseReader reader) {
- return tagFieldMapper.map(reader);
- }
- });
- }
- });
- return new GetWebm(__typename, id, source, views, url, likes, dislikes, createdAt, tags);
- }
- }
- }
- public static class Tag {
- static final ResponseField[] $responseFields = {
- ResponseField.forString("__typename", "__typename", null, false, Collections.<ResponseField.Condition>emptyList()),
- ResponseField.forInt("id", "id", null, false, Collections.<ResponseField.Condition>emptyList()),
- ResponseField.forString("name", "name", null, false, Collections.<ResponseField.Condition>emptyList())
- };
- final @Nonnull String __typename;
- final int id;
- final @Nonnull String name;
- private volatile String $toString;
- private volatile int $hashCode;
- private volatile boolean $hashCodeMemoized;
- public Tag(@Nonnull String __typename, int id, @Nonnull String name) {
- this.__typename = Utils.checkNotNull(__typename, "__typename == null");
- this.id = id;
- this.name = Utils.checkNotNull(name, "name == null");
- }
- public @Nonnull String __typename() {
- return this.__typename;
- }
- public int id() {
- return this.id;
- }
- public @Nonnull String name() {
- return this.name;
- }
- public ResponseFieldMarshaller marshaller() {
- return new ResponseFieldMarshaller() {
- @Override
- public void marshal(ResponseWriter writer) {
- writer.writeString($responseFields[0], __typename);
- writer.writeInt($responseFields[1], id);
- writer.writeString($responseFields[2], name);
- }
- };
- }
- @Override
- public String toString() {
- if ($toString == null) {
- $toString = "Tag{"
- + "__typename=" + __typename + ", "
- + "id=" + id + ", "
- + "name=" + name
- + "}";
- }
- return $toString;
- }
- @Override
- public boolean equals(Object o) {
- if (o == this) {
- return true;
- }
- if (o instanceof Tag) {
- Tag that = (Tag) o;
- return this.__typename.equals(that.__typename)
- && this.id == that.id
- && this.name.equals(that.name);
- }
- return false;
- }
- @Override
- public int hashCode() {
- if (!$hashCodeMemoized) {
- int h = 1;
- h *= 1000003;
- h ^= __typename.hashCode();
- h *= 1000003;
- h ^= id;
- h *= 1000003;
- h ^= name.hashCode();
- $hashCode = h;
- $hashCodeMemoized = true;
- }
- return $hashCode;
- }
- public static final class Mapper implements ResponseFieldMapper<Tag> {
- @Override
- public Tag map(ResponseReader reader) {
- final String __typename = reader.readString($responseFields[0]);
- final int id = reader.readInt($responseFields[1]);
- final String name = reader.readString($responseFields[2]);
- return new Tag(__typename, id, name);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement