org.opensearch.action.search.GetSearchPipelineRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opensearch Show documentation
Show all versions of opensearch Show documentation
OpenSearch subproject :server
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/
package org.opensearch.action.search;
import org.opensearch.action.ActionRequestValidationException;
import org.opensearch.action.support.clustermanager.ClusterManagerNodeReadRequest;
import org.opensearch.common.annotation.PublicApi;
import org.opensearch.core.common.Strings;
import org.opensearch.core.common.io.stream.StreamInput;
import org.opensearch.core.common.io.stream.StreamOutput;
import java.io.IOException;
import java.util.Objects;
/**
* Request to get search pipelines
*
* @opensearch.api
*/
@PublicApi(since = "2.7.0")
public class GetSearchPipelineRequest extends ClusterManagerNodeReadRequest {
private final String[] ids;
public GetSearchPipelineRequest(String... ids) {
this.ids = Objects.requireNonNull(ids);
}
public GetSearchPipelineRequest() {
ids = Strings.EMPTY_ARRAY;
}
public GetSearchPipelineRequest(StreamInput in) throws IOException {
super(in);
ids = in.readStringArray();
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
out.writeStringArray(ids);
}
public String[] getIds() {
return ids;
}
@Override
public ActionRequestValidationException validate() {
return null;
}
}