com.basistech.rosette.apimodel.NameDeduplicationRequest 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 jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;
/**
* Request object for name-deduplication.
*
* This class carries the list of names to dedupe as well as the score threshold.
*/
public final class NameDeduplicationRequest extends Request {
/**
*/
@NotNull
@Valid
private final List names;
/**
*/
private final Double threshold;
// workaround for inheritance https://github.com/projectlombok/lombok/issues/853
public NameDeduplicationRequest(String profileId, List names, Double threshold) {
super(profileId);
this.names = new ArrayList<>(names);
this.threshold = threshold;
}
@SuppressWarnings("all")
public static class NameDeduplicationRequestBuilder {
@SuppressWarnings("all")
private String profileId;
@SuppressWarnings("all")
private List names;
@SuppressWarnings("all")
private Double threshold;
@SuppressWarnings("all")
NameDeduplicationRequestBuilder() {
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public NameDeduplicationRequest.NameDeduplicationRequestBuilder profileId(final String profileId) {
this.profileId = profileId;
return this;
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public NameDeduplicationRequest.NameDeduplicationRequestBuilder names(final List names) {
this.names = names;
return this;
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public NameDeduplicationRequest.NameDeduplicationRequestBuilder threshold(final Double threshold) {
this.threshold = threshold;
return this;
}
@SuppressWarnings("all")
public NameDeduplicationRequest build() {
return new NameDeduplicationRequest(this.profileId, this.names, this.threshold);
}
@Override
@SuppressWarnings("all")
public String toString() {
return "NameDeduplicationRequest.NameDeduplicationRequestBuilder(profileId=" + this.profileId + ", names=" + this.names + ", threshold=" + this.threshold + ")";
}
}
@SuppressWarnings("all")
public static NameDeduplicationRequest.NameDeduplicationRequestBuilder builder() {
return new NameDeduplicationRequest.NameDeduplicationRequestBuilder();
}
/**
* @return the list of names
*/
@SuppressWarnings("all")
public List getNames() {
return this.names;
}
/**
* @return the threshold
*/
@SuppressWarnings("all")
public Double getThreshold() {
return this.threshold;
}
@Override
@SuppressWarnings("all")
public boolean equals(final Object o) {
if (o == this) return true;
if (!(o instanceof NameDeduplicationRequest)) return false;
final NameDeduplicationRequest other = (NameDeduplicationRequest) o;
if (!other.canEqual((Object) this)) return false;
if (!super.equals(o)) return false;
final Object this$threshold = this.getThreshold();
final Object other$threshold = other.getThreshold();
if (this$threshold == null ? other$threshold != null : !this$threshold.equals(other$threshold)) return false;
final Object this$names = this.getNames();
final Object other$names = other.getNames();
if (this$names == null ? other$names != null : !this$names.equals(other$names)) return false;
return true;
}
@SuppressWarnings("all")
protected boolean canEqual(final Object other) {
return other instanceof NameDeduplicationRequest;
}
@Override
@SuppressWarnings("all")
public int hashCode() {
final int PRIME = 59;
int result = super.hashCode();
final Object $threshold = this.getThreshold();
result = result * PRIME + ($threshold == null ? 43 : $threshold.hashCode());
final Object $names = this.getNames();
result = result * PRIME + ($names == null ? 43 : $names.hashCode());
return result;
}
@Override
@SuppressWarnings("all")
public String toString() {
return "NameDeduplicationRequest(names=" + this.getNames() + ", threshold=" + this.getThreshold() + ")";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy