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

org.fiware.ngsi.model.BatchOperationResultVO 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 BatchOperationResultVO {

	public static final java.lang.String JSON_PROPERTY_SUCCESS = "success";
	public static final java.lang.String JSON_PROPERTY_ERROR = "error";

	@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_SUCCESS)
	@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)
	private java.util.List success;

	@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_ERROR)
	@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)
	private java.util.List error;

	// methods

	@Override
	public boolean equals(Object object) {
		if (object == this) {
			return true;
		}
		if (object == null || getClass() != object.getClass()) {
			return false;
		}
		BatchOperationResultVO other = (BatchOperationResultVO) object;
		return java.util.Objects.equals(success, other.success)
				&& java.util.Objects.equals(error, other.error);
	}

	@Override
	public int hashCode() {
		return java.util.Objects.hash(success, error);
	}

	@Override
	public java.lang.String toString() {
		return new java.lang.StringBuilder()
				.append("BatchOperationResultVO[")
				.append("success=").append(success).append(",")
				.append("error=").append(error)
				.append("]")
				.toString();
	}

	// fluent

	public BatchOperationResultVO success(java.util.List newSuccess) {
		this.success = newSuccess;
		return this;
	}
	
	public BatchOperationResultVO addSuccessItem(java.net.URI successItem) {
		if (this.success == null) {
			this.success = new java.util.ArrayList<>();
		}
		this.success.add(successItem);
		return this;
	}

	public BatchOperationResultVO removeSuccessItem(java.net.URI successItem) {
		if (this.success != null) {
			this.success.remove(successItem);
		}
		return this;
	}

	public BatchOperationResultVO error(java.util.List newError) {
		this.error = newError;
		return this;
	}
	
	public BatchOperationResultVO addErrorItem(BatchEntityErrorVO errorItem) {
		if (this.error == null) {
			this.error = new java.util.ArrayList<>();
		}
		this.error.add(errorItem);
		return this;
	}

	public BatchOperationResultVO removeErrorItem(BatchEntityErrorVO errorItem) {
		if (this.error != null) {
			this.error.remove(errorItem);
		}
		return this;
	}

	// getter/setter

	public java.util.List getSuccess() {
		return success;
	}

	public void setSuccess(java.util.List newSuccess) {
		this.success = newSuccess;
	}

	public java.util.List getError() {
		return error;
	}

	public void setError(java.util.List newError) {
		this.error = newError;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy