Event_publicfields.java.txt 3.9 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
package com.kobylynskyi.graphql.test1;

import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequestSerializer;
import java.util.StringJoiner;

/**
 * An event that describes a thing that happens
 */
@javax.annotation.Generated(
    value = "com.kobylynskyi.graphql.codegen.GraphQLCodegen",
    date = "2020-12-31T23:59:59-0500"
)
public class Event implements java.io.Serializable {

    private static final long serialVersionUID = 1L;

    public String id;
    public String categoryId;
    public java.util.List<EventProperty> properties;
    public EventStatus status;
    public String createdBy;
    public String createdDateTime;
    public Boolean active;
    public Integer rating;

    public Event() {
    }

    public Event(String id, String categoryId, java.util.List<EventProperty> properties, EventStatus status, String createdBy, String createdDateTime, Boolean active, Integer rating) {
        this.id = id;
        this.categoryId = categoryId;
        this.properties = properties;
        this.status = status;
        this.createdBy = createdBy;
        this.createdDateTime = createdDateTime;
        this.active = active;
        this.rating = rating;
    }


    @Override
    public String toString() {
        StringJoiner joiner = new StringJoiner(", ", "{ ", " }");
        if (id != null) {
            joiner.add("id: " + GraphQLRequestSerializer.getEntry(id));
        }
        if (categoryId != null) {
            joiner.add("categoryId: " + GraphQLRequestSerializer.getEntry(categoryId));
        }
        if (properties != null) {
            joiner.add("properties: " + GraphQLRequestSerializer.getEntry(properties));
        }
        if (status != null) {
            joiner.add("status: " + GraphQLRequestSerializer.getEntry(status));
        }
        if (createdBy != null) {
            joiner.add("createdBy: " + GraphQLRequestSerializer.getEntry(createdBy));
        }
        if (createdDateTime != null) {
            joiner.add("createdDateTime: " + GraphQLRequestSerializer.getEntry(createdDateTime));
        }
        if (active != null) {
            joiner.add("active: " + GraphQLRequestSerializer.getEntry(active));
        }
        if (rating != null) {
            joiner.add("rating: " + GraphQLRequestSerializer.getEntry(rating));
        }
        return joiner.toString();
    }

    public static Event.Builder builder() {
        return new Event.Builder();
    }

    public static class Builder {

        private String id;
        private String categoryId;
        private java.util.List<EventProperty> properties;
        private EventStatus status;
        private String createdBy;
        private String createdDateTime;
        private Boolean active;
        private Integer rating;

        public Builder() {
        }

        public Builder setId(String id) {
            this.id = id;
            return this;
        }

        public Builder setCategoryId(String categoryId) {
            this.categoryId = categoryId;
            return this;
        }

        public Builder setProperties(java.util.List<EventProperty> properties) {
            this.properties = properties;
            return this;
        }

        public Builder setStatus(EventStatus status) {
            this.status = status;
            return this;
        }

        public Builder setCreatedBy(String createdBy) {
            this.createdBy = createdBy;
            return this;
        }

        public Builder setCreatedDateTime(String createdDateTime) {
            this.createdDateTime = createdDateTime;
            return this;
        }

        public Builder setActive(Boolean active) {
            this.active = active;
            return this;
        }

        public Builder setRating(Integer rating) {
            this.rating = rating;
            return this;
        }


        public Event build() {
            return new Event(id, categoryId, properties, status, createdBy, createdDateTime, active, rating);
        }

    }
}