com.basistech.rosette.apimodel.SupportedLanguagePair 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 2018 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 com.basistech.util.TextDomain;
/**
* Supported language/script/scheme pairs
*/
@JacksonMixin
@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = SupportedLanguagePair.SupportedLanguagePairBuilder.class)
public final class SupportedLanguagePair {
/**
*/
private final TextDomain source;
/**
*/
private final TextDomain target;
/**
*/
private Boolean licensed;
@SuppressWarnings("all")
SupportedLanguagePair(final TextDomain source, final TextDomain target, final Boolean licensed) {
this.source = source;
this.target = target;
this.licensed = licensed;
}
@SuppressWarnings("all")
@com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "", buildMethodName = "build")
public static class SupportedLanguagePairBuilder {
@SuppressWarnings("all")
private TextDomain source;
@SuppressWarnings("all")
private TextDomain target;
@SuppressWarnings("all")
private Boolean licensed;
@SuppressWarnings("all")
SupportedLanguagePairBuilder() {
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public SupportedLanguagePair.SupportedLanguagePairBuilder source(final TextDomain source) {
this.source = source;
return this;
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public SupportedLanguagePair.SupportedLanguagePairBuilder target(final TextDomain target) {
this.target = target;
return this;
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public SupportedLanguagePair.SupportedLanguagePairBuilder licensed(final Boolean licensed) {
this.licensed = licensed;
return this;
}
@SuppressWarnings("all")
public SupportedLanguagePair build() {
return new SupportedLanguagePair(this.source, this.target, this.licensed);
}
@Override
@SuppressWarnings("all")
public String toString() {
return "SupportedLanguagePair.SupportedLanguagePairBuilder(source=" + this.source + ", target=" + this.target + ", licensed=" + this.licensed + ")";
}
}
@SuppressWarnings("all")
public static SupportedLanguagePair.SupportedLanguagePairBuilder builder() {
return new SupportedLanguagePair.SupportedLanguagePairBuilder();
}
/**
* @return the source TextDomain
*/
@SuppressWarnings("all")
public TextDomain getSource() {
return this.source;
}
/**
* @return the target TextDomain
*/
@SuppressWarnings("all")
public TextDomain getTarget() {
return this.target;
}
@Override
@SuppressWarnings("all")
public boolean equals(final Object o) {
if (o == this) return true;
if (!(o instanceof SupportedLanguagePair)) return false;
final SupportedLanguagePair other = (SupportedLanguagePair) o;
final Object this$licensed = this.getLicensed();
final Object other$licensed = other.getLicensed();
if (this$licensed == null ? other$licensed != null : !this$licensed.equals(other$licensed)) return false;
final Object this$source = this.getSource();
final Object other$source = other.getSource();
if (this$source == null ? other$source != null : !this$source.equals(other$source)) return false;
final Object this$target = this.getTarget();
final Object other$target = other.getTarget();
if (this$target == null ? other$target != null : !this$target.equals(other$target)) return false;
return true;
}
@Override
@SuppressWarnings("all")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $licensed = this.getLicensed();
result = result * PRIME + ($licensed == null ? 43 : $licensed.hashCode());
final Object $source = this.getSource();
result = result * PRIME + ($source == null ? 43 : $source.hashCode());
final Object $target = this.getTarget();
result = result * PRIME + ($target == null ? 43 : $target.hashCode());
return result;
}
@Override
@SuppressWarnings("all")
public String toString() {
return "SupportedLanguagePair(source=" + this.getSource() + ", target=" + this.getTarget() + ", licensed=" + this.getLicensed() + ")";
}
/**
* @return if this language pair is licensed or not
*/
@SuppressWarnings("all")
public Boolean getLicensed() {
return this.licensed;
}
/**
*/
@SuppressWarnings("all")
public void setLicensed(final Boolean licensed) {
this.licensed = licensed;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy