com.basistech.rosette.apimodel.SemanticVectorsResponse 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 2017 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 com.basistech.rosette.annotations.JacksonMixin;
import java.util.List;
/**
* Simple api response data model for semantic vectors
*/
@JacksonMixin
public class SemanticVectorsResponse extends Response {
/**
*/
private final List documentEmbedding;
/**
*/
private final List tokens;
/**
*/
private final List> tokenEmbeddings;
@SuppressWarnings("all")
SemanticVectorsResponse(final List documentEmbedding, final List tokens, final List> tokenEmbeddings) {
this.documentEmbedding = documentEmbedding;
this.tokens = tokens;
this.tokenEmbeddings = tokenEmbeddings;
}
@SuppressWarnings("all")
public static class SemanticVectorsResponseBuilder {
@SuppressWarnings("all")
private List documentEmbedding;
@SuppressWarnings("all")
private List tokens;
@SuppressWarnings("all")
private List> tokenEmbeddings;
@SuppressWarnings("all")
SemanticVectorsResponseBuilder() {
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public SemanticVectorsResponse.SemanticVectorsResponseBuilder documentEmbedding(final List documentEmbedding) {
this.documentEmbedding = documentEmbedding;
return this;
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public SemanticVectorsResponse.SemanticVectorsResponseBuilder tokens(final List tokens) {
this.tokens = tokens;
return this;
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public SemanticVectorsResponse.SemanticVectorsResponseBuilder tokenEmbeddings(final List> tokenEmbeddings) {
this.tokenEmbeddings = tokenEmbeddings;
return this;
}
@SuppressWarnings("all")
public SemanticVectorsResponse build() {
return new SemanticVectorsResponse(this.documentEmbedding, this.tokens, this.tokenEmbeddings);
}
@Override
@SuppressWarnings("all")
public String toString() {
return "SemanticVectorsResponse.SemanticVectorsResponseBuilder(documentEmbedding=" + this.documentEmbedding + ", tokens=" + this.tokens + ", tokenEmbeddings=" + this.tokenEmbeddings + ")";
}
}
@SuppressWarnings("all")
public static SemanticVectorsResponse.SemanticVectorsResponseBuilder builder() {
return new SemanticVectorsResponse.SemanticVectorsResponseBuilder();
}
/**
* @return the document embedding vector as a list
*/
@SuppressWarnings("all")
public List getDocumentEmbedding() {
return this.documentEmbedding;
}
/**
* @return list of tokens, or {@code null}
*/
@SuppressWarnings("all")
public List getTokens() {
return this.tokens;
}
/**
* @return list of per-token embeddings, 1:1 with tokens, or {@code null}
*/
@SuppressWarnings("all")
public List> getTokenEmbeddings() {
return this.tokenEmbeddings;
}
@Override
@SuppressWarnings("all")
public boolean equals(final Object o) {
if (o == this) return true;
if (!(o instanceof SemanticVectorsResponse)) return false;
final SemanticVectorsResponse other = (SemanticVectorsResponse) o;
if (!other.canEqual((Object) this)) return false;
if (!super.equals(o)) return false;
final Object this$documentEmbedding = this.getDocumentEmbedding();
final Object other$documentEmbedding = other.getDocumentEmbedding();
if (this$documentEmbedding == null ? other$documentEmbedding != null : !this$documentEmbedding.equals(other$documentEmbedding)) return false;
final Object this$tokens = this.getTokens();
final Object other$tokens = other.getTokens();
if (this$tokens == null ? other$tokens != null : !this$tokens.equals(other$tokens)) return false;
final Object this$tokenEmbeddings = this.getTokenEmbeddings();
final Object other$tokenEmbeddings = other.getTokenEmbeddings();
if (this$tokenEmbeddings == null ? other$tokenEmbeddings != null : !this$tokenEmbeddings.equals(other$tokenEmbeddings)) return false;
return true;
}
@SuppressWarnings("all")
protected boolean canEqual(final Object other) {
return other instanceof SemanticVectorsResponse;
}
@Override
@SuppressWarnings("all")
public int hashCode() {
final int PRIME = 59;
int result = super.hashCode();
final Object $documentEmbedding = this.getDocumentEmbedding();
result = result * PRIME + ($documentEmbedding == null ? 43 : $documentEmbedding.hashCode());
final Object $tokens = this.getTokens();
result = result * PRIME + ($tokens == null ? 43 : $tokens.hashCode());
final Object $tokenEmbeddings = this.getTokenEmbeddings();
result = result * PRIME + ($tokenEmbeddings == null ? 43 : $tokenEmbeddings.hashCode());
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy