org.graylog.events.notifications.AutoValue_EventNotificationExecutionJob_Data Maven / Gradle / Ivy
package org.graylog.events.notifications;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;
import org.graylog.events.event.EventDto;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_EventNotificationExecutionJob_Data extends EventNotificationExecutionJob.Data {
private final String type;
private final EventDto eventDto;
private AutoValue_EventNotificationExecutionJob_Data(
String type,
EventDto eventDto) {
this.type = type;
this.eventDto = eventDto;
}
@JsonProperty("type")
@Override
public String type() {
return type;
}
@JsonProperty("event_dto")
@Override
public EventDto eventDto() {
return eventDto;
}
@Override
public String toString() {
return "Data{"
+ "type=" + type + ", "
+ "eventDto=" + eventDto
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof EventNotificationExecutionJob.Data) {
EventNotificationExecutionJob.Data that = (EventNotificationExecutionJob.Data) o;
return this.type.equals(that.type())
&& this.eventDto.equals(that.eventDto());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= type.hashCode();
h$ *= 1000003;
h$ ^= eventDto.hashCode();
return h$;
}
@Override
public EventNotificationExecutionJob.Data.Builder toBuilder() {
return new Builder(this);
}
static final class Builder extends EventNotificationExecutionJob.Data.Builder {
private String type;
private EventDto eventDto;
Builder() {
}
private Builder(EventNotificationExecutionJob.Data source) {
this.type = source.type();
this.eventDto = source.eventDto();
}
@Override
public EventNotificationExecutionJob.Data.Builder type(String type) {
if (type == null) {
throw new NullPointerException("Null type");
}
this.type = type;
return this;
}
@Override
public EventNotificationExecutionJob.Data.Builder eventDto(EventDto eventDto) {
if (eventDto == null) {
throw new NullPointerException("Null eventDto");
}
this.eventDto = eventDto;
return this;
}
@Override
EventNotificationExecutionJob.Data autoBuild() {
String missing = "";
if (this.type == null) {
missing += " type";
}
if (this.eventDto == null) {
missing += " eventDto";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_EventNotificationExecutionJob_Data(
this.type,
this.eventDto);
}
}
}