/* * 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. * * Modifications Copyright OpenSearch Contributors. See * GitHub history for details. */ package org.opensearch.ad.transport; import java.io.IOException; import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.transport.TransportRequest; public class ADTaskProfileNodeRequest extends TransportRequest { private String detectorId; public ADTaskProfileNodeRequest(StreamInput in) throws IOException { super(in); this.detectorId = in.readString(); } public ADTaskProfileNodeRequest(ADTaskProfileRequest request) { this.detectorId = request.getId(); } @Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeString(detectorId); } public String getId() { return detectorId; } }