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

com.paypal.api.payments.Patch Maven / Gradle / Ivy

There is a newer version: 1.14.0
Show newest version
// Generated by delombok at Wed Oct 12 18:15:55 CDT 2016
package com.paypal.api.payments;

import com.paypal.base.rest.PayPalModel;

public class Patch extends PayPalModel {
	/**
	 * Patch operation to perform.Value required for add & remove operation can be any JSON value.
	 */
	private String op;
	/**
	 * string containing a JSON-Pointer value that references a location within the target document (the target location) where the operation is performed.
	 */
	private String path;
	private Object value;
	private String from;

	/**
	 * Default Constructor
	 */
	public Patch() {
	}

	/**
	 * Parameterized Constructor
	 */
	public Patch(String op, String path) {
		this.op = op;
		this.path = path;
	}

	/**
	 * Patch operation to perform.Value required for add & remove operation can be any JSON value.
	 */
	@java.lang.SuppressWarnings("all")
	public String getOp() {
		return this.op;
	}

	/**
	 * string containing a JSON-Pointer value that references a location within the target document (the target location) where the operation is performed.
	 */
	@java.lang.SuppressWarnings("all")
	public String getPath() {
		return this.path;
	}

	@java.lang.SuppressWarnings("all")
	public Object getValue() {
		return this.value;
	}

	@java.lang.SuppressWarnings("all")
	public String getFrom() {
		return this.from;
	}

	/**
	 * Patch operation to perform.Value required for add & remove operation can be any JSON value.
	 * @return this
	 */
	@java.lang.SuppressWarnings("all")
	public Patch setOp(final String op) {
		this.op = op;
		return this;
	}

	/**
	 * string containing a JSON-Pointer value that references a location within the target document (the target location) where the operation is performed.
	 * @return this
	 */
	@java.lang.SuppressWarnings("all")
	public Patch setPath(final String path) {
		this.path = path;
		return this;
	}

	@java.lang.SuppressWarnings("all")
	public Patch setValue(final Object value) {
		this.value = value;
		return this;
	}

	@java.lang.SuppressWarnings("all")
	public Patch setFrom(final String from) {
		this.from = from;
		return this;
	}

	@java.lang.Override
	@java.lang.SuppressWarnings("all")
	public boolean equals(final java.lang.Object o) {
		if (o == this) return true;
		if (!(o instanceof Patch)) return false;
		final Patch other = (Patch) o;
		if (!other.canEqual((java.lang.Object) this)) return false;
		if (!super.equals(o)) return false;
		final java.lang.Object this$op = this.getOp();
		final java.lang.Object other$op = other.getOp();
		if (this$op == null ? other$op != null : !this$op.equals(other$op)) return false;
		final java.lang.Object this$path = this.getPath();
		final java.lang.Object other$path = other.getPath();
		if (this$path == null ? other$path != null : !this$path.equals(other$path)) return false;
		final java.lang.Object this$value = this.getValue();
		final java.lang.Object other$value = other.getValue();
		if (this$value == null ? other$value != null : !this$value.equals(other$value)) return false;
		final java.lang.Object this$from = this.getFrom();
		final java.lang.Object other$from = other.getFrom();
		if (this$from == null ? other$from != null : !this$from.equals(other$from)) return false;
		return true;
	}

	@java.lang.SuppressWarnings("all")
	protected boolean canEqual(final java.lang.Object other) {
		return other instanceof Patch;
	}

	@java.lang.Override
	@java.lang.SuppressWarnings("all")
	public int hashCode() {
		final int PRIME = 59;
		int result = 1;
		result = result * PRIME + super.hashCode();
		final java.lang.Object $op = this.getOp();
		result = result * PRIME + ($op == null ? 43 : $op.hashCode());
		final java.lang.Object $path = this.getPath();
		result = result * PRIME + ($path == null ? 43 : $path.hashCode());
		final java.lang.Object $value = this.getValue();
		result = result * PRIME + ($value == null ? 43 : $value.hashCode());
		final java.lang.Object $from = this.getFrom();
		result = result * PRIME + ($from == null ? 43 : $from.hashCode());
		return result;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy