All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.fiware.ngsi.model.NotificationParamsVO Maven / Gradle / Ivy

There is a newer version: 1.1.5
Show newest version
package org.fiware.ngsi.model;

@jakarta.annotation.Generated("org.openapitools.codegen.languages.MicronautCodegen")
@io.micronaut.core.annotation.Introspected
public class NotificationParamsVO {

	public static final java.lang.String JSON_PROPERTY_ATTRIBUTES = "attributes";
	public static final java.lang.String JSON_PROPERTY_FORMAT = "format";
	public static final java.lang.String JSON_PROPERTY_ENDPOINT = "endpoint";
	public static final java.lang.String JSON_PROPERTY_STATUS = "status";
	public static final java.lang.String JSON_PROPERTY_TIMES_SENT = "timesSent";
	public static final java.lang.String JSON_PROPERTY_LAST_NOTIFICATION = "lastNotification";
	public static final java.lang.String JSON_PROPERTY_LAST_FAILURE = "lastFailure";
	public static final java.lang.String JSON_PROPERTY_LAST_SUCCESS = "lastSuccess";

	@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_ATTRIBUTES)
	@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)
	private java.util.Set attributes;

	@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_FORMAT)
	@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)
	private java.lang.String format;

	@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_ENDPOINT)
	@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.ALWAYS)
	private EndpointVO endpoint;

	@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_STATUS)
	@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)
	private Status status;

	@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_TIMES_SENT)
	@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)
	private java.lang.Double timesSent;

	@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_LAST_NOTIFICATION)
	@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)
	private java.time.Instant lastNotification;

	@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_LAST_FAILURE)
	@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)
	private java.time.Instant lastFailure;

	@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_LAST_SUCCESS)
	@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)
	private java.time.Instant lastSuccess;

	// methods

	@Override
	public boolean equals(Object object) {
		if (object == this) {
			return true;
		}
		if (object == null || getClass() != object.getClass()) {
			return false;
		}
		NotificationParamsVO other = (NotificationParamsVO) object;
		return java.util.Objects.equals(attributes, other.attributes)
				&& java.util.Objects.equals(format, other.format)
				&& java.util.Objects.equals(endpoint, other.endpoint)
				&& java.util.Objects.equals(status, other.status)
				&& java.util.Objects.equals(timesSent, other.timesSent)
				&& java.util.Objects.equals(lastNotification, other.lastNotification)
				&& java.util.Objects.equals(lastFailure, other.lastFailure)
				&& java.util.Objects.equals(lastSuccess, other.lastSuccess);
	}

	@Override
	public int hashCode() {
		return java.util.Objects.hash(attributes, format, endpoint, status, timesSent, lastNotification, lastFailure, lastSuccess);
	}

	@Override
	public java.lang.String toString() {
		return new java.lang.StringBuilder()
				.append("NotificationParamsVO[")
				.append("attributes=").append(attributes).append(",")
				.append("format=").append(format).append(",")
				.append("endpoint=").append(endpoint).append(",")
				.append("status=").append(status).append(",")
				.append("timesSent=").append(timesSent).append(",")
				.append("lastNotification=").append(lastNotification).append(",")
				.append("lastFailure=").append(lastFailure).append(",")
				.append("lastSuccess=").append(lastSuccess)
				.append("]")
				.toString();
	}

	// fluent

	public NotificationParamsVO attributes(java.util.Set newAttributes) {
		this.attributes = newAttributes;
		return this;
	}
	
	public NotificationParamsVO addAttributesItem(java.lang.String attributesItem) {
		if (this.attributes == null) {
			this.attributes = new java.util.LinkedHashSet<>();
		}
		this.attributes.add(attributesItem);
		return this;
	}

	public NotificationParamsVO removeAttributesItem(java.lang.String attributesItem) {
		if (this.attributes != null) {
			this.attributes.remove(attributesItem);
		}
		return this;
	}

	public NotificationParamsVO format(java.lang.String newFormat) {
		this.format = newFormat;
		return this;
	}

	public NotificationParamsVO endpoint(EndpointVO newEndpoint) {
		this.endpoint = newEndpoint;
		return this;
	}

	public NotificationParamsVO status(Status newStatus) {
		this.status = newStatus;
		return this;
	}

	public NotificationParamsVO timesSent(java.lang.Double newTimesSent) {
		this.timesSent = newTimesSent;
		return this;
	}

	public NotificationParamsVO lastNotification(java.time.Instant newLastNotification) {
		this.lastNotification = newLastNotification;
		return this;
	}

	public NotificationParamsVO lastFailure(java.time.Instant newLastFailure) {
		this.lastFailure = newLastFailure;
		return this;
	}

	public NotificationParamsVO lastSuccess(java.time.Instant newLastSuccess) {
		this.lastSuccess = newLastSuccess;
		return this;
	}

	// getter/setter

	public java.util.Set getAttributes() {
		return attributes;
	}

	public void setAttributes(java.util.Set newAttributes) {
		this.attributes = newAttributes;
	}

	public java.lang.String getFormat() {
		return format;
	}

	public void setFormat(java.lang.String newFormat) {
		this.format = newFormat;
	}

	public EndpointVO getEndpoint() {
		return endpoint;
	}

	public void setEndpoint(EndpointVO newEndpoint) {
		this.endpoint = newEndpoint;
	}

	public Status getStatus() {
		return status;
	}

	public void setStatus(Status newStatus) {
		this.status = newStatus;
	}

	public java.lang.Double getTimesSent() {
		return timesSent;
	}

	public void setTimesSent(java.lang.Double newTimesSent) {
		this.timesSent = newTimesSent;
	}

	public java.time.Instant getLastNotification() {
		return lastNotification;
	}

	public void setLastNotification(java.time.Instant newLastNotification) {
		this.lastNotification = newLastNotification;
	}

	public java.time.Instant getLastFailure() {
		return lastFailure;
	}

	public void setLastFailure(java.time.Instant newLastFailure) {
		this.lastFailure = newLastFailure;
	}

	public java.time.Instant getLastSuccess() {
		return lastSuccess;
	}

	public void setLastSuccess(java.time.Instant newLastSuccess) {
		this.lastSuccess = newLastSuccess;
	}

@io.micronaut.core.annotation.Introspected
public enum Status {

	OK("ok"),
	FAILED("failed");

	public static final java.lang.String OK_VALUE = "ok";
	public static final java.lang.String FAILED_VALUE = "failed";

	private final java.lang.String value;

	private Status(java.lang.String value) {
		this.value = value;
	}

	@com.fasterxml.jackson.annotation.JsonCreator
	public static Status toEnum(java.lang.String value) {
		return toOptional(value).orElseThrow(() -> new IllegalArgumentException("Unknown value '" + value + "'."));
	}

	public static java.util.Optional toOptional(java.lang.String value) {
		return java.util.Arrays
				.stream(values())
				.filter(e -> e.value.equals(value))
				.findAny();
	}

	@com.fasterxml.jackson.annotation.JsonValue
	public java.lang.String getValue() {
		return value;
	}
}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy