com.proofpoint.platform.sample.AutoValue_PersonRepresentation Maven / Gradle / Ivy
package com.proofpoint.platform.sample;
import jakarta.annotation.Nullable;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_PersonRepresentation extends PersonRepresentation {
@Nullable
private final @NotNull(message = "is missing") @Pattern(regexp = "[^@]+@[^@]+", message = "is malformed") String email;
@Nullable
private final @NotNull(message = "is missing") String name;
AutoValue_PersonRepresentation(
@Nullable @NotNull(message = "is missing") @Pattern(regexp = "[^@]+@[^@]+", message = "is malformed") String email,
@Nullable @NotNull(message = "is missing") String name) {
this.email = email;
this.name = name;
}
@Nullable
@Override
@NotNull(message = "is missing") @Pattern(regexp = "[^@]+@[^@]+", message = "is malformed") String getEmail() {
return email;
}
@Nullable
@Override
@NotNull(message = "is missing") String getName() {
return name;
}
@Override
public String toString() {
return "PersonRepresentation{"
+ "email=" + email + ", "
+ "name=" + name
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof PersonRepresentation) {
PersonRepresentation that = (PersonRepresentation) o;
return (this.email == null ? that.getEmail() == null : this.email.equals(that.getEmail()))
&& (this.name == null ? that.getName() == null : this.name.equals(that.getName()));
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= (email == null) ? 0 : email.hashCode();
h$ *= 1000003;
h$ ^= (name == null) ? 0 : name.hashCode();
return h$;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy