com.basistech.rosette.apimodel.NameSimilarityRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rosette-api-all Show documentation
Show all versions of rosette-api-all Show documentation
Babel Street Analytics API all modules combined
The newest version!
// Generated by delombok at Fri Nov 15 11:56:46 CST 2024
/*
* Copyright 2022 Basis Technology Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.basistech.rosette.apimodel;
import java.util.Map;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
/**
* Request object for name-similarity.
*
* This class carries the two names to compare.
*/
public final class NameSimilarityRequest extends Request {
/**
*/
@NotNull
@Valid
private final Name name1;
/**
*/
@NotNull
@Valid
private final Name name2;
/**
*/
private final Map parameters;
// workaround for inheritance https://github.com/rzwitserloot/lombok/issues/853
public NameSimilarityRequest(String profileId, Name name1, Name name2, Map parameters) {
super(profileId);
this.name1 = name1;
this.name2 = name2;
this.parameters = parameters;
}
@SuppressWarnings("all")
public static class NameSimilarityRequestBuilder {
@SuppressWarnings("all")
private String profileId;
@SuppressWarnings("all")
private Name name1;
@SuppressWarnings("all")
private Name name2;
@SuppressWarnings("all")
private Map parameters;
@SuppressWarnings("all")
NameSimilarityRequestBuilder() {
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public NameSimilarityRequest.NameSimilarityRequestBuilder profileId(final String profileId) {
this.profileId = profileId;
return this;
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public NameSimilarityRequest.NameSimilarityRequestBuilder name1(final Name name1) {
this.name1 = name1;
return this;
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public NameSimilarityRequest.NameSimilarityRequestBuilder name2(final Name name2) {
this.name2 = name2;
return this;
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public NameSimilarityRequest.NameSimilarityRequestBuilder parameters(final Map parameters) {
this.parameters = parameters;
return this;
}
@SuppressWarnings("all")
public NameSimilarityRequest build() {
return new NameSimilarityRequest(this.profileId, this.name1, this.name2, this.parameters);
}
@Override
@SuppressWarnings("all")
public String toString() {
return "NameSimilarityRequest.NameSimilarityRequestBuilder(profileId=" + this.profileId + ", name1=" + this.name1 + ", name2=" + this.name2 + ", parameters=" + this.parameters + ")";
}
}
@SuppressWarnings("all")
public static NameSimilarityRequest.NameSimilarityRequestBuilder builder() {
return new NameSimilarityRequest.NameSimilarityRequestBuilder();
}
/**
* @return first name
*/
@SuppressWarnings("all")
public Name getName1() {
return this.name1;
}
/**
* @return second name
*/
@SuppressWarnings("all")
public Name getName2() {
return this.name2;
}
/**
* @return parameters to use
*/
@SuppressWarnings("all")
public Map getParameters() {
return this.parameters;
}
@Override
@SuppressWarnings("all")
public boolean equals(final Object o) {
if (o == this) return true;
if (!(o instanceof NameSimilarityRequest)) return false;
final NameSimilarityRequest other = (NameSimilarityRequest) o;
if (!other.canEqual((Object) this)) return false;
if (!super.equals(o)) return false;
final Object this$name1 = this.getName1();
final Object other$name1 = other.getName1();
if (this$name1 == null ? other$name1 != null : !this$name1.equals(other$name1)) return false;
final Object this$name2 = this.getName2();
final Object other$name2 = other.getName2();
if (this$name2 == null ? other$name2 != null : !this$name2.equals(other$name2)) return false;
final Object this$parameters = this.getParameters();
final Object other$parameters = other.getParameters();
if (this$parameters == null ? other$parameters != null : !this$parameters.equals(other$parameters)) return false;
return true;
}
@SuppressWarnings("all")
protected boolean canEqual(final Object other) {
return other instanceof NameSimilarityRequest;
}
@Override
@SuppressWarnings("all")
public int hashCode() {
final int PRIME = 59;
int result = super.hashCode();
final Object $name1 = this.getName1();
result = result * PRIME + ($name1 == null ? 43 : $name1.hashCode());
final Object $name2 = this.getName2();
result = result * PRIME + ($name2 == null ? 43 : $name2.hashCode());
final Object $parameters = this.getParameters();
result = result * PRIME + ($parameters == null ? 43 : $parameters.hashCode());
return result;
}
@Override
@SuppressWarnings("all")
public String toString() {
return "NameSimilarityRequest(name1=" + this.getName1() + ", name2=" + this.getName2() + ", parameters=" + this.getParameters() + ")";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy