org.openmetadata.schema.api.events.EventSubscriptionDestinationTestRequest Maven / Gradle / Ivy
package org.openmetadata.schema.api.events;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.processing.Generated;
import javax.validation.Valid;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import org.openmetadata.schema.entity.events.SubscriptionDestination;
/**
* Test EventSubscription Request
*
* Schema defining eventSubscription test API.
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"alertName",
"destinations"
})
@Generated("jsonschema2pojo")
public class EventSubscriptionDestinationTestRequest {
/**
* Name of the event subscription
*
*/
@JsonProperty("alertName")
@JsonPropertyDescription("Name of the event subscription")
private String alertName;
/**
* List of external destinations.
*
*/
@JsonProperty("destinations")
@JsonPropertyDescription("List of external destinations.")
@Valid
private List destinations = new ArrayList();
/**
* Name of the event subscription
*
*/
@JsonProperty("alertName")
public String getAlertName() {
return alertName;
}
/**
* Name of the event subscription
*
*/
@JsonProperty("alertName")
public void setAlertName(String alertName) {
this.alertName = alertName;
}
public EventSubscriptionDestinationTestRequest withAlertName(String alertName) {
this.alertName = alertName;
return this;
}
/**
* List of external destinations.
*
*/
@JsonProperty("destinations")
public List getDestinations() {
return destinations;
}
/**
* List of external destinations.
*
*/
@JsonProperty("destinations")
public void setDestinations(List destinations) {
this.destinations = destinations;
}
public EventSubscriptionDestinationTestRequest withDestinations(List destinations) {
this.destinations = destinations;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(EventSubscriptionDestinationTestRequest.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("alertName");
sb.append('=');
sb.append(((this.alertName == null)?"":this.alertName));
sb.append(',');
sb.append("destinations");
sb.append('=');
sb.append(((this.destinations == null)?"":this.destinations));
sb.append(',');
if (sb.charAt((sb.length()- 1)) == ',') {
sb.setCharAt((sb.length()- 1), ']');
} else {
sb.append(']');
}
return sb.toString();
}
@Override
public int hashCode() {
int result = 1;
result = ((result* 31)+((this.alertName == null)? 0 :this.alertName.hashCode()));
result = ((result* 31)+((this.destinations == null)? 0 :this.destinations.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof EventSubscriptionDestinationTestRequest) == false) {
return false;
}
EventSubscriptionDestinationTestRequest rhs = ((EventSubscriptionDestinationTestRequest) other);
return (((this.alertName == rhs.alertName)||((this.alertName!= null)&&this.alertName.equals(rhs.alertName)))&&((this.destinations == rhs.destinations)||((this.destinations!= null)&&this.destinations.equals(rhs.destinations))));
}
}