io.swagger.models.auth.AbstractSecuritySchemeDefinition Maven / Gradle / Ivy
package io.swagger.models.auth;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import java.util.LinkedHashMap;
import java.util.Map;
public abstract class AbstractSecuritySchemeDefinition implements SecuritySchemeDefinition {
private Map vendorExtensions = new LinkedHashMap();
private String description;
@JsonAnyGetter
public Map getVendorExtensions() {
return vendorExtensions;
}
@JsonAnySetter
public void setVendorExtension(String name, Object value) {
if (name.startsWith("x-")) {
vendorExtensions.put(name, value);
}
}
public void setVendorExtensions(Map vendorExtensions) {
this.vendorExtensions = vendorExtensions;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((description == null) ? 0 : description.hashCode());
result = prime * result + ((vendorExtensions == null) ? 0 : vendorExtensions.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
AbstractSecuritySchemeDefinition other = (AbstractSecuritySchemeDefinition) obj;
if (description == null) {
if (other.description != null) {
return false;
}
} else if (!description.equals(other.description)) {
return false;
}
if (vendorExtensions == null) {
if (other.vendorExtensions != null) {
return false;
}
} else if (!vendorExtensions.equals(other.vendorExtensions)) {
return false;
}
return true;
}
}