001// Generated by delombok at Fri Mar 03 18:26:02 UTC 2023
002package de.cuioss.test.generator.domain;
003
004/**
005 * Simple person object containing a title, firstname, lastname, organization and a corresponding
006 * email-address
007 *
008 * @author Oliver Wolff
009 */
010public final class Person {
011    private final String title;
012    private final String firstname;
013    private final String lastname;
014    private final String email;
015    private final String organisation;
016
017    @java.lang.SuppressWarnings("all")
018    @lombok.Generated
019    Person(final String title, final String firstname, final String lastname, final String email, final String organisation) {
020        this.title = title;
021        this.firstname = firstname;
022        this.lastname = lastname;
023        this.email = email;
024        this.organisation = organisation;
025    }
026
027
028    @java.lang.SuppressWarnings("all")
029    @lombok.Generated
030    public static class PersonBuilder {
031        @java.lang.SuppressWarnings("all")
032        @lombok.Generated
033        private String title;
034        @java.lang.SuppressWarnings("all")
035        @lombok.Generated
036        private String firstname;
037        @java.lang.SuppressWarnings("all")
038        @lombok.Generated
039        private String lastname;
040        @java.lang.SuppressWarnings("all")
041        @lombok.Generated
042        private String email;
043        @java.lang.SuppressWarnings("all")
044        @lombok.Generated
045        private String organisation;
046
047        @java.lang.SuppressWarnings("all")
048        @lombok.Generated
049        PersonBuilder() {
050        }
051
052        /**
053         * @return {@code this}.
054         */
055        @java.lang.SuppressWarnings("all")
056        @lombok.Generated
057        public Person.PersonBuilder title(final String title) {
058            this.title = title;
059            return this;
060        }
061
062        /**
063         * @return {@code this}.
064         */
065        @java.lang.SuppressWarnings("all")
066        @lombok.Generated
067        public Person.PersonBuilder firstname(final String firstname) {
068            this.firstname = firstname;
069            return this;
070        }
071
072        /**
073         * @return {@code this}.
074         */
075        @java.lang.SuppressWarnings("all")
076        @lombok.Generated
077        public Person.PersonBuilder lastname(final String lastname) {
078            this.lastname = lastname;
079            return this;
080        }
081
082        /**
083         * @return {@code this}.
084         */
085        @java.lang.SuppressWarnings("all")
086        @lombok.Generated
087        public Person.PersonBuilder email(final String email) {
088            this.email = email;
089            return this;
090        }
091
092        /**
093         * @return {@code this}.
094         */
095        @java.lang.SuppressWarnings("all")
096        @lombok.Generated
097        public Person.PersonBuilder organisation(final String organisation) {
098            this.organisation = organisation;
099            return this;
100        }
101
102        @java.lang.SuppressWarnings("all")
103        @lombok.Generated
104        public Person build() {
105            return new Person(this.title, this.firstname, this.lastname, this.email, this.organisation);
106        }
107
108        @java.lang.Override
109        @java.lang.SuppressWarnings("all")
110        @lombok.Generated
111        public java.lang.String toString() {
112            return "Person.PersonBuilder(title=" + this.title + ", firstname=" + this.firstname + ", lastname=" + this.lastname + ", email=" + this.email + ", organisation=" + this.organisation + ")";
113        }
114    }
115
116    @java.lang.SuppressWarnings("all")
117    @lombok.Generated
118    public static Person.PersonBuilder builder() {
119        return new Person.PersonBuilder();
120    }
121
122    @java.lang.SuppressWarnings("all")
123    @lombok.Generated
124    public String getTitle() {
125        return this.title;
126    }
127
128    @java.lang.SuppressWarnings("all")
129    @lombok.Generated
130    public String getFirstname() {
131        return this.firstname;
132    }
133
134    @java.lang.SuppressWarnings("all")
135    @lombok.Generated
136    public String getLastname() {
137        return this.lastname;
138    }
139
140    @java.lang.SuppressWarnings("all")
141    @lombok.Generated
142    public String getEmail() {
143        return this.email;
144    }
145
146    @java.lang.SuppressWarnings("all")
147    @lombok.Generated
148    public String getOrganisation() {
149        return this.organisation;
150    }
151
152    @java.lang.Override
153    @java.lang.SuppressWarnings("all")
154    @lombok.Generated
155    public boolean equals(final java.lang.Object o) {
156        if (o == this) return true;
157        if (!(o instanceof Person)) return false;
158        final Person other = (Person) o;
159        final java.lang.Object this$title = this.getTitle();
160        final java.lang.Object other$title = other.getTitle();
161        if (this$title == null ? other$title != null : !this$title.equals(other$title)) return false;
162        final java.lang.Object this$firstname = this.getFirstname();
163        final java.lang.Object other$firstname = other.getFirstname();
164        if (this$firstname == null ? other$firstname != null : !this$firstname.equals(other$firstname)) return false;
165        final java.lang.Object this$lastname = this.getLastname();
166        final java.lang.Object other$lastname = other.getLastname();
167        if (this$lastname == null ? other$lastname != null : !this$lastname.equals(other$lastname)) return false;
168        final java.lang.Object this$email = this.getEmail();
169        final java.lang.Object other$email = other.getEmail();
170        if (this$email == null ? other$email != null : !this$email.equals(other$email)) return false;
171        final java.lang.Object this$organisation = this.getOrganisation();
172        final java.lang.Object other$organisation = other.getOrganisation();
173        if (this$organisation == null ? other$organisation != null : !this$organisation.equals(other$organisation)) return false;
174        return true;
175    }
176
177    @java.lang.Override
178    @java.lang.SuppressWarnings("all")
179    @lombok.Generated
180    public int hashCode() {
181        final int PRIME = 59;
182        int result = 1;
183        final java.lang.Object $title = this.getTitle();
184        result = result * PRIME + ($title == null ? 43 : $title.hashCode());
185        final java.lang.Object $firstname = this.getFirstname();
186        result = result * PRIME + ($firstname == null ? 43 : $firstname.hashCode());
187        final java.lang.Object $lastname = this.getLastname();
188        result = result * PRIME + ($lastname == null ? 43 : $lastname.hashCode());
189        final java.lang.Object $email = this.getEmail();
190        result = result * PRIME + ($email == null ? 43 : $email.hashCode());
191        final java.lang.Object $organisation = this.getOrganisation();
192        result = result * PRIME + ($organisation == null ? 43 : $organisation.hashCode());
193        return result;
194    }
195
196    @java.lang.Override
197    @java.lang.SuppressWarnings("all")
198    @lombok.Generated
199    public java.lang.String toString() {
200        return "Person(title=" + this.getTitle() + ", firstname=" + this.getFirstname() + ", lastname=" + this.getLastname() + ", email=" + this.getEmail() + ", organisation=" + this.getOrganisation() + ")";
201    }
202}