io.swagger.models.auth.AbstractSecuritySchemeDefinition Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swagger-all Show documentation
Show all versions of swagger-all Show documentation
swagger-all is a rebundled verison of Swagger as one OSGi bundle.
The newest version!
package io.swagger.models.auth;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import java.util.HashMap;
import java.util.Map;
public abstract class AbstractSecuritySchemeDefinition implements SecuritySchemeDefinition {
private final Map vendorExtensions = new HashMap();
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 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;
}
}