com.basistech.rosette.apimodel.AddressSimilarityRequest 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 2019 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.constraints.NotNull;
/**
* Request object for address-similarity.
*
* This class carries the two addresses to compare.
*/
public final class AddressSimilarityRequest extends Request {
/**
*/
@NotNull
private final IAddress address1;
/**
*/
@NotNull
private final IAddress address2;
/**
*/
private final Map parameters;
public AddressSimilarityRequest(String profileId, IAddress address1, IAddress address2, Map parameters) {
super(profileId);
this.address1 = address1;
this.address2 = address2;
this.parameters = parameters;
}
@SuppressWarnings("all")
public static class AddressSimilarityRequestBuilder {
@SuppressWarnings("all")
private String profileId;
@SuppressWarnings("all")
private IAddress address1;
@SuppressWarnings("all")
private IAddress address2;
@SuppressWarnings("all")
private Map parameters;
@SuppressWarnings("all")
AddressSimilarityRequestBuilder() {
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public AddressSimilarityRequest.AddressSimilarityRequestBuilder profileId(final String profileId) {
this.profileId = profileId;
return this;
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public AddressSimilarityRequest.AddressSimilarityRequestBuilder address1(final IAddress address1) {
this.address1 = address1;
return this;
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public AddressSimilarityRequest.AddressSimilarityRequestBuilder address2(final IAddress address2) {
this.address2 = address2;
return this;
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public AddressSimilarityRequest.AddressSimilarityRequestBuilder parameters(final Map parameters) {
this.parameters = parameters;
return this;
}
@SuppressWarnings("all")
public AddressSimilarityRequest build() {
return new AddressSimilarityRequest(this.profileId, this.address1, this.address2, this.parameters);
}
@Override
@SuppressWarnings("all")
public String toString() {
return "AddressSimilarityRequest.AddressSimilarityRequestBuilder(profileId=" + this.profileId + ", address1=" + this.address1 + ", address2=" + this.address2 + ", parameters=" + this.parameters + ")";
}
}
@SuppressWarnings("all")
public static AddressSimilarityRequest.AddressSimilarityRequestBuilder builder() {
return new AddressSimilarityRequest.AddressSimilarityRequestBuilder();
}
/**
* @return first address
*/
@SuppressWarnings("all")
public IAddress getAddress1() {
return this.address1;
}
/**
* @return second address
*/
@SuppressWarnings("all")
public IAddress getAddress2() {
return this.address2;
}
/**
* @return parameters to use in the request
*/
@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 AddressSimilarityRequest)) return false;
final AddressSimilarityRequest other = (AddressSimilarityRequest) o;
if (!other.canEqual((Object) this)) return false;
if (!super.equals(o)) return false;
final Object this$address1 = this.getAddress1();
final Object other$address1 = other.getAddress1();
if (this$address1 == null ? other$address1 != null : !this$address1.equals(other$address1)) return false;
final Object this$address2 = this.getAddress2();
final Object other$address2 = other.getAddress2();
if (this$address2 == null ? other$address2 != null : !this$address2.equals(other$address2)) 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 AddressSimilarityRequest;
}
@Override
@SuppressWarnings("all")
public int hashCode() {
final int PRIME = 59;
int result = super.hashCode();
final Object $address1 = this.getAddress1();
result = result * PRIME + ($address1 == null ? 43 : $address1.hashCode());
final Object $address2 = this.getAddress2();
result = result * PRIME + ($address2 == null ? 43 : $address2.hashCode());
final Object $parameters = this.getParameters();
result = result * PRIME + ($parameters == null ? 43 : $parameters.hashCode());
return result;
}
@Override
@SuppressWarnings("all")
public String toString() {
return "AddressSimilarityRequest(address1=" + this.getAddress1() + ", address2=" + this.getAddress2() + ", parameters=" + this.getParameters() + ")";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy