org.elasticsearch.client.transform.GetTransformStatsRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of elasticsearch-rest-high-level-client Show documentation
Show all versions of elasticsearch-rest-high-level-client Show documentation
Elasticsearch subproject :client:rest-high-level
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
package org.elasticsearch.client.transform;
import org.elasticsearch.client.Validatable;
import org.elasticsearch.client.ValidationException;
import org.elasticsearch.client.core.PageParams;
import java.util.Objects;
import java.util.Optional;
public class GetTransformStatsRequest implements Validatable {
private final String id;
private PageParams pageParams;
private Boolean allowNoMatch;
public GetTransformStatsRequest(String id) {
this.id = id;
}
public String getId() {
return id;
}
public PageParams getPageParams() {
return pageParams;
}
public void setPageParams(PageParams pageParams) {
this.pageParams = pageParams;
}
public Boolean getAllowNoMatch() {
return allowNoMatch;
}
public void setAllowNoMatch(Boolean allowNoMatch) {
this.allowNoMatch = allowNoMatch;
}
@Override
public Optional validate() {
if (id == null) {
ValidationException validationException = new ValidationException();
validationException.addValidationError("transform id must not be null");
return Optional.of(validationException);
} else {
return Optional.empty();
}
}
@Override
public int hashCode() {
return Objects.hash(id, pageParams, allowNoMatch);
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
GetTransformStatsRequest other = (GetTransformStatsRequest) obj;
return Objects.equals(id, other.id)
&& Objects.equals(pageParams, other.pageParams)
&& Objects.equals(allowNoMatch, other.allowNoMatch);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy