com.basistech.rosette.apimodel.SentimentResponse 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.Collection;
/**
* Information returned from the sentiment endpoint.
*/
@JacksonMixin
public class SentimentResponse extends Response {
/**
*/
private final Label document;
/**
*/
private final Collection entities;
@SuppressWarnings("all")
SentimentResponse(final Label document, final Collection entities) {
this.document = document;
this.entities = entities;
}
@SuppressWarnings("all")
public static class SentimentResponseBuilder {
@SuppressWarnings("all")
private Label document;
@SuppressWarnings("all")
private Collection entities;
@SuppressWarnings("all")
SentimentResponseBuilder() {
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public SentimentResponse.SentimentResponseBuilder document(final Label document) {
this.document = document;
return this;
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public SentimentResponse.SentimentResponseBuilder entities(final Collection entities) {
this.entities = entities;
return this;
}
@SuppressWarnings("all")
public SentimentResponse build() {
return new SentimentResponse(this.document, this.entities);
}
@Override
@SuppressWarnings("all")
public String toString() {
return "SentimentResponse.SentimentResponseBuilder(document=" + this.document + ", entities=" + this.entities + ")";
}
}
@SuppressWarnings("all")
public static SentimentResponse.SentimentResponseBuilder builder() {
return new SentimentResponse.SentimentResponseBuilder();
}
/**
* @return the whole-document sentiment.
*/
@SuppressWarnings("all")
public Label getDocument() {
return this.document;
}
/**
* @return the information for individual entities.
*/
@SuppressWarnings("all")
public Collection getEntities() {
return this.entities;
}
@Override
@SuppressWarnings("all")
public boolean equals(final Object o) {
if (o == this) return true;
if (!(o instanceof SentimentResponse)) return false;
final SentimentResponse other = (SentimentResponse) o;
if (!other.canEqual((Object) this)) return false;
if (!super.equals(o)) return false;
final Object this$document = this.getDocument();
final Object other$document = other.getDocument();
if (this$document == null ? other$document != null : !this$document.equals(other$document)) return false;
final Object this$entities = this.getEntities();
final Object other$entities = other.getEntities();
if (this$entities == null ? other$entities != null : !this$entities.equals(other$entities)) return false;
return true;
}
@SuppressWarnings("all")
protected boolean canEqual(final Object other) {
return other instanceof SentimentResponse;
}
@Override
@SuppressWarnings("all")
public int hashCode() {
final int PRIME = 59;
int result = super.hashCode();
final Object $document = this.getDocument();
result = result * PRIME + ($document == null ? 43 : $document.hashCode());
final Object $entities = this.getEntities();
result = result * PRIME + ($entities == null ? 43 : $entities.hashCode());
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy