index
int64 | repo_id
string | file_path
string | content
string |
|---|---|---|---|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/context/PipelineProfiler.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.api.context;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.nd4j.common.io.StringUtils;
import org.nd4j.common.primitives.AtomicBoolean;
import org.nd4j.shade.jackson.databind.ObjectMapper;
import java.io.*;
import java.lang.management.ManagementFactory;
import java.nio.charset.StandardCharsets;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingDeque;
@Slf4j
public class PipelineProfiler implements Profiler {
private Writer writer;
private ObjectMapper json;
private final Thread fileWritingThread;
private final BlockingQueue<TraceEvent> writeQueue;
private final AtomicBoolean writing = new AtomicBoolean(false);
private long startTime;
private long endTime;
private final long pid;
private final long tid;
@Getter
private boolean logActive;
private ProfilerConfig profilerConfig;
private Path currentLog;
private Set<String> open = new HashSet<>();
private long getProcessId() {
// Note: may fail in some JVM implementations
// therefore fallback has to be provided
// something like '<pid>@<hostname>', at least in SUN / Oracle JVMs
final String jvmName = ManagementFactory.getRuntimeMXBean().getName();
final int index = jvmName.indexOf('@');
if (index < 1) {
// part before '@' empty (index = 0) / '@' not found (index = -1)
return 0;
}
try {
return Long.parseLong(jvmName.substring(0, index));
} catch (NumberFormatException e) {
// ignore
}
return 0;
}
private void fileSizeGuard() throws IOException {
if ((profilerConfig.splitSize() > 0) &&
(Files.size(currentLog) > profilerConfig.splitSize())) {
String baseName = FilenameUtils.removeExtension(currentLog.getFileName().toString());
int num = 1;
String counted = org.apache.commons.lang3.StringUtils.EMPTY;
String[] parts = baseName.split("_");
if (parts.length > 1) {
counted = parts[0] + "_" + (Integer.parseInt(parts[1]) + 1);
}
else {
counted = baseName + "_" + num;
}
Path nextFile = Paths.get(currentLog.getParent() + FileSystems.getDefault().getSeparator() +
counted + ".json");
Files.createFile(nextFile);
this.currentLog = nextFile;
try {
this.writer.flush();
this.writer.close();
this.writer = new BufferedWriter(new FileWriter(nextFile.toString(), true));
this.writer.write("["); //JSON array open (array close is optional for Chrome profiler format)
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
public void waitWriter() {
while ((!writeQueue.isEmpty() || writing.get()) && fileWritingThread.isAlive()) {
try {
Thread.sleep(10);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
try {
writer.flush();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
public PipelineProfiler(ProfilerConfig profilerConfig) {
this.profilerConfig = profilerConfig;
this.currentLog = profilerConfig.outputFile();
try {
this.writer = new BufferedWriter(new FileWriter(this.currentLog.toString(), true));
this.writer.write("["); //JSON array open (array close is optional for Chrome profiler format)
} catch (IOException e) {
throw new RuntimeException(e);
}
this.json = new ObjectMapper();
this.pid = getProcessId();
this.tid = Thread.currentThread().getId();
//Set up a queue so file access doesn't add latency to the execution thread
writeQueue =
new LinkedBlockingDeque<>();
fileWritingThread = new Thread(new Runnable() {
@Override
public void run() {
try {
runHelper();
} catch (Throwable t) {
log.error("Error when attempting to write results to file", t);
}
}
public void runHelper() throws Exception {
while (true) {
fileSizeGuard();
TraceEvent te = writeQueue.take(); //Blocking
writing.set(true);
try {
String j = json.writeValueAsString(te);
writer.append(j);
writer.append(",\n");
writer.flush();
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
writing.set(false);
}
}
}
});
fileWritingThread.setDaemon(true);
fileWritingThread.start();
}
@Override
public boolean profilerEnabled() {
return true;
}
@Override
public void eventStart(String key) {
logActive = true;
startTime = System.nanoTime() / 1000;
TraceEvent event = TraceEvent.builder()
.name(key)
.cat("START")
.ts(startTime)
.ph(TraceEvent.EventType.B)
.pid(this.pid)
.tid(this.tid)
.build();
writeQueue.add(event);
open.add(key);
}
@Override
public void eventEnd(String key) {
logActive = false;
endTime = System.nanoTime() / 1000;
TraceEvent event = TraceEvent.builder()
.name(key)
.cat("END")
.ts(endTime)
.ph(TraceEvent.EventType.E)
.pid(this.pid)
.tid(this.tid)
.build();
writeQueue.add(event);
open.remove(key);
}
@Override
public void flushBlocking() {
waitWriter();
}
@Override
public void closeAll() {
if(open.size() > 0){
List<String> l = new ArrayList<>(open);
for(String s : l){
eventEnd(s);
}
}
}
public static TraceEvent[] readEvents(File file) throws IOException {
String content = FileUtils.readFileToString(file, StandardCharsets.UTF_8);
content = StringUtils.trimTrailingWhitespace(content);
if (content.endsWith(","))
content = content.substring(0, content.length()-1) + "]";
if (StringUtils.isEmpty(content))
return new TraceEvent[0];
TraceEvent[] events = new ObjectMapper().readValue(content, TraceEvent[].class);
return events;
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/context/PipelineTimer.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.context;
import ai.konduit.serving.pipeline.registry.MicrometerRegistry;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.time.Duration;
import java.util.concurrent.TimeUnit;
public class PipelineTimer implements Timer {
@Getter
private io.micrometer.core.instrument.Timer mmTimer;
public PipelineTimer(String id) {
mmTimer = MicrometerRegistry.getRegistry().timer(id);
}
@Override
public void record(Duration duration) {
mmTimer.record(duration);
}
@Override
public void record(long duration, TimeUnit timeUnit) {
mmTimer.record(duration, timeUnit);
}
@Override
public Timer.Sample start() {
io.micrometer.core.instrument.Timer.Sample sample = io.micrometer.core.instrument.Timer.start();
return new Sample(sample);
}
@AllArgsConstructor
public static class Sample implements Timer.Sample {
private io.micrometer.core.instrument.Timer.Sample mmSample;
public long stop(Timer timer) {
return mmSample.stop(((PipelineTimer)timer).getMmTimer());
}
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/context/Profiler.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.context;
import java.io.IOException;
/**
* The Profiler interface is used within each PipelineStep (technically, within each {@link ai.konduit.serving.pipeline.api.step.PipelineStepRunner})
* for performance analysis and debugging purposes.
* Specifically, for each event within a PipelineStepRunner such as "load data", "convert input array", etc - developers
* can profile events based on their start and end times.<br>
* Events are identified by a String key, and have both start and end times.
*
* <p>
* For example:
* <pre>
* {@code
* @Override
* public Data exec(Context ctx, Data data){
* Profiler p = ctx.profiler();
* p.eventStart("DataConversion");
* data.getNDArray("myArray").getAs(float[][].class);
* p.eventEnd("DataConversion");
* ...
* }}</pre>
* <p>
* If the profiler is not enabled globally for the Pipeline execution, profiler calls are a no-op hence have virtually
* no overhead.
* <p>
* Profiler eventStart/End calls can be nested and events need not end before earlier ones start - for example, both
* {@code eventStart("X"), eventStart("Y"), eventEnd("Y"), eventEnd("X")} and
* {@code eventStart("X"), eventStart("Y"), eventEnd("X"), eventEnd("Y")} are valid. However,
* {@code eventEnd("X"), eventStart("X")} is not valid (end before start), which wil log a warning.
* <p>
* Note that every eventStart call should have a corresponding eventEnd call some time before the PipelineStepRunner.exec
* method returns. Any profiler eventStart calls without a corresponding eventEnd call will have eventEnd called once
* the exec method returns.
* <p>
* Event keys are usually the same on all calls of a given PipelineStepRunner's exec method, but this need not be the case
* in general
*
* @author Alex Black
*/
public interface Profiler {
/**
* Returns true if the profiler is enabled globally, or false otherwise
*/
boolean profilerEnabled();
/**
* Start the timer for the event with the specified key.
*/
void eventStart(String key);
/**
* End the timer for the event with the specified key.
* Should be called some time after {@link #eventStart(String)}
*/
void eventEnd(String key);
/**
* Block until the profiler writing of results has been completed
*/
void flushBlocking();
/**
* Close all currently open events (if any)
* i.e., call eventEnd for any keys where an eventStart has been called but not a corresponding eventEnd
*/
void closeAll();
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/context/ProfilerConfig.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.api.context;
import lombok.*;
import lombok.experimental.Accessors;
import java.io.File;
import java.nio.file.Path;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(fluent = true)
public class ProfilerConfig {
@Getter
private Path outputFile;
@Getter
private long splitSize;
public ProfilerConfig outputFile(File f){
this.outputFile = f.toPath();
return this;
}
public ProfilerConfig outputFile(Path p){
this.outputFile = p;
return this;
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/context/Timer.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.context;
import java.time.Duration;
import java.util.concurrent.TimeUnit;
public interface Timer {
public interface Sample {
long stop(Timer timer);
}
void record(Duration duration);
void record(long duration, TimeUnit timeUnit);
Sample start();
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/context/TraceEvent.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.context;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TraceEvent {
public enum EventType {
B,E
}
private String name;
private String cat;
private long ts;
private long pid;
private long tid;
private EventType ph;
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/data/BoundingBox.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.api.data;
import ai.konduit.serving.pipeline.impl.data.box.BBoxCHW;
import ai.konduit.serving.pipeline.impl.data.box.BBoxXY;
import ai.konduit.serving.pipeline.impl.pipeline.serde.BoundingBoxDeserializer;
import ai.konduit.serving.pipeline.impl.pipeline.serde.BoundingBoxSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import org.nd4j.shade.jackson.databind.annotation.JsonDeserialize;
import org.nd4j.shade.jackson.databind.annotation.JsonSerialize;
import java.util.Objects;
/**
* BoundingBox is usually used to represent a rectangular region in an image, along with an optional String label,
* and an optional double probability.
* <p>
* Bounding boxes can be defined in two (essentially equivalent) formats:<br>
* (a) Based on center X, center Y, height and width<br>
* (b) Based on x1, x2, y1 and y2 locations (i.e., lower/upper X, lower/upper Y coordinate)<br>
* <p>
* As a general rule, bounding box coordinates are specified as a fraction of the image - with coordinates (x,y)=(0.0, 0.0)
* being top left of the image, and (x,y)=(1.0, 1.0) being the bottom right of the image.<br>
* However, in some use cases, specifying x/y locations in pixels might be used.
*
* @author Alex Black
*/
@Schema(description = "This object is usually used to represent a rectangular region in an image, along with an optional String label, " +
"and an optional double probability. Bounding boxes can be defined in two (essentially equivalent) formats: " +
"(a) Based on center X, center Y, height and width " +
"(b) Based on x1, x2, y1 and y2 locations (i.e., lower/upper X, lower/upper Y coordinate) " +
"As a general rule, bounding box coordinates are specified as a fraction of the image - with coordinates (x,y)=(0.0, 0.0) " +
"being top left of the image, and (x,y)=(1.0, 1.0) being the bottom right of the image. However, in some use cases, " +
"specifying x/y locations in pixels might be used.")
@JsonSerialize(using = BoundingBoxSerializer.class)
@JsonDeserialize(using = BoundingBoxDeserializer.class)
public interface BoundingBox {
/**
* As per {@link #createXY(double, double, double, double, String, Double)} without a label or probability
*/
static BoundingBox create(double cx, double cy, double h, double w) {
return create(cx, cy, h, w, "", 0.0);
}
/**
* Create a BoundingBox instance based on the center X/Y location and box height/width.
* As per {@link BoundingBox}, specifying these as as a fraction of image size (i.e., 0.0 to 1.0) is generally preferred
*
* @param cx Center X location
* @param cy Center Y location
* @param h Height
* @param w Width
* @param label Label for the bounding box. May be null.
* @param probability PRobability for the bounding box, in range [0.0, 1.0]. May be null
* @return BoundingBox instance
*/
static BoundingBox create(double cx, double cy, double h, double w, String label, Double probability) {
return new BBoxCHW(cx, cy, h, w, label, probability);
}
static BoundingBox createXY(double x1, double x2, double y1, double y2) {
return createXY(x1, x2, y1, y2, "", 0.0);
}
/**
* Create a BoundingBox instance based on lower/upper X/Y coordinates of the box.<br>
* i.e., the top-left of the box is defined by (x1, y1) and the bottom-right is defined by (x2, y2)<br>
* As per {@link BoundingBox}, specifying these as as a fraction of image size (i.e., 0.0 to 1.0) is generally preferred
*
* @param x1 The lower X coordinate for the box (i.e., top-left X coordinate)
* @param x2 The upper X coordinate for the box (i.e., bottom-right X coordinate)
* @param y1 The smaller Y coordinate for the box (i.e., top-left Y coordinate)
* @param y2 The larger Y coordinate for the box (i.e., bottom-right Y coordinate)
* @param label Label for the bounding box. May be null.
* @param probability PRobability for the bounding box, in range [0.0, 1.0]. May be null
* @return BoundingBox instance
*/
static BoundingBox createXY(double x1, double x2, double y1, double y2, String label, Double probability) {
return new BBoxXY(x1, x2, y1, y2, label, probability);
}
/**
* @return The lower X coordinate (i.e., top-left X coordinate)
*/
double x1();
/**
* @return The upper X coordinate (i.e., bottom-right X coordinate)
*/
double x2();
/**
* @return The smaller Y coordinate (i.e., top-left Y coordinate)
*/
double y1();
/**
* @return The larger X coordinate (i.e., bottom-right Y coordinate)
*/
double y2();
/**
* @return The bounding box center X coordinate
*/
double cx();
/**
* @return The bounding box center Y coordinate
*/
double cy();
default double width(){
return Math.abs(x2() - x1());
}
default double height(){
return Math.abs(y2() - y1());
}
/**
* @return The label for the bounding box. May be null.
*/
String label();
/**
* @return The probability for the bounding box. May be null.
*/
Double probability();
/**
* As per {@link #equals(BoundingBox, BoundingBox, double, double)} using eps = 1e-5 and probEps = 1e-5
*/
static boolean equals(BoundingBox bb1, BoundingBox bb2) {
return equals(bb1, bb2, 1e-5, 1e-5);
}
/**
* @param bb1 First bounding box to compare
* @param bb2 Second bounding box to compare
* @param eps Epsilon value for X/Y coordinates. Use 0.0 for exact, or non-zero for "approximately equals" behaviour
* @param probEps Epsilon value for probability comparison. Use 0.0 for exact probability match, or non-zero for "approximately
* equal" behavior. Unused if one/both bounding boxes don't have a probability value
* @return True if the two bounding boxes are equals, false otherwise
*/
static boolean equals(BoundingBox bb1, BoundingBox bb2, double eps, double probEps) {
return Math.abs(bb1.x1() - bb2.x1()) < eps &&
Math.abs(bb1.x2() - bb2.x2()) < eps &&
Math.abs(bb1.y1() - bb2.y1()) < eps &&
Math.abs(bb1.y2() - bb2.y2()) < eps &&
Objects.equals(bb1.label(), bb2.label()) &&
((bb1.probability() == null && bb2.probability() == null) ||
(bb1.probability() != null && Math.abs(bb1.probability() - bb2.probability()) < probEps));
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/data/Data.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.data;
import ai.konduit.serving.pipeline.impl.data.*;
import ai.konduit.serving.pipeline.impl.data.image.Png;
import ai.konduit.serving.pipeline.impl.data.ndarray.SerializedNDArray;
import ai.konduit.serving.pipeline.impl.serde.DataJsonDeserializer;
import ai.konduit.serving.pipeline.impl.serde.DataJsonSerializer;
import ai.konduit.serving.pipeline.util.DataUtils;
import ai.konduit.serving.pipeline.util.ObjectMappers;
import lombok.NonNull;
import org.nd4j.common.base.Preconditions;
import org.nd4j.shade.jackson.core.JsonProcessingException;
import org.nd4j.shade.jackson.databind.annotation.JsonDeserialize;
import org.nd4j.shade.jackson.databind.annotation.JsonSerialize;
import java.io.*;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
@JsonSerialize(using = DataJsonSerializer.class)
@JsonDeserialize(using = DataJsonDeserializer.class)
public interface Data {
String RESERVED_KEY_TYPE = "@type";
String RESERVED_KEY_BYTES_BASE64 = "@BytesBase64";
String RESERVED_KEY_BYTEBUFFER_BASE64 = "@ByteBufferBase64";
String RESERVED_KEY_BYTES_ARRAY = "@BytesArray";
String RESERVED_KEY_BYTEBUFFER = "@ByteBuffer";
String RESERVED_KEY_IMAGE_FORMAT = "@ImageFormat";
String RESERVED_KEY_IMAGE_DATA = "@ImageData";
String RESERVED_KEY_NDARRAY_SHAPE = "@NDArrayShape";
String RESERVED_KEY_NDARRAY_TYPE = "@NDArrayType";
String RESERVED_KEY_NDARRAY_DATA_BASE64 = "@NDArrayDataBase64";
String RESERVED_KEY_NDARRAY_DATA_ARRAY = "@NDArrayDataBase64";
String RESERVED_KEY_METADATA = "@Metadata";
String RESERVED_KEY_BB_X1 = "@x1";
String RESERVED_KEY_BB_X2 = "@x2";
String RESERVED_KEY_BB_Y1 = "@y1";
String RESERVED_KEY_BB_Y2 = "@y2";
String RESERVED_KEY_BB_CX = "@cx";
String RESERVED_KEY_BB_CY = "@cy";
String RESERVED_KEY_BB_H = "@h";
String RESERVED_KEY_BB_W = "@w";
String RESERVED_KEY_POINT = "@Point";
String RESERVED_KEY_POINT_COORDS = "@Coords";
String RESERVED_KEY_ASYNC_TRIGGER = "@AsyncTrigger";
static List<String> reservedKeywords(){
return Arrays.asList(RESERVED_KEY_TYPE, RESERVED_KEY_BYTES_BASE64, RESERVED_KEY_BYTES_ARRAY, RESERVED_KEY_IMAGE_FORMAT,
RESERVED_KEY_IMAGE_DATA, RESERVED_KEY_NDARRAY_SHAPE, RESERVED_KEY_NDARRAY_TYPE, RESERVED_KEY_NDARRAY_DATA_BASE64,
RESERVED_KEY_NDARRAY_DATA_ARRAY, RESERVED_KEY_METADATA,
RESERVED_KEY_BB_X1, RESERVED_KEY_BB_X2, RESERVED_KEY_BB_Y1, RESERVED_KEY_BB_Y2,
RESERVED_KEY_BB_CX, RESERVED_KEY_BB_CY, RESERVED_KEY_BB_H, RESERVED_KEY_BB_W,
RESERVED_KEY_POINT, RESERVED_KEY_POINT_COORDS, RESERVED_KEY_ASYNC_TRIGGER);
}
int size();
default String toJson(){
try {
return ObjectMappers.json().writeValueAsString(this);
} catch (JsonProcessingException e){
throw new RuntimeException("Error serializing Data instance to JSON", e);
}
}
List<String> keys();
String key(int id);
ValueType type(String key) throws ValueNotFoundException;
ValueType listType(String key);
boolean has(String key);
default boolean hasAll(Collection<? extends String> keys){
for(String s : keys){
if(!has(s))
return false;
}
return true;
}
// Getters
Object get(String key) throws ValueNotFoundException;
NDArray getNDArray(String key) throws ValueNotFoundException;
String getString(String key) throws ValueNotFoundException;
boolean getBoolean(String key) throws ValueNotFoundException;
byte[] getBytes(String key) throws ValueNotFoundException;
ByteBuffer getByteBuffer(String key) throws ValueNotFoundException;
double getDouble(String key) throws ValueNotFoundException;
Image getImage(String key) throws ValueNotFoundException;
long getLong(String key) throws ValueNotFoundException;
BoundingBox getBoundingBox(String key) throws ValueNotFoundException;
Point getPoint(String key) throws ValueNotFoundException;
List<Object> getList(String key, ValueType type); //TODO type
Data getData(String key);
List<String> getListString(String key);
List<Long> getListInt64(String key);
List<Boolean> getListBoolean(String key);
List<byte[]> getListBytes(String key);
List<ByteBuffer> getListByteBuffer(String key);
List<Double> getListDouble(String key);
List<Point> getListPoint(String key);
List<List<?>> getListData(String key);
List<Image> getListImage(String key);
List<NDArray> getListNDArray(String key);
List<BoundingBox> getListBoundingBox(String key);
void put(String key, String data);
void put(String key, NDArray data);
void put(String key, ByteBuffer data);
void put(String key, byte[] data);
void put(String key, Image data);
void put(String key, long data);
void put(String key, double data);
void put(String key, boolean data);
void put(String key, BoundingBox data);
void put(String key, Point data);
void putListString(String key, List<String> data);
void putListInt64(String key, List<Long> data);
void putListBoolean(String key, List<Boolean> data);
void putListByteBuffer(String key, List<ByteBuffer> data);
void putListBytes(String key, List<byte[]> data);
void putListDouble(String key, List<Double> data);
void putListData(String key, List<Data> data);
void putListImage(String key, List<Image> data);
void putListNDArray(String key, List<NDArray> data);
void putListBoundingBox(String key, List<BoundingBox> data);
void putListPoint(String key, List<Point> data);
void putList(String key, List<?> data, ValueType vt);
void put(String key, Data data);
boolean hasMetaData();
Data getMetaData();
void setMetaData(Data data);
Data clone();
// Serialization routines
default void save(File toFile) throws IOException {
this.toProtoData().save(toFile);
}
default void write(OutputStream toStream) throws IOException {
this.toProtoData().write(toStream);
}
default byte[] asBytes() {
return this.toProtoData().asBytes();
}
ProtoData toProtoData();
static Data fromJson(String json) {
try {
return ObjectMappers.json().readValue(json, Data.class);
} catch (JsonProcessingException e){
throw new RuntimeException("Error deserializing Data from JSON", e);
}
}
static Data fromBytes(byte[] input) {
return new ProtoData(input);
}
static Data fromFile(File f) throws IOException {
return new ProtoData(f);
}
static Data fromStream(InputStream stream) throws IOException {
return new ProtoData(stream);
}
static Data singleton(@NonNull String key, @NonNull Object value){
return JData.singleton(key, value);
}
static Data singletonList(@NonNull String key, @NonNull List<?> value, @NonNull ValueType valueType){
return JData.singletonList(key, value, valueType);
}
static Data empty(){
return new JData();
}
static String toString(Data d){
StringBuilder sb = new StringBuilder();
sb.append("Data(");
sb.append(d.keys().toString());
sb.append(")");
return sb.toString();
}
static boolean equals(@NonNull Data d1, @NonNull Data d2) {
if(d1.size() != d2.size())
return false;
List<String> k1 = d1.keys();
List<String> k2 = d2.keys();
if(!k1.containsAll(k2))
return false;
for(String s : k1){
if(d1.type(s) != d2.type(s))
return false;
}
//All keys and types are the same at this point
//Therefore check values
for(String s : k1){
ValueType vt = d1.type(s);
switch (vt){
default:
//TODO
throw new UnsupportedOperationException(vt + " equality not yet implemented");
case LIST:
//TODO will this be robust for equality of any objects? Probably not...
ValueType l1Type = d1.listType(s);
ValueType l2Type = d2.listType(s);
List<?> list1 = d1.getList(s, l1Type);
List<?> list2 = d2.getList(s, l2Type);
if(!DataUtils.listEquals(list1, list2, l1Type, l2Type))
return false;
break;
case IMAGE:
Png png1 = d1.getImage(s).getAs(Png.class);
Png png2 = d2.getImage(s).getAs(Png.class);
byte[] pngBytes1 = png1.getBytes();
byte[] pngBytes2 = png2.getBytes();
if(!Arrays.equals(pngBytes1, pngBytes2))
return false;
break;
case NDARRAY:
//TODO this is inefficient - but robust...
NDArray a1 = d1.getNDArray(s);
NDArray a2 = d2.getNDArray(s);
SerializedNDArray sa1 = a1.getAs(SerializedNDArray.class);
SerializedNDArray sa2 = a2.getAs(SerializedNDArray.class);
if(!sa1.equals(sa2))
return false;
break;
case STRING:
if(!d1.getString(s).equals(d2.getString(s)))
return false;
break;
case BYTEBUFFER:
ByteBuffer b1Buffer = d1.getByteBuffer(s);
ByteBuffer b2Buffer = d2.getByteBuffer(s);
return b1Buffer.equals(b2Buffer);
case BYTES:
byte[] b1 = d1.getBytes(s);
byte[] b2 = d2.getBytes(s);
if(!Arrays.equals(b1, b2))
return false;
break;
case DOUBLE:
double dbl1 = d1.getDouble(s);
double dbl2 = d2.getDouble(s);
if(dbl1 != dbl2 && !(Double.isNaN(dbl1) && Double.isNaN(dbl2))){ //Both equal, or both NaN
return false;
}
break;
case INT64:
long l1 = d1.getLong(s);
long l2 = d2.getLong(s);
if(l1 != l2)
return false;
break;
case BOOLEAN:
boolean bool1 = d1.getBoolean(s);
boolean bool2 = d2.getBoolean(s);
if(bool1 != bool2)
return false;
break;
case DATA:
Data d1a = d1.getData(s);
Data d2a = d2.getData(s);
if(!equals(d1a, d2a))
return false;
break;
case BOUNDING_BOX:
BoundingBox bb1 = d1.getBoundingBox(s);
BoundingBox bb2 = d2.getBoundingBox(s);
if(!BoundingBox.equals(bb1, bb2))
return false;
break;
case POINT:
Point p1 = d1.getPoint(s);
Point p2 = d2.getPoint(s);
if(!Point.equals(p1, p2))
return false;
break;
}
}
return true;
}
static void assertNotReservedKey(@NonNull String s){
for(String kwd : reservedKeywords()){
if(kwd.equalsIgnoreCase(s)){
throw new IllegalStateException("Cannot use key \"" + kwd + "\" in a Data instance: This key is reserved" +
" for internal use only");
}
}
}
default void copyFrom(@NonNull String key, @NonNull Data from){
Preconditions.checkState(from.has(key), "Key %s does not exist in provided Data instance");
ValueType vt = from.type(key);
//TODO is there a cleaner way?
switch (vt){
case NDARRAY:
put(key, from.getNDArray(key));
return;
case STRING:
put(key, from.getString(key));
return;
case BYTES:
put(key, from.getBytes(key));
return;
case BYTEBUFFER:
put(key, from.getByteBuffer(key));
return;
case IMAGE:
put(key, from.getImage(key));
return;
case DOUBLE:
put(key, from.getDouble(key));
return;
case INT64:
put(key, from.getLong(key));
return;
case BOOLEAN:
put(key, from.getBoolean(key));
return;
case POINT:
put(key, from.getPoint(key));
return;
case DATA:
put(key, from.getData(key));
return;
case BOUNDING_BOX:
put(key, from.getBoundingBox(key));
return;
case LIST:
ValueType vtList = from.listType(key);
List<?> l = from.getList(key, vtList);
switch (vtList){
case NDARRAY:
putListNDArray(key, (List<NDArray>)l);
break;
case STRING:
putListString(key, (List<String>)l);
break;
case BYTES:
putListBytes(key, (List<byte[]>)l);
break;
case IMAGE:
putListImage(key, (List<Image>)l);
break;
case DOUBLE:
putListDouble(key, (List<Double>)l);
break;
case INT64:
putListInt64(key, (List<Long>)l);
break;
case BOOLEAN:
putListBoolean(key, (List<Boolean>)l);
break;
case BOUNDING_BOX:
putListBoundingBox(key, (List<BoundingBox>)l);
break;
case POINT:
putListPoint(key, (List<Point>)l);
break;
case DATA:
putListData(key, (List<Data>)l);
break;
case LIST:
putList(key, l, ValueType.LIST);
break;
default:
throw new UnsupportedOperationException("Not supported: " + vt);
}
break;
default:
throw new UnsupportedOperationException("Not supported: " + vt);
}
}
/**
* Merge all of the specified Data instance values into this Data instance
* @param allowOverwrite If true: allow duplicate keys to overwrite the keys in this Data instance
* @param datas The Data instances to merge into this one
*/
default void merge(boolean allowOverwrite, Data... datas){
for(Data d : datas){
for(String s : d.keys()){
//TODO we should check this BEFORE doing merging
if(has(s) && !allowOverwrite)
throw new IllegalStateException("Error during merging: Data instance already has key \"" + s + "\" and allowOverwrite is false");
this.copyFrom(s, d);
}
}
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/data/Image.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.data;
import ai.konduit.serving.pipeline.api.format.ImageFactory;
import ai.konduit.serving.pipeline.api.format.ImageFormat;
import ai.konduit.serving.pipeline.registry.ImageFactoryRegistry;
import lombok.NonNull;
import org.nd4j.common.base.Preconditions;
public interface Image {
int height();
int width();
int channels();
Object get();
<T> T getAs(ImageFormat<T> format);
<T> T getAs(Class<T> type);
boolean canGetAs(ImageFormat<?> format);
boolean canGetAs(Class<?> type);
//TODO how will this work for PNG, JPG etc files?
static Image create(@NonNull Object from) {
if(from instanceof Image) {
return (Image) from;
}
ImageFactory f = ImageFactoryRegistry.getFactoryFor(from);
Preconditions.checkState(f != null, "Unable to create Image from object of %s - no ImageFactory instances" +
" are available that can convert this type to Konduit Serving Image", from.getClass());
return f.create(from);
}
static boolean canCreateFrom(@NonNull Object from){
return ImageFactoryRegistry.getFactoryFor(from) != null;
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/data/NDArray.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.data;
import ai.konduit.serving.pipeline.api.format.NDArrayFactory;
import ai.konduit.serving.pipeline.api.format.NDArrayFormat;
import ai.konduit.serving.pipeline.registry.NDArrayFactoryRegistry;
import lombok.NonNull;
import org.nd4j.common.base.Preconditions;
public interface NDArray {
NDArrayType type();
long[] shape();
long size(int dimension);
int rank();
Object get();
<T> T getAs(NDArrayFormat<T> format);
<T> T getAs(Class<T> type);
boolean canGetAs(NDArrayFormat<?> format);
boolean canGetAs(Class<?> type);
static NDArray create(@NonNull Object from){
NDArrayFactory f = NDArrayFactoryRegistry.getFactoryFor(from);
Preconditions.checkState(f != null, "Unable to create NDArray from object of %s - no NDArrayFactory instances" +
" are available that can convert this type to Konduit Serving NDArray", from.getClass());
return f.create(from);
}
static boolean canCreateFrom(@NonNull Object from){
return NDArrayFactoryRegistry.getFactoryFor(from) != null;
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/data/NDArrayType.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.data;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* The data type of an {@link NDArray}
*/
@Schema(description = "An enum that specifies the data type of an n-dimensional array.")
public enum NDArrayType {
DOUBLE,
FLOAT,
FLOAT16,
BFLOAT16,
INT64,
INT32,
INT16,
INT8,
UINT64,
UINT32,
UINT16,
UINT8,
BOOL,
UTF8;
public boolean isFixedWidth(){
return width() > 0;
}
public int width() {
switch (this){
case DOUBLE:
case INT64:
case UINT64:
return 8;
case FLOAT:
case INT32:
case UINT32:
return 4;
case FLOAT16:
case BFLOAT16:
case INT16:
case UINT16:
return 2;
case INT8:
case UINT8:
case BOOL:
return 1;
case UTF8:
default:
return 0;
}
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/data/Point.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.data;
import ai.konduit.serving.pipeline.impl.data.point.NDPoint;
import ai.konduit.serving.pipeline.impl.serde.PointDeserializer;
import org.nd4j.shade.jackson.databind.annotation.JsonDeserialize;
import java.util.Objects;
/**
* Point is usually used to represent a point in space. Often, this may be a point on a 2 dimensional plane, or in 3
* dimensional space. However, a Point can in principle have any number of dimensions.
* <p>
* Points are generally specified with relative coordinates when used together with other inputs like pictures.
* But using them with absolute values is also possible.
*
* @author Paul Dubs
*/
@JsonDeserialize(using = PointDeserializer.class)
public interface Point {
/**
* As per {@link #create(double, double, String, Double)} without a label or probability
*/
static Point create(double x, double y) {
return create(x, y, "", 0.0);
}
/**
* Create a 2d Point instance.
* As per {@link Point}, specifying these as as a fraction of image size (i.e., 0.0 to 1.0) is generally preferred
*
* @param x X location
* @param y Y location
* @param label Label for the point. May be null.
* @param probability Probability for the point, in range [0.0, 1.0]. May be null
* @return Point instance
*/
static Point create(double x, double y, String label, Double probability) {
return new NDPoint(new double[]{x, y}, label, probability);
}
/**
* As per {@link #create(double, double, double, String, Double)} without a label or probability
*/
static Point create(double x, double y, double z) {
return create(x, y, z, "", 0.0);
}
/**
* Create a 3d Point instance.
* As per {@link Point}, specifying these as as a fraction of image size (i.e., 0.0 to 1.0) is generally preferred
*
* @param x X location
* @param y Y location
* @param z Z location
* @param label Label for the point. May be null.
* @param probability Probability for the point, in range [0.0, 1.0]. May be null
* @return Point instance
*/
static Point create(double x, double y, double z, String label, Double probability) {
return new NDPoint(new double[]{x, y, z}, label, probability);
}
/**
* As per {@link #create(double[], String, Double)} without a label or probability
*/
static Point create(double... x) {
return create(x, "", 0.0);
}
/**
* Create a n-d Point instance.
* As per {@link Point}, specifying these as a fraction of image size (i.e., 0.0 to 1.0) is
* generally preferred.
*
* @param x coordinates of the point in n-dimensional space
* @param label Label for the point. May be null.
* @param probability Probability for the point, in range [0.0, 1.0]. May be null
* @return Point instance
*/
static Point create(double[] x, String label, Double probability) {
return new NDPoint(x, label, probability);
}
/**
* @return The n-th coordinate of the point
*/
double get(int n);
/**
* @return Dimensionality of the point
*/
int dimensions();
/**
* @return The X coordinate (i.e., the first dimension of the point)
*/
default double x() { return get(0); }
/**
* @return The y coordinate (i.e., the second dimension of the point)
*/
default double y() { return get(1); }
/**
* @return The z coordinate (i.e., the third dimension of the point)
*/
default double z() { return get(2); }
/**
* @return The label for the bounding box. May be null.
*/
String label();
/**
* @return The probability for the bounding box. May be null.
*/
Double probability();
/**
* As per {@link #equals(Point, Point, double, double)} using eps = 1e-5 and probEps = 1e-5
*/
static boolean equals(Point p1, Point p2) {
return equals(p1, p2, 1e-5, 1e-5);
}
/**
* @param p1 First point to compare
* @param p2 Second point to compare
* @param eps Epsilon value for coordinates. Use 0.0 for exact, or non-zero for "approximately equals" behaviour
* @param probEps Epsilon value for probability comparison. Use 0.0 for exact probability match, or non-zero for "approximately
* equal" behavior. Unused if one/both points don't have a probability value
* @return True if the two points are equals, false otherwise
*/
static boolean equals(Point p1, Point p2, double eps, double probEps) {
if(p1 == p2){ return true; }
if(p1.dimensions() != p2.dimensions()){ return false; }
for (int i = 0; i < p1.dimensions(); i++) {
if(Math.abs(p1.get(i) - p2.get(i)) >= eps){ return false; }
}
return Objects.equals(p1.label(), p2.label()) &&
((p1.probability() == null && p2.probability() == null) ||
(p1.probability() != null && Math.abs(p1.probability() - p2.probability()) < probEps));
}
/**
* Turn relative defined coordinates into absolute coordinates
*/
default Point toAbsolute(double... absoluteSizes) {
// if the first point is absolute (not between 0 and 1), all others should be too
if(!(0.0 < x() && x() < 1.0)) { return this; }
double[] coords = new double[dimensions()];
if(coords.length != absoluteSizes.length){
throw new IllegalArgumentException("An absolute size has to be defined for each dimension of the point!");
}
for (int i = 0; i < coords.length; i++) {
coords[i] = absoluteSizes[i] * get(i);
}
return Point.create(coords, label(), probability());
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/data/ValueType.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.data;
public enum ValueType {
//NOTE: some uses of .ordinal() in protobuf means that any new additions should be added at the end of the list
NDARRAY,
STRING,
BYTES,
IMAGE,
DOUBLE,
INT64,
BOOLEAN,
BOUNDING_BOX,
DATA,
LIST,
POINT,
BYTEBUFFER,
NONE
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/exception/DataConversionException.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.exception;
public class DataConversionException extends RuntimeException {
public DataConversionException() {
}
public DataConversionException(String message) {
super(message);
}
public DataConversionException(String message, Throwable cause) {
super(message, cause);
}
public DataConversionException(Throwable cause) {
super(cause);
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/exception/DataLoadingException.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.exception;
public class DataLoadingException extends RuntimeException {
public DataLoadingException() {
}
public DataLoadingException(String message) {
super(message);
}
public DataLoadingException(String message, Throwable cause) {
super(message, cause);
}
public DataLoadingException(Throwable cause) {
super(cause);
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/exception/ModelLoadingException.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.api.exception;
public class ModelLoadingException extends RuntimeException {
public ModelLoadingException(String message) {
super(message);
}
public ModelLoadingException(String message, Throwable cause) {
super(message, cause);
}
public ModelLoadingException(Throwable cause) {
super(cause);
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/format/FormatFactory.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.format;
import ai.konduit.serving.pipeline.api.data.Image;
import java.util.Set;
public interface FormatFactory<T> {
Set<Class<?>> supportedTypes();
boolean canCreateFrom(Object o);
T create(Object o);
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/format/ImageConverter.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.format;
import ai.konduit.serving.pipeline.api.data.Image;
public interface ImageConverter {
boolean canConvert(Image from, ImageFormat<?> to);
boolean canConvert(Image from, Class<?> to);
<T> T convert(Image from, ImageFormat<T> to);
<T> T convert(Image from, Class<T> to);
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/format/ImageFactory.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.format;
import ai.konduit.serving.pipeline.api.data.Image;
public interface ImageFactory extends FormatFactory<Image> {
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/format/ImageFormat.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.format;
public interface ImageFormat<T> {
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/format/NDArrayConverter.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.format;
import ai.konduit.serving.pipeline.api.data.NDArray;
public interface NDArrayConverter {
boolean canConvert(NDArray from, NDArrayFormat<?> to);
boolean canConvert(NDArray from, Class<?> to);
<T> T convert(NDArray from, NDArrayFormat<T> to);
<T> T convert(NDArray from, Class<T> to);
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/format/NDArrayFactory.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.format;
import ai.konduit.serving.pipeline.api.data.NDArray;
public interface NDArrayFactory extends FormatFactory<NDArray> {
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/format/NDArrayFormat.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.format;
public interface NDArrayFormat<T> {
Class<T> formatType();
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/pipeline/Pipeline.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.api.pipeline;
import ai.konduit.serving.pipeline.api.TextConfig;
import ai.konduit.serving.pipeline.api.data.Data;
import ai.konduit.serving.pipeline.api.step.PipelineStep;
import ai.konduit.serving.pipeline.impl.pipeline.serde.PipelineDeserializer;
import ai.konduit.serving.pipeline.util.ObjectMappers;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.NonNull;
import org.nd4j.shade.jackson.databind.annotation.JsonDeserialize;
import java.io.Serializable;
/**
* A Pipeline object represents the configuration of a machine learning pipeline - including zero or more machine learning
* models, and zero or more ETL steps, etc.<br>
* Fundamentally, a Pipeline is a {@link Data} -> {@link Data} transformation, that is built out of any number of
* {@link PipelineStep} operations internally.
* <p>
* A Pipeline may be a simple sequence of {@link PipelineStep}s or may be a more complex directed acyclic graph of steps,
* perhaps including conditional operations/branching
*/
@JsonDeserialize(using = PipelineDeserializer.class)
@Schema(description = "A konduit serving pipeline.")
public interface Pipeline extends TextConfig, Serializable {
/**
* Return (or instantiate if necessary) the executor for executing this pipeline
*
* @return An instantiated pipeline executor for this pipeline
*/
PipelineExecutor executor();
static Pipeline fromJson(@NonNull String json){
return ObjectMappers.fromJson(json, Pipeline.class);
}
static Pipeline fromYaml(@NonNull String yaml){
return ObjectMappers.fromYaml(yaml, Pipeline.class);
}
/**
* For keeping the size/count of the number of steps/levels inside the pipeline configuration
* @return number of steps in the pipeline configuration
*/
int size();
/**
* Pipeline ID as input for metrics system
* @return Pipeline ID
*/
String id();
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/pipeline/PipelineExecutor.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.api.pipeline;
import ai.konduit.serving.pipeline.api.context.Profiler;
import ai.konduit.serving.pipeline.api.context.ProfilerConfig;
import ai.konduit.serving.pipeline.api.data.Data;
import ai.konduit.serving.pipeline.api.step.PipelineStepRunner;
import org.slf4j.Logger;
import java.util.List;
/**
* A pipeline executor implements the actual execution behind the {@link Data} -> {@link Data} mapping that is defined
* by a {@link Pipeline}
*
* @author Alex Black
*/
public interface PipelineExecutor {
/**
* Gen the underlying pipeline that this executor will execute
*/
Pipeline getPipeline();
/**
* Get the runners that this PipelineStepExecuter will use to execute the pipeline steps
*/
List<PipelineStepRunner> getRunners();
/**
* Execute the pipeline on the specified Data instance
*/
Data exec(Data data);
/**
* Execute the pipeline on all of the specified Data instances
*/
default Data[] exec(Data... data) {
Data[] out = new Data[data.length];
for (int i = 0; i < data.length; i++) {
out[i] = exec(data[i]);
}
return out;
}
/**
* Close the pipeline executor.
* This means cleaning up any used resources such as memory, database connections, etc.
* This method will be called when a pipeline needs to be finalized.
* In practice the call is usually routed to {@link PipelineStepRunner#close()} for each of the {@link PipelineStepRunner}s
* returned by {@link #getRunners()}
*/
default void close() {
for (PipelineStepRunner r : getRunners()) {
try {
r.close();
} catch (Throwable t) {
getLogger().error("Error closing PipelineStepRunner", t);
}
}
}
/**
* Get the logger used by this PipelineExecutor
*/
Logger getLogger();
/**
* Set profiling config.
*/
void profilerConfig(ProfilerConfig profilerConfig);
Profiler profiler();
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/pipeline/Trigger.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.pipeline;
import ai.konduit.serving.pipeline.api.TextConfig;
import ai.konduit.serving.pipeline.api.data.Data;
import org.nd4j.shade.jackson.annotation.JsonTypeInfo;
import java.util.function.Function;
import static org.nd4j.shade.jackson.annotation.JsonTypeInfo.Id.NAME;
/**
* Trigger is used with {@link ai.konduit.serving.pipeline.impl.pipeline.AsyncPipeline}, and determines when/how
* the underlying pipeline will be called, which may be independent
* For example, a Trigger could be used to implement behaviour such as: "execute 5 times every second irrespective of
* whether the pipeline is queried by the user" (for example, for processing data from a webcam or IP camera)<br>
* <p>
* Trigger can be used to implement behaviour such as:
* (a) Execute the underlying pipeline every N milliseconds, and return the last Data output when actually queried<br>
* (b) Execute the pipeline at most N times per second (and return the cached value if not)<br>
*
* @author Alex Black
*/
@JsonTypeInfo(use = NAME, property = "@type")
public interface Trigger extends TextConfig {
/**
* This method is called whenever the AsyncPipeline's exec(Data) method is called
*
* @param data The input data
* @return The output (possibly cached from async execution)
*/
Data query(Data data);
/**
* The callback function to use. This method is called when the AsyncPipeline is set up for execution;
* the function is used to execute the underlying pipeline.
*
* @param callbackFn Function to use to perform execution of the underlying pipeline
*/
void setCallback(Function<Data, Data> callbackFn);
/**
* Stop the underlying execution, if any
*/
void stop();
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/process/ProcessUtils.java
|
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://www.apache.org/licenses/LICENSE-2.0.
* *
* * See the NOTICE file distributed with this work for additional
* * information regarding copyright ownership.
* * 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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/package ai.konduit.serving.pipeline.api.process;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.IOUtils;
import org.nd4j.common.base.Preconditions;
import org.nd4j.shade.guava.collect.Streams;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
@Slf4j
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class ProcessUtils {
private static final String OS = System.getProperty("os.name").toLowerCase();
public static boolean isWindows() {
return OS.contains("win");
}
public static boolean isMac() {
return OS.contains("mac");
}
public static boolean isUnix() {
return OS.contains("nix") || OS.contains("nux") || OS.contains("aix");
}
public static boolean isSolaris() {
return OS.contains("sunos");
}
public static String runAndGetOutput(String... command){
try {
Process process = startProcessFromCommand(command);
String output = getProcessOutput(process);
String errorOutput = getProcessErrorOutput(process);
int errorCode = process.waitFor();
Preconditions.checkState(0 == errorCode,
String.format("Process exited with non-zero (%s) exit code. Details: %n%s%n%s", errorCode, output, errorOutput)
);
log.debug("Process output: {}", output);
log.debug("Process errors (ignore if none): '{}'", errorOutput);
return output;
} catch (IOException | InterruptedException e) {
e.printStackTrace();
System.exit(1);
return null;
}
}
private static Process startProcessFromCommand(String... command) throws IOException {
return getProcessBuilderFromCommand(command).start();
}
private static ProcessBuilder getProcessBuilderFromCommand(String... command) {
List<String> fullCommand = Streams.concat(getBaseCommand().stream(), Arrays.stream(command)).collect(Collectors.toList());
log.debug("Running command (sub): {}", String.join(" ", command));
return new ProcessBuilder(fullCommand);
}
private static List<String> getBaseCommand() {
return Arrays.asList();
}
private static String getProcessOutput(Process process) throws IOException {
return IOUtils.toString(process.getInputStream(), StandardCharsets.UTF_8);
}
private static String getProcessErrorOutput(Process process) throws IOException {
return IOUtils.toString(process.getErrorStream(), StandardCharsets.UTF_8);
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/protocol/AzureClient.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.protocol;
public class AzureClient implements NetClient {
@Override
public void connect(String host) {
}
@Override
public boolean login(String user, String password) {
return false;
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/protocol/FtpClient.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.protocol;
import org.apache.commons.net.PrintCommandListener;
import org.apache.commons.net.ftp.FTPClient;
import java.io.IOException;
import java.io.PrintWriter;
public class FtpClient implements NetClient {
private FTPClient ftp = new FTPClient();
private int port = 21;
@Override
public void connect(String host) throws IOException {
ftp.connect("localhost", port);
ftp.addProtocolCommandListener(new PrintCommandListener(new PrintWriter(System.out)));
}
@Override
public boolean login(String user, String password) throws IOException {
return ftp.login(user, password);
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/protocol/GoogleCloudClient.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.protocol;
public class GoogleCloudClient implements NetClient {
@Override
public void connect(String host) {
}
@Override
public boolean login(String user, String password) {
return false;
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/protocol/HdfsClient.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.protocol;
public class HdfsClient implements NetClient {
@Override
public void connect(String host) {
}
@Override
public boolean login(String user, String password) {
return false;
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/protocol/NetClient.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.protocol;
import java.io.IOException;
public interface NetClient {
void connect(String host) throws IOException;
boolean login(String user, String password) throws IOException;
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/protocol/S3Client.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.protocol;
public class S3Client implements NetClient {
@Override
public void connect(String host) {
}
@Override
public boolean login(String user, String password) {
return false;
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/protocol/URIResolver.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.protocol;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang3.StringUtils;
import java.io.*;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLConnection;
import java.nio.file.Paths;
@Slf4j
public class URIResolver {
public static boolean isUrl(String input) {
if (input.startsWith("http://") ||
input.startsWith("https://") ||
input.startsWith("ftp://")) {
return true;
}
return false;
}
private static File cacheDirectory;
static {
File f = new File(System.getProperty("user.home"), ".konduit_cache/");
if (!f.exists())
f.mkdirs();
cacheDirectory = f;
}
public static File getCachedFile(String uri) {
URI u = URI.create(uri);
String fullPath = StringUtils.defaultIfEmpty(u.getScheme(), StringUtils.EMPTY);
//System.out.println(u.getPath());
String[] dirs = u.getPath().split("/");
fullPath += File.separator + FilenameUtils.getName(uri);
File effectiveDirectory = new File(cacheDirectory, fullPath);
return effectiveDirectory;
}
public static File getFile(String uri) throws IOException {
File f = getIfFile(uri);
if(f != null){
return f;
}
URI u = URI.create(uri);
String scheme = u.getScheme();
if (scheme.equals("file")) {
return new File(u.getPath());
}
File cachedFile = getCachedFile(uri);
if (cachedFile.exists()) {
return cachedFile;
}
URL url = u.toURL();
URLConnection connection = url.openConnection();
FileUtils.copyURLToFile(url, cachedFile);
return cachedFile;
}
public static void clearCache(){
try {
FileUtils.deleteDirectory(cacheDirectory);
} catch (IOException e){
log.warn("Failed to delete cache directory: {}", cacheDirectory);
}
cacheDirectory.mkdirs();
}
protected static File getIfFile(String path){
if(path.matches("\\w+://.*") || path.startsWith("file:/")) //Regex does not catch file:/C:/... out of (new File(...).toURI().toString()
return null;
try{
File f = new File(path);
f.getCanonicalPath(); //Throws an IOException if not a valid file path
return f;
} catch (IOException e2){
return null;
}
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/protocol
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/protocol/handlers/KSStreamHandlerFactory.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.protocol.handlers;
//import org.apache.hadoop.fs.FsUrlStreamHandlerFactory;
import java.net.URLStreamHandler;
import java.net.URLStreamHandlerFactory;
public class KSStreamHandlerFactory implements URLStreamHandlerFactory {
@Override
public URLStreamHandler createURLStreamHandler(String protocol) {
if ("s3".equals(protocol)) {
return new S3Handler();
}
/*else if ("hdfs".equals(protocol)) {
return new FsUrlStreamHandlerFactory().createURLStreamHandler("hdfs");
}*/
return null;
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/protocol
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/protocol/handlers/S3Handler.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.protocol.handlers;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;
/*import org.jets3t.service.ServiceException;
import org.jets3t.service.impl.rest.httpclient.RestS3Service;
import org.jets3t.service.model.S3Object;
import org.jets3t.service.security.AWSCredentials;*/
public class S3Handler extends URLStreamHandler {
protected URLConnection openConnection(URL url) throws IOException {
return new URLConnection(url) {
@Override
public InputStream getInputStream() throws IOException {
String accessKey = null;
String secretKey = null;
if (url.getUserInfo() != null) {
String[] credentials = url.getUserInfo().split("[:]");
accessKey = credentials[0];
secretKey = credentials[1];
}
String bucket = url.getHost().substring(0, url.getHost().indexOf("."));
String key = url.getPath().substring(1);
/*try {
RestS3Service s3Service = new RestS3Service(new AWSCredentials(accessKey, secretKey));
S3Object s3obj = s3Service.getObject(bucket, key);
return s3obj.getDataInputStream();
} catch (ServiceException e) {
throw new IOException(e);
}*/
return null;
}
@Override
public void connect() throws IOException { }
};
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/python/PythonPathUtils.java
|
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://www.apache.org/licenses/LICENSE-2.0.
* *
* * See the NOTICE file distributed with this work for additional
* * information regarding copyright ownership.
* * 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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.python;
import ai.konduit.serving.pipeline.api.process.ProcessUtils;
import ai.konduit.serving.pipeline.api.python.models.*;
import ai.konduit.serving.pipeline.settings.DirectoryFetcher;
import ai.konduit.serving.pipeline.util.ObjectMappers;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FileUtils;
import org.nd4j.shade.guava.collect.Streams;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
@Slf4j
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class PythonPathUtils {
public static final String FINDER_COMMAND = ProcessUtils.isWindows() ? "where" : "which";
private static final File registeredInstallDetailsLocation = new File(DirectoryFetcher.getProfilesDir(), "registered-installs.json");
public static List<PythonDetails> findPythonInstallations() {
List<String> pythonInstallationPaths = findInstallationPaths(PythonType.PYTHON.name().toLowerCase());
List<String> allPythonInstallations = Streams.concat(pythonInstallationPaths.stream(),
filterRegisteredInstalls(PythonType.PYTHON).stream().map(RegisteredPythonInstall::path)).collect(Collectors.toList());
return IntStream.range(0, allPythonInstallations.size())
.mapToObj(index -> getPythonDetails(String.valueOf(index + 1), allPythonInstallations.get(index)))
.collect(Collectors.toList());
}
public static PythonDetails getPythonDetails(String id, String pythonPath) {
return new PythonDetails(id, pythonPath, getPythonVersion(pythonPath));
}
public static List<CondaDetails> findCondaInstallations() {
List<String> condaInstallationPaths = findInstallationPaths(PythonType.CONDA.name().toLowerCase());
List<String> allCondaInstalls = Streams.concat(condaInstallationPaths.stream(),
filterRegisteredInstalls(PythonType.CONDA).stream().map(RegisteredPythonInstall::path)).collect(Collectors.toList());
return IntStream.range(0, allCondaInstalls.size())
.mapToObj(index -> getCondaDetails(String.valueOf(index + 1), allCondaInstalls.get(index)))
.collect(Collectors.toList());
}
public static CondaDetails getCondaDetails(String id, String condaPath) {
return new CondaDetails(id, condaPath, getCondaVersion(condaPath), findCondaEnvironments(condaPath));
}
public static List<VenvDetails> findVenvInstallations() {
List<RegisteredPythonInstall> allVenvInstallations = filterRegisteredInstalls(PythonType.VENV);
return IntStream.range(0, allVenvInstallations.size())
.mapToObj(index -> getPythonDetails(String.valueOf(index + 1), getVenvPythonFile(allVenvInstallations.get(index).path()).getAbsolutePath()))
.map(pythonDetails -> new VenvDetails(pythonDetails.id(), pythonDetails.path(), pythonDetails.version()))
.collect(Collectors.toList());
}
public static String getPythonVersion(String pythonPath) {
String pythonCommandOutput = ProcessUtils.runAndGetOutput(pythonPath, "-c", "import sys; print('Python ' + sys.version.split(' ')[0])");
if(pythonCommandOutput.contains("Python ")) {
return pythonCommandOutput.replace("Python ", "");
} else {
throw new IllegalStateException(String.format("Path at '%s' is not a valid python executable.", pythonPath));
}
}
public static String getCondaVersion(String condaPath) {
String condaCommandOutput = ProcessUtils.runAndGetOutput(condaPath, "--version");
if(condaCommandOutput.contains("conda ")) {
return condaCommandOutput.replace("conda ", "");
} else {
throw new IllegalStateException(String.format("Path at '%s' is not a valid conda executable.", condaPath));
}
}
public static String getVenvVersion(String venvPath) {
File venvPythonPath = getVenvPythonFile(venvPath);
if(!venvPythonPath.exists()) {
throw new IllegalStateException(String.format("Unable to find python path associated with the virtual environment at '%s'. " +
"Please ensure the specified venv path at '%s' is a valid python virtual environment.", venvPythonPath.getAbsoluteFile(), new File(venvPath).getAbsoluteFile()));
} else {
return getPythonVersion(venvPythonPath.getAbsolutePath());
}
}
public static File getVenvPythonFile(String venvPath) {
return Paths.get(venvPath, ProcessUtils.isWindows() ? "Scripts" : "bin", ProcessUtils.isWindows() ? "python.exe" : "python").toFile();
}
public static String getPythonPathFromRoot(String rootPath) {
return (ProcessUtils.isWindows() ?
Paths.get(rootPath, "python.exe") :
Paths.get(rootPath, "bin", "python"))
.toFile().getAbsolutePath();
}
public static List<String> findInstallationPaths(String type) {
return Arrays.stream(ProcessUtils.runAndGetOutput(FINDER_COMMAND, type).split(System.lineSeparator()))
.collect(Collectors.toList());
}
public static List<PythonDetails> findCondaEnvironments(String condaPath) {
return Arrays.stream(
ProcessUtils.runAndGetOutput(condaPath, "info", "-e")
.replace("*", " ")
.replace("# conda environments:", "")
.replace("#", "")
.trim()
.split(System.lineSeparator()))
.collect(Collectors.toList())
.stream()
.map(envInfo -> {
String[] envInfoSplits = envInfo.split("\\s+", 2);
String resolvedPythonPath = getPythonPathFromRoot(envInfoSplits[1]);
return new PythonDetails(envInfoSplits[0], resolvedPythonPath, getPythonVersion(resolvedPythonPath));
}).collect(Collectors.toList());
}
public static void registerInstallation(PythonType pythonType, String path) {
List<RegisteredPythonInstall> registeredPythonInstalls = getRegisteredPythonInstalls();
path = new File(path).getAbsolutePath();
switch (pythonType) {
case PYTHON:
String pythonVersion = getPythonVersion(path);
registeredPythonInstalls.add(new RegisteredPythonInstall(pythonType, path, pythonVersion));
break;
case CONDA:
String condaVersion = getCondaVersion(path);
registeredPythonInstalls.add(new RegisteredPythonInstall(pythonType, path, condaVersion));
break;
case VENV:
String venvVersion = getVenvVersion(path);
registeredPythonInstalls.add(new RegisteredPythonInstall(pythonType, path, venvVersion));
break;
}
saveRegisteredPythonInstalls(registeredPythonInstalls);
System.out.format("Registered installation of type: '%s' from location: '%s'%n", pythonType.name(), path);
}
public static List<RegisteredPythonInstall> getRegisteredPythonInstalls() {
try {
return ObjectMappers.fromJson(FileUtils.readFileToString(registeredInstallDetailsLocation, StandardCharsets.UTF_8), RegisteredPythonInstalls.class).registeredPythonInstalls();
} catch (FileNotFoundException e) {
return new ArrayList<>();
} catch (IOException e) {
System.out.println(e.getMessage());
System.exit(1);
return new ArrayList<>();
}
}
public static List<RegisteredPythonInstall> filterRegisteredInstalls(PythonType pythonType) {
return getRegisteredPythonInstalls().stream()
.filter(registeredPythonInstall -> registeredPythonInstall.pythonType().equals(pythonType))
.collect(Collectors.toList());
}
public static void saveRegisteredPythonInstalls(List<RegisteredPythonInstall> registeredPythonInstalls) {
try {
FileUtils.writeStringToFile(registeredInstallDetailsLocation, ObjectMappers.toJson(new RegisteredPythonInstalls(registeredPythonInstalls)), StandardCharsets.UTF_8);
} catch (IOException e) {
System.out.println(e.getMessage());
System.exit(1);
}
}
public enum PythonType {
PYTHON, CONDA, VENV
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/python
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/python/models/AppendType.java
|
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://www.apache.org/licenses/LICENSE-2.0.
* *
* * See the NOTICE file distributed with this work for additional
* * information regarding copyright ownership.
* * 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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.python.models;
public enum AppendType {
BEFORE,
NONE,
AFTER
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/python
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/python/models/CondaDetails.java
|
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://www.apache.org/licenses/LICENSE-2.0.
* *
* * See the NOTICE file distributed with this work for additional
* * information regarding copyright ownership.
* * 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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.python.models;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.util.List;
@Data
@Accessors(fluent = true)
@AllArgsConstructor
@NoArgsConstructor
public class CondaDetails {
private String id;
private String path;
private String version;
private List<PythonDetails> environments;
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/python
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/python/models/JavaCppDetails.java
|
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://www.apache.org/licenses/LICENSE-2.0.
* *
* * See the NOTICE file distributed with this work for additional
* * information regarding copyright ownership.
* * 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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.python.models;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
@Data
@Accessors(fluent = true)
@NoArgsConstructor
@AllArgsConstructor
public class JavaCppDetails {
String id;
String path;
String version;
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/python
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/python/models/PythonConfigType.java
|
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://www.apache.org/licenses/LICENSE-2.0.
* *
* * See the NOTICE file distributed with this work for additional
* * information regarding copyright ownership.
* * 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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.python.models;
public enum PythonConfigType {
JAVACPP,
PYTHON,
CONDA,
VENV,
CUSTOM
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/python
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/python/models/PythonDetails.java
|
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://www.apache.org/licenses/LICENSE-2.0.
* *
* * See the NOTICE file distributed with this work for additional
* * information regarding copyright ownership.
* * 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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.python.models;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
@Data
@Accessors(fluent = true)
@AllArgsConstructor
@NoArgsConstructor
public class PythonDetails {
private String id;
private String path;
private String version;
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/python
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/python/models/RegisteredPythonInstall.java
|
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://www.apache.org/licenses/LICENSE-2.0.
* *
* * See the NOTICE file distributed with this work for additional
* * information regarding copyright ownership.
* * 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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.python.models;
import ai.konduit.serving.pipeline.api.python.PythonPathUtils;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
@Data
@Accessors(fluent = true)
@NoArgsConstructor
@AllArgsConstructor
public class RegisteredPythonInstall {
private PythonPathUtils.PythonType pythonType;
private String path;
private String version;
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/python
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/python/models/RegisteredPythonInstalls.java
|
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://www.apache.org/licenses/LICENSE-2.0.
* *
* * See the NOTICE file distributed with this work for additional
* * information regarding copyright ownership.
* * 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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.python.models;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.util.List;
@Data
@Accessors(fluent = true)
@NoArgsConstructor
@AllArgsConstructor
public class RegisteredPythonInstalls {
List<RegisteredPythonInstall> registeredPythonInstalls;
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/python
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/python/models/VenvDetails.java
|
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://www.apache.org/licenses/LICENSE-2.0.
* *
* * See the NOTICE file distributed with this work for additional
* * information regarding copyright ownership.
* * 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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.api.python.models;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
@Data
@Accessors(fluent = true)
@AllArgsConstructor
@NoArgsConstructor
public class VenvDetails {
private String id;
private String path;
private String version;
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/serde/JsonSubType.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.api.serde;
import ai.konduit.serving.pipeline.api.TextConfig;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
/**
* JsonSubType represents a human-readable JSON/YAML subtype mapping.<br>
* Essentially, {@code JsonSubType("X", MyXClass, SomeConfigInterface)} means that the JSON represented by a wrapper
* class "X" should be deserialized to the implementation class "MyXClass" which implements the configuration
* interface "SomeConfigInterface"
*
* i.e., the folowing JSON:
* <pre>
* "X" : {
* (some config fields here)
* }
* </pre>
* could be deserialized as follows: {@code SomeConfigInterface i = MyXClass.fromJson("...")}
*/
@AllArgsConstructor
@Data
@Builder
public class JsonSubType {
/**
* The name of the type as it appears in the JSON or YAML configuration
*/
private String name;
/**
* The class that the "name" data should be deserialized to
*/
private Class<?> subtype;
/**
* The interface that the subtype class implements - i.e., "subtype" implements "configInterface"
*/
private Class<? extends TextConfig> configInterface;
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/serde/JsonSubTypesMapping.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.api.serde;
import java.util.List;
import java.util.ServiceLoader;
/**
* JsonSubTypesMapping is an interface implemented by a class in each module.
*
* Used via {@link ServiceLoader} or OSGi to determine at what objects JSON can be deserialized to, based on the currently
* available Konduit Serving module.
*
* See {@link JsonSubType} for more details
*
*/
public interface JsonSubTypesMapping {
/**
* @return A list of JsonSubType objects that represent the classes that the JSON data can be deserialized to using this module
*/
List<JsonSubType> getSubTypesMapping();
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/step/PipelineStep.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.api.step;
import ai.konduit.serving.pipeline.api.TextConfig;
import org.nd4j.shade.jackson.annotation.JsonTypeInfo;
import java.io.Serializable;
import static org.nd4j.shade.jackson.annotation.JsonTypeInfo.Id.NAME;
/**
* A PipelineStep defines the configuration for one component of a Pipeline. Note that no execution-related
* functionality is implemented in a {@link PipelineStepRunner}<br>
* <br>
* A given PipelineStep may be executable by more than one type of {@link PipelineStepRunner}.
* For example, a TensorFlow model could in principle be executed by any of the TensorFlow runtime, SameDiff, or
* the ONNX runtime.
*/
//Note: For JSON subtypes, we can't use the typical Jackson annotations, as the classes implementing the PipelineStep
// interface won't generally be defined in konduit-serving-pipeline module - hence can't be referenced here
// In practice this means we'll use a registration type approach via JsonSubTypesMapping
@JsonTypeInfo(use = NAME, property = "@type")
public interface PipelineStep extends TextConfig, Serializable {
default String name() {
return getClass().getSimpleName();
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/step/PipelineStepRunner.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.api.step;
import ai.konduit.serving.pipeline.api.context.Context;
import ai.konduit.serving.pipeline.api.data.Data;
import java.io.Closeable;
/**
* PipelineStepRunner executes a given {@link PipelineStep}.
* Note that PipelineStepRunner instances are instantiated by a {@link PipelineStepRunnerFactory}
*/
public interface PipelineStepRunner extends Closeable {
/**
* Destroy the pipeline step runner.
* <p>
* This means cleaning up any used resources such as memory, resources, etc.
* This method will be called when a pipeline needs to be finalized.
*/
void close();
/**
* @return The pipeline step (configuration) that this PipelineStepRunner will execute
*/
PipelineStep getPipelineStep();
/**
* Execute the pipeline on the specified Data instance
*/
Data exec(Context ctx, Data data);
/**
* Execute the pipeline on all of the specified Data instances
*/
default Data[] exec(Context ctx, Data... data) {
Data[] out = new Data[data.length];
for (int i = 0; i < data.length; i++) {
out[i] = exec(ctx, data[i]);
}
return out;
}
/**
* Get name of the current runner for logging
*/
default String name(){
return getClass().getSimpleName();
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/api/step/PipelineStepRunnerFactory.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.api.step;
/**
* PipelineRunnerFactory is used to instantiate a {@link PipelineStepRunner} from a {@link PipelineStep}
* i.e., get the pipeline step execution class from the pipeline step definitionh/configuration class.
* <p>
* This design is used for a number of reasons:
* (a) It allows for multiple PipelineStepRunner implementations that are able to run a given pipeline step
* In principle we could have multiple on the classpath - or swap in different pipeline step runners for the same
* pipeline step, in different situations / use cases.
* (b) It is more appropriate a design for OSGi-based implementations where things like Class.forName can't be used
* <p>
* <p>
* TODO: We'll need a way to prioritize PipelineRunnerFactory instances - what happens if there are 2 or more ways to
* run a given pipeline? Which should we choose?
*/
public interface PipelineStepRunnerFactory {
/**
* Returns true if the PipelineRunnerFactory is able to create a PipelineStepRunner for this particular
* type of pipeline step
*
* @param step The pipeline step to check if this PipelineRunnerFactory can execute
* @return True if the pipeline step can be executed by the type of runners that this factory creates
*/
boolean canRun(PipelineStep step);
/**
* Returns a {@link PipelineStepRunner} that can be used to execute the given PipelineStep
*
* @param step The pipeline step to execute
* @return The instantiated PipelineStepRunner
*/
PipelineStepRunner create(PipelineStep step);
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/context/DefaultContext.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.context;
import ai.konduit.serving.pipeline.api.context.Context;
import ai.konduit.serving.pipeline.api.context.Metrics;
import ai.konduit.serving.pipeline.api.context.Profiler;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.experimental.Accessors;
@AllArgsConstructor
@Data
@Accessors(fluent = true)
public class DefaultContext implements Context {
private final Metrics metrics;
private final Profiler profiler;
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/JData.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.impl.data;
import ai.konduit.serving.pipeline.api.data.*;
import ai.konduit.serving.pipeline.impl.data.wrappers.*;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import java.nio.ByteBuffer;
import java.util.*;
@Slf4j
public class JData implements Data {
private Map<String, Value> dataMap = new LinkedHashMap<>();
private Data metaData;
private static final String VALUE_NOT_FOUND_TEXT = "Value not found for key \"%s\"";
private static final String VALUE_HAS_WRONG_TYPE_TEXT = "Value has wrong type for key \"%s\": requested type %s, actual type %s";
public Map<String, Value> getDataMap() {
return dataMap;
}
@Override
public int size() {
return dataMap.size();
}
@Override
public List<String> keys() {
Set<String> keys = dataMap.keySet();
List<String> retVal = new ArrayList<>();
retVal.addAll(keys);
return retVal;
}
@Override
public String key(int id) {
String retVal = null;
Iterator<Map.Entry<String,Value>> iterator = dataMap.entrySet().iterator();
for (int i = 0; i < id; ++i) {
retVal = iterator.next().getKey();
}
return retVal;
}
private Value valueIfFound(String key, ValueType type) {
Value data = dataMap.get(key);
if (data == null)
throw new ValueNotFoundException(String.format(VALUE_NOT_FOUND_TEXT, key));
if(data.type() == ValueType.LIST && type == ValueType.NDARRAY) {
data = new NDArrayValue(NDArray.create(data));
} else {
if (data.type() != type)
throw new IllegalStateException(String.format(VALUE_HAS_WRONG_TYPE_TEXT, key, type, data.type()));
}
return data;
}
private <T> List<T> listIfFound(String key, ValueType listType){
Value lValue = dataMap.get(key);
if(lValue == null)
throw new ValueNotFoundException(String.format(VALUE_NOT_FOUND_TEXT, key));
if(lValue.type() != ValueType.LIST)
throw new IllegalStateException(String.format(VALUE_HAS_WRONG_TYPE_TEXT, key, ValueType.LIST, lValue.type()));
//TODO Check list type
return (List<T>) lValue.get();
}
@Override
public ValueType type(String key) {
Value data = dataMap.get(key);
if (data == null)
throw new ValueNotFoundException(String.format(VALUE_NOT_FOUND_TEXT, key));
return data.type();
}
@Override
public ValueType listType(String key) {
Value data = dataMap.get(key);
if (data == null || !(data instanceof ListValue))
throw new ValueNotFoundException(String.format(VALUE_NOT_FOUND_TEXT, key));
return ((ListValue)data).elementType();
}
@Override
public boolean has(String key) {
return dataMap.containsKey(key);
}
@Override
public Object get(String key) throws ValueNotFoundException {
if(!dataMap.containsKey(key))
throw new ValueNotFoundException(String.format(VALUE_NOT_FOUND_TEXT, key));
return dataMap.get(key).get();
}
@Override
public NDArray getNDArray(String key) {
Value<NDArray> data = valueIfFound(key, ValueType.NDARRAY);
return data.get();
}
@Override
public String getString(String key) {
Value<String> data = valueIfFound(key, ValueType.STRING);
return data.get();
}
@Override
public boolean getBoolean(String key) {
Value<Boolean> data = valueIfFound(key, ValueType.BOOLEAN);
return data.get();
}
@Override
public ByteBuffer getByteBuffer(String key) {
Value<ByteBuffer> data = valueIfFound(key, ValueType.BYTEBUFFER);
return data.get();
}
@Override
public byte[] getBytes(String key) {
Value<byte[]> data = valueIfFound(key, ValueType.BYTES);
return data.get();
}
@Override
public double getDouble(String key) {
Value<Double> data = valueIfFound(key, ValueType.DOUBLE);
return data.get();
}
@Override
public Image getImage(String key) {
Value<Image> data = valueIfFound(key, ValueType.IMAGE);
return data.get();
}
@Override
public long getLong(String key) {
Value<Long> data = valueIfFound(key, ValueType.INT64);
return data.get();
}
@Override
public BoundingBox getBoundingBox(String key) throws ValueNotFoundException {
Value<BoundingBox> data = valueIfFound(key, ValueType.BOUNDING_BOX);
return data.get();
}
@Override
public Point getPoint(String key) throws ValueNotFoundException {
Value<Point> data = valueIfFound(key, ValueType.POINT);
return data.get();
}
@Override
public List<Object> getList(String key, ValueType type) {
Value<List<Object>> data = valueIfFound(key, ValueType.LIST);
return data.get();
}
@Override
public Data getData(String key) {
Value<Data> data = valueIfFound(key, ValueType.DATA);
return data.get();
}
@Override
public List<String> getListString(String key) {
return listIfFound(key, ValueType.STRING);
}
@Override
public List<Long> getListInt64(String key) {
return listIfFound(key, ValueType.INT64);
}
@Override
public List<Boolean> getListBoolean(String key) {
return listIfFound(key, ValueType.BOOLEAN);
}
@Override
public List<byte[]> getListBytes(String key) {
return listIfFound(key, ValueType.BYTES);
}
@Override
public List<ByteBuffer> getListByteBuffer(String key) {
return listIfFound(key, ValueType.BYTEBUFFER);
}
@Override
public List<Double> getListDouble(String key) {
return listIfFound(key, ValueType.DOUBLE);
}
@Override
public List<Point> getListPoint(String key) {
return listIfFound(key, ValueType.POINT);
}
@Override
public List<List<?>> getListData(String key) {
return listIfFound(key, ValueType.LIST);
}
@Override
public List<Image> getListImage(String key) {
return listIfFound(key, ValueType.IMAGE);
}
@Override
public List<NDArray> getListNDArray(String key) {
return listIfFound(key, ValueType.NDARRAY);
}
@Override
public List<BoundingBox> getListBoundingBox(String key) {
return listIfFound(key, ValueType.BOUNDING_BOX);
}
@Override
public void put(String key, String data) {
Data.assertNotReservedKey(key);
dataMap.put(key, new StringValue(data));
}
@Override
public void put(String key, NDArray data) {
Data.assertNotReservedKey(key);
dataMap.put(key, new NDArrayValue(data));
}
@Override
public void put(String key, ByteBuffer data) {
Data.assertNotReservedKey(key);
dataMap.put(key, new ByteBufferValue(data));
}
@Override
public void put(String key, byte[] data) {
Data.assertNotReservedKey(key);
dataMap.put(key, new BytesValue(data));
}
@Override
public void put(String key, Image data) {
Data.assertNotReservedKey(key);
dataMap.put(key, new ImageValue(data));
}
@Override
public void put(String key, long data) {
Data.assertNotReservedKey(key);
dataMap.put(key, new IntValue(data));
}
@Override
public void put(String key, double data) {
Data.assertNotReservedKey(key);
dataMap.put(key, new DoubleValue(data));
}
@Override
public void put(String key, boolean data) {
Data.assertNotReservedKey(key);
dataMap.put(key, new BooleanValue(data));
}
@Override
public void put(String key, BoundingBox data) {
Data.assertNotReservedKey(key);
dataMap.put(key, new BBoxValue(data));
}
@Override
public void put(String key, Point data) {
Data.assertNotReservedKey(key);
dataMap.put(key, new PointValue(data));
}
@Override
public void put(String key, Data data) {
if (!StringUtils.equals(key, Data.RESERVED_KEY_METADATA))
Data.assertNotReservedKey(key);
this.dataMap.put(key, new DataValue(data));
}
@Override
public void putListString(String key, List<String> data) {
Data.assertNotReservedKey(key);
dataMap.put(key, new ListValue(data, ValueType.STRING));
}
@Override
public void putListInt64(String key, List<Long> data) {
Data.assertNotReservedKey(key);
dataMap.put(key, new ListValue(data, ValueType.INT64));
}
@Override
public void putListBoolean(String key, List<Boolean> data) {
Data.assertNotReservedKey(key);
dataMap.put(key, new ListValue(data, ValueType.BOOLEAN));
}
@Override
public void putListByteBuffer(String key, List<ByteBuffer> data) {
Data.assertNotReservedKey(key);
dataMap.put(key, new ListValue(data, ValueType.BYTEBUFFER));
}
@Override
public void putListBytes(String key, List<byte[]> data) {
Data.assertNotReservedKey(key);
dataMap.put(key, new ListValue(data, ValueType.BYTES));
}
@Override
public void putListDouble(String key, List<Double> data) {
Data.assertNotReservedKey(key);
dataMap.put(key, new ListValue(data, ValueType.DOUBLE));
}
@Override
public void putListData(String key, List<Data> data) {
Data.assertNotReservedKey(key);
dataMap.put(key, new ListValue(data, ValueType.DATA));
}
@Override
public void putListImage(String key, List<Image> data) {
Data.assertNotReservedKey(key);
dataMap.put(key, new ListValue(data, ValueType.IMAGE));
}
@Override
public void putListNDArray(String key, List<NDArray> data) {
Data.assertNotReservedKey(key);
dataMap.put(key, new ListValue(data, ValueType.NDARRAY));
}
@Override
public void putListBoundingBox(String key, List<BoundingBox> data) {
dataMap.put(key, new ListValue(data, ValueType.BOUNDING_BOX));
}
@Override
public void putListPoint(String key, List<Point> data) {
dataMap.put(key, new ListValue(data, ValueType.POINT));
}
@Override
public void putList(String key, List<?> data, ValueType vt){
Data.assertNotReservedKey(key);
dataMap.put(key, new ListValue(data, vt));
}
@Override
public boolean hasMetaData() {
return this.metaData != null;
}
@Override
public Data getMetaData() {
return this.metaData;
}
@Override
public void setMetaData(Data data) {
this.metaData = data;
}
@Override
public ProtoData toProtoData() {
return new ProtoData(this);
}
@Override
public boolean equals(Object o){
if(!(o instanceof Data))
return false;
return Data.equals(this, (Data)o);
}
@Override
public String toString(){
return Data.toString(this);
}
public static Data empty() {
Data retVal = new JData();
return retVal;
}
public static Data singleton(@NonNull String key, @NonNull Object data) {
Data instance = new JData();
if (data instanceof String) {
instance.put(key, (String)data);
}
else if (data instanceof Boolean) {
instance.put(key, (Boolean)data);
}
else if (data instanceof Integer) {
instance.put(key, ((Integer) data).longValue());
}
else if (data instanceof Long) {
instance.put(key, (Long)data);
}
else if (data instanceof Float) {
instance.put(key, ((Float) data).doubleValue());
}
else if (data instanceof Double) {
instance.put(key, (Double)data);
}
else if (data instanceof Image) {
instance.put(key, (Image)data);
}
else if (data instanceof Byte[]) {
byte[] input = ArrayUtils.toPrimitive((Byte[])data);
instance.put(key, input);
}
else if (data instanceof byte[]) {
instance.put(key, (byte[]) data);
}
else if (data instanceof ByteBuffer) {
instance.put(key, (ByteBuffer) data);
}
else if (data instanceof Data) {
instance.put(key, (Data)data);
}
else if(data instanceof NDArray){
instance.put(key, (NDArray)data);
}
else if (data instanceof Image) {
instance.put(key, (Image)data);
} else if(data instanceof BoundingBox){
instance.put(key, (BoundingBox)data);
} else if(data instanceof Point){
instance.put(key, (Point)data);
} else if (data instanceof NDArray) {
instance.put(key, (NDArray) data);
}
// else if (data instanceof Object) {
// instance.put(key, (Object)data);
// }
else {
throw new IllegalStateException("Trying to put data of not supported type: " + data.getClass());
}
return instance;
}
public static Data singletonList(@NonNull String key, @NonNull List<?> data,
@NonNull ValueType valueType) {
JData instance = new JData();
if (valueType == ValueType.STRING) {
instance.putListString(key, (List<String>) data);
} else if (valueType == ValueType.BOOLEAN) {
instance.putListBoolean(key, (List<Boolean>) data);
} else if (valueType == ValueType.DOUBLE) {
instance.putListDouble(key, (List<Double>) data);
} else if (valueType == ValueType.INT64) {
instance.putListInt64(key, (List<Long>) data);
} else if (valueType == ValueType.IMAGE) {
instance.putListImage(key, (List<Image>) data);
} else if (valueType == ValueType.NDARRAY) {
instance.putListNDArray(key, (List<NDArray>) data);
} else if (valueType == ValueType.DATA) {
instance.putListData(key, (List<Data>) data);
} else if (valueType == ValueType.BYTES) {
instance.putListBytes(key, (List<byte[]>) data);
} else if(valueType == ValueType.BOUNDING_BOX){
instance.putListBoundingBox(key, (List<BoundingBox>)data);
} else if(valueType == ValueType.POINT){
instance.putListPoint(key, (List<Point>)data);
} else if (valueType == ValueType.LIST) {
//TODO don't use JData - use Data interface
instance.putList(key, data, valueType);
} else if(valueType == ValueType.BYTEBUFFER) {
instance.putListByteBuffer(key,(List<ByteBuffer>) data);
} else {
throw new IllegalStateException("Trying to put list data of not supported type: " + valueType);
}
return instance;
}
public static DataBuilder builder(){
return new DataBuilder();
}
public static class DataBuilder {
private JData instance;
public DataBuilder() {
instance = new JData();
}
public DataBuilder add(String key, String data) {
instance.put(key, data);
return this;
}
public DataBuilder add(String key, Boolean data) {
instance.put(key, data);
return this;
}
public DataBuilder add(String key, ByteBuffer data) {
instance.put(key, data);
return this;
}
public DataBuilder add(String key, byte[] data) {
instance.put(key, data);
return this;
}
public DataBuilder add(String key, Double data) {
instance.put(key, data);
return this;
}
public DataBuilder add(String key, Image data) {
instance.put(key, data);
return this;
}
public DataBuilder add(String key, Long data) {
instance.put(key, data);
return this;
}
public DataBuilder add(String key, NDArray data){
instance.put(key, data);
return this;
}
public DataBuilder add(String key, BoundingBox data){
instance.put(key, data);
return this;
}
public DataBuilder add(String key, Point data){
instance.put(key, data);
return this;
}
public DataBuilder addListString(String key, List<String> data) {
instance.putListString(key, data);
return this;
}
public DataBuilder addListInt64(String key, List<Long> data) {
instance.putListInt64(key, data);
return this;
}
public DataBuilder addListBoolean(String key, List<Boolean> data) {
instance.putListBoolean(key, data);
return this;
}
public DataBuilder addListDouble(String key, List<Double> data) {
instance.putListDouble(key, data);
return this;
}
public DataBuilder addListImage(String key, List<Image> data) {
instance.putListImage(key, data);
return this;
}
public DataBuilder addListData(String key, List<Data> data) {
instance.putListData(key, data);
return this;
}
public DataBuilder addListNDArray(String key, List<NDArray> data) {
instance.putListNDArray(key, data);
return this;
}
public DataBuilder addListBoundingBox(String key, List<BoundingBox> data) {
instance.putListBoundingBox(key, data);
return this;
}
public DataBuilder addListPoint(String key, List<Point> data) {
instance.putListPoint(key, data);
return this;
}
public JData build() {
return instance;
}
}
@Override
public Data clone(){
Data ret = empty();
ret.merge(true, this);
return ret;
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/ProtoData.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.data;
import ai.konduit.serving.pipeline.api.data.Data;
import ai.konduit.serving.pipeline.api.exception.DataLoadingException;
import ai.konduit.serving.pipeline.impl.data.helpers.ProtobufUtils;
import com.google.protobuf.InvalidProtocolBufferException;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
import ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage;
import java.io.*;
import java.util.Map;
@Slf4j
public class ProtoData extends JData {
public ProtoData(@NonNull InputStream stream) throws IOException {
this(fromStream(stream));
}
public ProtoData(@NonNull byte[] input) {
this(fromBytes(input));
}
public ProtoData(@NonNull File file) throws IOException {
this(fromFile(file));
}
public ProtoData(@NonNull Data data) {
if(data instanceof JData){
getDataMap().putAll(((JData)data).getDataMap());
setMetaData(data.getMetaData());
}
else {
throw new UnsupportedOperationException("ProtoData(Data data) constructor not supported");
}
}
@Override
public ProtoData toProtoData() {
return this;
}
@Override
public void save(File toFile) throws IOException {
try (OutputStream os = new BufferedOutputStream(new FileOutputStream(toFile))) {
write(os);
}
}
@Override
public void write(OutputStream toStream) throws IOException {
if (hasMetaData()) {
DataProtoMessage.DataMap pbDataMap = ProtobufUtils.serialize(getDataMap(), ((JData)getMetaData()).getDataMap());
pbDataMap.writeTo(toStream);
}
else {
Map<String, DataProtoMessage.DataScheme> newItemsMap = ProtobufUtils.serializeMap(getDataMap());
DataProtoMessage.DataMap pbDataMap = DataProtoMessage.DataMap.newBuilder().
putAllMapItems(newItemsMap).
build();
pbDataMap.writeTo(toStream);
}
}
public static Data fromFile(File fromFile) throws IOException {
try (InputStream is = new FileInputStream(fromFile)) {
return fromStream(is);
}
}
public static Data fromStream(InputStream stream) throws IOException {
// mergeFrom performs stream buffering internally
DataProtoMessage.DataMap.Builder builder = DataProtoMessage.DataMap.newBuilder().mergeFrom(stream);
DataProtoMessage.DataMap dataMap = builder.build();
return ProtobufUtils.deserialize(dataMap);
}
public byte[] asBytes() {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
write(baos);
} catch (IOException e) {
String errorText = "Failed write to ByteArrayOutputStream";
log.error(errorText, e);
throw new DataLoadingException(errorText);
}
return baos.toByteArray();
}
public static Data fromBytes(byte[] input) {
Data retVal = empty();
DataProtoMessage.DataMap.Builder builder = null;
try {
builder = DataProtoMessage.DataMap.newBuilder().mergeFrom(input);
} catch (InvalidProtocolBufferException e) {
String errorText = "Error converting bytes array to data";
log.error(errorText,e);
throw new DataLoadingException(errorText);
}
DataProtoMessage.DataMap dataMap = builder.build();
retVal = ProtobufUtils.deserialize(dataMap);
return retVal;
}
@Override
public Data clone(){
Data ret = empty();
ret.merge(true, this);
return ret;
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/Value.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.impl.data;
import ai.konduit.serving.pipeline.api.data.ValueType;
public interface Value<T> {
ValueType type();
T get();
void set(T value);
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/ValueNotFoundException.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.impl.data;
public class ValueNotFoundException extends RuntimeException {
public ValueNotFoundException(String message) {
super(message);
}
public ValueNotFoundException(Throwable cause) {
super(cause);
}
public ValueNotFoundException(String message, Throwable cause) {
super(message, cause);
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/box/BBoxCHW.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.data.box;
import ai.konduit.serving.pipeline.api.data.BoundingBox;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@Accessors(fluent = true)
@Schema(description = "A bounding box based on center X, center Y, height and width format.")
public class BBoxCHW implements BoundingBox {
@Schema(description = "Center X coordinate.")
private final double cx;
@Schema(description = "Center Y coordinate.")
private final double cy;
@Schema(description = "Box height.")
private final double h;
@Schema(description = "Box width.")
private final double w;
@Schema(description = "Class label.")
private final String label;
@Schema(description = "Class probability.")
private final Double probability;
public BBoxCHW(double cx, double cy, double h, double w){
this(cx, cy, h, w, null, null);
}
public BBoxCHW(double cx, double cy, double h, double w, String label, Double probability){
this.cx = cx;
this.cy = cy;
this.h = h;
this.w = w;
this.label = label;
this.probability = probability;
}
@Override
public double x1() {
return cx - w/2;
}
@Override
public double x2() {
return cx + w/2;
}
@Override
public double y1() {
return cy - h/2;
}
@Override
public double y2() {
return cy + h/2;
}
@Override
public boolean equals(Object o){
if(!(o instanceof BoundingBox))
return false;
return BoundingBox.equals(this, (BoundingBox)o);
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/box/BBoxXY.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.data.box;
import ai.konduit.serving.pipeline.api.data.BoundingBox;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@Accessors(fluent = true)
@Schema(description = "A bounding box based on x1, x2, y1 and y2 locations (i.e., lower/upper X, lower/upper Y coordinate).")
public class BBoxXY implements BoundingBox {
@Schema(description = "Lower X coordinate.")
private final double x1;
@Schema(description = "Upper X coordinate.")
private final double x2;
@Schema(description = "Lower Y coordinate.")
private final double y1;
@Schema(description = "Upper Y coordinate.")
private final double y2;
@Schema(description = "Class label.")
private final String label;
@Schema(description = "Class probability.")
private final Double probability;
public BBoxXY(double x1, double x2, double y1, double y2){
this(x1, x2, y1, y2, null, null);
}
public BBoxXY(double x1, double x2, double y1, double y2, String label, Double probability){
this.x1 = x1;
this.x2 = x2;
this.y1 = y1;
this.y2 = y2;
this.label = label;
this.probability = probability;
}
@Override
public double cx() {
return (x1+x2)/2;
}
@Override
public double cy() {
return (y1+y2)/2;
}
@Override
public boolean equals(Object o){
if(!(o instanceof BoundingBox))
return false;
return BoundingBox.equals(this, (BoundingBox)o);
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/helpers/ProtobufUtils.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.data.helpers;
import ai.konduit.serving.pipeline.api.data.*;
import ai.konduit.serving.pipeline.impl.data.JData;
import ai.konduit.serving.pipeline.impl.data.Value;
import ai.konduit.serving.pipeline.impl.data.box.BBoxCHW;
import ai.konduit.serving.pipeline.impl.data.box.BBoxXY;
import ai.konduit.serving.pipeline.impl.data.image.Png;
import ai.konduit.serving.pipeline.impl.data.ndarray.SerializedNDArray;
import ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage;
import ai.konduit.serving.pipeline.impl.data.wrappers.ListValue;
import com.google.protobuf.ByteString;
import lombok.val;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import java.nio.ByteBuffer;
import java.util.*;
public class ProtobufUtils {
private static String PNG = "PNG";
private static List<ByteString> ndArrayToByteStringList(SerializedNDArray sn) {
sn.getBuffer().rewind();
byte[] bufferBytes = new byte[sn.getBuffer().remaining()];
sn.getBuffer().get(bufferBytes);
ByteString byteString = ByteString.copyFrom(bufferBytes);
List<ByteString> byteStringList = new ArrayList<>();
byteStringList.add(byteString);
return byteStringList;
}
private static DataProtoMessage.NDArray.ValueType toPbNDArrayType(NDArrayType origType) {
DataProtoMessage.NDArray.ValueType ndType = null;
switch (origType) {
case DOUBLE:
ndType = DataProtoMessage.NDArray.ValueType.DOUBLE;
break;
case FLOAT:
ndType = DataProtoMessage.NDArray.ValueType.FLOAT;
break;
case FLOAT16:
ndType = DataProtoMessage.NDArray.ValueType.FLOAT16;
break;
case BFLOAT16:
ndType = DataProtoMessage.NDArray.ValueType.BFLOAT16;
break;
case INT64:
ndType = DataProtoMessage.NDArray.ValueType.INT64;
break;
case INT32:
ndType = DataProtoMessage.NDArray.ValueType.INT32;
break;
case INT16:
ndType = DataProtoMessage.NDArray.ValueType.INT16;
break;
case INT8:
ndType = DataProtoMessage.NDArray.ValueType.INT8;
break;
case UINT64:
ndType = DataProtoMessage.NDArray.ValueType.UINT64;
break;
case UINT32:
ndType = DataProtoMessage.NDArray.ValueType.UINT32;
break;
case UINT16:
ndType = DataProtoMessage.NDArray.ValueType.UINT16;
break;
case UINT8:
ndType = DataProtoMessage.NDArray.ValueType.UINT8;
break;
case BOOL:
ndType = DataProtoMessage.NDArray.ValueType.BOOL;
break;
case UTF8:
ndType = DataProtoMessage.NDArray.ValueType.DOUBLE;
break;
default:
throw new IllegalStateException("NDArrayType " + origType + " not supported");
}
return ndType;
}
private static NDArrayType fromPbNDArrayType(DataProtoMessage.NDArray.ValueType origType) {
NDArrayType ndType = null;
switch (origType) {
case DOUBLE:
ndType = NDArrayType.DOUBLE;
break;
case FLOAT:
ndType = NDArrayType.FLOAT;
break;
case FLOAT16:
ndType = NDArrayType.FLOAT16;
break;
case BFLOAT16:
ndType = NDArrayType.BFLOAT16;
break;
case INT64:
ndType = NDArrayType.INT64;
break;
case INT32:
ndType = NDArrayType.INT32;
break;
case INT16:
ndType = NDArrayType.INT16;
break;
case INT8:
ndType = NDArrayType.INT8;
break;
case UINT64:
ndType = NDArrayType.UINT64;
break;
case UINT32:
ndType = NDArrayType.UINT32;
break;
case UINT16:
ndType = NDArrayType.UINT16;
break;
case UINT8:
ndType = NDArrayType.UINT8;
break;
case BOOL:
ndType = NDArrayType.BOOL;
break;
case UTF8:
ndType = NDArrayType.DOUBLE;
break;
default:
throw new IllegalStateException("NDArrayType " + origType + " not supported");
}
return ndType;
}
private static BoundingBox deserializeBoundingBox(DataProtoMessage.BoundingBox pbBox) {
BoundingBox boundingBox = null;
String lbl = pbBox.getLabel().isEmpty() ? null : pbBox.getLabel();
Double prob = Double.isNaN(pbBox.getProbability()) ? null : pbBox.getProbability();
if (pbBox.getType() == DataProtoMessage.BoundingBox.BoxType.CHW) {
boundingBox = new BBoxCHW(pbBox.getCx(), pbBox.getCy(), pbBox.getH(), pbBox.getW(), lbl, prob);
} else if (pbBox.getType() == DataProtoMessage.BoundingBox.BoxType.XY) {
boundingBox = new BBoxXY(pbBox.getX0(), pbBox.getX1(), pbBox.getY0(), pbBox.getY1(), lbl, prob);
} else {
throw new RuntimeException("Unknown bounding box type: " + pbBox.getType());
}
return boundingBox;
}
private static Point deserializePoint(DataProtoMessage.Point pbPoint) {
double[] coords = pbPoint.getCoordsList().stream().mapToDouble(Double::doubleValue).toArray();
String lbl = pbPoint.getLabel().isEmpty() ? "" : pbPoint.getLabel();
Double prob = Double.isNaN(pbPoint.getProbability()) ? null : pbPoint.getProbability();
Point point = Point.create(coords, lbl, prob);
return point;
}
private static NDArray deserializeNDArray(DataProtoMessage.NDArray pbArray) {
List<Long> shapes = pbArray.getShapeList();
long[] aShapes = new long[shapes.size()];
for (int i = 0; i < shapes.size(); ++i) {
aShapes[i] = shapes.get(i);
}
List<ByteString> data = pbArray.getArrayList();
DataProtoMessage.NDArray.ValueType type = pbArray.getType();
byte[] bytes = data.get(0).toByteArray();
ByteBuffer bb = ByteBuffer.wrap(bytes);
SerializedNDArray ndArray = new SerializedNDArray(fromPbNDArrayType(type), aShapes, bb);
return NDArray.create(ndArray);
}
private static Image deserializeImage(DataProtoMessage.Image pbImage) {
if (!StringUtils.equals(pbImage.getType(), PNG))
throw new IllegalStateException("Only PNG images supported for now.");
List<ByteString> pbData = pbImage.getDataList();
byte[] data = pbData.get(0).toByteArray();
// TODO: obviously should be working for different formats
Png png = new Png(data);
return Image.create(png);
}
public static DataProtoMessage.DataMap serialize(Map<String,Value> dataMap) {
return serialize(dataMap, null);
}
public static DataProtoMessage.DataMap serialize(Map<String,Value> dataMap,
Map<String,Value> metaData) {
DataProtoMessage.DataMap pbDataMap = null;
Map<String, DataProtoMessage.DataScheme> pbItemsMap = serializeMap(dataMap);
if (metaData != null) {
Map<String, DataProtoMessage.DataScheme> pbMetaData = serializeMap(metaData);
pbDataMap = DataProtoMessage.DataMap.newBuilder().
putAllMapItems(pbItemsMap).
putAllMetaData(pbMetaData).
build();
}
else {
pbDataMap = DataProtoMessage.DataMap.newBuilder().
putAllMapItems(pbItemsMap).
build();
}
return pbDataMap;
}
public static Map<String, DataProtoMessage.DataScheme> serializeMap(Map<String,Value> dataMap) {
Map<String, DataProtoMessage.DataScheme> pbItemsMap = new HashMap<>();
Iterator<Map.Entry<String, Value>> iterator = dataMap.entrySet().iterator();
while (iterator.hasNext()) {
Map.Entry<String, Value> nextItem = iterator.next();
Value value = nextItem.getValue();
DataProtoMessage.DataScheme item = null;
if (value.type() == ValueType.STRING) {
item = DataProtoMessage.DataScheme.newBuilder().
setSValue((String) nextItem.getValue().get()).
setTypeValue(ValueType.STRING.ordinal()).
build();
} else if (value.type() == ValueType.BOOLEAN) {
item = DataProtoMessage.DataScheme.newBuilder().
setBoolValue((Boolean) nextItem.getValue().get()).
setTypeValue(ValueType.BOOLEAN.ordinal()).
build();
} else if (value.type() == ValueType.INT64) {
item = DataProtoMessage.DataScheme.newBuilder().
setIValue((Long) nextItem.getValue().get()).
setTypeValue(ValueType.INT64.ordinal()).
build();
} else if (value.type() == ValueType.DOUBLE) {
item = DataProtoMessage.DataScheme.newBuilder().
setDoubleValue((Double) nextItem.getValue().get()).
setTypeValue(ValueType.DOUBLE.ordinal()).
build();
}
else if (value.type() == ValueType.IMAGE) {
Image image = (Image) nextItem.getValue().get();
Png p = image.getAs(Png.class);
byte[] imageBytes = p.getBytes();
//byte[] imageBytes = new JavaImageConverters.IdentityConverter().convert(image, byte[].class);
DataProtoMessage.Image pbImage = DataProtoMessage.Image.newBuilder().
addData(ByteString.copyFrom(imageBytes)).
setType(PNG).
build();
item = DataProtoMessage.DataScheme.newBuilder().
setImValue(pbImage).
setTypeValue(ValueType.IMAGE.ordinal()).
build();
}
else if (value.type() == ValueType.NDARRAY) {
NDArray ndArray = (NDArray)nextItem.getValue().get();
SerializedNDArray sn = ndArray.getAs(SerializedNDArray.class);
List<ByteString> byteStringList = ndArrayToByteStringList(sn);
DataProtoMessage.NDArray.ValueType ndType =
toPbNDArrayType(ndArray.type());
DataProtoMessage.NDArray pbNDArray = DataProtoMessage.NDArray.newBuilder().
addAllShape(Arrays.asList(ArrayUtils.toObject(sn.getShape()))).
addAllArray(byteStringList).
setType(ndType).
build();
item = DataProtoMessage.DataScheme.newBuilder().
setNdValue(pbNDArray).
setTypeValue(ValueType.NDARRAY.ordinal()).
build();
}
else if (value.type() == ValueType.DATA) {
JData jData = (JData)nextItem.getValue().get();
DataProtoMessage.DataMap dataMapEmbedded = serialize(jData.getDataMap());
item = DataProtoMessage.DataScheme.newBuilder().
setMetaData(dataMapEmbedded).
setTypeValue(ValueType.DATA.ordinal()).
build();
}
else if (value.type() == ValueType.BOUNDING_BOX) {
BoundingBox boundingBox = (BoundingBox) nextItem.getValue().get();
DataProtoMessage.BoundingBox pbBox = null;
if (boundingBox instanceof BBoxCHW) {
pbBox = DataProtoMessage.BoundingBox.newBuilder().
setCx(boundingBox.cx()).setCy(boundingBox.cy()).
setH(boundingBox.height()).
setW(boundingBox.width()).
setLabel(StringUtils.defaultIfEmpty(boundingBox.label(), StringUtils.EMPTY)).
setType(DataProtoMessage.BoundingBox.BoxType.CHW).
setProbability(boundingBox.probability() == null ? Double.NaN : boundingBox.probability()).
build();
}
else if (boundingBox instanceof BBoxXY) {
pbBox = DataProtoMessage.BoundingBox.newBuilder().
setX0(boundingBox.x1()).setX1(boundingBox.x2()).
setY0(boundingBox.y1()).setY1(boundingBox.y2()).
setLabel(StringUtils.defaultIfEmpty(boundingBox.label(), StringUtils.EMPTY)).
setType(DataProtoMessage.BoundingBox.BoxType.XY).
setProbability(boundingBox.probability() == null ? Double.NaN : boundingBox.probability()).
build();
}
item = DataProtoMessage.DataScheme.newBuilder().
setBoxValue(pbBox).
setTypeValue(ValueType.BOUNDING_BOX.ordinal()).
build();
} else if(value.type() == ValueType.POINT){
Point p = (Point)nextItem.getValue().get();
DataProtoMessage.Point.Builder b = DataProtoMessage.Point.newBuilder();
b.setLabel(StringUtils.defaultIfEmpty(p.label(), StringUtils.EMPTY));
b.setProbability(p.probability() == null ? Double.NaN : p.probability());
for( int i=0;i <p.dimensions(); i++ )
b.addCoords(p.get(i));
item = DataProtoMessage.DataScheme.newBuilder()
.setPointValue(b.build())
.setTypeValue(ValueType.POINT.ordinal())
.build();
}
else if (value.type() == ValueType.LIST) {
ListValue lv = (ListValue)value;
if (lv.elementType() == ValueType.INT64) {
List<Long> longs = (List<Long>)nextItem.getValue().get();
DataProtoMessage.Int64List toAdd = DataProtoMessage.Int64List.newBuilder().addAllList(longs).build();
DataProtoMessage.List toAddGen = DataProtoMessage.List.newBuilder().setIList(toAdd).build();
item = DataProtoMessage.DataScheme.newBuilder().
setListValue(toAddGen).
setListTypeValue(ValueType.INT64.ordinal()).
setTypeValue(ValueType.LIST.ordinal()).
build();
}
else if (lv.elementType() == ValueType.BOOLEAN) {
List<Boolean> longs = (List<Boolean>)nextItem.getValue().get();
DataProtoMessage.BooleanList toAdd = DataProtoMessage.BooleanList.newBuilder().addAllList(longs).build();
DataProtoMessage.List toAddGen = DataProtoMessage.List.newBuilder().setBList(toAdd).build();
item = DataProtoMessage.DataScheme.newBuilder().
setListValue(toAddGen).
setListTypeValue(ValueType.BOOLEAN.ordinal()).
setTypeValue(ValueType.LIST.ordinal()).
build();
}
else if (lv.elementType() == ValueType.DOUBLE) {
List<Double> doubles = (List<Double>)nextItem.getValue().get();
DataProtoMessage.DoubleList toAdd = DataProtoMessage.DoubleList.newBuilder().addAllList(doubles).build();
DataProtoMessage.List toAddGen = DataProtoMessage.List.newBuilder().setDList(toAdd).build();
item = DataProtoMessage.DataScheme.newBuilder().
setListValue(toAddGen).
setListTypeValue(ValueType.DOUBLE.ordinal()).
setTypeValue(ValueType.LIST.ordinal()).
build();
}
else if (lv.elementType() == ValueType.STRING) {
List<String> strings = (List<String>)nextItem.getValue().get();
DataProtoMessage.StringList toAdd = DataProtoMessage.StringList.newBuilder().addAllList(strings).build();
DataProtoMessage.List toAddGen = DataProtoMessage.List.newBuilder().setSList(toAdd).build();
item = DataProtoMessage.DataScheme.newBuilder().
//setListValue(toAddGen).
setListValue(toAddGen).
setListTypeValue(ValueType.STRING.ordinal()).
setTypeValue(ValueType.LIST.ordinal()).
build();
}
else if (lv.elementType() == ValueType.IMAGE) {
List<Image> images = (List<Image>)nextItem.getValue().get();
List<DataProtoMessage.Image> pbImages = new ArrayList<>();
for (val image : images) {
Png p = image.getAs(Png.class);
byte[] imageBytes = p.getBytes();
DataProtoMessage.Image pbImage = DataProtoMessage.Image.newBuilder().
addData(ByteString.copyFrom(imageBytes)).
setType(PNG).
build();
pbImages.add(pbImage);
}
DataProtoMessage.ImageList toAdd = DataProtoMessage.ImageList.newBuilder().addAllList(pbImages).build();
DataProtoMessage.List toAddGen = DataProtoMessage.List.newBuilder().setImList(toAdd).build();
item = DataProtoMessage.DataScheme.newBuilder().
setListValue(toAddGen).
setListTypeValue(ValueType.IMAGE.ordinal()).
setTypeValue(ValueType.LIST.ordinal()).
build();
}
else if (lv.elementType() == ValueType.NDARRAY) {
List<NDArray> arrays = (List<NDArray>)nextItem.getValue().get();
List<DataProtoMessage.NDArray> pbArrays = new ArrayList<>();
for (val arr : arrays) {
SerializedNDArray sn = arr.getAs(SerializedNDArray.class);
List<ByteString> byteStringList = ndArrayToByteStringList(sn);
DataProtoMessage.NDArray pbNDArray = DataProtoMessage.NDArray.newBuilder().
addAllShape(Arrays.asList(ArrayUtils.toObject(sn.getShape()))).
addAllArray(byteStringList).
setType(DataProtoMessage.NDArray.ValueType.FLOAT).
build();
pbArrays.add(pbNDArray);
}
DataProtoMessage.NDArrayList toAdd = DataProtoMessage.NDArrayList.newBuilder().addAllList(pbArrays).build();
DataProtoMessage.List toAddGen = DataProtoMessage.List.newBuilder().setNdList(toAdd).build();
item = DataProtoMessage.DataScheme.newBuilder().
setListValue(toAddGen).
setListTypeValue(ValueType.NDARRAY.ordinal()).
setTypeValue(ValueType.LIST.ordinal()).
build();
}
else if (lv.elementType() == ValueType.BOUNDING_BOX) {
List<BoundingBox> bboxes = (List<BoundingBox>)nextItem.getValue().get();
List<DataProtoMessage.BoundingBox> pbBoxes = new ArrayList<>();
for (val boundingBox : bboxes) {
DataProtoMessage.BoundingBox pbBox = null;
if (boundingBox instanceof BBoxCHW) {
pbBox = DataProtoMessage.BoundingBox.newBuilder().
setCx(boundingBox.cx()).setCy(boundingBox.cy()).
setH(boundingBox.height()).
setW(boundingBox.width()).
setLabel(StringUtils.defaultIfEmpty(boundingBox.label(), StringUtils.EMPTY)).
setType(DataProtoMessage.BoundingBox.BoxType.CHW).
setProbability(boundingBox.probability()).
build();
} else if (boundingBox instanceof BBoxXY) {
pbBox = DataProtoMessage.BoundingBox.newBuilder().
setX0(boundingBox.x1()).setX1(boundingBox.x2()).
setY0(boundingBox.y1()).setY1(boundingBox.y2()).
setLabel(StringUtils.defaultIfEmpty(boundingBox.label(), StringUtils.EMPTY)).
setType(DataProtoMessage.BoundingBox.BoxType.XY).
setProbability(boundingBox.probability()).
build();
}
pbBoxes.add(pbBox);
}
DataProtoMessage.BoundingBoxesList toAdd = DataProtoMessage.BoundingBoxesList.newBuilder().addAllList(pbBoxes).build();
DataProtoMessage.List toAddGen = DataProtoMessage.List.newBuilder().setBboxList(toAdd).build();
item = DataProtoMessage.DataScheme.newBuilder().
setListValue(toAddGen).
setListTypeValue(ValueType.BOUNDING_BOX.ordinal()).
setTypeValue(ValueType.LIST.ordinal()).
build();
} else if(lv.elementType() == ValueType.POINT){
List<Point> pts = (List<Point>)nextItem.getValue().get();
List<DataProtoMessage.Point> l = new ArrayList<>();
for(Point p : pts){
DataProtoMessage.Point.Builder b = DataProtoMessage.Point.newBuilder();
b.setLabel(StringUtils.defaultIfEmpty(p.label(), StringUtils.EMPTY));
b.setProbability(p.probability() == null ? Double.NaN : p.probability());
for( int i=0;i <p.dimensions(); i++ )
b.addCoords(p.get(i));
l.add(b.build());
}
DataProtoMessage.PointList toAdd = DataProtoMessage.PointList.newBuilder().addAllList(l).build();
DataProtoMessage.List toAddGen = DataProtoMessage.List.newBuilder().setPList(toAdd).build();
item = DataProtoMessage.DataScheme.newBuilder().
setListValue(toAddGen).
setListTypeValue(ValueType.POINT.ordinal()).
setTypeValue(ValueType.LIST.ordinal()).
build();
}
else {
throw new IllegalStateException("List type is not implemented yet " + lv.elementType());
}
}
if (item == null) {
throw new IllegalStateException("JData.write failed");
}
pbItemsMap.put(nextItem.getKey(), item);
}
return pbItemsMap;
}
private static Data dataFromMap(Map<String, DataProtoMessage.DataScheme> schemeMap) {
Data retData = new JData();
Iterator<Map.Entry<String, DataProtoMessage.DataScheme>> iterator =
schemeMap.entrySet().iterator();
while (iterator.hasNext()) {
Map.Entry<String, DataProtoMessage.DataScheme> entry = iterator.next();
DataProtoMessage.DataScheme item = entry.getValue();
if (item.getTypeValue() == DataProtoMessage.DataScheme.ValueType.STRING.ordinal()) {
retData.put(entry.getKey(), item.getSValue());
}
if (item.getTypeValue() == DataProtoMessage.DataScheme.ValueType.BOOLEAN.ordinal()) {
retData.put(entry.getKey(), item.getBoolValue());
}
if (item.getTypeValue() == DataProtoMessage.DataScheme.ValueType.INT64.ordinal()) {
retData.put(entry.getKey(), item.getIValue());
}
if (item.getTypeValue() == DataProtoMessage.DataScheme.ValueType.DOUBLE.ordinal()) {
retData.put(entry.getKey(), item.getDoubleValue());
}
if (item.getTypeValue() == DataProtoMessage.DataScheme.ValueType.DATA.ordinal()) {
DataProtoMessage.DataMap itemMetaData = item.getMetaData();
Data embeddedData = deserialize(itemMetaData);
retData.put(entry.getKey(), embeddedData);
}
if (item.getTypeValue() == DataProtoMessage.DataScheme.ValueType.BOUNDING_BOX.ordinal()) {
DataProtoMessage.BoundingBox pbBox = item.getBoxValue();
BoundingBox boundingBox = deserializeBoundingBox(pbBox);
retData.put(entry.getKey(), boundingBox);
}
if(item.getTypeValue() == DataProtoMessage.DataScheme.ValueType.POINT.ordinal()) {
DataProtoMessage.Point pbPoint = item.getPointValue();
Point point = deserializePoint(pbPoint);
retData.put(entry.getKey(), point);
}
if (item.getTypeValue() == DataProtoMessage.DataScheme.ValueType.LIST.ordinal()) {
if (item.getListTypeValue() == DataProtoMessage.DataScheme.ValueType.DOUBLE.ordinal()) {
retData.putListDouble(entry.getKey(), item.getListValue().getDList().getListList());
} else if (item.getListTypeValue() == DataProtoMessage.DataScheme.ValueType.BOOLEAN.ordinal()) {
retData.putListBoolean(entry.getKey(), item.getListValue().getBList().getListList());
} else if (item.getListTypeValue() == DataProtoMessage.DataScheme.ValueType.INT64.ordinal()) {
retData.putListInt64(entry.getKey(), item.getListValue().getIList().getListList());
} else if (item.getListTypeValue() == DataProtoMessage.DataScheme.ValueType.STRING.ordinal()) {
retData.putListString(entry.getKey(), item.getListValue().getSList().getListList());
} else if (item.getListTypeValue() == DataProtoMessage.DataScheme.ValueType.IMAGE.ordinal()) {
List<DataProtoMessage.Image> pbImages = item.getListValue().getImList().getListList();
List<Image> images = new ArrayList<>();
for (val pbImage : pbImages) {
Image image = deserializeImage(pbImage);
images.add(image);
}
retData.putListImage(entry.getKey(), images);
} else if (item.getListTypeValue() == DataProtoMessage.DataScheme.ValueType.NDARRAY.ordinal()) {
List<DataProtoMessage.NDArray> pbArrays = item.getListValue().getNdList().getListList();
List<NDArray> arrays = new ArrayList<>();
for (val pbArray : pbArrays) {
NDArray ndArray = deserializeNDArray(pbArray);
arrays.add(ndArray);
}
retData.putListNDArray(entry.getKey(), arrays);
} else if (item.getListTypeValue() == DataProtoMessage.DataScheme.ValueType.BOUNDING_BOX.ordinal()) {
List<DataProtoMessage.BoundingBox> pbArrays = item.getListValue().getBboxList().getListList();
List<BoundingBox> boxes = new ArrayList<>();
for (val pbBox : pbArrays) {
BoundingBox boundingBox = deserializeBoundingBox(pbBox);
boxes.add(boundingBox);
}
retData.putListBoundingBox(entry.getKey(), boxes);
} else if (item.getListTypeValue() == DataProtoMessage.DataScheme.ValueType.POINT.ordinal()) {
List<DataProtoMessage.Point> pbArrays = item.getListValue().getPList().getListList();
List<Point> points = new ArrayList<>();
for (val pbPoint : pbArrays) {
Point point = deserializePoint(pbPoint);
points.add(point);
}
retData.putListPoint(entry.getKey(), points);
}
}
if (item.getTypeValue() == DataProtoMessage.DataScheme.ValueType.IMAGE.ordinal()) {
DataProtoMessage.Image pbImage = item.getImValue();
Image image = deserializeImage(pbImage);
retData.put(entry.getKey(), image);
}
if (item.getTypeValue() == DataProtoMessage.DataScheme.ValueType.NDARRAY.ordinal()) {
DataProtoMessage.NDArray pbArray = item.getNdValue();
NDArray ndArray = deserializeNDArray(pbArray);
retData.put(entry.getKey(), ndArray);
}
}
return retData;
}
public static Data deserialize(DataProtoMessage.DataMap dataMap) {
Map<String, DataProtoMessage.DataScheme> schemeMap = dataMap.getMapItemsMap();
Data retData = dataFromMap(schemeMap);
Map<String,DataProtoMessage.DataScheme> metadata = dataMap.getMetaDataMap();
Data jMetaData = dataFromMap(metadata);
if(jMetaData != null && jMetaData.size() != 0) {
retData.setMetaData(jMetaData);
}
return retData;
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/image/BImage.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.data.image;
import ai.konduit.serving.pipeline.impl.data.image.base.BaseImage;
import java.awt.image.BufferedImage;
public class BImage extends BaseImage<BufferedImage> {
public BImage(BufferedImage image) {
super(image);
}
@Override
public int height() {
return image.getHeight();
}
@Override
public int width() {
return image.getWidth();
}
@Override
public int channels() {
return Math.min(3,image.getColorModel().getNumComponents());
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/image/Bmp.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.data.image;
import ai.konduit.serving.pipeline.impl.data.image.base.BaseImageFile;
import java.io.File;
import java.nio.ByteBuffer;
public class Bmp extends BaseImageFile {
public Bmp(File file) {
this(file, null, null,null);
}
public Bmp(File file, Integer height, Integer width,Integer channels){
super(file, height, width,channels);
}
public Bmp(byte[] bytes){
this(bytes, null, null,null);
}
public Bmp(byte[] bytes, Integer height, Integer width,Integer channels){
super(bytes, height, width,channels);
}
public Bmp(ByteBuffer byteBuffer){
super(byteBuffer);
}
public Bmp(ByteBuffer byteBuffer, Integer height, Integer width,Integer channels){
super(byteBuffer, height, width,channels);
}
@Override
public String formatName() {
return "BMP";
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/image/BmpImage.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.data.image;
import ai.konduit.serving.pipeline.impl.data.image.base.BaseImage;
public class BmpImage extends BaseImage<Bmp> {
public BmpImage(Bmp image) {
super(image);
}
@Override
public int height() {
return image.height();
}
@Override
public int width() {
return image.width();
}
@Override
public int channels() {
return image.channels();
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/image/Gif.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.data.image;
import ai.konduit.serving.pipeline.impl.data.image.base.BaseImageFile;
import java.io.File;
import java.nio.ByteBuffer;
public class Gif extends BaseImageFile {
public Gif(File file) {
this(file, null, null,null);
}
public Gif(File file, Integer height, Integer width,Integer channels){
super(file, height, width,channels);
}
public Gif(byte[] bytes){
this(bytes, null, null,null);
}
public Gif(byte[] bytes, Integer height, Integer width,Integer channels){
super(bytes, height, width,channels);
}
public Gif(ByteBuffer byteBuffer){
super(byteBuffer);
}
public Gif(ByteBuffer byteBuffer, Integer height, Integer width,Integer channels){
super(byteBuffer, height, width,channels);
}
@Override
public String formatName() {
return "GIF";
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/image/GifImage.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.data.image;
import ai.konduit.serving.pipeline.impl.data.image.base.BaseImage;
public class GifImage extends BaseImage<Gif> {
public GifImage(Gif image) {
super(image);
}
@Override
public int height() {
return image.height();
}
@Override
public int width() {
return image.width();
}
@Override
public int channels() {
return image.channels();
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/image/Jpeg.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.data.image;
import ai.konduit.serving.pipeline.impl.data.image.base.BaseImageFile;
import java.io.File;
import java.nio.ByteBuffer;
public class Jpeg extends BaseImageFile {
public Jpeg(File file) {
this(file, null, null,null);
}
public Jpeg(File file, Integer height, Integer width,Integer channels){
super(file, height, width,channels);
}
public Jpeg(byte[] bytes){
this(bytes, null, null,null);
}
public Jpeg(byte[] bytes, Integer height, Integer width,Integer channels){
super(bytes, height, width,channels);
}
public Jpeg(ByteBuffer byteBuffer){
super(byteBuffer);
}
public Jpeg(ByteBuffer byteBuffer, Integer height, Integer width,Integer channels){
super(byteBuffer, height, width,channels);
}
@Override
public String formatName() {
return "JPEG";
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/image/JpegImage.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.data.image;
import ai.konduit.serving.pipeline.impl.data.image.base.BaseImage;
public class JpegImage extends BaseImage<Jpeg> {
public JpegImage(Jpeg image) {
super(image);
}
@Override
public int height() {
return image.height();
}
@Override
public int width() {
return image.width();
}
@Override
public int channels() {
return image.channels();
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/image/Png.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.data.image;
import ai.konduit.serving.pipeline.impl.data.image.base.BaseImageFile;
import java.io.File;
import java.nio.ByteBuffer;
public class Png extends BaseImageFile {
public Png(File file) {
this(file, null, null,null);
}
public Png(File file, Integer height, Integer width,Integer channels) {
super(file, height, width,channels);
}
public Png(byte[] bytes){
this(bytes, null, null,null);
}
public Png(byte[] bytes, Integer height, Integer width,Integer channels){
super(bytes, height, width,channels);
}
public Png(ByteBuffer byteBuffer){
super(byteBuffer);
}
public Png(ByteBuffer byteBuffer, Integer height, Integer width,Integer channels){
super(byteBuffer, height, width,channels);
}
@Override
public String formatName() {
return "PNG";
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/image/PngImage.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.data.image;
import ai.konduit.serving.pipeline.impl.data.image.base.BaseImage;
public class PngImage extends BaseImage<Png> {
public PngImage(Png image) {
super(image);
}
@Override
public int height() {
return image.height();
}
@Override
public int width() {
return image.width();
}
@Override
public int channels() {
return image.channels();
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/image
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/image/base/BaseImage.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.data.image.base;
import ai.konduit.serving.pipeline.api.data.Image;
import ai.konduit.serving.pipeline.api.format.ImageConverter;
import ai.konduit.serving.pipeline.api.format.ImageFormat;
import ai.konduit.serving.pipeline.impl.data.image.Png;
import ai.konduit.serving.pipeline.registry.ImageConverterRegistry;
import lombok.AllArgsConstructor;
import org.nd4j.common.base.Preconditions;
import java.util.Arrays;
@AllArgsConstructor
public abstract class BaseImage<T> implements Image {
protected final T image;
@Override
public Object get() {
return image;
}
@Override
public <T> T getAs(ImageFormat<T> format) {
return ImageConverterRegistry.getConverterFor(this, format).convert(this, format);
}
@Override
public <T> T getAs(Class<T> type) {
ImageConverter converter = ImageConverterRegistry.getConverterFor(this, type);
Preconditions.checkState(converter != null, "No converter found for converting from %s to %s", image.getClass(), type);
return converter.convert(this, type);
}
@Override
public boolean canGetAs(ImageFormat<?> format) {
ImageConverter converter = ImageConverterRegistry.getConverterFor(this, format);
return converter != null;
}
@Override
public boolean canGetAs(Class<?> type) {
return false;
}
@Override
public boolean equals(Object o){
if(!(o instanceof Image))
return false;
Image o2 = (Image)o;
//TODO is this actually reliable for checks?
Png png1 = getAs(Png.class);
Png png2 = o2.getAs(Png.class);
byte[] b1 = png1.getBytes();
byte[] b2 = png2.getBytes();
return Arrays.equals(b1, b2);
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/image
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/image/base/BaseImageFile.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.data.image.base;
import ai.konduit.serving.pipeline.api.data.Image;
import ai.konduit.serving.pipeline.api.exception.DataLoadingException;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FileUtils;
import java.awt.image.BufferedImage;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.ByteBuffer;
@Slf4j
public abstract class BaseImageFile {
@Getter
protected ByteBuffer fileBytes;
protected Integer height;
protected Integer width;
protected Integer channels;
public BaseImageFile(File file) {
this(file, null, null,null);
}
public BaseImageFile(File file, Integer height, Integer width,Integer channels) {
try {
fileBytes = ByteBuffer.wrap(FileUtils.readFileToByteArray(file));
} catch (IOException e){
throw new DataLoadingException("Unable to load " + formatName() + " image from file " + file.getAbsolutePath());
}
this.height = height;
this.width = width;
this.channels = channels;
}
public BaseImageFile(byte[] bytes){
this(bytes, null, null,null);
}
public BaseImageFile(byte[] bytes, Integer height, Integer width,Integer channels){
this(ByteBuffer.wrap(bytes), height, width,channels);
}
public BaseImageFile(ByteBuffer fileBytes){
this(fileBytes, null, null,null);
}
public BaseImageFile(ByteBuffer fileBytes, Integer height, Integer width,Integer channels) {
this.fileBytes = fileBytes;
this.height = height;
this.width = width;
this.channels = channels;
}
public abstract String formatName();
public int channels() {
initHW();
return channels;
}
public int height() {
initHW();
return height;
}
public int width() {
initHW();
return width;
}
protected void initHW() {
if(height != null && width != null)
return;
BufferedImage bi = Image.create(this).getAs(BufferedImage.class);
height = bi.getHeight();
width = bi.getWidth();
switch(bi.getType()) {
case BufferedImage.TYPE_3BYTE_BGR:
case BufferedImage.TYPE_INT_RGB:
case BufferedImage.TYPE_INT_BGR:
case BufferedImage.TYPE_USHORT_555_RGB:
case BufferedImage.TYPE_USHORT_565_RGB:
channels = 3;
break;
case BufferedImage.TYPE_INT_ARGB:
case BufferedImage.TYPE_4BYTE_ABGR_PRE:
case BufferedImage.TYPE_4BYTE_ABGR:
case BufferedImage.TYPE_INT_ARGB_PRE:
log.warn("Note: Loaded image resolved to a channel with an alpha channel. Defaulting to 3 channels. Konduit Serving currently ignores the alpha channel (which normally would be a 4th channel.)");
channels = 4 - 1;
break;
case BufferedImage.TYPE_BYTE_BINARY:
case BufferedImage.TYPE_BYTE_GRAY:
case BufferedImage.TYPE_BYTE_INDEXED:
case BufferedImage.TYPE_USHORT_GRAY:
channels = 1;
break;
case BufferedImage.TYPE_CUSTOM:
channels = 3;
log.warn("Note: Loaded image resolved to type custom with BufferedImage. Defaulting to 3 channels for custom image type.");
break;
}
}
public byte[] getBytes() {
if(fileBytes.hasArray()) {
return fileBytes.array();
} else {
byte[] bytes = new byte[fileBytes.capacity()];
fileBytes.position(0);
fileBytes.get(bytes);
return bytes;
}
}
public void save(File f) throws IOException {
FileUtils.writeByteArrayToFile(f, getBytes());
}
public void write(OutputStream os) throws IOException {
boolean buffered = os instanceof BufferedOutputStream;
if(!buffered)
os = new BufferedOutputStream(os);
try(OutputStream o = os){
o.write(getBytes());
}
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/ndarray/BaseNDArray.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.data.ndarray;
import ai.konduit.serving.pipeline.api.data.NDArray;
import ai.konduit.serving.pipeline.api.format.NDArrayConverter;
import ai.konduit.serving.pipeline.api.format.NDArrayFormat;
import ai.konduit.serving.pipeline.registry.NDArrayConverterRegistry;
import lombok.AllArgsConstructor;
import org.nd4j.common.base.Preconditions;
@AllArgsConstructor
public abstract class BaseNDArray<T> implements NDArray {
protected final T array;
@Override
public Object get() {
return array;
}
@Override
public <T> T getAs(NDArrayFormat<T> format) {
return NDArrayConverterRegistry.getConverterFor(this, format).convert(this, format);
}
@Override
public <T> T getAs(Class<T> type) {
NDArrayConverter converter = NDArrayConverterRegistry.getConverterFor(this, type);
Preconditions.checkState(converter != null, "No converter found for converting from %s to %s", array.getClass(), type);
return converter.convert(this, type);
}
@Override
public boolean canGetAs(NDArrayFormat<?> format) {
NDArrayConverter converter = NDArrayConverterRegistry.getConverterFor(this, format);
return converter != null;
}
@Override
public boolean canGetAs(Class<?> type) {
NDArrayConverter converter = NDArrayConverterRegistry.getConverterFor(this, type);
return converter != null;
}
@Override
public boolean equals(Object o){
if(!(o instanceof NDArray))
return false;
NDArray o2 = (NDArray)o;
//TODO is there a more efficient approach?
SerializedNDArray thisArr = getAs(SerializedNDArray.class);
SerializedNDArray other = o2.getAs(SerializedNDArray.class);
return thisArr.equals(other);
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/ndarray/SerializedNDArray.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.data.ndarray;
import ai.konduit.serving.pipeline.api.data.NDArrayType;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.util.Arrays;
/**
* Note that the provided ByteBuffer should be little endian
*/
@AllArgsConstructor
@Data
public class SerializedNDArray {
private final NDArrayType type;
private final long[] shape;
private final ByteBuffer buffer;
@Override
public boolean equals(Object o){
if(!(o instanceof SerializedNDArray))
return false;
SerializedNDArray s = (SerializedNDArray) o;
if(type != s.type || !Arrays.equals(shape, s.shape))
return false;
if(buffer.capacity() != s.buffer.capacity())
return false;
if(buffer.hasArray() && s.buffer.hasArray()){
return Arrays.equals(buffer.array(), s.buffer.array());
}
int n = buffer.capacity();
for( int i=0; i<n; i++ ){
byte b1 = buffer.get(i);
byte b2 = s.buffer.get(i);
if(b1 != b2)
return false;
}
return true;
}
public static ByteBuffer resetSerializedNDArrayBuffer(SerializedNDArray sa) {
Buffer buffer = sa.getBuffer();
buffer.rewind();
ByteBuffer byteBuffer = sa.getBuffer().asReadOnlyBuffer();
byteBuffer.position(0);
return byteBuffer;
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/point/NDPoint.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.data.point;
import ai.konduit.serving.pipeline.api.data.Point;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.nd4j.common.base.Preconditions;
import org.nd4j.shade.jackson.annotation.JsonProperty;
@Data
@Accessors(fluent = true)
@NoArgsConstructor
public class NDPoint implements Point {
private double[] coords = null;
private String label = "";
private Double probability = 0.0;
public NDPoint(@JsonProperty("coords") double[] coords, @JsonProperty("label") String label, @JsonProperty("probability") Double probability){
Preconditions.checkState(coords != null ,"Invalid coordinates. Coordinates must not be null!");
this.coords = coords;
this.label = label;
this.probability = probability;
}
@Override
public double get(int n) {
if(n >= coords.length){
throw new IllegalArgumentException("Can not access dimension " + n + " of " + coords.length +" dimensional point!");
}
return coords[n];
}
@Override
public int dimensions() {
return coords.length;
}
@Override
public boolean equals(Object o){
if(!(o instanceof Point))
return false;
return Point.equals(this, (Point)o);
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/protobuf/DataProtoMessage.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: data.proto
package ai.konduit.serving.pipeline.impl.data.protobuf;
public final class DataProtoMessage {
private DataProtoMessage() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface DataSchemeOrBuilder extends
// @@protoc_insertion_point(interface_extends:ai.konduit.serving.DataScheme)
com.google.protobuf.MessageOrBuilder {
/**
* <code>string sValue = 2;</code>
* @return Whether the sValue field is set.
*/
boolean hasSValue();
/**
* <code>string sValue = 2;</code>
* @return The sValue.
*/
java.lang.String getSValue();
/**
* <code>string sValue = 2;</code>
* @return The bytes for sValue.
*/
com.google.protobuf.ByteString
getSValueBytes();
/**
* <code>bytes bValue = 3;</code>
* @return Whether the bValue field is set.
*/
boolean hasBValue();
/**
* <code>bytes bValue = 3;</code>
* @return The bValue.
*/
com.google.protobuf.ByteString getBValue();
/**
* <code>int64 iValue = 4;</code>
* @return Whether the iValue field is set.
*/
boolean hasIValue();
/**
* <code>int64 iValue = 4;</code>
* @return The iValue.
*/
long getIValue();
/**
* <code>bool boolValue = 5;</code>
* @return Whether the boolValue field is set.
*/
boolean hasBoolValue();
/**
* <code>bool boolValue = 5;</code>
* @return The boolValue.
*/
boolean getBoolValue();
/**
* <code>double doubleValue = 6;</code>
* @return Whether the doubleValue field is set.
*/
boolean hasDoubleValue();
/**
* <code>double doubleValue = 6;</code>
* @return The doubleValue.
*/
double getDoubleValue();
/**
* <code>.ai.konduit.serving.List listValue = 7;</code>
* @return Whether the listValue field is set.
*/
boolean hasListValue();
/**
* <code>.ai.konduit.serving.List listValue = 7;</code>
* @return The listValue.
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List getListValue();
/**
* <code>.ai.konduit.serving.List listValue = 7;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ListOrBuilder getListValueOrBuilder();
/**
* <code>.ai.konduit.serving.NDArray ndValue = 8;</code>
* @return Whether the ndValue field is set.
*/
boolean hasNdValue();
/**
* <code>.ai.konduit.serving.NDArray ndValue = 8;</code>
* @return The ndValue.
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray getNdValue();
/**
* <code>.ai.konduit.serving.NDArray ndValue = 8;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayOrBuilder getNdValueOrBuilder();
/**
* <code>.ai.konduit.serving.Image imValue = 9;</code>
* @return Whether the imValue field is set.
*/
boolean hasImValue();
/**
* <code>.ai.konduit.serving.Image imValue = 9;</code>
* @return The imValue.
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image getImValue();
/**
* <code>.ai.konduit.serving.Image imValue = 9;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageOrBuilder getImValueOrBuilder();
/**
* <code>.ai.konduit.serving.BoundingBox boxValue = 10;</code>
* @return Whether the boxValue field is set.
*/
boolean hasBoxValue();
/**
* <code>.ai.konduit.serving.BoundingBox boxValue = 10;</code>
* @return The boxValue.
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox getBoxValue();
/**
* <code>.ai.konduit.serving.BoundingBox boxValue = 10;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxOrBuilder getBoxValueOrBuilder();
/**
* <code>.ai.konduit.serving.DataMap metaData = 11;</code>
* @return Whether the metaData field is set.
*/
boolean hasMetaData();
/**
* <code>.ai.konduit.serving.DataMap metaData = 11;</code>
* @return The metaData.
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap getMetaData();
/**
* <code>.ai.konduit.serving.DataMap metaData = 11;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMapOrBuilder getMetaDataOrBuilder();
/**
* <code>.ai.konduit.serving.Point pointValue = 14;</code>
* @return Whether the pointValue field is set.
*/
boolean hasPointValue();
/**
* <code>.ai.konduit.serving.Point pointValue = 14;</code>
* @return The pointValue.
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point getPointValue();
/**
* <code>.ai.konduit.serving.Point pointValue = 14;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointOrBuilder getPointValueOrBuilder();
/**
* <code>.ai.konduit.serving.DataScheme.ValueType listType = 12;</code>
* @return The enum numeric value on the wire for listType.
*/
int getListTypeValue();
/**
* <code>.ai.konduit.serving.DataScheme.ValueType listType = 12;</code>
* @return The listType.
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType getListType();
/**
* <code>.ai.konduit.serving.DataScheme.ValueType type = 13;</code>
* @return The enum numeric value on the wire for type.
*/
int getTypeValue();
/**
* <code>.ai.konduit.serving.DataScheme.ValueType type = 13;</code>
* @return The type.
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType getType();
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueCase getValueCase();
}
/**
* Protobuf type {@code ai.konduit.serving.DataScheme}
*/
public static final class DataScheme extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:ai.konduit.serving.DataScheme)
DataSchemeOrBuilder {
private static final long serialVersionUID = 0L;
// Use DataScheme.newBuilder() to construct.
private DataScheme(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private DataScheme() {
listType_ = 0;
type_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DataScheme();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DataScheme(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 18: {
java.lang.String s = input.readStringRequireUtf8();
valueCase_ = 2;
value_ = s;
break;
}
case 26: {
valueCase_ = 3;
value_ = input.readBytes();
break;
}
case 32: {
valueCase_ = 4;
value_ = input.readInt64();
break;
}
case 40: {
valueCase_ = 5;
value_ = input.readBool();
break;
}
case 49: {
valueCase_ = 6;
value_ = input.readDouble();
break;
}
case 58: {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List.Builder subBuilder = null;
if (valueCase_ == 7) {
subBuilder = ((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List) value_).toBuilder();
}
value_ =
input.readMessage(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List) value_);
value_ = subBuilder.buildPartial();
}
valueCase_ = 7;
break;
}
case 66: {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.Builder subBuilder = null;
if (valueCase_ == 8) {
subBuilder = ((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray) value_).toBuilder();
}
value_ =
input.readMessage(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray) value_);
value_ = subBuilder.buildPartial();
}
valueCase_ = 8;
break;
}
case 74: {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.Builder subBuilder = null;
if (valueCase_ == 9) {
subBuilder = ((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image) value_).toBuilder();
}
value_ =
input.readMessage(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image) value_);
value_ = subBuilder.buildPartial();
}
valueCase_ = 9;
break;
}
case 82: {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.Builder subBuilder = null;
if (valueCase_ == 10) {
subBuilder = ((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox) value_).toBuilder();
}
value_ =
input.readMessage(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox) value_);
value_ = subBuilder.buildPartial();
}
valueCase_ = 10;
break;
}
case 90: {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap.Builder subBuilder = null;
if (valueCase_ == 11) {
subBuilder = ((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap) value_).toBuilder();
}
value_ =
input.readMessage(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap) value_);
value_ = subBuilder.buildPartial();
}
valueCase_ = 11;
break;
}
case 96: {
int rawValue = input.readEnum();
listType_ = rawValue;
break;
}
case 104: {
int rawValue = input.readEnum();
type_ = rawValue;
break;
}
case 114: {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.Builder subBuilder = null;
if (valueCase_ == 14) {
subBuilder = ((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point) value_).toBuilder();
}
value_ =
input.readMessage(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point) value_);
value_ = subBuilder.buildPartial();
}
valueCase_ = 14;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_DataScheme_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_DataScheme_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.Builder.class);
}
/**
* Protobuf enum {@code ai.konduit.serving.DataScheme.ValueType}
*/
public enum ValueType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* <code>NDARRAY = 0;</code>
*/
NDARRAY(0),
/**
* <code>STRING = 1;</code>
*/
STRING(1),
/**
* <code>BYTES = 2;</code>
*/
BYTES(2),
/**
* <code>IMAGE = 3;</code>
*/
IMAGE(3),
/**
* <code>DOUBLE = 4;</code>
*/
DOUBLE(4),
/**
* <code>INT64 = 5;</code>
*/
INT64(5),
/**
* <code>BOOLEAN = 6;</code>
*/
BOOLEAN(6),
/**
* <code>BOUNDING_BOX = 7;</code>
*/
BOUNDING_BOX(7),
/**
* <code>DATA = 8;</code>
*/
DATA(8),
/**
* <code>LIST = 9;</code>
*/
LIST(9),
/**
* <code>POINT = 10;</code>
*/
POINT(10),
UNRECOGNIZED(-1),
;
/**
* <code>NDARRAY = 0;</code>
*/
public static final int NDARRAY_VALUE = 0;
/**
* <code>STRING = 1;</code>
*/
public static final int STRING_VALUE = 1;
/**
* <code>BYTES = 2;</code>
*/
public static final int BYTES_VALUE = 2;
/**
* <code>IMAGE = 3;</code>
*/
public static final int IMAGE_VALUE = 3;
/**
* <code>DOUBLE = 4;</code>
*/
public static final int DOUBLE_VALUE = 4;
/**
* <code>INT64 = 5;</code>
*/
public static final int INT64_VALUE = 5;
/**
* <code>BOOLEAN = 6;</code>
*/
public static final int BOOLEAN_VALUE = 6;
/**
* <code>BOUNDING_BOX = 7;</code>
*/
public static final int BOUNDING_BOX_VALUE = 7;
/**
* <code>DATA = 8;</code>
*/
public static final int DATA_VALUE = 8;
/**
* <code>LIST = 9;</code>
*/
public static final int LIST_VALUE = 9;
/**
* <code>POINT = 10;</code>
*/
public static final int POINT_VALUE = 10;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ValueType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static ValueType forNumber(int value) {
switch (value) {
case 0: return NDARRAY;
case 1: return STRING;
case 2: return BYTES;
case 3: return IMAGE;
case 4: return DOUBLE;
case 5: return INT64;
case 6: return BOOLEAN;
case 7: return BOUNDING_BOX;
case 8: return DATA;
case 9: return LIST;
case 10: return POINT;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<ValueType>
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ValueType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<ValueType>() {
public ValueType findValueByNumber(int number) {
return ValueType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.getDescriptor().getEnumTypes().get(0);
}
private static final ValueType[] VALUES = values();
public static ValueType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private ValueType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:ai.konduit.serving.DataScheme.ValueType)
}
private int valueCase_ = 0;
private java.lang.Object value_;
public enum ValueCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
SVALUE(2),
BVALUE(3),
IVALUE(4),
BOOLVALUE(5),
DOUBLEVALUE(6),
LISTVALUE(7),
NDVALUE(8),
IMVALUE(9),
BOXVALUE(10),
METADATA(11),
POINTVALUE(14),
VALUE_NOT_SET(0);
private final int value;
private ValueCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ValueCase valueOf(int value) {
return forNumber(value);
}
public static ValueCase forNumber(int value) {
switch (value) {
case 2: return SVALUE;
case 3: return BVALUE;
case 4: return IVALUE;
case 5: return BOOLVALUE;
case 6: return DOUBLEVALUE;
case 7: return LISTVALUE;
case 8: return NDVALUE;
case 9: return IMVALUE;
case 10: return BOXVALUE;
case 11: return METADATA;
case 14: return POINTVALUE;
case 0: return VALUE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ValueCase
getValueCase() {
return ValueCase.forNumber(
valueCase_);
}
public static final int SVALUE_FIELD_NUMBER = 2;
/**
* <code>string sValue = 2;</code>
* @return Whether the sValue field is set.
*/
public boolean hasSValue() {
return valueCase_ == 2;
}
/**
* <code>string sValue = 2;</code>
* @return The sValue.
*/
public java.lang.String getSValue() {
java.lang.Object ref = "";
if (valueCase_ == 2) {
ref = value_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (valueCase_ == 2) {
value_ = s;
}
return s;
}
}
/**
* <code>string sValue = 2;</code>
* @return The bytes for sValue.
*/
public com.google.protobuf.ByteString
getSValueBytes() {
java.lang.Object ref = "";
if (valueCase_ == 2) {
ref = value_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (valueCase_ == 2) {
value_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int BVALUE_FIELD_NUMBER = 3;
/**
* <code>bytes bValue = 3;</code>
* @return Whether the bValue field is set.
*/
@java.lang.Override
public boolean hasBValue() {
return valueCase_ == 3;
}
/**
* <code>bytes bValue = 3;</code>
* @return The bValue.
*/
@java.lang.Override
public com.google.protobuf.ByteString getBValue() {
if (valueCase_ == 3) {
return (com.google.protobuf.ByteString) value_;
}
return com.google.protobuf.ByteString.EMPTY;
}
public static final int IVALUE_FIELD_NUMBER = 4;
/**
* <code>int64 iValue = 4;</code>
* @return Whether the iValue field is set.
*/
@java.lang.Override
public boolean hasIValue() {
return valueCase_ == 4;
}
/**
* <code>int64 iValue = 4;</code>
* @return The iValue.
*/
@java.lang.Override
public long getIValue() {
if (valueCase_ == 4) {
return (java.lang.Long) value_;
}
return 0L;
}
public static final int BOOLVALUE_FIELD_NUMBER = 5;
/**
* <code>bool boolValue = 5;</code>
* @return Whether the boolValue field is set.
*/
@java.lang.Override
public boolean hasBoolValue() {
return valueCase_ == 5;
}
/**
* <code>bool boolValue = 5;</code>
* @return The boolValue.
*/
@java.lang.Override
public boolean getBoolValue() {
if (valueCase_ == 5) {
return (java.lang.Boolean) value_;
}
return false;
}
public static final int DOUBLEVALUE_FIELD_NUMBER = 6;
/**
* <code>double doubleValue = 6;</code>
* @return Whether the doubleValue field is set.
*/
@java.lang.Override
public boolean hasDoubleValue() {
return valueCase_ == 6;
}
/**
* <code>double doubleValue = 6;</code>
* @return The doubleValue.
*/
@java.lang.Override
public double getDoubleValue() {
if (valueCase_ == 6) {
return (java.lang.Double) value_;
}
return 0D;
}
public static final int LISTVALUE_FIELD_NUMBER = 7;
/**
* <code>.ai.konduit.serving.List listValue = 7;</code>
* @return Whether the listValue field is set.
*/
@java.lang.Override
public boolean hasListValue() {
return valueCase_ == 7;
}
/**
* <code>.ai.konduit.serving.List listValue = 7;</code>
* @return The listValue.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List getListValue() {
if (valueCase_ == 7) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List.getDefaultInstance();
}
/**
* <code>.ai.konduit.serving.List listValue = 7;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ListOrBuilder getListValueOrBuilder() {
if (valueCase_ == 7) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List.getDefaultInstance();
}
public static final int NDVALUE_FIELD_NUMBER = 8;
/**
* <code>.ai.konduit.serving.NDArray ndValue = 8;</code>
* @return Whether the ndValue field is set.
*/
@java.lang.Override
public boolean hasNdValue() {
return valueCase_ == 8;
}
/**
* <code>.ai.konduit.serving.NDArray ndValue = 8;</code>
* @return The ndValue.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray getNdValue() {
if (valueCase_ == 8) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.getDefaultInstance();
}
/**
* <code>.ai.konduit.serving.NDArray ndValue = 8;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayOrBuilder getNdValueOrBuilder() {
if (valueCase_ == 8) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.getDefaultInstance();
}
public static final int IMVALUE_FIELD_NUMBER = 9;
/**
* <code>.ai.konduit.serving.Image imValue = 9;</code>
* @return Whether the imValue field is set.
*/
@java.lang.Override
public boolean hasImValue() {
return valueCase_ == 9;
}
/**
* <code>.ai.konduit.serving.Image imValue = 9;</code>
* @return The imValue.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image getImValue() {
if (valueCase_ == 9) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.getDefaultInstance();
}
/**
* <code>.ai.konduit.serving.Image imValue = 9;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageOrBuilder getImValueOrBuilder() {
if (valueCase_ == 9) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.getDefaultInstance();
}
public static final int BOXVALUE_FIELD_NUMBER = 10;
/**
* <code>.ai.konduit.serving.BoundingBox boxValue = 10;</code>
* @return Whether the boxValue field is set.
*/
@java.lang.Override
public boolean hasBoxValue() {
return valueCase_ == 10;
}
/**
* <code>.ai.konduit.serving.BoundingBox boxValue = 10;</code>
* @return The boxValue.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox getBoxValue() {
if (valueCase_ == 10) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.getDefaultInstance();
}
/**
* <code>.ai.konduit.serving.BoundingBox boxValue = 10;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxOrBuilder getBoxValueOrBuilder() {
if (valueCase_ == 10) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.getDefaultInstance();
}
public static final int METADATA_FIELD_NUMBER = 11;
/**
* <code>.ai.konduit.serving.DataMap metaData = 11;</code>
* @return Whether the metaData field is set.
*/
@java.lang.Override
public boolean hasMetaData() {
return valueCase_ == 11;
}
/**
* <code>.ai.konduit.serving.DataMap metaData = 11;</code>
* @return The metaData.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap getMetaData() {
if (valueCase_ == 11) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap.getDefaultInstance();
}
/**
* <code>.ai.konduit.serving.DataMap metaData = 11;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMapOrBuilder getMetaDataOrBuilder() {
if (valueCase_ == 11) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap.getDefaultInstance();
}
public static final int POINTVALUE_FIELD_NUMBER = 14;
/**
* <code>.ai.konduit.serving.Point pointValue = 14;</code>
* @return Whether the pointValue field is set.
*/
@java.lang.Override
public boolean hasPointValue() {
return valueCase_ == 14;
}
/**
* <code>.ai.konduit.serving.Point pointValue = 14;</code>
* @return The pointValue.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point getPointValue() {
if (valueCase_ == 14) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.getDefaultInstance();
}
/**
* <code>.ai.konduit.serving.Point pointValue = 14;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointOrBuilder getPointValueOrBuilder() {
if (valueCase_ == 14) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.getDefaultInstance();
}
public static final int LISTTYPE_FIELD_NUMBER = 12;
private int listType_;
/**
* <code>.ai.konduit.serving.DataScheme.ValueType listType = 12;</code>
* @return The enum numeric value on the wire for listType.
*/
@java.lang.Override public int getListTypeValue() {
return listType_;
}
/**
* <code>.ai.konduit.serving.DataScheme.ValueType listType = 12;</code>
* @return The listType.
*/
@java.lang.Override public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType getListType() {
@SuppressWarnings("deprecation")
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType result = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType.valueOf(listType_);
return result == null ? ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType.UNRECOGNIZED : result;
}
public static final int TYPE_FIELD_NUMBER = 13;
private int type_;
/**
* <code>.ai.konduit.serving.DataScheme.ValueType type = 13;</code>
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
* <code>.ai.konduit.serving.DataScheme.ValueType type = 13;</code>
* @return The type.
*/
@java.lang.Override public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType getType() {
@SuppressWarnings("deprecation")
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType result = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType.valueOf(type_);
return result == null ? ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (valueCase_ == 2) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_);
}
if (valueCase_ == 3) {
output.writeBytes(
3, (com.google.protobuf.ByteString) value_);
}
if (valueCase_ == 4) {
output.writeInt64(
4, (long)((java.lang.Long) value_));
}
if (valueCase_ == 5) {
output.writeBool(
5, (boolean)((java.lang.Boolean) value_));
}
if (valueCase_ == 6) {
output.writeDouble(
6, (double)((java.lang.Double) value_));
}
if (valueCase_ == 7) {
output.writeMessage(7, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List) value_);
}
if (valueCase_ == 8) {
output.writeMessage(8, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray) value_);
}
if (valueCase_ == 9) {
output.writeMessage(9, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image) value_);
}
if (valueCase_ == 10) {
output.writeMessage(10, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox) value_);
}
if (valueCase_ == 11) {
output.writeMessage(11, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap) value_);
}
if (listType_ != ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType.NDARRAY.getNumber()) {
output.writeEnum(12, listType_);
}
if (type_ != ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType.NDARRAY.getNumber()) {
output.writeEnum(13, type_);
}
if (valueCase_ == 14) {
output.writeMessage(14, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point) value_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (valueCase_ == 2) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_);
}
if (valueCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(
3, (com.google.protobuf.ByteString) value_);
}
if (valueCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(
4, (long)((java.lang.Long) value_));
}
if (valueCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(
5, (boolean)((java.lang.Boolean) value_));
}
if (valueCase_ == 6) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(
6, (double)((java.lang.Double) value_));
}
if (valueCase_ == 7) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List) value_);
}
if (valueCase_ == 8) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray) value_);
}
if (valueCase_ == 9) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image) value_);
}
if (valueCase_ == 10) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox) value_);
}
if (valueCase_ == 11) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap) value_);
}
if (listType_ != ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType.NDARRAY.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(12, listType_);
}
if (type_ != ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType.NDARRAY.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(13, type_);
}
if (valueCase_ == 14) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(14, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point) value_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme)) {
return super.equals(obj);
}
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme other = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme) obj;
if (listType_ != other.listType_) return false;
if (type_ != other.type_) return false;
if (!getValueCase().equals(other.getValueCase())) return false;
switch (valueCase_) {
case 2:
if (!getSValue()
.equals(other.getSValue())) return false;
break;
case 3:
if (!getBValue()
.equals(other.getBValue())) return false;
break;
case 4:
if (getIValue()
!= other.getIValue()) return false;
break;
case 5:
if (getBoolValue()
!= other.getBoolValue()) return false;
break;
case 6:
if (java.lang.Double.doubleToLongBits(getDoubleValue())
!= java.lang.Double.doubleToLongBits(
other.getDoubleValue())) return false;
break;
case 7:
if (!getListValue()
.equals(other.getListValue())) return false;
break;
case 8:
if (!getNdValue()
.equals(other.getNdValue())) return false;
break;
case 9:
if (!getImValue()
.equals(other.getImValue())) return false;
break;
case 10:
if (!getBoxValue()
.equals(other.getBoxValue())) return false;
break;
case 11:
if (!getMetaData()
.equals(other.getMetaData())) return false;
break;
case 14:
if (!getPointValue()
.equals(other.getPointValue())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + LISTTYPE_FIELD_NUMBER;
hash = (53 * hash) + listType_;
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
switch (valueCase_) {
case 2:
hash = (37 * hash) + SVALUE_FIELD_NUMBER;
hash = (53 * hash) + getSValue().hashCode();
break;
case 3:
hash = (37 * hash) + BVALUE_FIELD_NUMBER;
hash = (53 * hash) + getBValue().hashCode();
break;
case 4:
hash = (37 * hash) + IVALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getIValue());
break;
case 5:
hash = (37 * hash) + BOOLVALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getBoolValue());
break;
case 6:
hash = (37 * hash) + DOUBLEVALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getDoubleValue()));
break;
case 7:
hash = (37 * hash) + LISTVALUE_FIELD_NUMBER;
hash = (53 * hash) + getListValue().hashCode();
break;
case 8:
hash = (37 * hash) + NDVALUE_FIELD_NUMBER;
hash = (53 * hash) + getNdValue().hashCode();
break;
case 9:
hash = (37 * hash) + IMVALUE_FIELD_NUMBER;
hash = (53 * hash) + getImValue().hashCode();
break;
case 10:
hash = (37 * hash) + BOXVALUE_FIELD_NUMBER;
hash = (53 * hash) + getBoxValue().hashCode();
break;
case 11:
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + getMetaData().hashCode();
break;
case 14:
hash = (37 * hash) + POINTVALUE_FIELD_NUMBER;
hash = (53 * hash) + getPointValue().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code ai.konduit.serving.DataScheme}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:ai.konduit.serving.DataScheme)
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataSchemeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_DataScheme_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_DataScheme_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.Builder.class);
}
// Construct using ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
listType_ = 0;
type_ = 0;
valueCase_ = 0;
value_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_DataScheme_descriptor;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme getDefaultInstanceForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.getDefaultInstance();
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme build() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme buildPartial() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme result = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme(this);
if (valueCase_ == 2) {
result.value_ = value_;
}
if (valueCase_ == 3) {
result.value_ = value_;
}
if (valueCase_ == 4) {
result.value_ = value_;
}
if (valueCase_ == 5) {
result.value_ = value_;
}
if (valueCase_ == 6) {
result.value_ = value_;
}
if (valueCase_ == 7) {
if (listValueBuilder_ == null) {
result.value_ = value_;
} else {
result.value_ = listValueBuilder_.build();
}
}
if (valueCase_ == 8) {
if (ndValueBuilder_ == null) {
result.value_ = value_;
} else {
result.value_ = ndValueBuilder_.build();
}
}
if (valueCase_ == 9) {
if (imValueBuilder_ == null) {
result.value_ = value_;
} else {
result.value_ = imValueBuilder_.build();
}
}
if (valueCase_ == 10) {
if (boxValueBuilder_ == null) {
result.value_ = value_;
} else {
result.value_ = boxValueBuilder_.build();
}
}
if (valueCase_ == 11) {
if (metaDataBuilder_ == null) {
result.value_ = value_;
} else {
result.value_ = metaDataBuilder_.build();
}
}
if (valueCase_ == 14) {
if (pointValueBuilder_ == null) {
result.value_ = value_;
} else {
result.value_ = pointValueBuilder_.build();
}
}
result.listType_ = listType_;
result.type_ = type_;
result.valueCase_ = valueCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme) {
return mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme other) {
if (other == ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.getDefaultInstance()) return this;
if (other.listType_ != 0) {
setListTypeValue(other.getListTypeValue());
}
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
switch (other.getValueCase()) {
case SVALUE: {
valueCase_ = 2;
value_ = other.value_;
onChanged();
break;
}
case BVALUE: {
setBValue(other.getBValue());
break;
}
case IVALUE: {
setIValue(other.getIValue());
break;
}
case BOOLVALUE: {
setBoolValue(other.getBoolValue());
break;
}
case DOUBLEVALUE: {
setDoubleValue(other.getDoubleValue());
break;
}
case LISTVALUE: {
mergeListValue(other.getListValue());
break;
}
case NDVALUE: {
mergeNdValue(other.getNdValue());
break;
}
case IMVALUE: {
mergeImValue(other.getImValue());
break;
}
case BOXVALUE: {
mergeBoxValue(other.getBoxValue());
break;
}
case METADATA: {
mergeMetaData(other.getMetaData());
break;
}
case POINTVALUE: {
mergePointValue(other.getPointValue());
break;
}
case VALUE_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int valueCase_ = 0;
private java.lang.Object value_;
public ValueCase
getValueCase() {
return ValueCase.forNumber(
valueCase_);
}
public Builder clearValue() {
valueCase_ = 0;
value_ = null;
onChanged();
return this;
}
/**
* <code>string sValue = 2;</code>
* @return Whether the sValue field is set.
*/
@java.lang.Override
public boolean hasSValue() {
return valueCase_ == 2;
}
/**
* <code>string sValue = 2;</code>
* @return The sValue.
*/
@java.lang.Override
public java.lang.String getSValue() {
java.lang.Object ref = "";
if (valueCase_ == 2) {
ref = value_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (valueCase_ == 2) {
value_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>string sValue = 2;</code>
* @return The bytes for sValue.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSValueBytes() {
java.lang.Object ref = "";
if (valueCase_ == 2) {
ref = value_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (valueCase_ == 2) {
value_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>string sValue = 2;</code>
* @param value The sValue to set.
* @return This builder for chaining.
*/
public Builder setSValue(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
valueCase_ = 2;
value_ = value;
onChanged();
return this;
}
/**
* <code>string sValue = 2;</code>
* @return This builder for chaining.
*/
public Builder clearSValue() {
if (valueCase_ == 2) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
/**
* <code>string sValue = 2;</code>
* @param value The bytes for sValue to set.
* @return This builder for chaining.
*/
public Builder setSValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
valueCase_ = 2;
value_ = value;
onChanged();
return this;
}
/**
* <code>bytes bValue = 3;</code>
* @return Whether the bValue field is set.
*/
public boolean hasBValue() {
return valueCase_ == 3;
}
/**
* <code>bytes bValue = 3;</code>
* @return The bValue.
*/
public com.google.protobuf.ByteString getBValue() {
if (valueCase_ == 3) {
return (com.google.protobuf.ByteString) value_;
}
return com.google.protobuf.ByteString.EMPTY;
}
/**
* <code>bytes bValue = 3;</code>
* @param value The bValue to set.
* @return This builder for chaining.
*/
public Builder setBValue(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
valueCase_ = 3;
value_ = value;
onChanged();
return this;
}
/**
* <code>bytes bValue = 3;</code>
* @return This builder for chaining.
*/
public Builder clearBValue() {
if (valueCase_ == 3) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
/**
* <code>int64 iValue = 4;</code>
* @return Whether the iValue field is set.
*/
public boolean hasIValue() {
return valueCase_ == 4;
}
/**
* <code>int64 iValue = 4;</code>
* @return The iValue.
*/
public long getIValue() {
if (valueCase_ == 4) {
return (java.lang.Long) value_;
}
return 0L;
}
/**
* <code>int64 iValue = 4;</code>
* @param value The iValue to set.
* @return This builder for chaining.
*/
public Builder setIValue(long value) {
valueCase_ = 4;
value_ = value;
onChanged();
return this;
}
/**
* <code>int64 iValue = 4;</code>
* @return This builder for chaining.
*/
public Builder clearIValue() {
if (valueCase_ == 4) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
/**
* <code>bool boolValue = 5;</code>
* @return Whether the boolValue field is set.
*/
public boolean hasBoolValue() {
return valueCase_ == 5;
}
/**
* <code>bool boolValue = 5;</code>
* @return The boolValue.
*/
public boolean getBoolValue() {
if (valueCase_ == 5) {
return (java.lang.Boolean) value_;
}
return false;
}
/**
* <code>bool boolValue = 5;</code>
* @param value The boolValue to set.
* @return This builder for chaining.
*/
public Builder setBoolValue(boolean value) {
valueCase_ = 5;
value_ = value;
onChanged();
return this;
}
/**
* <code>bool boolValue = 5;</code>
* @return This builder for chaining.
*/
public Builder clearBoolValue() {
if (valueCase_ == 5) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
/**
* <code>double doubleValue = 6;</code>
* @return Whether the doubleValue field is set.
*/
public boolean hasDoubleValue() {
return valueCase_ == 6;
}
/**
* <code>double doubleValue = 6;</code>
* @return The doubleValue.
*/
public double getDoubleValue() {
if (valueCase_ == 6) {
return (java.lang.Double) value_;
}
return 0D;
}
/**
* <code>double doubleValue = 6;</code>
* @param value The doubleValue to set.
* @return This builder for chaining.
*/
public Builder setDoubleValue(double value) {
valueCase_ = 6;
value_ = value;
onChanged();
return this;
}
/**
* <code>double doubleValue = 6;</code>
* @return This builder for chaining.
*/
public Builder clearDoubleValue() {
if (valueCase_ == 6) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ListOrBuilder> listValueBuilder_;
/**
* <code>.ai.konduit.serving.List listValue = 7;</code>
* @return Whether the listValue field is set.
*/
@java.lang.Override
public boolean hasListValue() {
return valueCase_ == 7;
}
/**
* <code>.ai.konduit.serving.List listValue = 7;</code>
* @return The listValue.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List getListValue() {
if (listValueBuilder_ == null) {
if (valueCase_ == 7) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List.getDefaultInstance();
} else {
if (valueCase_ == 7) {
return listValueBuilder_.getMessage();
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.List listValue = 7;</code>
*/
public Builder setListValue(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List value) {
if (listValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
} else {
listValueBuilder_.setMessage(value);
}
valueCase_ = 7;
return this;
}
/**
* <code>.ai.konduit.serving.List listValue = 7;</code>
*/
public Builder setListValue(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List.Builder builderForValue) {
if (listValueBuilder_ == null) {
value_ = builderForValue.build();
onChanged();
} else {
listValueBuilder_.setMessage(builderForValue.build());
}
valueCase_ = 7;
return this;
}
/**
* <code>.ai.konduit.serving.List listValue = 7;</code>
*/
public Builder mergeListValue(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List value) {
if (listValueBuilder_ == null) {
if (valueCase_ == 7 &&
value_ != ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List.getDefaultInstance()) {
value_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List.newBuilder((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List) value_)
.mergeFrom(value).buildPartial();
} else {
value_ = value;
}
onChanged();
} else {
if (valueCase_ == 7) {
listValueBuilder_.mergeFrom(value);
}
listValueBuilder_.setMessage(value);
}
valueCase_ = 7;
return this;
}
/**
* <code>.ai.konduit.serving.List listValue = 7;</code>
*/
public Builder clearListValue() {
if (listValueBuilder_ == null) {
if (valueCase_ == 7) {
valueCase_ = 0;
value_ = null;
onChanged();
}
} else {
if (valueCase_ == 7) {
valueCase_ = 0;
value_ = null;
}
listValueBuilder_.clear();
}
return this;
}
/**
* <code>.ai.konduit.serving.List listValue = 7;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List.Builder getListValueBuilder() {
return getListValueFieldBuilder().getBuilder();
}
/**
* <code>.ai.konduit.serving.List listValue = 7;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ListOrBuilder getListValueOrBuilder() {
if ((valueCase_ == 7) && (listValueBuilder_ != null)) {
return listValueBuilder_.getMessageOrBuilder();
} else {
if (valueCase_ == 7) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.List listValue = 7;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ListOrBuilder>
getListValueFieldBuilder() {
if (listValueBuilder_ == null) {
if (!(valueCase_ == 7)) {
value_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List.getDefaultInstance();
}
listValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ListOrBuilder>(
(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List) value_,
getParentForChildren(),
isClean());
value_ = null;
}
valueCase_ = 7;
onChanged();;
return listValueBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayOrBuilder> ndValueBuilder_;
/**
* <code>.ai.konduit.serving.NDArray ndValue = 8;</code>
* @return Whether the ndValue field is set.
*/
@java.lang.Override
public boolean hasNdValue() {
return valueCase_ == 8;
}
/**
* <code>.ai.konduit.serving.NDArray ndValue = 8;</code>
* @return The ndValue.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray getNdValue() {
if (ndValueBuilder_ == null) {
if (valueCase_ == 8) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.getDefaultInstance();
} else {
if (valueCase_ == 8) {
return ndValueBuilder_.getMessage();
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.NDArray ndValue = 8;</code>
*/
public Builder setNdValue(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray value) {
if (ndValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
} else {
ndValueBuilder_.setMessage(value);
}
valueCase_ = 8;
return this;
}
/**
* <code>.ai.konduit.serving.NDArray ndValue = 8;</code>
*/
public Builder setNdValue(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.Builder builderForValue) {
if (ndValueBuilder_ == null) {
value_ = builderForValue.build();
onChanged();
} else {
ndValueBuilder_.setMessage(builderForValue.build());
}
valueCase_ = 8;
return this;
}
/**
* <code>.ai.konduit.serving.NDArray ndValue = 8;</code>
*/
public Builder mergeNdValue(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray value) {
if (ndValueBuilder_ == null) {
if (valueCase_ == 8 &&
value_ != ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.getDefaultInstance()) {
value_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.newBuilder((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray) value_)
.mergeFrom(value).buildPartial();
} else {
value_ = value;
}
onChanged();
} else {
if (valueCase_ == 8) {
ndValueBuilder_.mergeFrom(value);
}
ndValueBuilder_.setMessage(value);
}
valueCase_ = 8;
return this;
}
/**
* <code>.ai.konduit.serving.NDArray ndValue = 8;</code>
*/
public Builder clearNdValue() {
if (ndValueBuilder_ == null) {
if (valueCase_ == 8) {
valueCase_ = 0;
value_ = null;
onChanged();
}
} else {
if (valueCase_ == 8) {
valueCase_ = 0;
value_ = null;
}
ndValueBuilder_.clear();
}
return this;
}
/**
* <code>.ai.konduit.serving.NDArray ndValue = 8;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.Builder getNdValueBuilder() {
return getNdValueFieldBuilder().getBuilder();
}
/**
* <code>.ai.konduit.serving.NDArray ndValue = 8;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayOrBuilder getNdValueOrBuilder() {
if ((valueCase_ == 8) && (ndValueBuilder_ != null)) {
return ndValueBuilder_.getMessageOrBuilder();
} else {
if (valueCase_ == 8) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.NDArray ndValue = 8;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayOrBuilder>
getNdValueFieldBuilder() {
if (ndValueBuilder_ == null) {
if (!(valueCase_ == 8)) {
value_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.getDefaultInstance();
}
ndValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayOrBuilder>(
(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray) value_,
getParentForChildren(),
isClean());
value_ = null;
}
valueCase_ = 8;
onChanged();;
return ndValueBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageOrBuilder> imValueBuilder_;
/**
* <code>.ai.konduit.serving.Image imValue = 9;</code>
* @return Whether the imValue field is set.
*/
@java.lang.Override
public boolean hasImValue() {
return valueCase_ == 9;
}
/**
* <code>.ai.konduit.serving.Image imValue = 9;</code>
* @return The imValue.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image getImValue() {
if (imValueBuilder_ == null) {
if (valueCase_ == 9) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.getDefaultInstance();
} else {
if (valueCase_ == 9) {
return imValueBuilder_.getMessage();
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.Image imValue = 9;</code>
*/
public Builder setImValue(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image value) {
if (imValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
} else {
imValueBuilder_.setMessage(value);
}
valueCase_ = 9;
return this;
}
/**
* <code>.ai.konduit.serving.Image imValue = 9;</code>
*/
public Builder setImValue(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.Builder builderForValue) {
if (imValueBuilder_ == null) {
value_ = builderForValue.build();
onChanged();
} else {
imValueBuilder_.setMessage(builderForValue.build());
}
valueCase_ = 9;
return this;
}
/**
* <code>.ai.konduit.serving.Image imValue = 9;</code>
*/
public Builder mergeImValue(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image value) {
if (imValueBuilder_ == null) {
if (valueCase_ == 9 &&
value_ != ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.getDefaultInstance()) {
value_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.newBuilder((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image) value_)
.mergeFrom(value).buildPartial();
} else {
value_ = value;
}
onChanged();
} else {
if (valueCase_ == 9) {
imValueBuilder_.mergeFrom(value);
}
imValueBuilder_.setMessage(value);
}
valueCase_ = 9;
return this;
}
/**
* <code>.ai.konduit.serving.Image imValue = 9;</code>
*/
public Builder clearImValue() {
if (imValueBuilder_ == null) {
if (valueCase_ == 9) {
valueCase_ = 0;
value_ = null;
onChanged();
}
} else {
if (valueCase_ == 9) {
valueCase_ = 0;
value_ = null;
}
imValueBuilder_.clear();
}
return this;
}
/**
* <code>.ai.konduit.serving.Image imValue = 9;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.Builder getImValueBuilder() {
return getImValueFieldBuilder().getBuilder();
}
/**
* <code>.ai.konduit.serving.Image imValue = 9;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageOrBuilder getImValueOrBuilder() {
if ((valueCase_ == 9) && (imValueBuilder_ != null)) {
return imValueBuilder_.getMessageOrBuilder();
} else {
if (valueCase_ == 9) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.Image imValue = 9;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageOrBuilder>
getImValueFieldBuilder() {
if (imValueBuilder_ == null) {
if (!(valueCase_ == 9)) {
value_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.getDefaultInstance();
}
imValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageOrBuilder>(
(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image) value_,
getParentForChildren(),
isClean());
value_ = null;
}
valueCase_ = 9;
onChanged();;
return imValueBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxOrBuilder> boxValueBuilder_;
/**
* <code>.ai.konduit.serving.BoundingBox boxValue = 10;</code>
* @return Whether the boxValue field is set.
*/
@java.lang.Override
public boolean hasBoxValue() {
return valueCase_ == 10;
}
/**
* <code>.ai.konduit.serving.BoundingBox boxValue = 10;</code>
* @return The boxValue.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox getBoxValue() {
if (boxValueBuilder_ == null) {
if (valueCase_ == 10) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.getDefaultInstance();
} else {
if (valueCase_ == 10) {
return boxValueBuilder_.getMessage();
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.BoundingBox boxValue = 10;</code>
*/
public Builder setBoxValue(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox value) {
if (boxValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
} else {
boxValueBuilder_.setMessage(value);
}
valueCase_ = 10;
return this;
}
/**
* <code>.ai.konduit.serving.BoundingBox boxValue = 10;</code>
*/
public Builder setBoxValue(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.Builder builderForValue) {
if (boxValueBuilder_ == null) {
value_ = builderForValue.build();
onChanged();
} else {
boxValueBuilder_.setMessage(builderForValue.build());
}
valueCase_ = 10;
return this;
}
/**
* <code>.ai.konduit.serving.BoundingBox boxValue = 10;</code>
*/
public Builder mergeBoxValue(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox value) {
if (boxValueBuilder_ == null) {
if (valueCase_ == 10 &&
value_ != ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.getDefaultInstance()) {
value_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.newBuilder((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox) value_)
.mergeFrom(value).buildPartial();
} else {
value_ = value;
}
onChanged();
} else {
if (valueCase_ == 10) {
boxValueBuilder_.mergeFrom(value);
}
boxValueBuilder_.setMessage(value);
}
valueCase_ = 10;
return this;
}
/**
* <code>.ai.konduit.serving.BoundingBox boxValue = 10;</code>
*/
public Builder clearBoxValue() {
if (boxValueBuilder_ == null) {
if (valueCase_ == 10) {
valueCase_ = 0;
value_ = null;
onChanged();
}
} else {
if (valueCase_ == 10) {
valueCase_ = 0;
value_ = null;
}
boxValueBuilder_.clear();
}
return this;
}
/**
* <code>.ai.konduit.serving.BoundingBox boxValue = 10;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.Builder getBoxValueBuilder() {
return getBoxValueFieldBuilder().getBuilder();
}
/**
* <code>.ai.konduit.serving.BoundingBox boxValue = 10;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxOrBuilder getBoxValueOrBuilder() {
if ((valueCase_ == 10) && (boxValueBuilder_ != null)) {
return boxValueBuilder_.getMessageOrBuilder();
} else {
if (valueCase_ == 10) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.BoundingBox boxValue = 10;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxOrBuilder>
getBoxValueFieldBuilder() {
if (boxValueBuilder_ == null) {
if (!(valueCase_ == 10)) {
value_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.getDefaultInstance();
}
boxValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxOrBuilder>(
(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox) value_,
getParentForChildren(),
isClean());
value_ = null;
}
valueCase_ = 10;
onChanged();;
return boxValueBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMapOrBuilder> metaDataBuilder_;
/**
* <code>.ai.konduit.serving.DataMap metaData = 11;</code>
* @return Whether the metaData field is set.
*/
@java.lang.Override
public boolean hasMetaData() {
return valueCase_ == 11;
}
/**
* <code>.ai.konduit.serving.DataMap metaData = 11;</code>
* @return The metaData.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap getMetaData() {
if (metaDataBuilder_ == null) {
if (valueCase_ == 11) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap.getDefaultInstance();
} else {
if (valueCase_ == 11) {
return metaDataBuilder_.getMessage();
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.DataMap metaData = 11;</code>
*/
public Builder setMetaData(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap value) {
if (metaDataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
} else {
metaDataBuilder_.setMessage(value);
}
valueCase_ = 11;
return this;
}
/**
* <code>.ai.konduit.serving.DataMap metaData = 11;</code>
*/
public Builder setMetaData(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap.Builder builderForValue) {
if (metaDataBuilder_ == null) {
value_ = builderForValue.build();
onChanged();
} else {
metaDataBuilder_.setMessage(builderForValue.build());
}
valueCase_ = 11;
return this;
}
/**
* <code>.ai.konduit.serving.DataMap metaData = 11;</code>
*/
public Builder mergeMetaData(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap value) {
if (metaDataBuilder_ == null) {
if (valueCase_ == 11 &&
value_ != ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap.getDefaultInstance()) {
value_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap.newBuilder((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap) value_)
.mergeFrom(value).buildPartial();
} else {
value_ = value;
}
onChanged();
} else {
if (valueCase_ == 11) {
metaDataBuilder_.mergeFrom(value);
}
metaDataBuilder_.setMessage(value);
}
valueCase_ = 11;
return this;
}
/**
* <code>.ai.konduit.serving.DataMap metaData = 11;</code>
*/
public Builder clearMetaData() {
if (metaDataBuilder_ == null) {
if (valueCase_ == 11) {
valueCase_ = 0;
value_ = null;
onChanged();
}
} else {
if (valueCase_ == 11) {
valueCase_ = 0;
value_ = null;
}
metaDataBuilder_.clear();
}
return this;
}
/**
* <code>.ai.konduit.serving.DataMap metaData = 11;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap.Builder getMetaDataBuilder() {
return getMetaDataFieldBuilder().getBuilder();
}
/**
* <code>.ai.konduit.serving.DataMap metaData = 11;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMapOrBuilder getMetaDataOrBuilder() {
if ((valueCase_ == 11) && (metaDataBuilder_ != null)) {
return metaDataBuilder_.getMessageOrBuilder();
} else {
if (valueCase_ == 11) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.DataMap metaData = 11;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMapOrBuilder>
getMetaDataFieldBuilder() {
if (metaDataBuilder_ == null) {
if (!(valueCase_ == 11)) {
value_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap.getDefaultInstance();
}
metaDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMapOrBuilder>(
(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap) value_,
getParentForChildren(),
isClean());
value_ = null;
}
valueCase_ = 11;
onChanged();;
return metaDataBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointOrBuilder> pointValueBuilder_;
/**
* <code>.ai.konduit.serving.Point pointValue = 14;</code>
* @return Whether the pointValue field is set.
*/
@java.lang.Override
public boolean hasPointValue() {
return valueCase_ == 14;
}
/**
* <code>.ai.konduit.serving.Point pointValue = 14;</code>
* @return The pointValue.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point getPointValue() {
if (pointValueBuilder_ == null) {
if (valueCase_ == 14) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.getDefaultInstance();
} else {
if (valueCase_ == 14) {
return pointValueBuilder_.getMessage();
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.Point pointValue = 14;</code>
*/
public Builder setPointValue(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point value) {
if (pointValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
} else {
pointValueBuilder_.setMessage(value);
}
valueCase_ = 14;
return this;
}
/**
* <code>.ai.konduit.serving.Point pointValue = 14;</code>
*/
public Builder setPointValue(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.Builder builderForValue) {
if (pointValueBuilder_ == null) {
value_ = builderForValue.build();
onChanged();
} else {
pointValueBuilder_.setMessage(builderForValue.build());
}
valueCase_ = 14;
return this;
}
/**
* <code>.ai.konduit.serving.Point pointValue = 14;</code>
*/
public Builder mergePointValue(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point value) {
if (pointValueBuilder_ == null) {
if (valueCase_ == 14 &&
value_ != ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.getDefaultInstance()) {
value_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.newBuilder((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point) value_)
.mergeFrom(value).buildPartial();
} else {
value_ = value;
}
onChanged();
} else {
if (valueCase_ == 14) {
pointValueBuilder_.mergeFrom(value);
}
pointValueBuilder_.setMessage(value);
}
valueCase_ = 14;
return this;
}
/**
* <code>.ai.konduit.serving.Point pointValue = 14;</code>
*/
public Builder clearPointValue() {
if (pointValueBuilder_ == null) {
if (valueCase_ == 14) {
valueCase_ = 0;
value_ = null;
onChanged();
}
} else {
if (valueCase_ == 14) {
valueCase_ = 0;
value_ = null;
}
pointValueBuilder_.clear();
}
return this;
}
/**
* <code>.ai.konduit.serving.Point pointValue = 14;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.Builder getPointValueBuilder() {
return getPointValueFieldBuilder().getBuilder();
}
/**
* <code>.ai.konduit.serving.Point pointValue = 14;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointOrBuilder getPointValueOrBuilder() {
if ((valueCase_ == 14) && (pointValueBuilder_ != null)) {
return pointValueBuilder_.getMessageOrBuilder();
} else {
if (valueCase_ == 14) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point) value_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.Point pointValue = 14;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointOrBuilder>
getPointValueFieldBuilder() {
if (pointValueBuilder_ == null) {
if (!(valueCase_ == 14)) {
value_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.getDefaultInstance();
}
pointValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointOrBuilder>(
(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point) value_,
getParentForChildren(),
isClean());
value_ = null;
}
valueCase_ = 14;
onChanged();;
return pointValueBuilder_;
}
private int listType_ = 0;
/**
* <code>.ai.konduit.serving.DataScheme.ValueType listType = 12;</code>
* @return The enum numeric value on the wire for listType.
*/
@java.lang.Override public int getListTypeValue() {
return listType_;
}
/**
* <code>.ai.konduit.serving.DataScheme.ValueType listType = 12;</code>
* @param value The enum numeric value on the wire for listType to set.
* @return This builder for chaining.
*/
public Builder setListTypeValue(int value) {
listType_ = value;
onChanged();
return this;
}
/**
* <code>.ai.konduit.serving.DataScheme.ValueType listType = 12;</code>
* @return The listType.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType getListType() {
@SuppressWarnings("deprecation")
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType result = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType.valueOf(listType_);
return result == null ? ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType.UNRECOGNIZED : result;
}
/**
* <code>.ai.konduit.serving.DataScheme.ValueType listType = 12;</code>
* @param value The listType to set.
* @return This builder for chaining.
*/
public Builder setListType(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType value) {
if (value == null) {
throw new NullPointerException();
}
listType_ = value.getNumber();
onChanged();
return this;
}
/**
* <code>.ai.konduit.serving.DataScheme.ValueType listType = 12;</code>
* @return This builder for chaining.
*/
public Builder clearListType() {
listType_ = 0;
onChanged();
return this;
}
private int type_ = 0;
/**
* <code>.ai.konduit.serving.DataScheme.ValueType type = 13;</code>
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
* <code>.ai.konduit.serving.DataScheme.ValueType type = 13;</code>
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
type_ = value;
onChanged();
return this;
}
/**
* <code>.ai.konduit.serving.DataScheme.ValueType type = 13;</code>
* @return The type.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType getType() {
@SuppressWarnings("deprecation")
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType result = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType.valueOf(type_);
return result == null ? ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType.UNRECOGNIZED : result;
}
/**
* <code>.ai.konduit.serving.DataScheme.ValueType type = 13;</code>
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.ValueType value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value.getNumber();
onChanged();
return this;
}
/**
* <code>.ai.konduit.serving.DataScheme.ValueType type = 13;</code>
* @return This builder for chaining.
*/
public Builder clearType() {
type_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:ai.konduit.serving.DataScheme)
}
// @@protoc_insertion_point(class_scope:ai.konduit.serving.DataScheme)
private static final ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme();
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<DataScheme>
PARSER = new com.google.protobuf.AbstractParser<DataScheme>() {
@java.lang.Override
public DataScheme parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DataScheme(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<DataScheme> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<DataScheme> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface StringListOrBuilder extends
// @@protoc_insertion_point(interface_extends:ai.konduit.serving.StringList)
com.google.protobuf.MessageOrBuilder {
/**
* <code>repeated string list = 1;</code>
* @return A list containing the list.
*/
java.util.List<java.lang.String>
getListList();
/**
* <code>repeated string list = 1;</code>
* @return The count of list.
*/
int getListCount();
/**
* <code>repeated string list = 1;</code>
* @param index The index of the element to return.
* @return The list at the given index.
*/
java.lang.String getList(int index);
/**
* <code>repeated string list = 1;</code>
* @param index The index of the value to return.
* @return The bytes of the list at the given index.
*/
com.google.protobuf.ByteString
getListBytes(int index);
}
/**
* Protobuf type {@code ai.konduit.serving.StringList}
*/
public static final class StringList extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:ai.konduit.serving.StringList)
StringListOrBuilder {
private static final long serialVersionUID = 0L;
// Use StringList.newBuilder() to construct.
private StringList(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private StringList() {
list_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new StringList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private StringList(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
list_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
list_.add(s);
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
list_ = list_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_StringList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_StringList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList.Builder.class);
}
public static final int LIST_FIELD_NUMBER = 1;
private com.google.protobuf.LazyStringList list_;
/**
* <code>repeated string list = 1;</code>
* @return A list containing the list.
*/
public com.google.protobuf.ProtocolStringList
getListList() {
return list_;
}
/**
* <code>repeated string list = 1;</code>
* @return The count of list.
*/
public int getListCount() {
return list_.size();
}
/**
* <code>repeated string list = 1;</code>
* @param index The index of the element to return.
* @return The list at the given index.
*/
public java.lang.String getList(int index) {
return list_.get(index);
}
/**
* <code>repeated string list = 1;</code>
* @param index The index of the value to return.
* @return The bytes of the list at the given index.
*/
public com.google.protobuf.ByteString
getListBytes(int index) {
return list_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < list_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, list_.getRaw(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < list_.size(); i++) {
dataSize += computeStringSizeNoTag(list_.getRaw(i));
}
size += dataSize;
size += 1 * getListList().size();
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList)) {
return super.equals(obj);
}
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList other = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList) obj;
if (!getListList()
.equals(other.getListList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getListCount() > 0) {
hash = (37 * hash) + LIST_FIELD_NUMBER;
hash = (53 * hash) + getListList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code ai.konduit.serving.StringList}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:ai.konduit.serving.StringList)
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringListOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_StringList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_StringList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList.Builder.class);
}
// Construct using ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
list_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_StringList_descriptor;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList getDefaultInstanceForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList.getDefaultInstance();
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList build() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList buildPartial() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList result = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) != 0)) {
list_ = list_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.list_ = list_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList) {
return mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList other) {
if (other == ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList.getDefaultInstance()) return this;
if (!other.list_.isEmpty()) {
if (list_.isEmpty()) {
list_ = other.list_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureListIsMutable();
list_.addAll(other.list_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.LazyStringList list_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureListIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
list_ = new com.google.protobuf.LazyStringArrayList(list_);
bitField0_ |= 0x00000001;
}
}
/**
* <code>repeated string list = 1;</code>
* @return A list containing the list.
*/
public com.google.protobuf.ProtocolStringList
getListList() {
return list_.getUnmodifiableView();
}
/**
* <code>repeated string list = 1;</code>
* @return The count of list.
*/
public int getListCount() {
return list_.size();
}
/**
* <code>repeated string list = 1;</code>
* @param index The index of the element to return.
* @return The list at the given index.
*/
public java.lang.String getList(int index) {
return list_.get(index);
}
/**
* <code>repeated string list = 1;</code>
* @param index The index of the value to return.
* @return The bytes of the list at the given index.
*/
public com.google.protobuf.ByteString
getListBytes(int index) {
return list_.getByteString(index);
}
/**
* <code>repeated string list = 1;</code>
* @param index The index to set the value at.
* @param value The list to set.
* @return This builder for chaining.
*/
public Builder setList(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureListIsMutable();
list_.set(index, value);
onChanged();
return this;
}
/**
* <code>repeated string list = 1;</code>
* @param value The list to add.
* @return This builder for chaining.
*/
public Builder addList(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureListIsMutable();
list_.add(value);
onChanged();
return this;
}
/**
* <code>repeated string list = 1;</code>
* @param values The list to add.
* @return This builder for chaining.
*/
public Builder addAllList(
java.lang.Iterable<java.lang.String> values) {
ensureListIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, list_);
onChanged();
return this;
}
/**
* <code>repeated string list = 1;</code>
* @return This builder for chaining.
*/
public Builder clearList() {
list_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* <code>repeated string list = 1;</code>
* @param value The bytes of the list to add.
* @return This builder for chaining.
*/
public Builder addListBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureListIsMutable();
list_.add(value);
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:ai.konduit.serving.StringList)
}
// @@protoc_insertion_point(class_scope:ai.konduit.serving.StringList)
private static final ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList();
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<StringList>
PARSER = new com.google.protobuf.AbstractParser<StringList>() {
@java.lang.Override
public StringList parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new StringList(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<StringList> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<StringList> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface Int64ListOrBuilder extends
// @@protoc_insertion_point(interface_extends:ai.konduit.serving.Int64List)
com.google.protobuf.MessageOrBuilder {
/**
* <code>repeated int64 list = 1;</code>
* @return A list containing the list.
*/
java.util.List<java.lang.Long> getListList();
/**
* <code>repeated int64 list = 1;</code>
* @return The count of list.
*/
int getListCount();
/**
* <code>repeated int64 list = 1;</code>
* @param index The index of the element to return.
* @return The list at the given index.
*/
long getList(int index);
}
/**
* Protobuf type {@code ai.konduit.serving.Int64List}
*/
public static final class Int64List extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:ai.konduit.serving.Int64List)
Int64ListOrBuilder {
private static final long serialVersionUID = 0L;
// Use Int64List.newBuilder() to construct.
private Int64List(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private Int64List() {
list_ = emptyLongList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Int64List();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Int64List(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
list_ = newLongList();
mutable_bitField0_ |= 0x00000001;
}
list_.addLong(input.readInt64());
break;
}
case 10: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
list_ = newLongList();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
list_.addLong(input.readInt64());
}
input.popLimit(limit);
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
list_.makeImmutable(); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_Int64List_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_Int64List_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List.Builder.class);
}
public static final int LIST_FIELD_NUMBER = 1;
private com.google.protobuf.Internal.LongList list_;
/**
* <code>repeated int64 list = 1;</code>
* @return A list containing the list.
*/
@java.lang.Override
public java.util.List<java.lang.Long>
getListList() {
return list_;
}
/**
* <code>repeated int64 list = 1;</code>
* @return The count of list.
*/
public int getListCount() {
return list_.size();
}
/**
* <code>repeated int64 list = 1;</code>
* @param index The index of the element to return.
* @return The list at the given index.
*/
public long getList(int index) {
return list_.getLong(index);
}
private int listMemoizedSerializedSize = -1;
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (getListList().size() > 0) {
output.writeUInt32NoTag(10);
output.writeUInt32NoTag(listMemoizedSerializedSize);
}
for (int i = 0; i < list_.size(); i++) {
output.writeInt64NoTag(list_.getLong(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < list_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(list_.getLong(i));
}
size += dataSize;
if (!getListList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
listMemoizedSerializedSize = dataSize;
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List)) {
return super.equals(obj);
}
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List other = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List) obj;
if (!getListList()
.equals(other.getListList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getListCount() > 0) {
hash = (37 * hash) + LIST_FIELD_NUMBER;
hash = (53 * hash) + getListList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code ai.konduit.serving.Int64List}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:ai.konduit.serving.Int64List)
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64ListOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_Int64List_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_Int64List_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List.Builder.class);
}
// Construct using ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
list_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_Int64List_descriptor;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List getDefaultInstanceForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List.getDefaultInstance();
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List build() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List buildPartial() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List result = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) != 0)) {
list_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.list_ = list_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List) {
return mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List other) {
if (other == ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List.getDefaultInstance()) return this;
if (!other.list_.isEmpty()) {
if (list_.isEmpty()) {
list_ = other.list_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureListIsMutable();
list_.addAll(other.list_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.Internal.LongList list_ = emptyLongList();
private void ensureListIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
list_ = mutableCopy(list_);
bitField0_ |= 0x00000001;
}
}
/**
* <code>repeated int64 list = 1;</code>
* @return A list containing the list.
*/
public java.util.List<java.lang.Long>
getListList() {
return ((bitField0_ & 0x00000001) != 0) ?
java.util.Collections.unmodifiableList(list_) : list_;
}
/**
* <code>repeated int64 list = 1;</code>
* @return The count of list.
*/
public int getListCount() {
return list_.size();
}
/**
* <code>repeated int64 list = 1;</code>
* @param index The index of the element to return.
* @return The list at the given index.
*/
public long getList(int index) {
return list_.getLong(index);
}
/**
* <code>repeated int64 list = 1;</code>
* @param index The index to set the value at.
* @param value The list to set.
* @return This builder for chaining.
*/
public Builder setList(
int index, long value) {
ensureListIsMutable();
list_.setLong(index, value);
onChanged();
return this;
}
/**
* <code>repeated int64 list = 1;</code>
* @param value The list to add.
* @return This builder for chaining.
*/
public Builder addList(long value) {
ensureListIsMutable();
list_.addLong(value);
onChanged();
return this;
}
/**
* <code>repeated int64 list = 1;</code>
* @param values The list to add.
* @return This builder for chaining.
*/
public Builder addAllList(
java.lang.Iterable<? extends java.lang.Long> values) {
ensureListIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, list_);
onChanged();
return this;
}
/**
* <code>repeated int64 list = 1;</code>
* @return This builder for chaining.
*/
public Builder clearList() {
list_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:ai.konduit.serving.Int64List)
}
// @@protoc_insertion_point(class_scope:ai.konduit.serving.Int64List)
private static final ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List();
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<Int64List>
PARSER = new com.google.protobuf.AbstractParser<Int64List>() {
@java.lang.Override
public Int64List parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Int64List(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<Int64List> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<Int64List> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface BooleanListOrBuilder extends
// @@protoc_insertion_point(interface_extends:ai.konduit.serving.BooleanList)
com.google.protobuf.MessageOrBuilder {
/**
* <code>repeated bool list = 1;</code>
* @return A list containing the list.
*/
java.util.List<java.lang.Boolean> getListList();
/**
* <code>repeated bool list = 1;</code>
* @return The count of list.
*/
int getListCount();
/**
* <code>repeated bool list = 1;</code>
* @param index The index of the element to return.
* @return The list at the given index.
*/
boolean getList(int index);
}
/**
* Protobuf type {@code ai.konduit.serving.BooleanList}
*/
public static final class BooleanList extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:ai.konduit.serving.BooleanList)
BooleanListOrBuilder {
private static final long serialVersionUID = 0L;
// Use BooleanList.newBuilder() to construct.
private BooleanList(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private BooleanList() {
list_ = emptyBooleanList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new BooleanList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private BooleanList(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
list_ = newBooleanList();
mutable_bitField0_ |= 0x00000001;
}
list_.addBoolean(input.readBool());
break;
}
case 10: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
list_ = newBooleanList();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
list_.addBoolean(input.readBool());
}
input.popLimit(limit);
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
list_.makeImmutable(); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_BooleanList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_BooleanList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList.Builder.class);
}
public static final int LIST_FIELD_NUMBER = 1;
private com.google.protobuf.Internal.BooleanList list_;
/**
* <code>repeated bool list = 1;</code>
* @return A list containing the list.
*/
@java.lang.Override
public java.util.List<java.lang.Boolean>
getListList() {
return list_;
}
/**
* <code>repeated bool list = 1;</code>
* @return The count of list.
*/
public int getListCount() {
return list_.size();
}
/**
* <code>repeated bool list = 1;</code>
* @param index The index of the element to return.
* @return The list at the given index.
*/
public boolean getList(int index) {
return list_.getBoolean(index);
}
private int listMemoizedSerializedSize = -1;
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (getListList().size() > 0) {
output.writeUInt32NoTag(10);
output.writeUInt32NoTag(listMemoizedSerializedSize);
}
for (int i = 0; i < list_.size(); i++) {
output.writeBoolNoTag(list_.getBoolean(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
dataSize = 1 * getListList().size();
size += dataSize;
if (!getListList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
listMemoizedSerializedSize = dataSize;
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList)) {
return super.equals(obj);
}
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList other = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList) obj;
if (!getListList()
.equals(other.getListList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getListCount() > 0) {
hash = (37 * hash) + LIST_FIELD_NUMBER;
hash = (53 * hash) + getListList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code ai.konduit.serving.BooleanList}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:ai.konduit.serving.BooleanList)
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanListOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_BooleanList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_BooleanList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList.Builder.class);
}
// Construct using ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
list_ = emptyBooleanList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_BooleanList_descriptor;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList getDefaultInstanceForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList.getDefaultInstance();
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList build() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList buildPartial() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList result = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) != 0)) {
list_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.list_ = list_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList) {
return mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList other) {
if (other == ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList.getDefaultInstance()) return this;
if (!other.list_.isEmpty()) {
if (list_.isEmpty()) {
list_ = other.list_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureListIsMutable();
list_.addAll(other.list_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.Internal.BooleanList list_ = emptyBooleanList();
private void ensureListIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
list_ = mutableCopy(list_);
bitField0_ |= 0x00000001;
}
}
/**
* <code>repeated bool list = 1;</code>
* @return A list containing the list.
*/
public java.util.List<java.lang.Boolean>
getListList() {
return ((bitField0_ & 0x00000001) != 0) ?
java.util.Collections.unmodifiableList(list_) : list_;
}
/**
* <code>repeated bool list = 1;</code>
* @return The count of list.
*/
public int getListCount() {
return list_.size();
}
/**
* <code>repeated bool list = 1;</code>
* @param index The index of the element to return.
* @return The list at the given index.
*/
public boolean getList(int index) {
return list_.getBoolean(index);
}
/**
* <code>repeated bool list = 1;</code>
* @param index The index to set the value at.
* @param value The list to set.
* @return This builder for chaining.
*/
public Builder setList(
int index, boolean value) {
ensureListIsMutable();
list_.setBoolean(index, value);
onChanged();
return this;
}
/**
* <code>repeated bool list = 1;</code>
* @param value The list to add.
* @return This builder for chaining.
*/
public Builder addList(boolean value) {
ensureListIsMutable();
list_.addBoolean(value);
onChanged();
return this;
}
/**
* <code>repeated bool list = 1;</code>
* @param values The list to add.
* @return This builder for chaining.
*/
public Builder addAllList(
java.lang.Iterable<? extends java.lang.Boolean> values) {
ensureListIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, list_);
onChanged();
return this;
}
/**
* <code>repeated bool list = 1;</code>
* @return This builder for chaining.
*/
public Builder clearList() {
list_ = emptyBooleanList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:ai.konduit.serving.BooleanList)
}
// @@protoc_insertion_point(class_scope:ai.konduit.serving.BooleanList)
private static final ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList();
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<BooleanList>
PARSER = new com.google.protobuf.AbstractParser<BooleanList>() {
@java.lang.Override
public BooleanList parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BooleanList(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<BooleanList> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<BooleanList> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DoubleListOrBuilder extends
// @@protoc_insertion_point(interface_extends:ai.konduit.serving.DoubleList)
com.google.protobuf.MessageOrBuilder {
/**
* <code>repeated double list = 1;</code>
* @return A list containing the list.
*/
java.util.List<java.lang.Double> getListList();
/**
* <code>repeated double list = 1;</code>
* @return The count of list.
*/
int getListCount();
/**
* <code>repeated double list = 1;</code>
* @param index The index of the element to return.
* @return The list at the given index.
*/
double getList(int index);
}
/**
* Protobuf type {@code ai.konduit.serving.DoubleList}
*/
public static final class DoubleList extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:ai.konduit.serving.DoubleList)
DoubleListOrBuilder {
private static final long serialVersionUID = 0L;
// Use DoubleList.newBuilder() to construct.
private DoubleList(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private DoubleList() {
list_ = emptyDoubleList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DoubleList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DoubleList(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 9: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
list_ = newDoubleList();
mutable_bitField0_ |= 0x00000001;
}
list_.addDouble(input.readDouble());
break;
}
case 10: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
list_ = newDoubleList();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
list_.addDouble(input.readDouble());
}
input.popLimit(limit);
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
list_.makeImmutable(); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_DoubleList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_DoubleList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList.Builder.class);
}
public static final int LIST_FIELD_NUMBER = 1;
private com.google.protobuf.Internal.DoubleList list_;
/**
* <code>repeated double list = 1;</code>
* @return A list containing the list.
*/
@java.lang.Override
public java.util.List<java.lang.Double>
getListList() {
return list_;
}
/**
* <code>repeated double list = 1;</code>
* @return The count of list.
*/
public int getListCount() {
return list_.size();
}
/**
* <code>repeated double list = 1;</code>
* @param index The index of the element to return.
* @return The list at the given index.
*/
public double getList(int index) {
return list_.getDouble(index);
}
private int listMemoizedSerializedSize = -1;
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (getListList().size() > 0) {
output.writeUInt32NoTag(10);
output.writeUInt32NoTag(listMemoizedSerializedSize);
}
for (int i = 0; i < list_.size(); i++) {
output.writeDoubleNoTag(list_.getDouble(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
dataSize = 8 * getListList().size();
size += dataSize;
if (!getListList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
listMemoizedSerializedSize = dataSize;
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList)) {
return super.equals(obj);
}
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList other = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList) obj;
if (!getListList()
.equals(other.getListList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getListCount() > 0) {
hash = (37 * hash) + LIST_FIELD_NUMBER;
hash = (53 * hash) + getListList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code ai.konduit.serving.DoubleList}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:ai.konduit.serving.DoubleList)
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleListOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_DoubleList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_DoubleList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList.Builder.class);
}
// Construct using ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
list_ = emptyDoubleList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_DoubleList_descriptor;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList getDefaultInstanceForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList.getDefaultInstance();
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList build() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList buildPartial() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList result = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) != 0)) {
list_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.list_ = list_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList) {
return mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList other) {
if (other == ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList.getDefaultInstance()) return this;
if (!other.list_.isEmpty()) {
if (list_.isEmpty()) {
list_ = other.list_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureListIsMutable();
list_.addAll(other.list_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.Internal.DoubleList list_ = emptyDoubleList();
private void ensureListIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
list_ = mutableCopy(list_);
bitField0_ |= 0x00000001;
}
}
/**
* <code>repeated double list = 1;</code>
* @return A list containing the list.
*/
public java.util.List<java.lang.Double>
getListList() {
return ((bitField0_ & 0x00000001) != 0) ?
java.util.Collections.unmodifiableList(list_) : list_;
}
/**
* <code>repeated double list = 1;</code>
* @return The count of list.
*/
public int getListCount() {
return list_.size();
}
/**
* <code>repeated double list = 1;</code>
* @param index The index of the element to return.
* @return The list at the given index.
*/
public double getList(int index) {
return list_.getDouble(index);
}
/**
* <code>repeated double list = 1;</code>
* @param index The index to set the value at.
* @param value The list to set.
* @return This builder for chaining.
*/
public Builder setList(
int index, double value) {
ensureListIsMutable();
list_.setDouble(index, value);
onChanged();
return this;
}
/**
* <code>repeated double list = 1;</code>
* @param value The list to add.
* @return This builder for chaining.
*/
public Builder addList(double value) {
ensureListIsMutable();
list_.addDouble(value);
onChanged();
return this;
}
/**
* <code>repeated double list = 1;</code>
* @param values The list to add.
* @return This builder for chaining.
*/
public Builder addAllList(
java.lang.Iterable<? extends java.lang.Double> values) {
ensureListIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, list_);
onChanged();
return this;
}
/**
* <code>repeated double list = 1;</code>
* @return This builder for chaining.
*/
public Builder clearList() {
list_ = emptyDoubleList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:ai.konduit.serving.DoubleList)
}
// @@protoc_insertion_point(class_scope:ai.konduit.serving.DoubleList)
private static final ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList();
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<DoubleList>
PARSER = new com.google.protobuf.AbstractParser<DoubleList>() {
@java.lang.Override
public DoubleList parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DoubleList(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<DoubleList> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<DoubleList> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ImageListOrBuilder extends
// @@protoc_insertion_point(interface_extends:ai.konduit.serving.ImageList)
com.google.protobuf.MessageOrBuilder {
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image>
getListList();
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image getList(int index);
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
int getListCount();
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
java.util.List<? extends ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageOrBuilder>
getListOrBuilderList();
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageOrBuilder getListOrBuilder(
int index);
}
/**
* Protobuf type {@code ai.konduit.serving.ImageList}
*/
public static final class ImageList extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:ai.konduit.serving.ImageList)
ImageListOrBuilder {
private static final long serialVersionUID = 0L;
// Use ImageList.newBuilder() to construct.
private ImageList(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private ImageList() {
list_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ImageList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ImageList(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
list_ = new java.util.ArrayList<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image>();
mutable_bitField0_ |= 0x00000001;
}
list_.add(
input.readMessage(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
list_ = java.util.Collections.unmodifiableList(list_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_ImageList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_ImageList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList.Builder.class);
}
public static final int LIST_FIELD_NUMBER = 1;
private java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image> list_;
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
@java.lang.Override
public java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image> getListList() {
return list_;
}
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
@java.lang.Override
public java.util.List<? extends ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageOrBuilder>
getListOrBuilderList() {
return list_;
}
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
@java.lang.Override
public int getListCount() {
return list_.size();
}
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image getList(int index) {
return list_.get(index);
}
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageOrBuilder getListOrBuilder(
int index) {
return list_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < list_.size(); i++) {
output.writeMessage(1, list_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < list_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, list_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList)) {
return super.equals(obj);
}
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList other = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList) obj;
if (!getListList()
.equals(other.getListList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getListCount() > 0) {
hash = (37 * hash) + LIST_FIELD_NUMBER;
hash = (53 * hash) + getListList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code ai.konduit.serving.ImageList}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:ai.konduit.serving.ImageList)
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageListOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_ImageList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_ImageList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList.Builder.class);
}
// Construct using ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getListFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (listBuilder_ == null) {
list_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
listBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_ImageList_descriptor;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList getDefaultInstanceForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList.getDefaultInstance();
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList build() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList buildPartial() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList result = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList(this);
int from_bitField0_ = bitField0_;
if (listBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
list_ = java.util.Collections.unmodifiableList(list_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.list_ = list_;
} else {
result.list_ = listBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList) {
return mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList other) {
if (other == ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList.getDefaultInstance()) return this;
if (listBuilder_ == null) {
if (!other.list_.isEmpty()) {
if (list_.isEmpty()) {
list_ = other.list_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureListIsMutable();
list_.addAll(other.list_);
}
onChanged();
}
} else {
if (!other.list_.isEmpty()) {
if (listBuilder_.isEmpty()) {
listBuilder_.dispose();
listBuilder_ = null;
list_ = other.list_;
bitField0_ = (bitField0_ & ~0x00000001);
listBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getListFieldBuilder() : null;
} else {
listBuilder_.addAllMessages(other.list_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image> list_ =
java.util.Collections.emptyList();
private void ensureListIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
list_ = new java.util.ArrayList<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image>(list_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageOrBuilder> listBuilder_;
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
public java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image> getListList() {
if (listBuilder_ == null) {
return java.util.Collections.unmodifiableList(list_);
} else {
return listBuilder_.getMessageList();
}
}
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
public int getListCount() {
if (listBuilder_ == null) {
return list_.size();
} else {
return listBuilder_.getCount();
}
}
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image getList(int index) {
if (listBuilder_ == null) {
return list_.get(index);
} else {
return listBuilder_.getMessage(index);
}
}
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
public Builder setList(
int index, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image value) {
if (listBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureListIsMutable();
list_.set(index, value);
onChanged();
} else {
listBuilder_.setMessage(index, value);
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
public Builder setList(
int index, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.Builder builderForValue) {
if (listBuilder_ == null) {
ensureListIsMutable();
list_.set(index, builderForValue.build());
onChanged();
} else {
listBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
public Builder addList(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image value) {
if (listBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureListIsMutable();
list_.add(value);
onChanged();
} else {
listBuilder_.addMessage(value);
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
public Builder addList(
int index, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image value) {
if (listBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureListIsMutable();
list_.add(index, value);
onChanged();
} else {
listBuilder_.addMessage(index, value);
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
public Builder addList(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.Builder builderForValue) {
if (listBuilder_ == null) {
ensureListIsMutable();
list_.add(builderForValue.build());
onChanged();
} else {
listBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
public Builder addList(
int index, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.Builder builderForValue) {
if (listBuilder_ == null) {
ensureListIsMutable();
list_.add(index, builderForValue.build());
onChanged();
} else {
listBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
public Builder addAllList(
java.lang.Iterable<? extends ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image> values) {
if (listBuilder_ == null) {
ensureListIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, list_);
onChanged();
} else {
listBuilder_.addAllMessages(values);
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
public Builder clearList() {
if (listBuilder_ == null) {
list_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
listBuilder_.clear();
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
public Builder removeList(int index) {
if (listBuilder_ == null) {
ensureListIsMutable();
list_.remove(index);
onChanged();
} else {
listBuilder_.remove(index);
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.Builder getListBuilder(
int index) {
return getListFieldBuilder().getBuilder(index);
}
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageOrBuilder getListOrBuilder(
int index) {
if (listBuilder_ == null) {
return list_.get(index); } else {
return listBuilder_.getMessageOrBuilder(index);
}
}
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
public java.util.List<? extends ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageOrBuilder>
getListOrBuilderList() {
if (listBuilder_ != null) {
return listBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(list_);
}
}
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.Builder addListBuilder() {
return getListFieldBuilder().addBuilder(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.getDefaultInstance());
}
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.Builder addListBuilder(
int index) {
return getListFieldBuilder().addBuilder(
index, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.getDefaultInstance());
}
/**
* <code>repeated .ai.konduit.serving.Image list = 1;</code>
*/
public java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.Builder>
getListBuilderList() {
return getListFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageOrBuilder>
getListFieldBuilder() {
if (listBuilder_ == null) {
listBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageOrBuilder>(
list_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
list_ = null;
}
return listBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:ai.konduit.serving.ImageList)
}
// @@protoc_insertion_point(class_scope:ai.konduit.serving.ImageList)
private static final ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList();
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<ImageList>
PARSER = new com.google.protobuf.AbstractParser<ImageList>() {
@java.lang.Override
public ImageList parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ImageList(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<ImageList> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<ImageList> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface NDArrayListOrBuilder extends
// @@protoc_insertion_point(interface_extends:ai.konduit.serving.NDArrayList)
com.google.protobuf.MessageOrBuilder {
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray>
getListList();
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray getList(int index);
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
int getListCount();
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
java.util.List<? extends ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayOrBuilder>
getListOrBuilderList();
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayOrBuilder getListOrBuilder(
int index);
}
/**
* Protobuf type {@code ai.konduit.serving.NDArrayList}
*/
public static final class NDArrayList extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:ai.konduit.serving.NDArrayList)
NDArrayListOrBuilder {
private static final long serialVersionUID = 0L;
// Use NDArrayList.newBuilder() to construct.
private NDArrayList(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private NDArrayList() {
list_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new NDArrayList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private NDArrayList(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
list_ = new java.util.ArrayList<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray>();
mutable_bitField0_ |= 0x00000001;
}
list_.add(
input.readMessage(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
list_ = java.util.Collections.unmodifiableList(list_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_NDArrayList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_NDArrayList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList.Builder.class);
}
public static final int LIST_FIELD_NUMBER = 1;
private java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray> list_;
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
@java.lang.Override
public java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray> getListList() {
return list_;
}
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
@java.lang.Override
public java.util.List<? extends ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayOrBuilder>
getListOrBuilderList() {
return list_;
}
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
@java.lang.Override
public int getListCount() {
return list_.size();
}
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray getList(int index) {
return list_.get(index);
}
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayOrBuilder getListOrBuilder(
int index) {
return list_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < list_.size(); i++) {
output.writeMessage(1, list_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < list_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, list_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList)) {
return super.equals(obj);
}
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList other = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList) obj;
if (!getListList()
.equals(other.getListList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getListCount() > 0) {
hash = (37 * hash) + LIST_FIELD_NUMBER;
hash = (53 * hash) + getListList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code ai.konduit.serving.NDArrayList}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:ai.konduit.serving.NDArrayList)
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayListOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_NDArrayList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_NDArrayList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList.Builder.class);
}
// Construct using ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getListFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (listBuilder_ == null) {
list_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
listBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_NDArrayList_descriptor;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList getDefaultInstanceForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList.getDefaultInstance();
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList build() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList buildPartial() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList result = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList(this);
int from_bitField0_ = bitField0_;
if (listBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
list_ = java.util.Collections.unmodifiableList(list_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.list_ = list_;
} else {
result.list_ = listBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList) {
return mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList other) {
if (other == ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList.getDefaultInstance()) return this;
if (listBuilder_ == null) {
if (!other.list_.isEmpty()) {
if (list_.isEmpty()) {
list_ = other.list_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureListIsMutable();
list_.addAll(other.list_);
}
onChanged();
}
} else {
if (!other.list_.isEmpty()) {
if (listBuilder_.isEmpty()) {
listBuilder_.dispose();
listBuilder_ = null;
list_ = other.list_;
bitField0_ = (bitField0_ & ~0x00000001);
listBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getListFieldBuilder() : null;
} else {
listBuilder_.addAllMessages(other.list_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray> list_ =
java.util.Collections.emptyList();
private void ensureListIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
list_ = new java.util.ArrayList<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray>(list_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayOrBuilder> listBuilder_;
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
public java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray> getListList() {
if (listBuilder_ == null) {
return java.util.Collections.unmodifiableList(list_);
} else {
return listBuilder_.getMessageList();
}
}
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
public int getListCount() {
if (listBuilder_ == null) {
return list_.size();
} else {
return listBuilder_.getCount();
}
}
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray getList(int index) {
if (listBuilder_ == null) {
return list_.get(index);
} else {
return listBuilder_.getMessage(index);
}
}
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
public Builder setList(
int index, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray value) {
if (listBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureListIsMutable();
list_.set(index, value);
onChanged();
} else {
listBuilder_.setMessage(index, value);
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
public Builder setList(
int index, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.Builder builderForValue) {
if (listBuilder_ == null) {
ensureListIsMutable();
list_.set(index, builderForValue.build());
onChanged();
} else {
listBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
public Builder addList(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray value) {
if (listBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureListIsMutable();
list_.add(value);
onChanged();
} else {
listBuilder_.addMessage(value);
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
public Builder addList(
int index, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray value) {
if (listBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureListIsMutable();
list_.add(index, value);
onChanged();
} else {
listBuilder_.addMessage(index, value);
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
public Builder addList(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.Builder builderForValue) {
if (listBuilder_ == null) {
ensureListIsMutable();
list_.add(builderForValue.build());
onChanged();
} else {
listBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
public Builder addList(
int index, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.Builder builderForValue) {
if (listBuilder_ == null) {
ensureListIsMutable();
list_.add(index, builderForValue.build());
onChanged();
} else {
listBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
public Builder addAllList(
java.lang.Iterable<? extends ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray> values) {
if (listBuilder_ == null) {
ensureListIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, list_);
onChanged();
} else {
listBuilder_.addAllMessages(values);
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
public Builder clearList() {
if (listBuilder_ == null) {
list_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
listBuilder_.clear();
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
public Builder removeList(int index) {
if (listBuilder_ == null) {
ensureListIsMutable();
list_.remove(index);
onChanged();
} else {
listBuilder_.remove(index);
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.Builder getListBuilder(
int index) {
return getListFieldBuilder().getBuilder(index);
}
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayOrBuilder getListOrBuilder(
int index) {
if (listBuilder_ == null) {
return list_.get(index); } else {
return listBuilder_.getMessageOrBuilder(index);
}
}
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
public java.util.List<? extends ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayOrBuilder>
getListOrBuilderList() {
if (listBuilder_ != null) {
return listBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(list_);
}
}
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.Builder addListBuilder() {
return getListFieldBuilder().addBuilder(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.getDefaultInstance());
}
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.Builder addListBuilder(
int index) {
return getListFieldBuilder().addBuilder(
index, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.getDefaultInstance());
}
/**
* <code>repeated .ai.konduit.serving.NDArray list = 1;</code>
*/
public java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.Builder>
getListBuilderList() {
return getListFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayOrBuilder>
getListFieldBuilder() {
if (listBuilder_ == null) {
listBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayOrBuilder>(
list_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
list_ = null;
}
return listBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:ai.konduit.serving.NDArrayList)
}
// @@protoc_insertion_point(class_scope:ai.konduit.serving.NDArrayList)
private static final ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList();
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<NDArrayList>
PARSER = new com.google.protobuf.AbstractParser<NDArrayList>() {
@java.lang.Override
public NDArrayList parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new NDArrayList(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<NDArrayList> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<NDArrayList> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface BoundingBoxesListOrBuilder extends
// @@protoc_insertion_point(interface_extends:ai.konduit.serving.BoundingBoxesList)
com.google.protobuf.MessageOrBuilder {
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox>
getListList();
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox getList(int index);
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
int getListCount();
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
java.util.List<? extends ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxOrBuilder>
getListOrBuilderList();
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxOrBuilder getListOrBuilder(
int index);
}
/**
* Protobuf type {@code ai.konduit.serving.BoundingBoxesList}
*/
public static final class BoundingBoxesList extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:ai.konduit.serving.BoundingBoxesList)
BoundingBoxesListOrBuilder {
private static final long serialVersionUID = 0L;
// Use BoundingBoxesList.newBuilder() to construct.
private BoundingBoxesList(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private BoundingBoxesList() {
list_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new BoundingBoxesList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private BoundingBoxesList(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
list_ = new java.util.ArrayList<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox>();
mutable_bitField0_ |= 0x00000001;
}
list_.add(
input.readMessage(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
list_ = java.util.Collections.unmodifiableList(list_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_BoundingBoxesList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_BoundingBoxesList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList.Builder.class);
}
public static final int LIST_FIELD_NUMBER = 1;
private java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox> list_;
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
@java.lang.Override
public java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox> getListList() {
return list_;
}
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
@java.lang.Override
public java.util.List<? extends ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxOrBuilder>
getListOrBuilderList() {
return list_;
}
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
@java.lang.Override
public int getListCount() {
return list_.size();
}
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox getList(int index) {
return list_.get(index);
}
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxOrBuilder getListOrBuilder(
int index) {
return list_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < list_.size(); i++) {
output.writeMessage(1, list_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < list_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, list_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList)) {
return super.equals(obj);
}
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList other = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList) obj;
if (!getListList()
.equals(other.getListList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getListCount() > 0) {
hash = (37 * hash) + LIST_FIELD_NUMBER;
hash = (53 * hash) + getListList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code ai.konduit.serving.BoundingBoxesList}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:ai.konduit.serving.BoundingBoxesList)
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesListOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_BoundingBoxesList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_BoundingBoxesList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList.Builder.class);
}
// Construct using ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getListFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (listBuilder_ == null) {
list_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
listBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_BoundingBoxesList_descriptor;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList getDefaultInstanceForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList.getDefaultInstance();
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList build() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList buildPartial() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList result = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList(this);
int from_bitField0_ = bitField0_;
if (listBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
list_ = java.util.Collections.unmodifiableList(list_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.list_ = list_;
} else {
result.list_ = listBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList) {
return mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList other) {
if (other == ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList.getDefaultInstance()) return this;
if (listBuilder_ == null) {
if (!other.list_.isEmpty()) {
if (list_.isEmpty()) {
list_ = other.list_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureListIsMutable();
list_.addAll(other.list_);
}
onChanged();
}
} else {
if (!other.list_.isEmpty()) {
if (listBuilder_.isEmpty()) {
listBuilder_.dispose();
listBuilder_ = null;
list_ = other.list_;
bitField0_ = (bitField0_ & ~0x00000001);
listBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getListFieldBuilder() : null;
} else {
listBuilder_.addAllMessages(other.list_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox> list_ =
java.util.Collections.emptyList();
private void ensureListIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
list_ = new java.util.ArrayList<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox>(list_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxOrBuilder> listBuilder_;
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
public java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox> getListList() {
if (listBuilder_ == null) {
return java.util.Collections.unmodifiableList(list_);
} else {
return listBuilder_.getMessageList();
}
}
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
public int getListCount() {
if (listBuilder_ == null) {
return list_.size();
} else {
return listBuilder_.getCount();
}
}
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox getList(int index) {
if (listBuilder_ == null) {
return list_.get(index);
} else {
return listBuilder_.getMessage(index);
}
}
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
public Builder setList(
int index, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox value) {
if (listBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureListIsMutable();
list_.set(index, value);
onChanged();
} else {
listBuilder_.setMessage(index, value);
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
public Builder setList(
int index, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.Builder builderForValue) {
if (listBuilder_ == null) {
ensureListIsMutable();
list_.set(index, builderForValue.build());
onChanged();
} else {
listBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
public Builder addList(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox value) {
if (listBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureListIsMutable();
list_.add(value);
onChanged();
} else {
listBuilder_.addMessage(value);
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
public Builder addList(
int index, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox value) {
if (listBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureListIsMutable();
list_.add(index, value);
onChanged();
} else {
listBuilder_.addMessage(index, value);
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
public Builder addList(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.Builder builderForValue) {
if (listBuilder_ == null) {
ensureListIsMutable();
list_.add(builderForValue.build());
onChanged();
} else {
listBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
public Builder addList(
int index, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.Builder builderForValue) {
if (listBuilder_ == null) {
ensureListIsMutable();
list_.add(index, builderForValue.build());
onChanged();
} else {
listBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
public Builder addAllList(
java.lang.Iterable<? extends ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox> values) {
if (listBuilder_ == null) {
ensureListIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, list_);
onChanged();
} else {
listBuilder_.addAllMessages(values);
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
public Builder clearList() {
if (listBuilder_ == null) {
list_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
listBuilder_.clear();
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
public Builder removeList(int index) {
if (listBuilder_ == null) {
ensureListIsMutable();
list_.remove(index);
onChanged();
} else {
listBuilder_.remove(index);
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.Builder getListBuilder(
int index) {
return getListFieldBuilder().getBuilder(index);
}
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxOrBuilder getListOrBuilder(
int index) {
if (listBuilder_ == null) {
return list_.get(index); } else {
return listBuilder_.getMessageOrBuilder(index);
}
}
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
public java.util.List<? extends ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxOrBuilder>
getListOrBuilderList() {
if (listBuilder_ != null) {
return listBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(list_);
}
}
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.Builder addListBuilder() {
return getListFieldBuilder().addBuilder(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.getDefaultInstance());
}
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.Builder addListBuilder(
int index) {
return getListFieldBuilder().addBuilder(
index, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.getDefaultInstance());
}
/**
* <code>repeated .ai.konduit.serving.BoundingBox list = 1;</code>
*/
public java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.Builder>
getListBuilderList() {
return getListFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxOrBuilder>
getListFieldBuilder() {
if (listBuilder_ == null) {
listBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxOrBuilder>(
list_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
list_ = null;
}
return listBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:ai.konduit.serving.BoundingBoxesList)
}
// @@protoc_insertion_point(class_scope:ai.konduit.serving.BoundingBoxesList)
private static final ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList();
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<BoundingBoxesList>
PARSER = new com.google.protobuf.AbstractParser<BoundingBoxesList>() {
@java.lang.Override
public BoundingBoxesList parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BoundingBoxesList(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<BoundingBoxesList> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<BoundingBoxesList> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PointListOrBuilder extends
// @@protoc_insertion_point(interface_extends:ai.konduit.serving.PointList)
com.google.protobuf.MessageOrBuilder {
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point>
getListList();
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point getList(int index);
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
int getListCount();
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
java.util.List<? extends ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointOrBuilder>
getListOrBuilderList();
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointOrBuilder getListOrBuilder(
int index);
}
/**
* Protobuf type {@code ai.konduit.serving.PointList}
*/
public static final class PointList extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:ai.konduit.serving.PointList)
PointListOrBuilder {
private static final long serialVersionUID = 0L;
// Use PointList.newBuilder() to construct.
private PointList(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private PointList() {
list_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PointList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PointList(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
list_ = new java.util.ArrayList<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point>();
mutable_bitField0_ |= 0x00000001;
}
list_.add(
input.readMessage(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
list_ = java.util.Collections.unmodifiableList(list_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_PointList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_PointList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList.Builder.class);
}
public static final int LIST_FIELD_NUMBER = 1;
private java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point> list_;
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
@java.lang.Override
public java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point> getListList() {
return list_;
}
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
@java.lang.Override
public java.util.List<? extends ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointOrBuilder>
getListOrBuilderList() {
return list_;
}
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
@java.lang.Override
public int getListCount() {
return list_.size();
}
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point getList(int index) {
return list_.get(index);
}
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointOrBuilder getListOrBuilder(
int index) {
return list_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < list_.size(); i++) {
output.writeMessage(1, list_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < list_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, list_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList)) {
return super.equals(obj);
}
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList other = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList) obj;
if (!getListList()
.equals(other.getListList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getListCount() > 0) {
hash = (37 * hash) + LIST_FIELD_NUMBER;
hash = (53 * hash) + getListList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code ai.konduit.serving.PointList}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:ai.konduit.serving.PointList)
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointListOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_PointList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_PointList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList.Builder.class);
}
// Construct using ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getListFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (listBuilder_ == null) {
list_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
listBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_PointList_descriptor;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList getDefaultInstanceForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList.getDefaultInstance();
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList build() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList buildPartial() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList result = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList(this);
int from_bitField0_ = bitField0_;
if (listBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
list_ = java.util.Collections.unmodifiableList(list_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.list_ = list_;
} else {
result.list_ = listBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList) {
return mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList other) {
if (other == ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList.getDefaultInstance()) return this;
if (listBuilder_ == null) {
if (!other.list_.isEmpty()) {
if (list_.isEmpty()) {
list_ = other.list_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureListIsMutable();
list_.addAll(other.list_);
}
onChanged();
}
} else {
if (!other.list_.isEmpty()) {
if (listBuilder_.isEmpty()) {
listBuilder_.dispose();
listBuilder_ = null;
list_ = other.list_;
bitField0_ = (bitField0_ & ~0x00000001);
listBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getListFieldBuilder() : null;
} else {
listBuilder_.addAllMessages(other.list_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point> list_ =
java.util.Collections.emptyList();
private void ensureListIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
list_ = new java.util.ArrayList<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point>(list_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointOrBuilder> listBuilder_;
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
public java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point> getListList() {
if (listBuilder_ == null) {
return java.util.Collections.unmodifiableList(list_);
} else {
return listBuilder_.getMessageList();
}
}
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
public int getListCount() {
if (listBuilder_ == null) {
return list_.size();
} else {
return listBuilder_.getCount();
}
}
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point getList(int index) {
if (listBuilder_ == null) {
return list_.get(index);
} else {
return listBuilder_.getMessage(index);
}
}
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
public Builder setList(
int index, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point value) {
if (listBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureListIsMutable();
list_.set(index, value);
onChanged();
} else {
listBuilder_.setMessage(index, value);
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
public Builder setList(
int index, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.Builder builderForValue) {
if (listBuilder_ == null) {
ensureListIsMutable();
list_.set(index, builderForValue.build());
onChanged();
} else {
listBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
public Builder addList(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point value) {
if (listBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureListIsMutable();
list_.add(value);
onChanged();
} else {
listBuilder_.addMessage(value);
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
public Builder addList(
int index, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point value) {
if (listBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureListIsMutable();
list_.add(index, value);
onChanged();
} else {
listBuilder_.addMessage(index, value);
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
public Builder addList(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.Builder builderForValue) {
if (listBuilder_ == null) {
ensureListIsMutable();
list_.add(builderForValue.build());
onChanged();
} else {
listBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
public Builder addList(
int index, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.Builder builderForValue) {
if (listBuilder_ == null) {
ensureListIsMutable();
list_.add(index, builderForValue.build());
onChanged();
} else {
listBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
public Builder addAllList(
java.lang.Iterable<? extends ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point> values) {
if (listBuilder_ == null) {
ensureListIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, list_);
onChanged();
} else {
listBuilder_.addAllMessages(values);
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
public Builder clearList() {
if (listBuilder_ == null) {
list_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
listBuilder_.clear();
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
public Builder removeList(int index) {
if (listBuilder_ == null) {
ensureListIsMutable();
list_.remove(index);
onChanged();
} else {
listBuilder_.remove(index);
}
return this;
}
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.Builder getListBuilder(
int index) {
return getListFieldBuilder().getBuilder(index);
}
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointOrBuilder getListOrBuilder(
int index) {
if (listBuilder_ == null) {
return list_.get(index); } else {
return listBuilder_.getMessageOrBuilder(index);
}
}
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
public java.util.List<? extends ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointOrBuilder>
getListOrBuilderList() {
if (listBuilder_ != null) {
return listBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(list_);
}
}
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.Builder addListBuilder() {
return getListFieldBuilder().addBuilder(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.getDefaultInstance());
}
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.Builder addListBuilder(
int index) {
return getListFieldBuilder().addBuilder(
index, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.getDefaultInstance());
}
/**
* <code>repeated .ai.konduit.serving.Point list = 1;</code>
*/
public java.util.List<ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.Builder>
getListBuilderList() {
return getListFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointOrBuilder>
getListFieldBuilder() {
if (listBuilder_ == null) {
listBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointOrBuilder>(
list_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
list_ = null;
}
return listBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:ai.konduit.serving.PointList)
}
// @@protoc_insertion_point(class_scope:ai.konduit.serving.PointList)
private static final ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList();
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<PointList>
PARSER = new com.google.protobuf.AbstractParser<PointList>() {
@java.lang.Override
public PointList parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PointList(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<PointList> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<PointList> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ListOrBuilder extends
// @@protoc_insertion_point(interface_extends:ai.konduit.serving.List)
com.google.protobuf.MessageOrBuilder {
/**
* <code>.ai.konduit.serving.StringList sList = 1;</code>
* @return Whether the sList field is set.
*/
boolean hasSList();
/**
* <code>.ai.konduit.serving.StringList sList = 1;</code>
* @return The sList.
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList getSList();
/**
* <code>.ai.konduit.serving.StringList sList = 1;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringListOrBuilder getSListOrBuilder();
/**
* <code>.ai.konduit.serving.Int64List iList = 2;</code>
* @return Whether the iList field is set.
*/
boolean hasIList();
/**
* <code>.ai.konduit.serving.Int64List iList = 2;</code>
* @return The iList.
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List getIList();
/**
* <code>.ai.konduit.serving.Int64List iList = 2;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64ListOrBuilder getIListOrBuilder();
/**
* <code>.ai.konduit.serving.BooleanList bList = 3;</code>
* @return Whether the bList field is set.
*/
boolean hasBList();
/**
* <code>.ai.konduit.serving.BooleanList bList = 3;</code>
* @return The bList.
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList getBList();
/**
* <code>.ai.konduit.serving.BooleanList bList = 3;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanListOrBuilder getBListOrBuilder();
/**
* <code>.ai.konduit.serving.DoubleList dList = 4;</code>
* @return Whether the dList field is set.
*/
boolean hasDList();
/**
* <code>.ai.konduit.serving.DoubleList dList = 4;</code>
* @return The dList.
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList getDList();
/**
* <code>.ai.konduit.serving.DoubleList dList = 4;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleListOrBuilder getDListOrBuilder();
/**
* <code>.ai.konduit.serving.ImageList imList = 5;</code>
* @return Whether the imList field is set.
*/
boolean hasImList();
/**
* <code>.ai.konduit.serving.ImageList imList = 5;</code>
* @return The imList.
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList getImList();
/**
* <code>.ai.konduit.serving.ImageList imList = 5;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageListOrBuilder getImListOrBuilder();
/**
* <code>.ai.konduit.serving.NDArrayList ndList = 6;</code>
* @return Whether the ndList field is set.
*/
boolean hasNdList();
/**
* <code>.ai.konduit.serving.NDArrayList ndList = 6;</code>
* @return The ndList.
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList getNdList();
/**
* <code>.ai.konduit.serving.NDArrayList ndList = 6;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayListOrBuilder getNdListOrBuilder();
/**
* <code>.ai.konduit.serving.BoundingBoxesList bboxList = 7;</code>
* @return Whether the bboxList field is set.
*/
boolean hasBboxList();
/**
* <code>.ai.konduit.serving.BoundingBoxesList bboxList = 7;</code>
* @return The bboxList.
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList getBboxList();
/**
* <code>.ai.konduit.serving.BoundingBoxesList bboxList = 7;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesListOrBuilder getBboxListOrBuilder();
/**
* <code>.ai.konduit.serving.PointList pList = 8;</code>
* @return Whether the pList field is set.
*/
boolean hasPList();
/**
* <code>.ai.konduit.serving.PointList pList = 8;</code>
* @return The pList.
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList getPList();
/**
* <code>.ai.konduit.serving.PointList pList = 8;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointListOrBuilder getPListOrBuilder();
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List.ListCase getListCase();
}
/**
* Protobuf type {@code ai.konduit.serving.List}
*/
public static final class List extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:ai.konduit.serving.List)
ListOrBuilder {
private static final long serialVersionUID = 0L;
// Use List.newBuilder() to construct.
private List(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private List() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new List();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private List(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList.Builder subBuilder = null;
if (listCase_ == 1) {
subBuilder = ((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList) list_).toBuilder();
}
list_ =
input.readMessage(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList) list_);
list_ = subBuilder.buildPartial();
}
listCase_ = 1;
break;
}
case 18: {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List.Builder subBuilder = null;
if (listCase_ == 2) {
subBuilder = ((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List) list_).toBuilder();
}
list_ =
input.readMessage(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List) list_);
list_ = subBuilder.buildPartial();
}
listCase_ = 2;
break;
}
case 26: {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList.Builder subBuilder = null;
if (listCase_ == 3) {
subBuilder = ((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList) list_).toBuilder();
}
list_ =
input.readMessage(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList) list_);
list_ = subBuilder.buildPartial();
}
listCase_ = 3;
break;
}
case 34: {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList.Builder subBuilder = null;
if (listCase_ == 4) {
subBuilder = ((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList) list_).toBuilder();
}
list_ =
input.readMessage(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList) list_);
list_ = subBuilder.buildPartial();
}
listCase_ = 4;
break;
}
case 42: {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList.Builder subBuilder = null;
if (listCase_ == 5) {
subBuilder = ((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList) list_).toBuilder();
}
list_ =
input.readMessage(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList) list_);
list_ = subBuilder.buildPartial();
}
listCase_ = 5;
break;
}
case 50: {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList.Builder subBuilder = null;
if (listCase_ == 6) {
subBuilder = ((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList) list_).toBuilder();
}
list_ =
input.readMessage(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList) list_);
list_ = subBuilder.buildPartial();
}
listCase_ = 6;
break;
}
case 58: {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList.Builder subBuilder = null;
if (listCase_ == 7) {
subBuilder = ((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList) list_).toBuilder();
}
list_ =
input.readMessage(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList) list_);
list_ = subBuilder.buildPartial();
}
listCase_ = 7;
break;
}
case 66: {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList.Builder subBuilder = null;
if (listCase_ == 8) {
subBuilder = ((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList) list_).toBuilder();
}
list_ =
input.readMessage(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList) list_);
list_ = subBuilder.buildPartial();
}
listCase_ = 8;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_List_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_List_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List.Builder.class);
}
private int listCase_ = 0;
private java.lang.Object list_;
public enum ListCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
SLIST(1),
ILIST(2),
BLIST(3),
DLIST(4),
IMLIST(5),
NDLIST(6),
BBOXLIST(7),
PLIST(8),
LIST_NOT_SET(0);
private final int value;
private ListCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ListCase valueOf(int value) {
return forNumber(value);
}
public static ListCase forNumber(int value) {
switch (value) {
case 1: return SLIST;
case 2: return ILIST;
case 3: return BLIST;
case 4: return DLIST;
case 5: return IMLIST;
case 6: return NDLIST;
case 7: return BBOXLIST;
case 8: return PLIST;
case 0: return LIST_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ListCase
getListCase() {
return ListCase.forNumber(
listCase_);
}
public static final int SLIST_FIELD_NUMBER = 1;
/**
* <code>.ai.konduit.serving.StringList sList = 1;</code>
* @return Whether the sList field is set.
*/
@java.lang.Override
public boolean hasSList() {
return listCase_ == 1;
}
/**
* <code>.ai.konduit.serving.StringList sList = 1;</code>
* @return The sList.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList getSList() {
if (listCase_ == 1) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList.getDefaultInstance();
}
/**
* <code>.ai.konduit.serving.StringList sList = 1;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringListOrBuilder getSListOrBuilder() {
if (listCase_ == 1) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList.getDefaultInstance();
}
public static final int ILIST_FIELD_NUMBER = 2;
/**
* <code>.ai.konduit.serving.Int64List iList = 2;</code>
* @return Whether the iList field is set.
*/
@java.lang.Override
public boolean hasIList() {
return listCase_ == 2;
}
/**
* <code>.ai.konduit.serving.Int64List iList = 2;</code>
* @return The iList.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List getIList() {
if (listCase_ == 2) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List.getDefaultInstance();
}
/**
* <code>.ai.konduit.serving.Int64List iList = 2;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64ListOrBuilder getIListOrBuilder() {
if (listCase_ == 2) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List.getDefaultInstance();
}
public static final int BLIST_FIELD_NUMBER = 3;
/**
* <code>.ai.konduit.serving.BooleanList bList = 3;</code>
* @return Whether the bList field is set.
*/
@java.lang.Override
public boolean hasBList() {
return listCase_ == 3;
}
/**
* <code>.ai.konduit.serving.BooleanList bList = 3;</code>
* @return The bList.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList getBList() {
if (listCase_ == 3) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList.getDefaultInstance();
}
/**
* <code>.ai.konduit.serving.BooleanList bList = 3;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanListOrBuilder getBListOrBuilder() {
if (listCase_ == 3) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList.getDefaultInstance();
}
public static final int DLIST_FIELD_NUMBER = 4;
/**
* <code>.ai.konduit.serving.DoubleList dList = 4;</code>
* @return Whether the dList field is set.
*/
@java.lang.Override
public boolean hasDList() {
return listCase_ == 4;
}
/**
* <code>.ai.konduit.serving.DoubleList dList = 4;</code>
* @return The dList.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList getDList() {
if (listCase_ == 4) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList.getDefaultInstance();
}
/**
* <code>.ai.konduit.serving.DoubleList dList = 4;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleListOrBuilder getDListOrBuilder() {
if (listCase_ == 4) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList.getDefaultInstance();
}
public static final int IMLIST_FIELD_NUMBER = 5;
/**
* <code>.ai.konduit.serving.ImageList imList = 5;</code>
* @return Whether the imList field is set.
*/
@java.lang.Override
public boolean hasImList() {
return listCase_ == 5;
}
/**
* <code>.ai.konduit.serving.ImageList imList = 5;</code>
* @return The imList.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList getImList() {
if (listCase_ == 5) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList.getDefaultInstance();
}
/**
* <code>.ai.konduit.serving.ImageList imList = 5;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageListOrBuilder getImListOrBuilder() {
if (listCase_ == 5) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList.getDefaultInstance();
}
public static final int NDLIST_FIELD_NUMBER = 6;
/**
* <code>.ai.konduit.serving.NDArrayList ndList = 6;</code>
* @return Whether the ndList field is set.
*/
@java.lang.Override
public boolean hasNdList() {
return listCase_ == 6;
}
/**
* <code>.ai.konduit.serving.NDArrayList ndList = 6;</code>
* @return The ndList.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList getNdList() {
if (listCase_ == 6) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList.getDefaultInstance();
}
/**
* <code>.ai.konduit.serving.NDArrayList ndList = 6;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayListOrBuilder getNdListOrBuilder() {
if (listCase_ == 6) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList.getDefaultInstance();
}
public static final int BBOXLIST_FIELD_NUMBER = 7;
/**
* <code>.ai.konduit.serving.BoundingBoxesList bboxList = 7;</code>
* @return Whether the bboxList field is set.
*/
@java.lang.Override
public boolean hasBboxList() {
return listCase_ == 7;
}
/**
* <code>.ai.konduit.serving.BoundingBoxesList bboxList = 7;</code>
* @return The bboxList.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList getBboxList() {
if (listCase_ == 7) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList.getDefaultInstance();
}
/**
* <code>.ai.konduit.serving.BoundingBoxesList bboxList = 7;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesListOrBuilder getBboxListOrBuilder() {
if (listCase_ == 7) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList.getDefaultInstance();
}
public static final int PLIST_FIELD_NUMBER = 8;
/**
* <code>.ai.konduit.serving.PointList pList = 8;</code>
* @return Whether the pList field is set.
*/
@java.lang.Override
public boolean hasPList() {
return listCase_ == 8;
}
/**
* <code>.ai.konduit.serving.PointList pList = 8;</code>
* @return The pList.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList getPList() {
if (listCase_ == 8) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList.getDefaultInstance();
}
/**
* <code>.ai.konduit.serving.PointList pList = 8;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointListOrBuilder getPListOrBuilder() {
if (listCase_ == 8) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (listCase_ == 1) {
output.writeMessage(1, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList) list_);
}
if (listCase_ == 2) {
output.writeMessage(2, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List) list_);
}
if (listCase_ == 3) {
output.writeMessage(3, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList) list_);
}
if (listCase_ == 4) {
output.writeMessage(4, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList) list_);
}
if (listCase_ == 5) {
output.writeMessage(5, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList) list_);
}
if (listCase_ == 6) {
output.writeMessage(6, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList) list_);
}
if (listCase_ == 7) {
output.writeMessage(7, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList) list_);
}
if (listCase_ == 8) {
output.writeMessage(8, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList) list_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (listCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList) list_);
}
if (listCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List) list_);
}
if (listCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList) list_);
}
if (listCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList) list_);
}
if (listCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList) list_);
}
if (listCase_ == 6) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList) list_);
}
if (listCase_ == 7) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList) list_);
}
if (listCase_ == 8) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList) list_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List)) {
return super.equals(obj);
}
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List other = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List) obj;
if (!getListCase().equals(other.getListCase())) return false;
switch (listCase_) {
case 1:
if (!getSList()
.equals(other.getSList())) return false;
break;
case 2:
if (!getIList()
.equals(other.getIList())) return false;
break;
case 3:
if (!getBList()
.equals(other.getBList())) return false;
break;
case 4:
if (!getDList()
.equals(other.getDList())) return false;
break;
case 5:
if (!getImList()
.equals(other.getImList())) return false;
break;
case 6:
if (!getNdList()
.equals(other.getNdList())) return false;
break;
case 7:
if (!getBboxList()
.equals(other.getBboxList())) return false;
break;
case 8:
if (!getPList()
.equals(other.getPList())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
switch (listCase_) {
case 1:
hash = (37 * hash) + SLIST_FIELD_NUMBER;
hash = (53 * hash) + getSList().hashCode();
break;
case 2:
hash = (37 * hash) + ILIST_FIELD_NUMBER;
hash = (53 * hash) + getIList().hashCode();
break;
case 3:
hash = (37 * hash) + BLIST_FIELD_NUMBER;
hash = (53 * hash) + getBList().hashCode();
break;
case 4:
hash = (37 * hash) + DLIST_FIELD_NUMBER;
hash = (53 * hash) + getDList().hashCode();
break;
case 5:
hash = (37 * hash) + IMLIST_FIELD_NUMBER;
hash = (53 * hash) + getImList().hashCode();
break;
case 6:
hash = (37 * hash) + NDLIST_FIELD_NUMBER;
hash = (53 * hash) + getNdList().hashCode();
break;
case 7:
hash = (37 * hash) + BBOXLIST_FIELD_NUMBER;
hash = (53 * hash) + getBboxList().hashCode();
break;
case 8:
hash = (37 * hash) + PLIST_FIELD_NUMBER;
hash = (53 * hash) + getPList().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code ai.konduit.serving.List}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:ai.konduit.serving.List)
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ListOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_List_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_List_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List.Builder.class);
}
// Construct using ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
listCase_ = 0;
list_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_List_descriptor;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List getDefaultInstanceForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List.getDefaultInstance();
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List build() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List buildPartial() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List result = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List(this);
if (listCase_ == 1) {
if (sListBuilder_ == null) {
result.list_ = list_;
} else {
result.list_ = sListBuilder_.build();
}
}
if (listCase_ == 2) {
if (iListBuilder_ == null) {
result.list_ = list_;
} else {
result.list_ = iListBuilder_.build();
}
}
if (listCase_ == 3) {
if (bListBuilder_ == null) {
result.list_ = list_;
} else {
result.list_ = bListBuilder_.build();
}
}
if (listCase_ == 4) {
if (dListBuilder_ == null) {
result.list_ = list_;
} else {
result.list_ = dListBuilder_.build();
}
}
if (listCase_ == 5) {
if (imListBuilder_ == null) {
result.list_ = list_;
} else {
result.list_ = imListBuilder_.build();
}
}
if (listCase_ == 6) {
if (ndListBuilder_ == null) {
result.list_ = list_;
} else {
result.list_ = ndListBuilder_.build();
}
}
if (listCase_ == 7) {
if (bboxListBuilder_ == null) {
result.list_ = list_;
} else {
result.list_ = bboxListBuilder_.build();
}
}
if (listCase_ == 8) {
if (pListBuilder_ == null) {
result.list_ = list_;
} else {
result.list_ = pListBuilder_.build();
}
}
result.listCase_ = listCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List) {
return mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List other) {
if (other == ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List.getDefaultInstance()) return this;
switch (other.getListCase()) {
case SLIST: {
mergeSList(other.getSList());
break;
}
case ILIST: {
mergeIList(other.getIList());
break;
}
case BLIST: {
mergeBList(other.getBList());
break;
}
case DLIST: {
mergeDList(other.getDList());
break;
}
case IMLIST: {
mergeImList(other.getImList());
break;
}
case NDLIST: {
mergeNdList(other.getNdList());
break;
}
case BBOXLIST: {
mergeBboxList(other.getBboxList());
break;
}
case PLIST: {
mergePList(other.getPList());
break;
}
case LIST_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int listCase_ = 0;
private java.lang.Object list_;
public ListCase
getListCase() {
return ListCase.forNumber(
listCase_);
}
public Builder clearList() {
listCase_ = 0;
list_ = null;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringListOrBuilder> sListBuilder_;
/**
* <code>.ai.konduit.serving.StringList sList = 1;</code>
* @return Whether the sList field is set.
*/
@java.lang.Override
public boolean hasSList() {
return listCase_ == 1;
}
/**
* <code>.ai.konduit.serving.StringList sList = 1;</code>
* @return The sList.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList getSList() {
if (sListBuilder_ == null) {
if (listCase_ == 1) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList.getDefaultInstance();
} else {
if (listCase_ == 1) {
return sListBuilder_.getMessage();
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.StringList sList = 1;</code>
*/
public Builder setSList(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList value) {
if (sListBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
list_ = value;
onChanged();
} else {
sListBuilder_.setMessage(value);
}
listCase_ = 1;
return this;
}
/**
* <code>.ai.konduit.serving.StringList sList = 1;</code>
*/
public Builder setSList(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList.Builder builderForValue) {
if (sListBuilder_ == null) {
list_ = builderForValue.build();
onChanged();
} else {
sListBuilder_.setMessage(builderForValue.build());
}
listCase_ = 1;
return this;
}
/**
* <code>.ai.konduit.serving.StringList sList = 1;</code>
*/
public Builder mergeSList(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList value) {
if (sListBuilder_ == null) {
if (listCase_ == 1 &&
list_ != ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList.getDefaultInstance()) {
list_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList.newBuilder((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList) list_)
.mergeFrom(value).buildPartial();
} else {
list_ = value;
}
onChanged();
} else {
if (listCase_ == 1) {
sListBuilder_.mergeFrom(value);
}
sListBuilder_.setMessage(value);
}
listCase_ = 1;
return this;
}
/**
* <code>.ai.konduit.serving.StringList sList = 1;</code>
*/
public Builder clearSList() {
if (sListBuilder_ == null) {
if (listCase_ == 1) {
listCase_ = 0;
list_ = null;
onChanged();
}
} else {
if (listCase_ == 1) {
listCase_ = 0;
list_ = null;
}
sListBuilder_.clear();
}
return this;
}
/**
* <code>.ai.konduit.serving.StringList sList = 1;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList.Builder getSListBuilder() {
return getSListFieldBuilder().getBuilder();
}
/**
* <code>.ai.konduit.serving.StringList sList = 1;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringListOrBuilder getSListOrBuilder() {
if ((listCase_ == 1) && (sListBuilder_ != null)) {
return sListBuilder_.getMessageOrBuilder();
} else {
if (listCase_ == 1) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.StringList sList = 1;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringListOrBuilder>
getSListFieldBuilder() {
if (sListBuilder_ == null) {
if (!(listCase_ == 1)) {
list_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList.getDefaultInstance();
}
sListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringListOrBuilder>(
(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.StringList) list_,
getParentForChildren(),
isClean());
list_ = null;
}
listCase_ = 1;
onChanged();;
return sListBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64ListOrBuilder> iListBuilder_;
/**
* <code>.ai.konduit.serving.Int64List iList = 2;</code>
* @return Whether the iList field is set.
*/
@java.lang.Override
public boolean hasIList() {
return listCase_ == 2;
}
/**
* <code>.ai.konduit.serving.Int64List iList = 2;</code>
* @return The iList.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List getIList() {
if (iListBuilder_ == null) {
if (listCase_ == 2) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List.getDefaultInstance();
} else {
if (listCase_ == 2) {
return iListBuilder_.getMessage();
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.Int64List iList = 2;</code>
*/
public Builder setIList(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List value) {
if (iListBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
list_ = value;
onChanged();
} else {
iListBuilder_.setMessage(value);
}
listCase_ = 2;
return this;
}
/**
* <code>.ai.konduit.serving.Int64List iList = 2;</code>
*/
public Builder setIList(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List.Builder builderForValue) {
if (iListBuilder_ == null) {
list_ = builderForValue.build();
onChanged();
} else {
iListBuilder_.setMessage(builderForValue.build());
}
listCase_ = 2;
return this;
}
/**
* <code>.ai.konduit.serving.Int64List iList = 2;</code>
*/
public Builder mergeIList(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List value) {
if (iListBuilder_ == null) {
if (listCase_ == 2 &&
list_ != ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List.getDefaultInstance()) {
list_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List.newBuilder((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List) list_)
.mergeFrom(value).buildPartial();
} else {
list_ = value;
}
onChanged();
} else {
if (listCase_ == 2) {
iListBuilder_.mergeFrom(value);
}
iListBuilder_.setMessage(value);
}
listCase_ = 2;
return this;
}
/**
* <code>.ai.konduit.serving.Int64List iList = 2;</code>
*/
public Builder clearIList() {
if (iListBuilder_ == null) {
if (listCase_ == 2) {
listCase_ = 0;
list_ = null;
onChanged();
}
} else {
if (listCase_ == 2) {
listCase_ = 0;
list_ = null;
}
iListBuilder_.clear();
}
return this;
}
/**
* <code>.ai.konduit.serving.Int64List iList = 2;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List.Builder getIListBuilder() {
return getIListFieldBuilder().getBuilder();
}
/**
* <code>.ai.konduit.serving.Int64List iList = 2;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64ListOrBuilder getIListOrBuilder() {
if ((listCase_ == 2) && (iListBuilder_ != null)) {
return iListBuilder_.getMessageOrBuilder();
} else {
if (listCase_ == 2) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.Int64List iList = 2;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64ListOrBuilder>
getIListFieldBuilder() {
if (iListBuilder_ == null) {
if (!(listCase_ == 2)) {
list_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List.getDefaultInstance();
}
iListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64ListOrBuilder>(
(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Int64List) list_,
getParentForChildren(),
isClean());
list_ = null;
}
listCase_ = 2;
onChanged();;
return iListBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanListOrBuilder> bListBuilder_;
/**
* <code>.ai.konduit.serving.BooleanList bList = 3;</code>
* @return Whether the bList field is set.
*/
@java.lang.Override
public boolean hasBList() {
return listCase_ == 3;
}
/**
* <code>.ai.konduit.serving.BooleanList bList = 3;</code>
* @return The bList.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList getBList() {
if (bListBuilder_ == null) {
if (listCase_ == 3) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList.getDefaultInstance();
} else {
if (listCase_ == 3) {
return bListBuilder_.getMessage();
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.BooleanList bList = 3;</code>
*/
public Builder setBList(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList value) {
if (bListBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
list_ = value;
onChanged();
} else {
bListBuilder_.setMessage(value);
}
listCase_ = 3;
return this;
}
/**
* <code>.ai.konduit.serving.BooleanList bList = 3;</code>
*/
public Builder setBList(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList.Builder builderForValue) {
if (bListBuilder_ == null) {
list_ = builderForValue.build();
onChanged();
} else {
bListBuilder_.setMessage(builderForValue.build());
}
listCase_ = 3;
return this;
}
/**
* <code>.ai.konduit.serving.BooleanList bList = 3;</code>
*/
public Builder mergeBList(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList value) {
if (bListBuilder_ == null) {
if (listCase_ == 3 &&
list_ != ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList.getDefaultInstance()) {
list_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList.newBuilder((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList) list_)
.mergeFrom(value).buildPartial();
} else {
list_ = value;
}
onChanged();
} else {
if (listCase_ == 3) {
bListBuilder_.mergeFrom(value);
}
bListBuilder_.setMessage(value);
}
listCase_ = 3;
return this;
}
/**
* <code>.ai.konduit.serving.BooleanList bList = 3;</code>
*/
public Builder clearBList() {
if (bListBuilder_ == null) {
if (listCase_ == 3) {
listCase_ = 0;
list_ = null;
onChanged();
}
} else {
if (listCase_ == 3) {
listCase_ = 0;
list_ = null;
}
bListBuilder_.clear();
}
return this;
}
/**
* <code>.ai.konduit.serving.BooleanList bList = 3;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList.Builder getBListBuilder() {
return getBListFieldBuilder().getBuilder();
}
/**
* <code>.ai.konduit.serving.BooleanList bList = 3;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanListOrBuilder getBListOrBuilder() {
if ((listCase_ == 3) && (bListBuilder_ != null)) {
return bListBuilder_.getMessageOrBuilder();
} else {
if (listCase_ == 3) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.BooleanList bList = 3;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanListOrBuilder>
getBListFieldBuilder() {
if (bListBuilder_ == null) {
if (!(listCase_ == 3)) {
list_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList.getDefaultInstance();
}
bListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanListOrBuilder>(
(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BooleanList) list_,
getParentForChildren(),
isClean());
list_ = null;
}
listCase_ = 3;
onChanged();;
return bListBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleListOrBuilder> dListBuilder_;
/**
* <code>.ai.konduit.serving.DoubleList dList = 4;</code>
* @return Whether the dList field is set.
*/
@java.lang.Override
public boolean hasDList() {
return listCase_ == 4;
}
/**
* <code>.ai.konduit.serving.DoubleList dList = 4;</code>
* @return The dList.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList getDList() {
if (dListBuilder_ == null) {
if (listCase_ == 4) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList.getDefaultInstance();
} else {
if (listCase_ == 4) {
return dListBuilder_.getMessage();
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.DoubleList dList = 4;</code>
*/
public Builder setDList(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList value) {
if (dListBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
list_ = value;
onChanged();
} else {
dListBuilder_.setMessage(value);
}
listCase_ = 4;
return this;
}
/**
* <code>.ai.konduit.serving.DoubleList dList = 4;</code>
*/
public Builder setDList(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList.Builder builderForValue) {
if (dListBuilder_ == null) {
list_ = builderForValue.build();
onChanged();
} else {
dListBuilder_.setMessage(builderForValue.build());
}
listCase_ = 4;
return this;
}
/**
* <code>.ai.konduit.serving.DoubleList dList = 4;</code>
*/
public Builder mergeDList(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList value) {
if (dListBuilder_ == null) {
if (listCase_ == 4 &&
list_ != ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList.getDefaultInstance()) {
list_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList.newBuilder((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList) list_)
.mergeFrom(value).buildPartial();
} else {
list_ = value;
}
onChanged();
} else {
if (listCase_ == 4) {
dListBuilder_.mergeFrom(value);
}
dListBuilder_.setMessage(value);
}
listCase_ = 4;
return this;
}
/**
* <code>.ai.konduit.serving.DoubleList dList = 4;</code>
*/
public Builder clearDList() {
if (dListBuilder_ == null) {
if (listCase_ == 4) {
listCase_ = 0;
list_ = null;
onChanged();
}
} else {
if (listCase_ == 4) {
listCase_ = 0;
list_ = null;
}
dListBuilder_.clear();
}
return this;
}
/**
* <code>.ai.konduit.serving.DoubleList dList = 4;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList.Builder getDListBuilder() {
return getDListFieldBuilder().getBuilder();
}
/**
* <code>.ai.konduit.serving.DoubleList dList = 4;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleListOrBuilder getDListOrBuilder() {
if ((listCase_ == 4) && (dListBuilder_ != null)) {
return dListBuilder_.getMessageOrBuilder();
} else {
if (listCase_ == 4) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.DoubleList dList = 4;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleListOrBuilder>
getDListFieldBuilder() {
if (dListBuilder_ == null) {
if (!(listCase_ == 4)) {
list_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList.getDefaultInstance();
}
dListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleListOrBuilder>(
(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DoubleList) list_,
getParentForChildren(),
isClean());
list_ = null;
}
listCase_ = 4;
onChanged();;
return dListBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageListOrBuilder> imListBuilder_;
/**
* <code>.ai.konduit.serving.ImageList imList = 5;</code>
* @return Whether the imList field is set.
*/
@java.lang.Override
public boolean hasImList() {
return listCase_ == 5;
}
/**
* <code>.ai.konduit.serving.ImageList imList = 5;</code>
* @return The imList.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList getImList() {
if (imListBuilder_ == null) {
if (listCase_ == 5) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList.getDefaultInstance();
} else {
if (listCase_ == 5) {
return imListBuilder_.getMessage();
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.ImageList imList = 5;</code>
*/
public Builder setImList(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList value) {
if (imListBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
list_ = value;
onChanged();
} else {
imListBuilder_.setMessage(value);
}
listCase_ = 5;
return this;
}
/**
* <code>.ai.konduit.serving.ImageList imList = 5;</code>
*/
public Builder setImList(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList.Builder builderForValue) {
if (imListBuilder_ == null) {
list_ = builderForValue.build();
onChanged();
} else {
imListBuilder_.setMessage(builderForValue.build());
}
listCase_ = 5;
return this;
}
/**
* <code>.ai.konduit.serving.ImageList imList = 5;</code>
*/
public Builder mergeImList(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList value) {
if (imListBuilder_ == null) {
if (listCase_ == 5 &&
list_ != ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList.getDefaultInstance()) {
list_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList.newBuilder((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList) list_)
.mergeFrom(value).buildPartial();
} else {
list_ = value;
}
onChanged();
} else {
if (listCase_ == 5) {
imListBuilder_.mergeFrom(value);
}
imListBuilder_.setMessage(value);
}
listCase_ = 5;
return this;
}
/**
* <code>.ai.konduit.serving.ImageList imList = 5;</code>
*/
public Builder clearImList() {
if (imListBuilder_ == null) {
if (listCase_ == 5) {
listCase_ = 0;
list_ = null;
onChanged();
}
} else {
if (listCase_ == 5) {
listCase_ = 0;
list_ = null;
}
imListBuilder_.clear();
}
return this;
}
/**
* <code>.ai.konduit.serving.ImageList imList = 5;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList.Builder getImListBuilder() {
return getImListFieldBuilder().getBuilder();
}
/**
* <code>.ai.konduit.serving.ImageList imList = 5;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageListOrBuilder getImListOrBuilder() {
if ((listCase_ == 5) && (imListBuilder_ != null)) {
return imListBuilder_.getMessageOrBuilder();
} else {
if (listCase_ == 5) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.ImageList imList = 5;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageListOrBuilder>
getImListFieldBuilder() {
if (imListBuilder_ == null) {
if (!(listCase_ == 5)) {
list_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList.getDefaultInstance();
}
imListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageListOrBuilder>(
(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageList) list_,
getParentForChildren(),
isClean());
list_ = null;
}
listCase_ = 5;
onChanged();;
return imListBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayListOrBuilder> ndListBuilder_;
/**
* <code>.ai.konduit.serving.NDArrayList ndList = 6;</code>
* @return Whether the ndList field is set.
*/
@java.lang.Override
public boolean hasNdList() {
return listCase_ == 6;
}
/**
* <code>.ai.konduit.serving.NDArrayList ndList = 6;</code>
* @return The ndList.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList getNdList() {
if (ndListBuilder_ == null) {
if (listCase_ == 6) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList.getDefaultInstance();
} else {
if (listCase_ == 6) {
return ndListBuilder_.getMessage();
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.NDArrayList ndList = 6;</code>
*/
public Builder setNdList(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList value) {
if (ndListBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
list_ = value;
onChanged();
} else {
ndListBuilder_.setMessage(value);
}
listCase_ = 6;
return this;
}
/**
* <code>.ai.konduit.serving.NDArrayList ndList = 6;</code>
*/
public Builder setNdList(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList.Builder builderForValue) {
if (ndListBuilder_ == null) {
list_ = builderForValue.build();
onChanged();
} else {
ndListBuilder_.setMessage(builderForValue.build());
}
listCase_ = 6;
return this;
}
/**
* <code>.ai.konduit.serving.NDArrayList ndList = 6;</code>
*/
public Builder mergeNdList(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList value) {
if (ndListBuilder_ == null) {
if (listCase_ == 6 &&
list_ != ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList.getDefaultInstance()) {
list_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList.newBuilder((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList) list_)
.mergeFrom(value).buildPartial();
} else {
list_ = value;
}
onChanged();
} else {
if (listCase_ == 6) {
ndListBuilder_.mergeFrom(value);
}
ndListBuilder_.setMessage(value);
}
listCase_ = 6;
return this;
}
/**
* <code>.ai.konduit.serving.NDArrayList ndList = 6;</code>
*/
public Builder clearNdList() {
if (ndListBuilder_ == null) {
if (listCase_ == 6) {
listCase_ = 0;
list_ = null;
onChanged();
}
} else {
if (listCase_ == 6) {
listCase_ = 0;
list_ = null;
}
ndListBuilder_.clear();
}
return this;
}
/**
* <code>.ai.konduit.serving.NDArrayList ndList = 6;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList.Builder getNdListBuilder() {
return getNdListFieldBuilder().getBuilder();
}
/**
* <code>.ai.konduit.serving.NDArrayList ndList = 6;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayListOrBuilder getNdListOrBuilder() {
if ((listCase_ == 6) && (ndListBuilder_ != null)) {
return ndListBuilder_.getMessageOrBuilder();
} else {
if (listCase_ == 6) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.NDArrayList ndList = 6;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayListOrBuilder>
getNdListFieldBuilder() {
if (ndListBuilder_ == null) {
if (!(listCase_ == 6)) {
list_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList.getDefaultInstance();
}
ndListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayListOrBuilder>(
(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayList) list_,
getParentForChildren(),
isClean());
list_ = null;
}
listCase_ = 6;
onChanged();;
return ndListBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesListOrBuilder> bboxListBuilder_;
/**
* <code>.ai.konduit.serving.BoundingBoxesList bboxList = 7;</code>
* @return Whether the bboxList field is set.
*/
@java.lang.Override
public boolean hasBboxList() {
return listCase_ == 7;
}
/**
* <code>.ai.konduit.serving.BoundingBoxesList bboxList = 7;</code>
* @return The bboxList.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList getBboxList() {
if (bboxListBuilder_ == null) {
if (listCase_ == 7) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList.getDefaultInstance();
} else {
if (listCase_ == 7) {
return bboxListBuilder_.getMessage();
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.BoundingBoxesList bboxList = 7;</code>
*/
public Builder setBboxList(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList value) {
if (bboxListBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
list_ = value;
onChanged();
} else {
bboxListBuilder_.setMessage(value);
}
listCase_ = 7;
return this;
}
/**
* <code>.ai.konduit.serving.BoundingBoxesList bboxList = 7;</code>
*/
public Builder setBboxList(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList.Builder builderForValue) {
if (bboxListBuilder_ == null) {
list_ = builderForValue.build();
onChanged();
} else {
bboxListBuilder_.setMessage(builderForValue.build());
}
listCase_ = 7;
return this;
}
/**
* <code>.ai.konduit.serving.BoundingBoxesList bboxList = 7;</code>
*/
public Builder mergeBboxList(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList value) {
if (bboxListBuilder_ == null) {
if (listCase_ == 7 &&
list_ != ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList.getDefaultInstance()) {
list_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList.newBuilder((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList) list_)
.mergeFrom(value).buildPartial();
} else {
list_ = value;
}
onChanged();
} else {
if (listCase_ == 7) {
bboxListBuilder_.mergeFrom(value);
}
bboxListBuilder_.setMessage(value);
}
listCase_ = 7;
return this;
}
/**
* <code>.ai.konduit.serving.BoundingBoxesList bboxList = 7;</code>
*/
public Builder clearBboxList() {
if (bboxListBuilder_ == null) {
if (listCase_ == 7) {
listCase_ = 0;
list_ = null;
onChanged();
}
} else {
if (listCase_ == 7) {
listCase_ = 0;
list_ = null;
}
bboxListBuilder_.clear();
}
return this;
}
/**
* <code>.ai.konduit.serving.BoundingBoxesList bboxList = 7;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList.Builder getBboxListBuilder() {
return getBboxListFieldBuilder().getBuilder();
}
/**
* <code>.ai.konduit.serving.BoundingBoxesList bboxList = 7;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesListOrBuilder getBboxListOrBuilder() {
if ((listCase_ == 7) && (bboxListBuilder_ != null)) {
return bboxListBuilder_.getMessageOrBuilder();
} else {
if (listCase_ == 7) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.BoundingBoxesList bboxList = 7;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesListOrBuilder>
getBboxListFieldBuilder() {
if (bboxListBuilder_ == null) {
if (!(listCase_ == 7)) {
list_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList.getDefaultInstance();
}
bboxListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesListOrBuilder>(
(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxesList) list_,
getParentForChildren(),
isClean());
list_ = null;
}
listCase_ = 7;
onChanged();;
return bboxListBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointListOrBuilder> pListBuilder_;
/**
* <code>.ai.konduit.serving.PointList pList = 8;</code>
* @return Whether the pList field is set.
*/
@java.lang.Override
public boolean hasPList() {
return listCase_ == 8;
}
/**
* <code>.ai.konduit.serving.PointList pList = 8;</code>
* @return The pList.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList getPList() {
if (pListBuilder_ == null) {
if (listCase_ == 8) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList.getDefaultInstance();
} else {
if (listCase_ == 8) {
return pListBuilder_.getMessage();
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.PointList pList = 8;</code>
*/
public Builder setPList(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList value) {
if (pListBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
list_ = value;
onChanged();
} else {
pListBuilder_.setMessage(value);
}
listCase_ = 8;
return this;
}
/**
* <code>.ai.konduit.serving.PointList pList = 8;</code>
*/
public Builder setPList(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList.Builder builderForValue) {
if (pListBuilder_ == null) {
list_ = builderForValue.build();
onChanged();
} else {
pListBuilder_.setMessage(builderForValue.build());
}
listCase_ = 8;
return this;
}
/**
* <code>.ai.konduit.serving.PointList pList = 8;</code>
*/
public Builder mergePList(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList value) {
if (pListBuilder_ == null) {
if (listCase_ == 8 &&
list_ != ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList.getDefaultInstance()) {
list_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList.newBuilder((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList) list_)
.mergeFrom(value).buildPartial();
} else {
list_ = value;
}
onChanged();
} else {
if (listCase_ == 8) {
pListBuilder_.mergeFrom(value);
}
pListBuilder_.setMessage(value);
}
listCase_ = 8;
return this;
}
/**
* <code>.ai.konduit.serving.PointList pList = 8;</code>
*/
public Builder clearPList() {
if (pListBuilder_ == null) {
if (listCase_ == 8) {
listCase_ = 0;
list_ = null;
onChanged();
}
} else {
if (listCase_ == 8) {
listCase_ = 0;
list_ = null;
}
pListBuilder_.clear();
}
return this;
}
/**
* <code>.ai.konduit.serving.PointList pList = 8;</code>
*/
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList.Builder getPListBuilder() {
return getPListFieldBuilder().getBuilder();
}
/**
* <code>.ai.konduit.serving.PointList pList = 8;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointListOrBuilder getPListOrBuilder() {
if ((listCase_ == 8) && (pListBuilder_ != null)) {
return pListBuilder_.getMessageOrBuilder();
} else {
if (listCase_ == 8) {
return (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList) list_;
}
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList.getDefaultInstance();
}
}
/**
* <code>.ai.konduit.serving.PointList pList = 8;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointListOrBuilder>
getPListFieldBuilder() {
if (pListBuilder_ == null) {
if (!(listCase_ == 8)) {
list_ = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList.getDefaultInstance();
}
pListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList.Builder, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointListOrBuilder>(
(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointList) list_,
getParentForChildren(),
isClean());
list_ = null;
}
listCase_ = 8;
onChanged();;
return pListBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:ai.konduit.serving.List)
}
// @@protoc_insertion_point(class_scope:ai.konduit.serving.List)
private static final ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List();
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<List>
PARSER = new com.google.protobuf.AbstractParser<List>() {
@java.lang.Override
public List parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new List(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<List> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<List> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.List getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ImageOrBuilder extends
// @@protoc_insertion_point(interface_extends:ai.konduit.serving.Image)
com.google.protobuf.MessageOrBuilder {
/**
* <code>string type = 1;</code>
* @return The type.
*/
java.lang.String getType();
/**
* <code>string type = 1;</code>
* @return The bytes for type.
*/
com.google.protobuf.ByteString
getTypeBytes();
/**
* <code>repeated bytes data = 2;</code>
* @return A list containing the data.
*/
java.util.List<com.google.protobuf.ByteString> getDataList();
/**
* <code>repeated bytes data = 2;</code>
* @return The count of data.
*/
int getDataCount();
/**
* <code>repeated bytes data = 2;</code>
* @param index The index of the element to return.
* @return The data at the given index.
*/
com.google.protobuf.ByteString getData(int index);
}
/**
* Protobuf type {@code ai.konduit.serving.Image}
*/
public static final class Image extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:ai.konduit.serving.Image)
ImageOrBuilder {
private static final long serialVersionUID = 0L;
// Use Image.newBuilder() to construct.
private Image(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private Image() {
type_ = "";
data_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Image();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Image(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
type_ = s;
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
data_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
mutable_bitField0_ |= 0x00000001;
}
data_.add(input.readBytes());
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
data_ = java.util.Collections.unmodifiableList(data_); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_Image_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_Image_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.Builder.class);
}
public static final int TYPE_FIELD_NUMBER = 1;
private volatile java.lang.Object type_;
/**
* <code>string type = 1;</code>
* @return The type.
*/
@java.lang.Override
public java.lang.String getType() {
java.lang.Object ref = type_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
type_ = s;
return s;
}
}
/**
* <code>string type = 1;</code>
* @return The bytes for type.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DATA_FIELD_NUMBER = 2;
private java.util.List<com.google.protobuf.ByteString> data_;
/**
* <code>repeated bytes data = 2;</code>
* @return A list containing the data.
*/
@java.lang.Override
public java.util.List<com.google.protobuf.ByteString>
getDataList() {
return data_;
}
/**
* <code>repeated bytes data = 2;</code>
* @return The count of data.
*/
public int getDataCount() {
return data_.size();
}
/**
* <code>repeated bytes data = 2;</code>
* @param index The index of the element to return.
* @return The data at the given index.
*/
public com.google.protobuf.ByteString getData(int index) {
return data_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getTypeBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_);
}
for (int i = 0; i < data_.size(); i++) {
output.writeBytes(2, data_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getTypeBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_);
}
{
int dataSize = 0;
for (int i = 0; i < data_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(data_.get(i));
}
size += dataSize;
size += 1 * getDataList().size();
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image)) {
return super.equals(obj);
}
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image other = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image) obj;
if (!getType()
.equals(other.getType())) return false;
if (!getDataList()
.equals(other.getDataList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + getType().hashCode();
if (getDataCount() > 0) {
hash = (37 * hash) + DATA_FIELD_NUMBER;
hash = (53 * hash) + getDataList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code ai.konduit.serving.Image}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:ai.konduit.serving.Image)
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.ImageOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_Image_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_Image_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.Builder.class);
}
// Construct using ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
type_ = "";
data_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_Image_descriptor;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image getDefaultInstanceForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.getDefaultInstance();
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image build() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image buildPartial() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image result = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image(this);
int from_bitField0_ = bitField0_;
result.type_ = type_;
if (((bitField0_ & 0x00000001) != 0)) {
data_ = java.util.Collections.unmodifiableList(data_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.data_ = data_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image) {
return mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image other) {
if (other == ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image.getDefaultInstance()) return this;
if (!other.getType().isEmpty()) {
type_ = other.type_;
onChanged();
}
if (!other.data_.isEmpty()) {
if (data_.isEmpty()) {
data_ = other.data_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureDataIsMutable();
data_.addAll(other.data_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object type_ = "";
/**
* <code>string type = 1;</code>
* @return The type.
*/
public java.lang.String getType() {
java.lang.Object ref = type_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
type_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>string type = 1;</code>
* @return The bytes for type.
*/
public com.google.protobuf.ByteString
getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>string type = 1;</code>
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value;
onChanged();
return this;
}
/**
* <code>string type = 1;</code>
* @return This builder for chaining.
*/
public Builder clearType() {
type_ = getDefaultInstance().getType();
onChanged();
return this;
}
/**
* <code>string type = 1;</code>
* @param value The bytes for type to set.
* @return This builder for chaining.
*/
public Builder setTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
type_ = value;
onChanged();
return this;
}
private java.util.List<com.google.protobuf.ByteString> data_ = java.util.Collections.emptyList();
private void ensureDataIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
data_ = new java.util.ArrayList<com.google.protobuf.ByteString>(data_);
bitField0_ |= 0x00000001;
}
}
/**
* <code>repeated bytes data = 2;</code>
* @return A list containing the data.
*/
public java.util.List<com.google.protobuf.ByteString>
getDataList() {
return ((bitField0_ & 0x00000001) != 0) ?
java.util.Collections.unmodifiableList(data_) : data_;
}
/**
* <code>repeated bytes data = 2;</code>
* @return The count of data.
*/
public int getDataCount() {
return data_.size();
}
/**
* <code>repeated bytes data = 2;</code>
* @param index The index of the element to return.
* @return The data at the given index.
*/
public com.google.protobuf.ByteString getData(int index) {
return data_.get(index);
}
/**
* <code>repeated bytes data = 2;</code>
* @param index The index to set the value at.
* @param value The data to set.
* @return This builder for chaining.
*/
public Builder setData(
int index, com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureDataIsMutable();
data_.set(index, value);
onChanged();
return this;
}
/**
* <code>repeated bytes data = 2;</code>
* @param value The data to add.
* @return This builder for chaining.
*/
public Builder addData(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureDataIsMutable();
data_.add(value);
onChanged();
return this;
}
/**
* <code>repeated bytes data = 2;</code>
* @param values The data to add.
* @return This builder for chaining.
*/
public Builder addAllData(
java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
ensureDataIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, data_);
onChanged();
return this;
}
/**
* <code>repeated bytes data = 2;</code>
* @return This builder for chaining.
*/
public Builder clearData() {
data_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:ai.konduit.serving.Image)
}
// @@protoc_insertion_point(class_scope:ai.konduit.serving.Image)
private static final ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image();
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<Image>
PARSER = new com.google.protobuf.AbstractParser<Image>() {
@java.lang.Override
public Image parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Image(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<Image> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<Image> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Image getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface NDArrayOrBuilder extends
// @@protoc_insertion_point(interface_extends:ai.konduit.serving.NDArray)
com.google.protobuf.MessageOrBuilder {
/**
* <code>repeated int64 shape = 1;</code>
* @return A list containing the shape.
*/
java.util.List<java.lang.Long> getShapeList();
/**
* <code>repeated int64 shape = 1;</code>
* @return The count of shape.
*/
int getShapeCount();
/**
* <code>repeated int64 shape = 1;</code>
* @param index The index of the element to return.
* @return The shape at the given index.
*/
long getShape(int index);
/**
* <code>repeated bytes array = 3;</code>
* @return A list containing the array.
*/
java.util.List<com.google.protobuf.ByteString> getArrayList();
/**
* <code>repeated bytes array = 3;</code>
* @return The count of array.
*/
int getArrayCount();
/**
* <code>repeated bytes array = 3;</code>
* @param index The index of the element to return.
* @return The array at the given index.
*/
com.google.protobuf.ByteString getArray(int index);
/**
* <code>.ai.konduit.serving.NDArray.ValueType type = 2;</code>
* @return The enum numeric value on the wire for type.
*/
int getTypeValue();
/**
* <code>.ai.konduit.serving.NDArray.ValueType type = 2;</code>
* @return The type.
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.ValueType getType();
}
/**
* Protobuf type {@code ai.konduit.serving.NDArray}
*/
public static final class NDArray extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:ai.konduit.serving.NDArray)
NDArrayOrBuilder {
private static final long serialVersionUID = 0L;
// Use NDArray.newBuilder() to construct.
private NDArray(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private NDArray() {
shape_ = emptyLongList();
array_ = java.util.Collections.emptyList();
type_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new NDArray();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private NDArray(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
shape_ = newLongList();
mutable_bitField0_ |= 0x00000001;
}
shape_.addLong(input.readInt64());
break;
}
case 10: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
shape_ = newLongList();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
shape_.addLong(input.readInt64());
}
input.popLimit(limit);
break;
}
case 16: {
int rawValue = input.readEnum();
type_ = rawValue;
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
array_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
mutable_bitField0_ |= 0x00000002;
}
array_.add(input.readBytes());
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
shape_.makeImmutable(); // C
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
array_ = java.util.Collections.unmodifiableList(array_); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_NDArray_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_NDArray_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.Builder.class);
}
/**
* Protobuf enum {@code ai.konduit.serving.NDArray.ValueType}
*/
public enum ValueType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* <code>DOUBLE = 0;</code>
*/
DOUBLE(0),
/**
* <code>FLOAT = 1;</code>
*/
FLOAT(1),
/**
* <code>FLOAT16 = 2;</code>
*/
FLOAT16(2),
/**
* <code>BFLOAT16 = 3;</code>
*/
BFLOAT16(3),
/**
* <code>INT64 = 4;</code>
*/
INT64(4),
/**
* <code>INT32 = 5;</code>
*/
INT32(5),
/**
* <code>INT16 = 6;</code>
*/
INT16(6),
/**
* <code>INT8 = 7;</code>
*/
INT8(7),
/**
* <code>UINT64 = 8;</code>
*/
UINT64(8),
/**
* <code>UINT32 = 9;</code>
*/
UINT32(9),
/**
* <code>UINT16 = 10;</code>
*/
UINT16(10),
/**
* <code>UINT8 = 11;</code>
*/
UINT8(11),
/**
* <code>BOOL = 12;</code>
*/
BOOL(12),
/**
* <code>UTF8 = 13;</code>
*/
UTF8(13),
UNRECOGNIZED(-1),
;
/**
* <code>DOUBLE = 0;</code>
*/
public static final int DOUBLE_VALUE = 0;
/**
* <code>FLOAT = 1;</code>
*/
public static final int FLOAT_VALUE = 1;
/**
* <code>FLOAT16 = 2;</code>
*/
public static final int FLOAT16_VALUE = 2;
/**
* <code>BFLOAT16 = 3;</code>
*/
public static final int BFLOAT16_VALUE = 3;
/**
* <code>INT64 = 4;</code>
*/
public static final int INT64_VALUE = 4;
/**
* <code>INT32 = 5;</code>
*/
public static final int INT32_VALUE = 5;
/**
* <code>INT16 = 6;</code>
*/
public static final int INT16_VALUE = 6;
/**
* <code>INT8 = 7;</code>
*/
public static final int INT8_VALUE = 7;
/**
* <code>UINT64 = 8;</code>
*/
public static final int UINT64_VALUE = 8;
/**
* <code>UINT32 = 9;</code>
*/
public static final int UINT32_VALUE = 9;
/**
* <code>UINT16 = 10;</code>
*/
public static final int UINT16_VALUE = 10;
/**
* <code>UINT8 = 11;</code>
*/
public static final int UINT8_VALUE = 11;
/**
* <code>BOOL = 12;</code>
*/
public static final int BOOL_VALUE = 12;
/**
* <code>UTF8 = 13;</code>
*/
public static final int UTF8_VALUE = 13;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ValueType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static ValueType forNumber(int value) {
switch (value) {
case 0: return DOUBLE;
case 1: return FLOAT;
case 2: return FLOAT16;
case 3: return BFLOAT16;
case 4: return INT64;
case 5: return INT32;
case 6: return INT16;
case 7: return INT8;
case 8: return UINT64;
case 9: return UINT32;
case 10: return UINT16;
case 11: return UINT8;
case 12: return BOOL;
case 13: return UTF8;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<ValueType>
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ValueType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<ValueType>() {
public ValueType findValueByNumber(int number) {
return ValueType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.getDescriptor().getEnumTypes().get(0);
}
private static final ValueType[] VALUES = values();
public static ValueType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private ValueType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:ai.konduit.serving.NDArray.ValueType)
}
public static final int SHAPE_FIELD_NUMBER = 1;
private com.google.protobuf.Internal.LongList shape_;
/**
* <code>repeated int64 shape = 1;</code>
* @return A list containing the shape.
*/
@java.lang.Override
public java.util.List<java.lang.Long>
getShapeList() {
return shape_;
}
/**
* <code>repeated int64 shape = 1;</code>
* @return The count of shape.
*/
public int getShapeCount() {
return shape_.size();
}
/**
* <code>repeated int64 shape = 1;</code>
* @param index The index of the element to return.
* @return The shape at the given index.
*/
public long getShape(int index) {
return shape_.getLong(index);
}
private int shapeMemoizedSerializedSize = -1;
public static final int ARRAY_FIELD_NUMBER = 3;
private java.util.List<com.google.protobuf.ByteString> array_;
/**
* <code>repeated bytes array = 3;</code>
* @return A list containing the array.
*/
@java.lang.Override
public java.util.List<com.google.protobuf.ByteString>
getArrayList() {
return array_;
}
/**
* <code>repeated bytes array = 3;</code>
* @return The count of array.
*/
public int getArrayCount() {
return array_.size();
}
/**
* <code>repeated bytes array = 3;</code>
* @param index The index of the element to return.
* @return The array at the given index.
*/
public com.google.protobuf.ByteString getArray(int index) {
return array_.get(index);
}
public static final int TYPE_FIELD_NUMBER = 2;
private int type_;
/**
* <code>.ai.konduit.serving.NDArray.ValueType type = 2;</code>
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
* <code>.ai.konduit.serving.NDArray.ValueType type = 2;</code>
* @return The type.
*/
@java.lang.Override public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.ValueType getType() {
@SuppressWarnings("deprecation")
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.ValueType result = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.ValueType.valueOf(type_);
return result == null ? ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.ValueType.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (getShapeList().size() > 0) {
output.writeUInt32NoTag(10);
output.writeUInt32NoTag(shapeMemoizedSerializedSize);
}
for (int i = 0; i < shape_.size(); i++) {
output.writeInt64NoTag(shape_.getLong(i));
}
if (type_ != ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.ValueType.DOUBLE.getNumber()) {
output.writeEnum(2, type_);
}
for (int i = 0; i < array_.size(); i++) {
output.writeBytes(3, array_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < shape_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(shape_.getLong(i));
}
size += dataSize;
if (!getShapeList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
shapeMemoizedSerializedSize = dataSize;
}
if (type_ != ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.ValueType.DOUBLE.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, type_);
}
{
int dataSize = 0;
for (int i = 0; i < array_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(array_.get(i));
}
size += dataSize;
size += 1 * getArrayList().size();
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray)) {
return super.equals(obj);
}
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray other = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray) obj;
if (!getShapeList()
.equals(other.getShapeList())) return false;
if (!getArrayList()
.equals(other.getArrayList())) return false;
if (type_ != other.type_) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getShapeCount() > 0) {
hash = (37 * hash) + SHAPE_FIELD_NUMBER;
hash = (53 * hash) + getShapeList().hashCode();
}
if (getArrayCount() > 0) {
hash = (37 * hash) + ARRAY_FIELD_NUMBER;
hash = (53 * hash) + getArrayList().hashCode();
}
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code ai.konduit.serving.NDArray}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:ai.konduit.serving.NDArray)
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArrayOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_NDArray_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_NDArray_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.Builder.class);
}
// Construct using ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
shape_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00000001);
array_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
type_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_NDArray_descriptor;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray getDefaultInstanceForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.getDefaultInstance();
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray build() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray buildPartial() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray result = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) != 0)) {
shape_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.shape_ = shape_;
if (((bitField0_ & 0x00000002) != 0)) {
array_ = java.util.Collections.unmodifiableList(array_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.array_ = array_;
result.type_ = type_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray) {
return mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray other) {
if (other == ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.getDefaultInstance()) return this;
if (!other.shape_.isEmpty()) {
if (shape_.isEmpty()) {
shape_ = other.shape_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureShapeIsMutable();
shape_.addAll(other.shape_);
}
onChanged();
}
if (!other.array_.isEmpty()) {
if (array_.isEmpty()) {
array_ = other.array_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureArrayIsMutable();
array_.addAll(other.array_);
}
onChanged();
}
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.Internal.LongList shape_ = emptyLongList();
private void ensureShapeIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
shape_ = mutableCopy(shape_);
bitField0_ |= 0x00000001;
}
}
/**
* <code>repeated int64 shape = 1;</code>
* @return A list containing the shape.
*/
public java.util.List<java.lang.Long>
getShapeList() {
return ((bitField0_ & 0x00000001) != 0) ?
java.util.Collections.unmodifiableList(shape_) : shape_;
}
/**
* <code>repeated int64 shape = 1;</code>
* @return The count of shape.
*/
public int getShapeCount() {
return shape_.size();
}
/**
* <code>repeated int64 shape = 1;</code>
* @param index The index of the element to return.
* @return The shape at the given index.
*/
public long getShape(int index) {
return shape_.getLong(index);
}
/**
* <code>repeated int64 shape = 1;</code>
* @param index The index to set the value at.
* @param value The shape to set.
* @return This builder for chaining.
*/
public Builder setShape(
int index, long value) {
ensureShapeIsMutable();
shape_.setLong(index, value);
onChanged();
return this;
}
/**
* <code>repeated int64 shape = 1;</code>
* @param value The shape to add.
* @return This builder for chaining.
*/
public Builder addShape(long value) {
ensureShapeIsMutable();
shape_.addLong(value);
onChanged();
return this;
}
/**
* <code>repeated int64 shape = 1;</code>
* @param values The shape to add.
* @return This builder for chaining.
*/
public Builder addAllShape(
java.lang.Iterable<? extends java.lang.Long> values) {
ensureShapeIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, shape_);
onChanged();
return this;
}
/**
* <code>repeated int64 shape = 1;</code>
* @return This builder for chaining.
*/
public Builder clearShape() {
shape_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
private java.util.List<com.google.protobuf.ByteString> array_ = java.util.Collections.emptyList();
private void ensureArrayIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
array_ = new java.util.ArrayList<com.google.protobuf.ByteString>(array_);
bitField0_ |= 0x00000002;
}
}
/**
* <code>repeated bytes array = 3;</code>
* @return A list containing the array.
*/
public java.util.List<com.google.protobuf.ByteString>
getArrayList() {
return ((bitField0_ & 0x00000002) != 0) ?
java.util.Collections.unmodifiableList(array_) : array_;
}
/**
* <code>repeated bytes array = 3;</code>
* @return The count of array.
*/
public int getArrayCount() {
return array_.size();
}
/**
* <code>repeated bytes array = 3;</code>
* @param index The index of the element to return.
* @return The array at the given index.
*/
public com.google.protobuf.ByteString getArray(int index) {
return array_.get(index);
}
/**
* <code>repeated bytes array = 3;</code>
* @param index The index to set the value at.
* @param value The array to set.
* @return This builder for chaining.
*/
public Builder setArray(
int index, com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureArrayIsMutable();
array_.set(index, value);
onChanged();
return this;
}
/**
* <code>repeated bytes array = 3;</code>
* @param value The array to add.
* @return This builder for chaining.
*/
public Builder addArray(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureArrayIsMutable();
array_.add(value);
onChanged();
return this;
}
/**
* <code>repeated bytes array = 3;</code>
* @param values The array to add.
* @return This builder for chaining.
*/
public Builder addAllArray(
java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
ensureArrayIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, array_);
onChanged();
return this;
}
/**
* <code>repeated bytes array = 3;</code>
* @return This builder for chaining.
*/
public Builder clearArray() {
array_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
private int type_ = 0;
/**
* <code>.ai.konduit.serving.NDArray.ValueType type = 2;</code>
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
* <code>.ai.konduit.serving.NDArray.ValueType type = 2;</code>
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
type_ = value;
onChanged();
return this;
}
/**
* <code>.ai.konduit.serving.NDArray.ValueType type = 2;</code>
* @return The type.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.ValueType getType() {
@SuppressWarnings("deprecation")
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.ValueType result = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.ValueType.valueOf(type_);
return result == null ? ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.ValueType.UNRECOGNIZED : result;
}
/**
* <code>.ai.konduit.serving.NDArray.ValueType type = 2;</code>
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray.ValueType value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value.getNumber();
onChanged();
return this;
}
/**
* <code>.ai.konduit.serving.NDArray.ValueType type = 2;</code>
* @return This builder for chaining.
*/
public Builder clearType() {
type_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:ai.konduit.serving.NDArray)
}
// @@protoc_insertion_point(class_scope:ai.konduit.serving.NDArray)
private static final ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray();
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<NDArray>
PARSER = new com.google.protobuf.AbstractParser<NDArray>() {
@java.lang.Override
public NDArray parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new NDArray(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<NDArray> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<NDArray> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.NDArray getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface BoundingBoxOrBuilder extends
// @@protoc_insertion_point(interface_extends:ai.konduit.serving.BoundingBox)
com.google.protobuf.MessageOrBuilder {
/**
* <code>double x0 = 1;</code>
* @return The x0.
*/
double getX0();
/**
* <code>double x1 = 2;</code>
* @return The x1.
*/
double getX1();
/**
* <code>double y0 = 3;</code>
* @return The y0.
*/
double getY0();
/**
* <code>double y1 = 4;</code>
* @return The y1.
*/
double getY1();
/**
* <code>double cx = 5;</code>
* @return The cx.
*/
double getCx();
/**
* <code>double cy = 6;</code>
* @return The cy.
*/
double getCy();
/**
* <code>double h = 7;</code>
* @return The h.
*/
double getH();
/**
* <code>double w = 8;</code>
* @return The w.
*/
double getW();
/**
* <code>string label = 9;</code>
* @return The label.
*/
java.lang.String getLabel();
/**
* <code>string label = 9;</code>
* @return The bytes for label.
*/
com.google.protobuf.ByteString
getLabelBytes();
/**
* <code>double probability = 10;</code>
* @return The probability.
*/
double getProbability();
/**
* <code>.ai.konduit.serving.BoundingBox.BoxType type = 11;</code>
* @return The enum numeric value on the wire for type.
*/
int getTypeValue();
/**
* <code>.ai.konduit.serving.BoundingBox.BoxType type = 11;</code>
* @return The type.
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.BoxType getType();
}
/**
* Protobuf type {@code ai.konduit.serving.BoundingBox}
*/
public static final class BoundingBox extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:ai.konduit.serving.BoundingBox)
BoundingBoxOrBuilder {
private static final long serialVersionUID = 0L;
// Use BoundingBox.newBuilder() to construct.
private BoundingBox(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private BoundingBox() {
label_ = "";
type_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new BoundingBox();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private BoundingBox(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 9: {
x0_ = input.readDouble();
break;
}
case 17: {
x1_ = input.readDouble();
break;
}
case 25: {
y0_ = input.readDouble();
break;
}
case 33: {
y1_ = input.readDouble();
break;
}
case 41: {
cx_ = input.readDouble();
break;
}
case 49: {
cy_ = input.readDouble();
break;
}
case 57: {
h_ = input.readDouble();
break;
}
case 65: {
w_ = input.readDouble();
break;
}
case 74: {
java.lang.String s = input.readStringRequireUtf8();
label_ = s;
break;
}
case 81: {
probability_ = input.readDouble();
break;
}
case 88: {
int rawValue = input.readEnum();
type_ = rawValue;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_BoundingBox_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_BoundingBox_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.Builder.class);
}
/**
* Protobuf enum {@code ai.konduit.serving.BoundingBox.BoxType}
*/
public enum BoxType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* <code>CHW = 0;</code>
*/
CHW(0),
/**
* <code>XY = 1;</code>
*/
XY(1),
UNRECOGNIZED(-1),
;
/**
* <code>CHW = 0;</code>
*/
public static final int CHW_VALUE = 0;
/**
* <code>XY = 1;</code>
*/
public static final int XY_VALUE = 1;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static BoxType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static BoxType forNumber(int value) {
switch (value) {
case 0: return CHW;
case 1: return XY;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<BoxType>
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
BoxType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<BoxType>() {
public BoxType findValueByNumber(int number) {
return BoxType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.getDescriptor().getEnumTypes().get(0);
}
private static final BoxType[] VALUES = values();
public static BoxType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private BoxType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:ai.konduit.serving.BoundingBox.BoxType)
}
public static final int X0_FIELD_NUMBER = 1;
private double x0_;
/**
* <code>double x0 = 1;</code>
* @return The x0.
*/
@java.lang.Override
public double getX0() {
return x0_;
}
public static final int X1_FIELD_NUMBER = 2;
private double x1_;
/**
* <code>double x1 = 2;</code>
* @return The x1.
*/
@java.lang.Override
public double getX1() {
return x1_;
}
public static final int Y0_FIELD_NUMBER = 3;
private double y0_;
/**
* <code>double y0 = 3;</code>
* @return The y0.
*/
@java.lang.Override
public double getY0() {
return y0_;
}
public static final int Y1_FIELD_NUMBER = 4;
private double y1_;
/**
* <code>double y1 = 4;</code>
* @return The y1.
*/
@java.lang.Override
public double getY1() {
return y1_;
}
public static final int CX_FIELD_NUMBER = 5;
private double cx_;
/**
* <code>double cx = 5;</code>
* @return The cx.
*/
@java.lang.Override
public double getCx() {
return cx_;
}
public static final int CY_FIELD_NUMBER = 6;
private double cy_;
/**
* <code>double cy = 6;</code>
* @return The cy.
*/
@java.lang.Override
public double getCy() {
return cy_;
}
public static final int H_FIELD_NUMBER = 7;
private double h_;
/**
* <code>double h = 7;</code>
* @return The h.
*/
@java.lang.Override
public double getH() {
return h_;
}
public static final int W_FIELD_NUMBER = 8;
private double w_;
/**
* <code>double w = 8;</code>
* @return The w.
*/
@java.lang.Override
public double getW() {
return w_;
}
public static final int LABEL_FIELD_NUMBER = 9;
private volatile java.lang.Object label_;
/**
* <code>string label = 9;</code>
* @return The label.
*/
@java.lang.Override
public java.lang.String getLabel() {
java.lang.Object ref = label_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
label_ = s;
return s;
}
}
/**
* <code>string label = 9;</code>
* @return The bytes for label.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getLabelBytes() {
java.lang.Object ref = label_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
label_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PROBABILITY_FIELD_NUMBER = 10;
private double probability_;
/**
* <code>double probability = 10;</code>
* @return The probability.
*/
@java.lang.Override
public double getProbability() {
return probability_;
}
public static final int TYPE_FIELD_NUMBER = 11;
private int type_;
/**
* <code>.ai.konduit.serving.BoundingBox.BoxType type = 11;</code>
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
* <code>.ai.konduit.serving.BoundingBox.BoxType type = 11;</code>
* @return The type.
*/
@java.lang.Override public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.BoxType getType() {
@SuppressWarnings("deprecation")
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.BoxType result = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.BoxType.valueOf(type_);
return result == null ? ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.BoxType.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (x0_ != 0D) {
output.writeDouble(1, x0_);
}
if (x1_ != 0D) {
output.writeDouble(2, x1_);
}
if (y0_ != 0D) {
output.writeDouble(3, y0_);
}
if (y1_ != 0D) {
output.writeDouble(4, y1_);
}
if (cx_ != 0D) {
output.writeDouble(5, cx_);
}
if (cy_ != 0D) {
output.writeDouble(6, cy_);
}
if (h_ != 0D) {
output.writeDouble(7, h_);
}
if (w_ != 0D) {
output.writeDouble(8, w_);
}
if (!getLabelBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, label_);
}
if (probability_ != 0D) {
output.writeDouble(10, probability_);
}
if (type_ != ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.BoxType.CHW.getNumber()) {
output.writeEnum(11, type_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (x0_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(1, x0_);
}
if (x1_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, x1_);
}
if (y0_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(3, y0_);
}
if (y1_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(4, y1_);
}
if (cx_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(5, cx_);
}
if (cy_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(6, cy_);
}
if (h_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(7, h_);
}
if (w_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(8, w_);
}
if (!getLabelBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, label_);
}
if (probability_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(10, probability_);
}
if (type_ != ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.BoxType.CHW.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(11, type_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox)) {
return super.equals(obj);
}
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox other = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox) obj;
if (java.lang.Double.doubleToLongBits(getX0())
!= java.lang.Double.doubleToLongBits(
other.getX0())) return false;
if (java.lang.Double.doubleToLongBits(getX1())
!= java.lang.Double.doubleToLongBits(
other.getX1())) return false;
if (java.lang.Double.doubleToLongBits(getY0())
!= java.lang.Double.doubleToLongBits(
other.getY0())) return false;
if (java.lang.Double.doubleToLongBits(getY1())
!= java.lang.Double.doubleToLongBits(
other.getY1())) return false;
if (java.lang.Double.doubleToLongBits(getCx())
!= java.lang.Double.doubleToLongBits(
other.getCx())) return false;
if (java.lang.Double.doubleToLongBits(getCy())
!= java.lang.Double.doubleToLongBits(
other.getCy())) return false;
if (java.lang.Double.doubleToLongBits(getH())
!= java.lang.Double.doubleToLongBits(
other.getH())) return false;
if (java.lang.Double.doubleToLongBits(getW())
!= java.lang.Double.doubleToLongBits(
other.getW())) return false;
if (!getLabel()
.equals(other.getLabel())) return false;
if (java.lang.Double.doubleToLongBits(getProbability())
!= java.lang.Double.doubleToLongBits(
other.getProbability())) return false;
if (type_ != other.type_) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + X0_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getX0()));
hash = (37 * hash) + X1_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getX1()));
hash = (37 * hash) + Y0_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getY0()));
hash = (37 * hash) + Y1_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getY1()));
hash = (37 * hash) + CX_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getCx()));
hash = (37 * hash) + CY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getCy()));
hash = (37 * hash) + H_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getH()));
hash = (37 * hash) + W_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getW()));
hash = (37 * hash) + LABEL_FIELD_NUMBER;
hash = (53 * hash) + getLabel().hashCode();
hash = (37 * hash) + PROBABILITY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getProbability()));
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code ai.konduit.serving.BoundingBox}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:ai.konduit.serving.BoundingBox)
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBoxOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_BoundingBox_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_BoundingBox_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.Builder.class);
}
// Construct using ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
x0_ = 0D;
x1_ = 0D;
y0_ = 0D;
y1_ = 0D;
cx_ = 0D;
cy_ = 0D;
h_ = 0D;
w_ = 0D;
label_ = "";
probability_ = 0D;
type_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_BoundingBox_descriptor;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox getDefaultInstanceForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.getDefaultInstance();
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox build() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox buildPartial() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox result = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox(this);
result.x0_ = x0_;
result.x1_ = x1_;
result.y0_ = y0_;
result.y1_ = y1_;
result.cx_ = cx_;
result.cy_ = cy_;
result.h_ = h_;
result.w_ = w_;
result.label_ = label_;
result.probability_ = probability_;
result.type_ = type_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox) {
return mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox other) {
if (other == ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.getDefaultInstance()) return this;
if (other.getX0() != 0D) {
setX0(other.getX0());
}
if (other.getX1() != 0D) {
setX1(other.getX1());
}
if (other.getY0() != 0D) {
setY0(other.getY0());
}
if (other.getY1() != 0D) {
setY1(other.getY1());
}
if (other.getCx() != 0D) {
setCx(other.getCx());
}
if (other.getCy() != 0D) {
setCy(other.getCy());
}
if (other.getH() != 0D) {
setH(other.getH());
}
if (other.getW() != 0D) {
setW(other.getW());
}
if (!other.getLabel().isEmpty()) {
label_ = other.label_;
onChanged();
}
if (other.getProbability() != 0D) {
setProbability(other.getProbability());
}
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private double x0_ ;
/**
* <code>double x0 = 1;</code>
* @return The x0.
*/
@java.lang.Override
public double getX0() {
return x0_;
}
/**
* <code>double x0 = 1;</code>
* @param value The x0 to set.
* @return This builder for chaining.
*/
public Builder setX0(double value) {
x0_ = value;
onChanged();
return this;
}
/**
* <code>double x0 = 1;</code>
* @return This builder for chaining.
*/
public Builder clearX0() {
x0_ = 0D;
onChanged();
return this;
}
private double x1_ ;
/**
* <code>double x1 = 2;</code>
* @return The x1.
*/
@java.lang.Override
public double getX1() {
return x1_;
}
/**
* <code>double x1 = 2;</code>
* @param value The x1 to set.
* @return This builder for chaining.
*/
public Builder setX1(double value) {
x1_ = value;
onChanged();
return this;
}
/**
* <code>double x1 = 2;</code>
* @return This builder for chaining.
*/
public Builder clearX1() {
x1_ = 0D;
onChanged();
return this;
}
private double y0_ ;
/**
* <code>double y0 = 3;</code>
* @return The y0.
*/
@java.lang.Override
public double getY0() {
return y0_;
}
/**
* <code>double y0 = 3;</code>
* @param value The y0 to set.
* @return This builder for chaining.
*/
public Builder setY0(double value) {
y0_ = value;
onChanged();
return this;
}
/**
* <code>double y0 = 3;</code>
* @return This builder for chaining.
*/
public Builder clearY0() {
y0_ = 0D;
onChanged();
return this;
}
private double y1_ ;
/**
* <code>double y1 = 4;</code>
* @return The y1.
*/
@java.lang.Override
public double getY1() {
return y1_;
}
/**
* <code>double y1 = 4;</code>
* @param value The y1 to set.
* @return This builder for chaining.
*/
public Builder setY1(double value) {
y1_ = value;
onChanged();
return this;
}
/**
* <code>double y1 = 4;</code>
* @return This builder for chaining.
*/
public Builder clearY1() {
y1_ = 0D;
onChanged();
return this;
}
private double cx_ ;
/**
* <code>double cx = 5;</code>
* @return The cx.
*/
@java.lang.Override
public double getCx() {
return cx_;
}
/**
* <code>double cx = 5;</code>
* @param value The cx to set.
* @return This builder for chaining.
*/
public Builder setCx(double value) {
cx_ = value;
onChanged();
return this;
}
/**
* <code>double cx = 5;</code>
* @return This builder for chaining.
*/
public Builder clearCx() {
cx_ = 0D;
onChanged();
return this;
}
private double cy_ ;
/**
* <code>double cy = 6;</code>
* @return The cy.
*/
@java.lang.Override
public double getCy() {
return cy_;
}
/**
* <code>double cy = 6;</code>
* @param value The cy to set.
* @return This builder for chaining.
*/
public Builder setCy(double value) {
cy_ = value;
onChanged();
return this;
}
/**
* <code>double cy = 6;</code>
* @return This builder for chaining.
*/
public Builder clearCy() {
cy_ = 0D;
onChanged();
return this;
}
private double h_ ;
/**
* <code>double h = 7;</code>
* @return The h.
*/
@java.lang.Override
public double getH() {
return h_;
}
/**
* <code>double h = 7;</code>
* @param value The h to set.
* @return This builder for chaining.
*/
public Builder setH(double value) {
h_ = value;
onChanged();
return this;
}
/**
* <code>double h = 7;</code>
* @return This builder for chaining.
*/
public Builder clearH() {
h_ = 0D;
onChanged();
return this;
}
private double w_ ;
/**
* <code>double w = 8;</code>
* @return The w.
*/
@java.lang.Override
public double getW() {
return w_;
}
/**
* <code>double w = 8;</code>
* @param value The w to set.
* @return This builder for chaining.
*/
public Builder setW(double value) {
w_ = value;
onChanged();
return this;
}
/**
* <code>double w = 8;</code>
* @return This builder for chaining.
*/
public Builder clearW() {
w_ = 0D;
onChanged();
return this;
}
private java.lang.Object label_ = "";
/**
* <code>string label = 9;</code>
* @return The label.
*/
public java.lang.String getLabel() {
java.lang.Object ref = label_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
label_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>string label = 9;</code>
* @return The bytes for label.
*/
public com.google.protobuf.ByteString
getLabelBytes() {
java.lang.Object ref = label_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
label_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>string label = 9;</code>
* @param value The label to set.
* @return This builder for chaining.
*/
public Builder setLabel(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
label_ = value;
onChanged();
return this;
}
/**
* <code>string label = 9;</code>
* @return This builder for chaining.
*/
public Builder clearLabel() {
label_ = getDefaultInstance().getLabel();
onChanged();
return this;
}
/**
* <code>string label = 9;</code>
* @param value The bytes for label to set.
* @return This builder for chaining.
*/
public Builder setLabelBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
label_ = value;
onChanged();
return this;
}
private double probability_ ;
/**
* <code>double probability = 10;</code>
* @return The probability.
*/
@java.lang.Override
public double getProbability() {
return probability_;
}
/**
* <code>double probability = 10;</code>
* @param value The probability to set.
* @return This builder for chaining.
*/
public Builder setProbability(double value) {
probability_ = value;
onChanged();
return this;
}
/**
* <code>double probability = 10;</code>
* @return This builder for chaining.
*/
public Builder clearProbability() {
probability_ = 0D;
onChanged();
return this;
}
private int type_ = 0;
/**
* <code>.ai.konduit.serving.BoundingBox.BoxType type = 11;</code>
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
* <code>.ai.konduit.serving.BoundingBox.BoxType type = 11;</code>
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
type_ = value;
onChanged();
return this;
}
/**
* <code>.ai.konduit.serving.BoundingBox.BoxType type = 11;</code>
* @return The type.
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.BoxType getType() {
@SuppressWarnings("deprecation")
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.BoxType result = ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.BoxType.valueOf(type_);
return result == null ? ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.BoxType.UNRECOGNIZED : result;
}
/**
* <code>.ai.konduit.serving.BoundingBox.BoxType type = 11;</code>
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox.BoxType value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value.getNumber();
onChanged();
return this;
}
/**
* <code>.ai.konduit.serving.BoundingBox.BoxType type = 11;</code>
* @return This builder for chaining.
*/
public Builder clearType() {
type_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:ai.konduit.serving.BoundingBox)
}
// @@protoc_insertion_point(class_scope:ai.konduit.serving.BoundingBox)
private static final ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox();
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<BoundingBox>
PARSER = new com.google.protobuf.AbstractParser<BoundingBox>() {
@java.lang.Override
public BoundingBox parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BoundingBox(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<BoundingBox> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<BoundingBox> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.BoundingBox getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DataMapOrBuilder extends
// @@protoc_insertion_point(interface_extends:ai.konduit.serving.DataMap)
com.google.protobuf.MessageOrBuilder {
/**
* <code>map<string, .ai.konduit.serving.DataScheme> mapItems = 1;</code>
*/
int getMapItemsCount();
/**
* <code>map<string, .ai.konduit.serving.DataScheme> mapItems = 1;</code>
*/
boolean containsMapItems(
java.lang.String key);
/**
* Use {@link #getMapItemsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme>
getMapItems();
/**
* <code>map<string, .ai.konduit.serving.DataScheme> mapItems = 1;</code>
*/
java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme>
getMapItemsMap();
/**
* <code>map<string, .ai.konduit.serving.DataScheme> mapItems = 1;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme getMapItemsOrDefault(
java.lang.String key,
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme defaultValue);
/**
* <code>map<string, .ai.konduit.serving.DataScheme> mapItems = 1;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme getMapItemsOrThrow(
java.lang.String key);
/**
* <code>map<string, .ai.konduit.serving.DataScheme> metaData = 2;</code>
*/
int getMetaDataCount();
/**
* <code>map<string, .ai.konduit.serving.DataScheme> metaData = 2;</code>
*/
boolean containsMetaData(
java.lang.String key);
/**
* Use {@link #getMetaDataMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme>
getMetaData();
/**
* <code>map<string, .ai.konduit.serving.DataScheme> metaData = 2;</code>
*/
java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme>
getMetaDataMap();
/**
* <code>map<string, .ai.konduit.serving.DataScheme> metaData = 2;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme getMetaDataOrDefault(
java.lang.String key,
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme defaultValue);
/**
* <code>map<string, .ai.konduit.serving.DataScheme> metaData = 2;</code>
*/
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme getMetaDataOrThrow(
java.lang.String key);
}
/**
* Protobuf type {@code ai.konduit.serving.DataMap}
*/
public static final class DataMap extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:ai.konduit.serving.DataMap)
DataMapOrBuilder {
private static final long serialVersionUID = 0L;
// Use DataMap.newBuilder() to construct.
private DataMap(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private DataMap() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DataMap();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DataMap(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
mapItems_ = com.google.protobuf.MapField.newMapField(
MapItemsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme>
mapItems__ = input.readMessage(
MapItemsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
mapItems_.getMutableMap().put(
mapItems__.getKey(), mapItems__.getValue());
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
metaData_ = com.google.protobuf.MapField.newMapField(
MetaDataDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000002;
}
com.google.protobuf.MapEntry<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme>
metaData__ = input.readMessage(
MetaDataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
metaData_.getMutableMap().put(
metaData__.getKey(), metaData__.getValue());
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_DataMap_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetMapItems();
case 2:
return internalGetMetaData();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_DataMap_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap.Builder.class);
}
public static final int MAPITEMS_FIELD_NUMBER = 1;
private static final class MapItemsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> defaultEntry =
com.google.protobuf.MapEntry
.<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme>newDefaultInstance(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_DataMap_MapItemsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> mapItems_;
private com.google.protobuf.MapField<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme>
internalGetMapItems() {
if (mapItems_ == null) {
return com.google.protobuf.MapField.emptyMapField(
MapItemsDefaultEntryHolder.defaultEntry);
}
return mapItems_;
}
public int getMapItemsCount() {
return internalGetMapItems().getMap().size();
}
/**
* <code>map<string, .ai.konduit.serving.DataScheme> mapItems = 1;</code>
*/
@java.lang.Override
public boolean containsMapItems(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetMapItems().getMap().containsKey(key);
}
/**
* Use {@link #getMapItemsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> getMapItems() {
return getMapItemsMap();
}
/**
* <code>map<string, .ai.konduit.serving.DataScheme> mapItems = 1;</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> getMapItemsMap() {
return internalGetMapItems().getMap();
}
/**
* <code>map<string, .ai.konduit.serving.DataScheme> mapItems = 1;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme getMapItemsOrDefault(
java.lang.String key,
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> map =
internalGetMapItems().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <code>map<string, .ai.konduit.serving.DataScheme> mapItems = 1;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme getMapItemsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> map =
internalGetMapItems().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int METADATA_FIELD_NUMBER = 2;
private static final class MetaDataDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> defaultEntry =
com.google.protobuf.MapEntry
.<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme>newDefaultInstance(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_DataMap_MetaDataEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> metaData_;
private com.google.protobuf.MapField<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme>
internalGetMetaData() {
if (metaData_ == null) {
return com.google.protobuf.MapField.emptyMapField(
MetaDataDefaultEntryHolder.defaultEntry);
}
return metaData_;
}
public int getMetaDataCount() {
return internalGetMetaData().getMap().size();
}
/**
* <code>map<string, .ai.konduit.serving.DataScheme> metaData = 2;</code>
*/
@java.lang.Override
public boolean containsMetaData(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetMetaData().getMap().containsKey(key);
}
/**
* Use {@link #getMetaDataMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> getMetaData() {
return getMetaDataMap();
}
/**
* <code>map<string, .ai.konduit.serving.DataScheme> metaData = 2;</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> getMetaDataMap() {
return internalGetMetaData().getMap();
}
/**
* <code>map<string, .ai.konduit.serving.DataScheme> metaData = 2;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme getMetaDataOrDefault(
java.lang.String key,
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> map =
internalGetMetaData().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <code>map<string, .ai.konduit.serving.DataScheme> metaData = 2;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme getMetaDataOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> map =
internalGetMetaData().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetMapItems(),
MapItemsDefaultEntryHolder.defaultEntry,
1);
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetMetaData(),
MetaDataDefaultEntryHolder.defaultEntry,
2);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (java.util.Map.Entry<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> entry
: internalGetMapItems().getMap().entrySet()) {
com.google.protobuf.MapEntry<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme>
mapItems__ = MapItemsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, mapItems__);
}
for (java.util.Map.Entry<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> entry
: internalGetMetaData().getMap().entrySet()) {
com.google.protobuf.MapEntry<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme>
metaData__ = MetaDataDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, metaData__);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap)) {
return super.equals(obj);
}
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap other = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap) obj;
if (!internalGetMapItems().equals(
other.internalGetMapItems())) return false;
if (!internalGetMetaData().equals(
other.internalGetMetaData())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (!internalGetMapItems().getMap().isEmpty()) {
hash = (37 * hash) + MAPITEMS_FIELD_NUMBER;
hash = (53 * hash) + internalGetMapItems().hashCode();
}
if (!internalGetMetaData().getMap().isEmpty()) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + internalGetMetaData().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code ai.konduit.serving.DataMap}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:ai.konduit.serving.DataMap)
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMapOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_DataMap_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetMapItems();
case 2:
return internalGetMetaData();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 1:
return internalGetMutableMapItems();
case 2:
return internalGetMutableMetaData();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_DataMap_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap.Builder.class);
}
// Construct using ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
internalGetMutableMapItems().clear();
internalGetMutableMetaData().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_DataMap_descriptor;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap getDefaultInstanceForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap.getDefaultInstance();
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap build() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap buildPartial() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap result = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap(this);
int from_bitField0_ = bitField0_;
result.mapItems_ = internalGetMapItems();
result.mapItems_.makeImmutable();
result.metaData_ = internalGetMetaData();
result.metaData_.makeImmutable();
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap) {
return mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap other) {
if (other == ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap.getDefaultInstance()) return this;
internalGetMutableMapItems().mergeFrom(
other.internalGetMapItems());
internalGetMutableMetaData().mergeFrom(
other.internalGetMetaData());
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.MapField<
java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> mapItems_;
private com.google.protobuf.MapField<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme>
internalGetMapItems() {
if (mapItems_ == null) {
return com.google.protobuf.MapField.emptyMapField(
MapItemsDefaultEntryHolder.defaultEntry);
}
return mapItems_;
}
private com.google.protobuf.MapField<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme>
internalGetMutableMapItems() {
onChanged();;
if (mapItems_ == null) {
mapItems_ = com.google.protobuf.MapField.newMapField(
MapItemsDefaultEntryHolder.defaultEntry);
}
if (!mapItems_.isMutable()) {
mapItems_ = mapItems_.copy();
}
return mapItems_;
}
public int getMapItemsCount() {
return internalGetMapItems().getMap().size();
}
/**
* <code>map<string, .ai.konduit.serving.DataScheme> mapItems = 1;</code>
*/
@java.lang.Override
public boolean containsMapItems(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetMapItems().getMap().containsKey(key);
}
/**
* Use {@link #getMapItemsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> getMapItems() {
return getMapItemsMap();
}
/**
* <code>map<string, .ai.konduit.serving.DataScheme> mapItems = 1;</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> getMapItemsMap() {
return internalGetMapItems().getMap();
}
/**
* <code>map<string, .ai.konduit.serving.DataScheme> mapItems = 1;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme getMapItemsOrDefault(
java.lang.String key,
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> map =
internalGetMapItems().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <code>map<string, .ai.konduit.serving.DataScheme> mapItems = 1;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme getMapItemsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> map =
internalGetMapItems().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearMapItems() {
internalGetMutableMapItems().getMutableMap()
.clear();
return this;
}
/**
* <code>map<string, .ai.konduit.serving.DataScheme> mapItems = 1;</code>
*/
public Builder removeMapItems(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableMapItems().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme>
getMutableMapItems() {
return internalGetMutableMapItems().getMutableMap();
}
/**
* <code>map<string, .ai.konduit.serving.DataScheme> mapItems = 1;</code>
*/
public Builder putMapItems(
java.lang.String key,
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableMapItems().getMutableMap()
.put(key, value);
return this;
}
/**
* <code>map<string, .ai.konduit.serving.DataScheme> mapItems = 1;</code>
*/
public Builder putAllMapItems(
java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> values) {
internalGetMutableMapItems().getMutableMap()
.putAll(values);
return this;
}
private com.google.protobuf.MapField<
java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> metaData_;
private com.google.protobuf.MapField<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme>
internalGetMetaData() {
if (metaData_ == null) {
return com.google.protobuf.MapField.emptyMapField(
MetaDataDefaultEntryHolder.defaultEntry);
}
return metaData_;
}
private com.google.protobuf.MapField<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme>
internalGetMutableMetaData() {
onChanged();;
if (metaData_ == null) {
metaData_ = com.google.protobuf.MapField.newMapField(
MetaDataDefaultEntryHolder.defaultEntry);
}
if (!metaData_.isMutable()) {
metaData_ = metaData_.copy();
}
return metaData_;
}
public int getMetaDataCount() {
return internalGetMetaData().getMap().size();
}
/**
* <code>map<string, .ai.konduit.serving.DataScheme> metaData = 2;</code>
*/
@java.lang.Override
public boolean containsMetaData(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetMetaData().getMap().containsKey(key);
}
/**
* Use {@link #getMetaDataMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> getMetaData() {
return getMetaDataMap();
}
/**
* <code>map<string, .ai.konduit.serving.DataScheme> metaData = 2;</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> getMetaDataMap() {
return internalGetMetaData().getMap();
}
/**
* <code>map<string, .ai.konduit.serving.DataScheme> metaData = 2;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme getMetaDataOrDefault(
java.lang.String key,
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> map =
internalGetMetaData().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <code>map<string, .ai.konduit.serving.DataScheme> metaData = 2;</code>
*/
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme getMetaDataOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> map =
internalGetMetaData().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearMetaData() {
internalGetMutableMetaData().getMutableMap()
.clear();
return this;
}
/**
* <code>map<string, .ai.konduit.serving.DataScheme> metaData = 2;</code>
*/
public Builder removeMetaData(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableMetaData().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme>
getMutableMetaData() {
return internalGetMutableMetaData().getMutableMap();
}
/**
* <code>map<string, .ai.konduit.serving.DataScheme> metaData = 2;</code>
*/
public Builder putMetaData(
java.lang.String key,
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableMetaData().getMutableMap()
.put(key, value);
return this;
}
/**
* <code>map<string, .ai.konduit.serving.DataScheme> metaData = 2;</code>
*/
public Builder putAllMetaData(
java.util.Map<java.lang.String, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataScheme> values) {
internalGetMutableMetaData().getMutableMap()
.putAll(values);
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:ai.konduit.serving.DataMap)
}
// @@protoc_insertion_point(class_scope:ai.konduit.serving.DataMap)
private static final ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap();
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<DataMap>
PARSER = new com.google.protobuf.AbstractParser<DataMap>() {
@java.lang.Override
public DataMap parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DataMap(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<DataMap> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<DataMap> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.DataMap getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PointOrBuilder extends
// @@protoc_insertion_point(interface_extends:ai.konduit.serving.Point)
com.google.protobuf.MessageOrBuilder {
/**
* <code>string label = 1;</code>
* @return The label.
*/
java.lang.String getLabel();
/**
* <code>string label = 1;</code>
* @return The bytes for label.
*/
com.google.protobuf.ByteString
getLabelBytes();
/**
* <code>double probability = 2;</code>
* @return The probability.
*/
double getProbability();
/**
* <code>repeated double coords = 3;</code>
* @return A list containing the coords.
*/
java.util.List<java.lang.Double> getCoordsList();
/**
* <code>repeated double coords = 3;</code>
* @return The count of coords.
*/
int getCoordsCount();
/**
* <code>repeated double coords = 3;</code>
* @param index The index of the element to return.
* @return The coords at the given index.
*/
double getCoords(int index);
}
/**
* Protobuf type {@code ai.konduit.serving.Point}
*/
public static final class Point extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:ai.konduit.serving.Point)
PointOrBuilder {
private static final long serialVersionUID = 0L;
// Use Point.newBuilder() to construct.
private Point(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private Point() {
label_ = "";
coords_ = emptyDoubleList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Point();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Point(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
label_ = s;
break;
}
case 17: {
probability_ = input.readDouble();
break;
}
case 25: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
coords_ = newDoubleList();
mutable_bitField0_ |= 0x00000001;
}
coords_.addDouble(input.readDouble());
break;
}
case 26: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
coords_ = newDoubleList();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
coords_.addDouble(input.readDouble());
}
input.popLimit(limit);
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
coords_.makeImmutable(); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_Point_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_Point_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.Builder.class);
}
public static final int LABEL_FIELD_NUMBER = 1;
private volatile java.lang.Object label_;
/**
* <code>string label = 1;</code>
* @return The label.
*/
@java.lang.Override
public java.lang.String getLabel() {
java.lang.Object ref = label_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
label_ = s;
return s;
}
}
/**
* <code>string label = 1;</code>
* @return The bytes for label.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getLabelBytes() {
java.lang.Object ref = label_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
label_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PROBABILITY_FIELD_NUMBER = 2;
private double probability_;
/**
* <code>double probability = 2;</code>
* @return The probability.
*/
@java.lang.Override
public double getProbability() {
return probability_;
}
public static final int COORDS_FIELD_NUMBER = 3;
private com.google.protobuf.Internal.DoubleList coords_;
/**
* <code>repeated double coords = 3;</code>
* @return A list containing the coords.
*/
@java.lang.Override
public java.util.List<java.lang.Double>
getCoordsList() {
return coords_;
}
/**
* <code>repeated double coords = 3;</code>
* @return The count of coords.
*/
public int getCoordsCount() {
return coords_.size();
}
/**
* <code>repeated double coords = 3;</code>
* @param index The index of the element to return.
* @return The coords at the given index.
*/
public double getCoords(int index) {
return coords_.getDouble(index);
}
private int coordsMemoizedSerializedSize = -1;
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (!getLabelBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, label_);
}
if (probability_ != 0D) {
output.writeDouble(2, probability_);
}
if (getCoordsList().size() > 0) {
output.writeUInt32NoTag(26);
output.writeUInt32NoTag(coordsMemoizedSerializedSize);
}
for (int i = 0; i < coords_.size(); i++) {
output.writeDoubleNoTag(coords_.getDouble(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getLabelBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, label_);
}
if (probability_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, probability_);
}
{
int dataSize = 0;
dataSize = 8 * getCoordsList().size();
size += dataSize;
if (!getCoordsList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
coordsMemoizedSerializedSize = dataSize;
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point)) {
return super.equals(obj);
}
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point other = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point) obj;
if (!getLabel()
.equals(other.getLabel())) return false;
if (java.lang.Double.doubleToLongBits(getProbability())
!= java.lang.Double.doubleToLongBits(
other.getProbability())) return false;
if (!getCoordsList()
.equals(other.getCoordsList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + LABEL_FIELD_NUMBER;
hash = (53 * hash) + getLabel().hashCode();
hash = (37 * hash) + PROBABILITY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getProbability()));
if (getCoordsCount() > 0) {
hash = (37 * hash) + COORDS_FIELD_NUMBER;
hash = (53 * hash) + getCoordsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code ai.konduit.serving.Point}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:ai.konduit.serving.Point)
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.PointOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_Point_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_Point_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.class, ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.Builder.class);
}
// Construct using ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
label_ = "";
probability_ = 0D;
coords_ = emptyDoubleList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.internal_static_ai_konduit_serving_Point_descriptor;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point getDefaultInstanceForType() {
return ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.getDefaultInstance();
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point build() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point buildPartial() {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point result = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point(this);
int from_bitField0_ = bitField0_;
result.label_ = label_;
result.probability_ = probability_;
if (((bitField0_ & 0x00000001) != 0)) {
coords_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.coords_ = coords_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point) {
return mergeFrom((ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point other) {
if (other == ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point.getDefaultInstance()) return this;
if (!other.getLabel().isEmpty()) {
label_ = other.label_;
onChanged();
}
if (other.getProbability() != 0D) {
setProbability(other.getProbability());
}
if (!other.coords_.isEmpty()) {
if (coords_.isEmpty()) {
coords_ = other.coords_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureCoordsIsMutable();
coords_.addAll(other.coords_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object label_ = "";
/**
* <code>string label = 1;</code>
* @return The label.
*/
public java.lang.String getLabel() {
java.lang.Object ref = label_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
label_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>string label = 1;</code>
* @return The bytes for label.
*/
public com.google.protobuf.ByteString
getLabelBytes() {
java.lang.Object ref = label_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
label_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>string label = 1;</code>
* @param value The label to set.
* @return This builder for chaining.
*/
public Builder setLabel(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
label_ = value;
onChanged();
return this;
}
/**
* <code>string label = 1;</code>
* @return This builder for chaining.
*/
public Builder clearLabel() {
label_ = getDefaultInstance().getLabel();
onChanged();
return this;
}
/**
* <code>string label = 1;</code>
* @param value The bytes for label to set.
* @return This builder for chaining.
*/
public Builder setLabelBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
label_ = value;
onChanged();
return this;
}
private double probability_ ;
/**
* <code>double probability = 2;</code>
* @return The probability.
*/
@java.lang.Override
public double getProbability() {
return probability_;
}
/**
* <code>double probability = 2;</code>
* @param value The probability to set.
* @return This builder for chaining.
*/
public Builder setProbability(double value) {
probability_ = value;
onChanged();
return this;
}
/**
* <code>double probability = 2;</code>
* @return This builder for chaining.
*/
public Builder clearProbability() {
probability_ = 0D;
onChanged();
return this;
}
private com.google.protobuf.Internal.DoubleList coords_ = emptyDoubleList();
private void ensureCoordsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
coords_ = mutableCopy(coords_);
bitField0_ |= 0x00000001;
}
}
/**
* <code>repeated double coords = 3;</code>
* @return A list containing the coords.
*/
public java.util.List<java.lang.Double>
getCoordsList() {
return ((bitField0_ & 0x00000001) != 0) ?
java.util.Collections.unmodifiableList(coords_) : coords_;
}
/**
* <code>repeated double coords = 3;</code>
* @return The count of coords.
*/
public int getCoordsCount() {
return coords_.size();
}
/**
* <code>repeated double coords = 3;</code>
* @param index The index of the element to return.
* @return The coords at the given index.
*/
public double getCoords(int index) {
return coords_.getDouble(index);
}
/**
* <code>repeated double coords = 3;</code>
* @param index The index to set the value at.
* @param value The coords to set.
* @return This builder for chaining.
*/
public Builder setCoords(
int index, double value) {
ensureCoordsIsMutable();
coords_.setDouble(index, value);
onChanged();
return this;
}
/**
* <code>repeated double coords = 3;</code>
* @param value The coords to add.
* @return This builder for chaining.
*/
public Builder addCoords(double value) {
ensureCoordsIsMutable();
coords_.addDouble(value);
onChanged();
return this;
}
/**
* <code>repeated double coords = 3;</code>
* @param values The coords to add.
* @return This builder for chaining.
*/
public Builder addAllCoords(
java.lang.Iterable<? extends java.lang.Double> values) {
ensureCoordsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, coords_);
onChanged();
return this;
}
/**
* <code>repeated double coords = 3;</code>
* @return This builder for chaining.
*/
public Builder clearCoords() {
coords_ = emptyDoubleList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:ai.konduit.serving.Point)
}
// @@protoc_insertion_point(class_scope:ai.konduit.serving.Point)
private static final ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point();
}
public static ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<Point>
PARSER = new com.google.protobuf.AbstractParser<Point>() {
@java.lang.Override
public Point parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Point(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<Point> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<Point> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.konduit.serving.pipeline.impl.data.protobuf.DataProtoMessage.Point getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_ai_konduit_serving_DataScheme_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_ai_konduit_serving_DataScheme_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_ai_konduit_serving_StringList_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_ai_konduit_serving_StringList_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_ai_konduit_serving_Int64List_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_ai_konduit_serving_Int64List_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_ai_konduit_serving_BooleanList_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_ai_konduit_serving_BooleanList_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_ai_konduit_serving_DoubleList_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_ai_konduit_serving_DoubleList_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_ai_konduit_serving_ImageList_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_ai_konduit_serving_ImageList_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_ai_konduit_serving_NDArrayList_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_ai_konduit_serving_NDArrayList_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_ai_konduit_serving_BoundingBoxesList_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_ai_konduit_serving_BoundingBoxesList_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_ai_konduit_serving_PointList_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_ai_konduit_serving_PointList_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_ai_konduit_serving_List_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_ai_konduit_serving_List_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_ai_konduit_serving_Image_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_ai_konduit_serving_Image_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_ai_konduit_serving_NDArray_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_ai_konduit_serving_NDArray_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_ai_konduit_serving_BoundingBox_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_ai_konduit_serving_BoundingBox_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_ai_konduit_serving_DataMap_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_ai_konduit_serving_DataMap_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_ai_konduit_serving_DataMap_MapItemsEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_ai_konduit_serving_DataMap_MapItemsEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_ai_konduit_serving_DataMap_MetaDataEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_ai_konduit_serving_DataMap_MetaDataEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_ai_konduit_serving_Point_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_ai_konduit_serving_Point_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\ndata.proto\022\022ai.konduit.serving\"\241\005\n\nDat" +
"aScheme\022\020\n\006sValue\030\002 \001(\tH\000\022\020\n\006bValue\030\003 \001(" +
"\014H\000\022\020\n\006iValue\030\004 \001(\003H\000\022\023\n\tboolValue\030\005 \001(\010" +
"H\000\022\025\n\013doubleValue\030\006 \001(\001H\000\022-\n\tlistValue\030\007" +
" \001(\0132\030.ai.konduit.serving.ListH\000\022.\n\007ndVa" +
"lue\030\010 \001(\0132\033.ai.konduit.serving.NDArrayH\000" +
"\022,\n\007imValue\030\t \001(\0132\031.ai.konduit.serving.I" +
"mageH\000\0223\n\010boxValue\030\n \001(\0132\037.ai.konduit.se" +
"rving.BoundingBoxH\000\022/\n\010metaData\030\013 \001(\0132\033." +
"ai.konduit.serving.DataMapH\000\022/\n\npointVal" +
"ue\030\016 \001(\0132\031.ai.konduit.serving.PointH\000\022:\n" +
"\010listType\030\014 \001(\0162(.ai.konduit.serving.Dat" +
"aScheme.ValueType\0226\n\004type\030\r \001(\0162(.ai.kon" +
"duit.serving.DataScheme.ValueType\"\217\001\n\tVa" +
"lueType\022\013\n\007NDARRAY\020\000\022\n\n\006STRING\020\001\022\t\n\005BYTE" +
"S\020\002\022\t\n\005IMAGE\020\003\022\n\n\006DOUBLE\020\004\022\t\n\005INT64\020\005\022\013\n" +
"\007BOOLEAN\020\006\022\020\n\014BOUNDING_BOX\020\007\022\010\n\004DATA\020\010\022\010" +
"\n\004LIST\020\t\022\t\n\005POINT\020\nB\007\n\005value\"\032\n\nStringLi" +
"st\022\014\n\004list\030\001 \003(\t\"\031\n\tInt64List\022\014\n\004list\030\001 " +
"\003(\003\"\033\n\013BooleanList\022\014\n\004list\030\001 \003(\010\"\032\n\nDoub" +
"leList\022\014\n\004list\030\001 \003(\001\"4\n\tImageList\022\'\n\004lis" +
"t\030\001 \003(\0132\031.ai.konduit.serving.Image\"8\n\013ND" +
"ArrayList\022)\n\004list\030\001 \003(\0132\033.ai.konduit.ser" +
"ving.NDArray\"B\n\021BoundingBoxesList\022-\n\004lis" +
"t\030\001 \003(\0132\037.ai.konduit.serving.BoundingBox" +
"\"4\n\tPointList\022\'\n\004list\030\001 \003(\0132\031.ai.konduit" +
".serving.Point\"\241\003\n\004List\022/\n\005sList\030\001 \001(\0132\036" +
".ai.konduit.serving.StringListH\000\022.\n\005iLis" +
"t\030\002 \001(\0132\035.ai.konduit.serving.Int64ListH\000" +
"\0220\n\005bList\030\003 \001(\0132\037.ai.konduit.serving.Boo" +
"leanListH\000\022/\n\005dList\030\004 \001(\0132\036.ai.konduit.s" +
"erving.DoubleListH\000\022/\n\006imList\030\005 \001(\0132\035.ai" +
".konduit.serving.ImageListH\000\0221\n\006ndList\030\006" +
" \001(\0132\037.ai.konduit.serving.NDArrayListH\000\022" +
"9\n\010bboxList\030\007 \001(\0132%.ai.konduit.serving.B" +
"oundingBoxesListH\000\022.\n\005pList\030\010 \001(\0132\035.ai.k" +
"onduit.serving.PointListH\000B\006\n\004list\"#\n\005Im" +
"age\022\014\n\004type\030\001 \001(\t\022\014\n\004data\030\002 \003(\014\"\212\002\n\007NDAr" +
"ray\022\r\n\005shape\030\001 \003(\003\022\r\n\005array\030\003 \003(\014\0223\n\004typ" +
"e\030\002 \001(\0162%.ai.konduit.serving.NDArray.Val" +
"ueType\"\253\001\n\tValueType\022\n\n\006DOUBLE\020\000\022\t\n\005FLOA" +
"T\020\001\022\013\n\007FLOAT16\020\002\022\014\n\010BFLOAT16\020\003\022\t\n\005INT64\020" +
"\004\022\t\n\005INT32\020\005\022\t\n\005INT16\020\006\022\010\n\004INT8\020\007\022\n\n\006UIN" +
"T64\020\010\022\n\n\006UINT32\020\t\022\n\n\006UINT16\020\n\022\t\n\005UINT8\020\013" +
"\022\010\n\004BOOL\020\014\022\010\n\004UTF8\020\r\"\342\001\n\013BoundingBox\022\n\n\002" +
"x0\030\001 \001(\001\022\n\n\002x1\030\002 \001(\001\022\n\n\002y0\030\003 \001(\001\022\n\n\002y1\030\004" +
" \001(\001\022\n\n\002cx\030\005 \001(\001\022\n\n\002cy\030\006 \001(\001\022\t\n\001h\030\007 \001(\001\022" +
"\t\n\001w\030\010 \001(\001\022\r\n\005label\030\t \001(\t\022\023\n\013probability" +
"\030\n \001(\001\0225\n\004type\030\013 \001(\0162\'.ai.konduit.servin" +
"g.BoundingBox.BoxType\"\032\n\007BoxType\022\007\n\003CHW\020" +
"\000\022\006\n\002XY\020\001\"\245\002\n\007DataMap\022;\n\010mapItems\030\001 \003(\0132" +
").ai.konduit.serving.DataMap.MapItemsEnt" +
"ry\022;\n\010metaData\030\002 \003(\0132).ai.konduit.servin" +
"g.DataMap.MetaDataEntry\032O\n\rMapItemsEntry" +
"\022\013\n\003key\030\001 \001(\t\022-\n\005value\030\002 \001(\0132\036.ai.kondui" +
"t.serving.DataScheme:\0028\001\032O\n\rMetaDataEntr" +
"y\022\013\n\003key\030\001 \001(\t\022-\n\005value\030\002 \001(\0132\036.ai.kondu" +
"it.serving.DataScheme:\0028\001\";\n\005Point\022\r\n\005la" +
"bel\030\001 \001(\t\022\023\n\013probability\030\002 \001(\001\022\016\n\006coords" +
"\030\003 \003(\001BB\n.ai.konduit.serving.pipeline.im" +
"pl.data.protobufB\020DataProtoMessageb\006prot" +
"o3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
});
internal_static_ai_konduit_serving_DataScheme_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_ai_konduit_serving_DataScheme_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_ai_konduit_serving_DataScheme_descriptor,
new java.lang.String[] { "SValue", "BValue", "IValue", "BoolValue", "DoubleValue", "ListValue", "NdValue", "ImValue", "BoxValue", "MetaData", "PointValue", "ListType", "Type", "Value", });
internal_static_ai_konduit_serving_StringList_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_ai_konduit_serving_StringList_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_ai_konduit_serving_StringList_descriptor,
new java.lang.String[] { "List", });
internal_static_ai_konduit_serving_Int64List_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_ai_konduit_serving_Int64List_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_ai_konduit_serving_Int64List_descriptor,
new java.lang.String[] { "List", });
internal_static_ai_konduit_serving_BooleanList_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_ai_konduit_serving_BooleanList_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_ai_konduit_serving_BooleanList_descriptor,
new java.lang.String[] { "List", });
internal_static_ai_konduit_serving_DoubleList_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_ai_konduit_serving_DoubleList_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_ai_konduit_serving_DoubleList_descriptor,
new java.lang.String[] { "List", });
internal_static_ai_konduit_serving_ImageList_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_ai_konduit_serving_ImageList_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_ai_konduit_serving_ImageList_descriptor,
new java.lang.String[] { "List", });
internal_static_ai_konduit_serving_NDArrayList_descriptor =
getDescriptor().getMessageTypes().get(6);
internal_static_ai_konduit_serving_NDArrayList_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_ai_konduit_serving_NDArrayList_descriptor,
new java.lang.String[] { "List", });
internal_static_ai_konduit_serving_BoundingBoxesList_descriptor =
getDescriptor().getMessageTypes().get(7);
internal_static_ai_konduit_serving_BoundingBoxesList_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_ai_konduit_serving_BoundingBoxesList_descriptor,
new java.lang.String[] { "List", });
internal_static_ai_konduit_serving_PointList_descriptor =
getDescriptor().getMessageTypes().get(8);
internal_static_ai_konduit_serving_PointList_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_ai_konduit_serving_PointList_descriptor,
new java.lang.String[] { "List", });
internal_static_ai_konduit_serving_List_descriptor =
getDescriptor().getMessageTypes().get(9);
internal_static_ai_konduit_serving_List_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_ai_konduit_serving_List_descriptor,
new java.lang.String[] { "SList", "IList", "BList", "DList", "ImList", "NdList", "BboxList", "PList", "List", });
internal_static_ai_konduit_serving_Image_descriptor =
getDescriptor().getMessageTypes().get(10);
internal_static_ai_konduit_serving_Image_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_ai_konduit_serving_Image_descriptor,
new java.lang.String[] { "Type", "Data", });
internal_static_ai_konduit_serving_NDArray_descriptor =
getDescriptor().getMessageTypes().get(11);
internal_static_ai_konduit_serving_NDArray_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_ai_konduit_serving_NDArray_descriptor,
new java.lang.String[] { "Shape", "Array", "Type", });
internal_static_ai_konduit_serving_BoundingBox_descriptor =
getDescriptor().getMessageTypes().get(12);
internal_static_ai_konduit_serving_BoundingBox_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_ai_konduit_serving_BoundingBox_descriptor,
new java.lang.String[] { "X0", "X1", "Y0", "Y1", "Cx", "Cy", "H", "W", "Label", "Probability", "Type", });
internal_static_ai_konduit_serving_DataMap_descriptor =
getDescriptor().getMessageTypes().get(13);
internal_static_ai_konduit_serving_DataMap_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_ai_konduit_serving_DataMap_descriptor,
new java.lang.String[] { "MapItems", "MetaData", });
internal_static_ai_konduit_serving_DataMap_MapItemsEntry_descriptor =
internal_static_ai_konduit_serving_DataMap_descriptor.getNestedTypes().get(0);
internal_static_ai_konduit_serving_DataMap_MapItemsEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_ai_konduit_serving_DataMap_MapItemsEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_ai_konduit_serving_DataMap_MetaDataEntry_descriptor =
internal_static_ai_konduit_serving_DataMap_descriptor.getNestedTypes().get(1);
internal_static_ai_konduit_serving_DataMap_MetaDataEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_ai_konduit_serving_DataMap_MetaDataEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_ai_konduit_serving_Point_descriptor =
getDescriptor().getMessageTypes().get(14);
internal_static_ai_konduit_serving_Point_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_ai_konduit_serving_Point_descriptor,
new java.lang.String[] { "Label", "Probability", "Coords", });
}
// @@protoc_insertion_point(outer_class_scope)
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/wrappers/BBoxValue.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.impl.data.wrappers;
import ai.konduit.serving.pipeline.api.data.BoundingBox;
import ai.konduit.serving.pipeline.api.data.ValueType;
public class BBoxValue extends BaseValue<BoundingBox> {
public BBoxValue(BoundingBox value) {
super(ValueType.BOUNDING_BOX, value);
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/wrappers/BaseValue.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.data.wrappers;
import ai.konduit.serving.pipeline.impl.data.Value;
import ai.konduit.serving.pipeline.api.data.ValueType;
import lombok.AllArgsConstructor;
@AllArgsConstructor
public class BaseValue<T> implements Value<T> {
protected final ValueType type;
protected T value;
@Override
public ValueType type() {
return type;
}
@Override
public T get() {
return value;
}
@Override
public void set(T value) {
this.value = value;
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/wrappers/BooleanValue.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.impl.data.wrappers;
import ai.konduit.serving.pipeline.api.data.ValueType;
public class BooleanValue extends BaseValue<Boolean> {
public BooleanValue(Boolean value) {
super(ValueType.BOOLEAN, value);
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/wrappers/ByteBufferValue.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.impl.data.wrappers;
import ai.konduit.serving.pipeline.api.data.ValueType;
import java.nio.ByteBuffer;
public class ByteBufferValue extends BaseValue<ByteBuffer> {
public ByteBufferValue(ByteBuffer value) {
super(ValueType.BYTEBUFFER, value);
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/wrappers/BytesValue.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.impl.data.wrappers;
import ai.konduit.serving.pipeline.api.data.ValueType;
public class BytesValue extends BaseValue<byte[]> {
public BytesValue(byte[] value) {
super(ValueType.BYTES, value);
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/wrappers/DataValue.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.data.wrappers;
import ai.konduit.serving.pipeline.api.data.Data;
import ai.konduit.serving.pipeline.api.data.ValueType;
public class DataValue extends BaseValue<Data> {
public DataValue(Data value) {
super(ValueType.DATA, value);
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/wrappers/DoubleValue.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.impl.data.wrappers;
import ai.konduit.serving.pipeline.api.data.ValueType;
public class DoubleValue extends BaseValue<Double> {
public DoubleValue(Double value) {
super(ValueType.DOUBLE, value);
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/wrappers/ImageValue.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.impl.data.wrappers;
import ai.konduit.serving.pipeline.api.data.Image;
import ai.konduit.serving.pipeline.api.data.ValueType;
public class ImageValue extends BaseValue<Image> {
public ImageValue(Image value) {
super(ValueType.IMAGE, value);
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/wrappers/IntValue.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.impl.data.wrappers;
import ai.konduit.serving.pipeline.api.data.ValueType;
public class IntValue extends BaseValue<Long> {
public IntValue(Long value) {
super(ValueType.INT64, value);
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/wrappers/ListValue.java
|
package ai.konduit.serving.pipeline.impl.data.wrappers;
import ai.konduit.serving.pipeline.impl.data.Value;
import ai.konduit.serving.pipeline.api.data.ValueType;
import lombok.AllArgsConstructor;
import java.util.List;
//@AllArgsConstructor
public class ListValue<T> implements Value<List<T>> {
private List<T> values;
private ValueType elementType;
public ListValue(List<T> values, ValueType elementType){
this.values = values;
this.elementType = elementType;
}
@Override
public ValueType type() {
return ValueType.LIST;
}
public ValueType elementType() { return elementType; }
@Override
public List<T> get() {
return values;
}
@Override
public void set(List<T> value) {
throw new IllegalStateException("Use set(List<T>,ValueType) for lists");
}
// @Override
public void set(List<T> value, ValueType elementType) {
this.values = value;
this.elementType = elementType;
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/wrappers/NDArrayValue.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.impl.data.wrappers;
import ai.konduit.serving.pipeline.api.data.NDArray;
import ai.konduit.serving.pipeline.api.data.ValueType;
public class NDArrayValue extends BaseValue<NDArray> {
public NDArrayValue(NDArray value) {
super(ValueType.NDARRAY, value);
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/wrappers/PointValue.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.impl.data.wrappers;
import ai.konduit.serving.pipeline.api.data.Point;
import ai.konduit.serving.pipeline.api.data.ValueType;
public class PointValue extends BaseValue<Point> {
public PointValue(Point value) {
super(ValueType.POINT, value);
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/data/wrappers/StringValue.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.impl.data.wrappers;
import ai.konduit.serving.pipeline.api.data.ValueType;
public class StringValue extends BaseValue<String> {
public StringValue(String value) {
super(ValueType.STRING, value);
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/format/JavaImageConverters.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.format;
import ai.konduit.serving.pipeline.api.data.Image;
import ai.konduit.serving.pipeline.api.exception.DataConversionException;
import ai.konduit.serving.pipeline.api.exception.DataLoadingException;
import ai.konduit.serving.pipeline.api.format.ImageConverter;
import ai.konduit.serving.pipeline.api.format.ImageFormat;
import ai.konduit.serving.pipeline.impl.data.image.Bmp;
import ai.konduit.serving.pipeline.impl.data.image.Gif;
import ai.konduit.serving.pipeline.impl.data.image.Jpeg;
import ai.konduit.serving.pipeline.impl.data.image.Png;
import ai.konduit.serving.pipeline.impl.data.image.base.BaseImageFile;
import lombok.AllArgsConstructor;
import org.nd4j.common.base.Preconditions;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
public class JavaImageConverters {
private JavaImageConverters(){ }
public static class IdentityConverter implements ImageConverter {
@Override
public boolean canConvert(Image from, ImageFormat<?> to) {
return false;
}
@Override
public boolean canConvert(Image from, Class<?> to) {
return to.isAssignableFrom(from.get().getClass());
}
@Override
public <T> T convert(Image from, ImageFormat<T> to) {
throw new UnsupportedOperationException("Not supported");
}
@Override
public <T> T convert(Image from, Class<T> to) {
Preconditions.checkState(canConvert(from, to), "Unable to convert %s to %s", from.get().getClass(), to);
return (T)from.get();
}
}
@AllArgsConstructor
public static abstract class BaseConverter implements ImageConverter {
protected Class<?> cFrom;
protected Class<?> cTo;
@Override
public boolean canConvert(Image from, ImageFormat<?> to) {
return false;
}
@Override
public boolean canConvert(Image from, Class<?> to) {
return cFrom.isAssignableFrom(from.get().getClass()) && cTo.isAssignableFrom(to);
}
@Override
public <T> T convert(Image from, ImageFormat<T> to) {
throw new UnsupportedOperationException("Not supported");
}
@Override
public <T> T convert(Image from, Class<T> to) {
Preconditions.checkState(canConvert(from, to), "Unable to convert image to format %s", to);
return doConversion(from, to);
}
protected abstract <T> T doConversion(Image from, Class<T> to);
}
public static abstract class BaseToBufferedImageConverter<F extends BaseImageFile> extends BaseConverter {
public BaseToBufferedImageConverter(Class<F> c) {
super(c, BufferedImage.class);
}
@Override
protected <T> T doConversion(Image from, Class<T> to) {
F f = (F) from.get();
byte[] bytes = f.getBytes();
try(ByteArrayInputStream is = new ByteArrayInputStream(bytes)){
BufferedImage bi = ImageIO.read(is);
return (T) bi;
} catch (IOException e){
throw new DataLoadingException("Error converting " + cFrom.getClass().getSimpleName() + " to BufferedImage", e);
}
}
}
public static class JpegToBufferedImageConverter extends BaseToBufferedImageConverter<Jpeg> {
public JpegToBufferedImageConverter() {
super(Jpeg.class);
}
}
public static class PngToBufferedImageConverter extends BaseToBufferedImageConverter<Png> {
public PngToBufferedImageConverter() {
super(Png.class);
}
}
public static class BmpToBufferedImageConverter extends BaseToBufferedImageConverter<Bmp> {
public BmpToBufferedImageConverter() {
super(Bmp.class);
}
}
public static class GifToBufferedImageConverter extends BaseToBufferedImageConverter<Gif> {
public GifToBufferedImageConverter() {
super(Gif.class);
}
}
public static abstract class BaseBufferedImageToOtherConverter<ToFormat extends BaseImageFile> extends BaseConverter {
public BaseBufferedImageToOtherConverter(Class<ToFormat> to) {
super(BufferedImage.class, to);
}
protected abstract String formatName();
protected abstract ToFormat get(byte[] bytes);
@Override
protected <T> T doConversion(Image from, Class<T> to) {
BufferedImage bi = (BufferedImage) from.get();
bi = removeAlpha(bi);
ByteArrayOutputStream os = new ByteArrayOutputStream();
try {
ImageIO.write(bi, formatName(), os);
} catch (IOException e){
throw new DataConversionException("Error converting BufferedImage to " + formatName(), e);
}
byte[] bytes = os.toByteArray();
return (T) get(bytes);
}
}
public static class BufferedImageToPngConverter extends BaseBufferedImageToOtherConverter<Png> {
public BufferedImageToPngConverter() {
super(Png.class);
}
@Override
protected String formatName() {
return "png";
}
@Override
protected Png get(byte[] bytes) {
return new Png(bytes);
}
}
public static class BufferedImageToJpgConverter extends BaseBufferedImageToOtherConverter<Jpeg> {
public BufferedImageToJpgConverter() {
super(Jpeg.class);
}
@Override
protected String formatName() {
return "jpg";
}
@Override
protected Jpeg get(byte[] bytes) {
return new Jpeg(bytes);
}
}
public static class BufferedImageToBmpConverter extends BaseBufferedImageToOtherConverter<Bmp> {
public BufferedImageToBmpConverter() {
super(Bmp.class);
}
@Override
protected String formatName() {
return "bmp";
}
@Override
protected Bmp get(byte[] bytes) {
return new Bmp(bytes);
}
}
public static class BufferedImageToGifConverter extends BaseBufferedImageToOtherConverter<Gif> {
public BufferedImageToGifConverter() {
super(Gif.class);
}
@Override
protected String formatName() {
return "gif";
}
@Override
protected Gif get(byte[] bytes) {
return new Gif(bytes);
}
}
public static class JpegToPngImageConverter extends BaseConverter {
public JpegToPngImageConverter() {
super(Jpeg.class, Png.class);
}
@Override
protected <T> T doConversion(Image from, Class<T> to) {
BufferedImage bi = from.getAs(BufferedImage.class);
Png g = Image.create(bi).getAs(Png.class);
return (T) g;
}
}
public static class PngToJpegConverter extends BaseConverter {
public PngToJpegConverter() {
super(Png.class, Jpeg.class);
}
@Override
protected <T> T doConversion(Image from, Class<T> to) {
BufferedImage bi = from.getAs(BufferedImage.class);
Jpeg j = Image.create(bi).getAs(Jpeg.class);
return (T) j;
}
}
public static class BmpToPngImageConverter extends BaseConverter {
public BmpToPngImageConverter() {
super(Bmp.class, Png.class);
}
@Override
protected <T> T doConversion(Image from, Class<T> to) {
BufferedImage bi = from.getAs(BufferedImage.class);
Png g = Image.create(bi).getAs(Png.class);
return (T) g;
}
}
public static class PngToBmpConverter extends BaseConverter {
public PngToBmpConverter() {
super(Png.class, Bmp.class);
}
@Override
protected <T> T doConversion(Image from, Class<T> to) {
BufferedImage bi = from.getAs(BufferedImage.class);
Bmp j = Image.create(bi).getAs(Bmp.class);
return (T) j;
}
}
public static class GifToPngImageConverter extends BaseConverter {
public GifToPngImageConverter() {
super(Gif.class, Png.class);
}
@Override
protected <T> T doConversion(Image from, Class<T> to) {
BufferedImage bi = from.getAs(BufferedImage.class);
Png g = Image.create(bi).getAs(Png.class);
return (T) g;
}
}
public static class PngToGifConverter extends BaseConverter {
public PngToGifConverter() {
super(Png.class, Gif.class);
}
@Override
protected <T> T doConversion(Image from, Class<T> to) {
BufferedImage bi = from.getAs(BufferedImage.class);
Gif j = Image.create(bi).getAs(Gif.class);
return (T) j;
}
}
public static BufferedImage removeAlpha(BufferedImage in){
if(!in.getColorModel().hasAlpha())
return in;
BufferedImage out = new BufferedImage(in.getWidth(), in.getHeight(), BufferedImage.TYPE_INT_RGB);
Graphics2D g = out.createGraphics();
g.setColor(Color.BLACK);
g.fillRect(0, 0, in.getWidth(), in.getHeight());
g.drawImage(in, 0, 0, null);
g.dispose();
return out;
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/format/JavaImageFactory.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.format;
import ai.konduit.serving.pipeline.api.data.Image;
import ai.konduit.serving.pipeline.api.exception.DataLoadingException;
import ai.konduit.serving.pipeline.api.format.ImageFactory;
import ai.konduit.serving.pipeline.impl.data.image.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.nio.file.Path;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
public class JavaImageFactory implements ImageFactory {
private static final Set<Class<?>> supportedClasses = new HashSet<>();
static {
Set<Class<?>> s = supportedClasses;
s.add(File.class);
s.add(Path.class);
s.add(Png.class);
s.add(Jpeg.class);
s.add(Bmp.class);
s.add(BufferedImage.class);
}
@Override
public Set<Class<?>> supportedTypes() {
return Collections.unmodifiableSet(supportedClasses);
}
@Override
public boolean canCreateFrom(Object o) {
//TODO what about interfaces, subtypes etc?
return supportedClasses.contains(o.getClass());
}
@Override
public Image create(Object o) {
if(o instanceof File || o instanceof Path){
//Try to infer file type from
File f;
if(o instanceof File){
f = (File) o;
} else {
f = ((Path)o).toFile();
}
String name = f.getName().toLowerCase();
if(name.endsWith(".png")){
return new PngImage(new Png(f));
} else if(name.endsWith(".jpg") || name.endsWith(".jpeg")){
return new JpegImage(new Jpeg(f));
} else if(name.endsWith(".bmp")){
return new BmpImage(new Bmp(f));
}
throw new DataLoadingException("Unable to create Image object: unable to guess image file format from File" +
" path/filename, or format not supported - " + f.getAbsolutePath());
} else if(o instanceof Png) {
return new PngImage((Png) o);
} else if(o instanceof Jpeg){
return new JpegImage((Jpeg)o);
} else if(o instanceof Bmp){
return new BmpImage((Bmp)o);
} else if(o instanceof BufferedImage){
return new BImage((BufferedImage) o);
} else {
throw new UnsupportedOperationException("Unable to create Image from object of type: " + o.getClass());
}
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/format/JavaNDArrayConverters.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.format;
import ai.konduit.serving.pipeline.api.data.NDArray;
import ai.konduit.serving.pipeline.api.data.NDArrayType;
import ai.konduit.serving.pipeline.api.data.ValueType;
import ai.konduit.serving.pipeline.impl.data.ndarray.SerializedNDArray;
import ai.konduit.serving.pipeline.api.format.NDArrayConverter;
import ai.konduit.serving.pipeline.api.format.NDArrayFormat;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nd4j.common.base.Preconditions;
import java.nio.*;
@Slf4j
public class JavaNDArrayConverters {
private JavaNDArrayConverters(){ }
public static class IdentityConverter implements NDArrayConverter {
@Override
public boolean canConvert(NDArray from, NDArrayFormat<?> to) {
return false;
}
@Override
public boolean canConvert(NDArray from, Class<?> to) {
return to.isAssignableFrom(from.get().getClass());
}
@Override
public <T> T convert(NDArray from, NDArrayFormat<T> to) {
throw new UnsupportedOperationException("Not supported");
}
@Override
public <T> T convert(NDArray from, Class<T> to) {
Preconditions.checkState(canConvert(from, to), "Unable to convert %s to %s", from.get().getClass(), to);
return (T)from.get();
}
}
public static class FloatToSerializedConverter implements NDArrayConverter {
@Override
public boolean canConvert(NDArray from, NDArrayFormat to) {
return false;
}
@Override
public boolean canConvert(NDArray from, Class<?> to) {
if(SerializedNDArray.class == to){
Object o = from.get();
return o instanceof float[] ||
o instanceof float[][] ||
o instanceof float[][][] ||
o instanceof float[][][][] ||
o instanceof float[][][][][];
}
return false;
}
@Override
public <T> T convert(NDArray from, NDArrayFormat<T> to) {
throw new UnsupportedOperationException("Not supported: conversion to " + to);
}
@Override
public <T> T convert(NDArray from, Class<T> to) {
Preconditions.checkState(canConvert(from, to), "Not able to convert: %s to %s", from, to);
Object o = from.get();
long[] shape = shape(o);
ByteBuffer bb = flatten(o);
return (T)new SerializedNDArray(NDArrayType.FLOAT, shape, bb);
}
private ByteBuffer flatten(Object o){
long[] shape = shape(o);
long prod = shape.length == 0 ? 0 : 1;
for(long l : shape)
prod *= l;
long bufferLength = prod * 4L; //Float = 4 bytes per element
Preconditions.checkState(prod < Integer.MAX_VALUE, "More than 2 billion bytes in Java float array - unable to convert to SerializedNDArray");
ByteBuffer bb = ByteBuffer.allocateDirect((int)bufferLength).order(ByteOrder.LITTLE_ENDIAN);
FloatBuffer fb = bb.asFloatBuffer();
int rank = rank(o);
switch (rank){
case 1:
fb.put((float[])o);
break;
case 2:
put((float[][])o, fb);
break;
case 3:
put((float[][][])o, fb);
break;
case 4:
put((float[][][][])o, fb);
break;
case 5:
put((float[][][][][])o, fb);
break;
default:
throw new IllegalStateException("Unable to convert: " + o.getClass());
}
return bb;
}
private int rank(Object o){
if(o instanceof float[]) {
return 1;
} else if(o instanceof float[][]) {
return 2;
} else if(o instanceof float[][][]) {
return 3;
} else if(o instanceof float[][][][]) {
return 4;
} else if(o instanceof float[][][][][]) {
return 5;
}
throw new UnsupportedOperationException();
}
private long[] shape(Object o) {
int rank = rank(o);
if(rank == 1) {
float[] f = (float[])o;
return new long[]{f.length};
} else if(o instanceof float[][]) {
float[][] f = (float[][])o;
return new long[]{f.length, f[0].length};
} else if(o instanceof float[][][]) {
float[][][] f3 = (float[][][])o;
return new long[]{f3.length, f3[0].length, f3[0][0].length};
} else if(o instanceof float[][][][]) {
float[][][][] f4 = (float[][][][])o;
return new long[]{f4.length, f4[0].length, f4[0][0].length, f4[0][0][0].length};
} else if(o instanceof float[][][][][]) {
float[][][][][] f5 = (float[][][][][])o;
return new long[]{f5.length, f5[0].length, f5[0][0].length, f5[0][0][0].length, f5[0][0][0][0].length};
}
throw new UnsupportedOperationException("All values are null");
}
private void put(float[][] toAdd, FloatBuffer fb){
for( int i=0; i<toAdd.length; i++ ){
fb.put(toAdd[i]);
}
}
private void put(float[][][] toAdd, FloatBuffer fb){
for(int i=0; i<toAdd.length; i++ ){
put(toAdd[i], fb);
}
}
private void put(float[][][][] toAdd, FloatBuffer fb){
for(int i=0; i<toAdd.length; i++ ){
put(toAdd[i], fb);
}
}
private void put(float[][][][][] toAdd, FloatBuffer fb){
for(int i=0; i<toAdd.length; i++ ){
put(toAdd[i], fb);
}
}
}
public static class DoubleToSerializedConverter implements NDArrayConverter {
@Override
public boolean canConvert(NDArray from, NDArrayFormat to) {
return false;
}
@Override
public boolean canConvert(NDArray from, Class<?> to) {
if(SerializedNDArray.class == to){
Object o = from.get();
return o instanceof double[] ||
o instanceof double[][] ||
o instanceof double[][][] ||
o instanceof double[][][][] ||
o instanceof double[][][][][];
}
return false;
}
@Override
public <T> T convert(NDArray from, NDArrayFormat<T> to) {
throw new UnsupportedOperationException("Not supported: conversion to " + to);
}
@Override
public <T> T convert(NDArray from, Class<T> to) {
Preconditions.checkState(canConvert(from, to), "Not able to convert: %s to %s", from, to);
Object o = from.get();
long[] shape = shape(o);
ByteBuffer bb = flatten(o);
return (T)new SerializedNDArray(NDArrayType.DOUBLE, shape, bb);
}
private ByteBuffer flatten(Object o){
long[] shape = shape(o);
long prod = shape.length == 0 ? 0 : 1;
for(long l : shape)
prod *= l;
long bufferLength = prod * 8L; //Double = 8 bytes per element
Preconditions.checkState(prod < Integer.MAX_VALUE, "More than 2 billion bytes in Java double array - unable to convert to SerializedNDArray");
ByteBuffer bb = ByteBuffer.allocateDirect((int)bufferLength).order(ByteOrder.LITTLE_ENDIAN);
DoubleBuffer fb = bb.asDoubleBuffer();
int rank = rank(o);
switch (rank){
case 1:
fb.put((double[])o);
break;
case 2:
put((double[][])o, fb);
break;
case 3:
put((double[][][])o, fb);
break;
case 4:
put((double[][][][])o, fb);
break;
case 5:
put((double[][][][][])o, fb);
break;
default:
throw new IllegalStateException("Unable to convert: " + o.getClass());
}
return bb;
}
private int rank(Object o){
if(o instanceof double[]) {
return 1;
} else if(o instanceof double[][]) {
return 2;
} else if(o instanceof double[][][]) {
return 3;
} else if(o instanceof double[][][][]) {
return 4;
} else if(o instanceof double[][][][][]) {
return 5;
}
throw new UnsupportedOperationException();
}
private long[] shape(Object o) {
int rank = rank(o);
if(rank == 1) {
double[] f = (double[])o;
return new long[]{f.length};
} else if(o instanceof double[][]) {
double[][] f = (double[][])o;
return new long[]{f.length, f[0].length};
} else if(o instanceof double[][][]) {
double[][][] f3 = (double[][][])o;
return new long[]{f3.length, f3[0].length, f3[0][0].length};
} else if(o instanceof double[][][][]) {
double[][][][] f4 = (double[][][][])o;
return new long[]{f4.length, f4[0].length, f4[0][0].length, f4[0][0][0].length};
} else if(o instanceof double[][][][][]) {
double[][][][][] f5 = (double[][][][][])o;
return new long[]{f5.length, f5[0].length, f5[0][0].length, f5[0][0][0].length, f5[0][0][0][0].length};
}
throw new UnsupportedOperationException("All values are null");
}
private void put(double[][] toAdd, DoubleBuffer db){
for( int i=0; i<toAdd.length; i++ ){
db.put(toAdd[i]);
}
}
private void put(double[][][] toAdd, DoubleBuffer db){
for(int i=0; i<toAdd.length; i++ ){
put(toAdd[i], db);
}
}
private void put(double[][][][] toAdd, DoubleBuffer db){
for(int i=0; i<toAdd.length; i++ ){
put(toAdd[i], db);
}
}
private void put(double[][][][][] toAdd, DoubleBuffer db){
for(int i=0; i<toAdd.length; i++ ){
put(toAdd[i], db);
}
}
}
public static class ByteToSerializedConverter implements NDArrayConverter {
@Override
public boolean canConvert(NDArray from, NDArrayFormat to) {
return false;
}
@Override
public boolean canConvert(NDArray from, Class<?> to) {
if(SerializedNDArray.class == to){
Object o = from.get();
return o instanceof byte[] ||
o instanceof byte[][] ||
o instanceof byte[][][] ||
o instanceof byte[][][][] ||
o instanceof byte[][][][][];
}
return false;
}
@Override
public <T> T convert(NDArray from, NDArrayFormat<T> to) {
throw new UnsupportedOperationException("Not supported: conversion to " + to);
}
@Override
public <T> T convert(NDArray from, Class<T> to) {
Preconditions.checkState(canConvert(from, to), "Not able to convert: %s to %s", from, to);
Object o = from.get();
long[] shape = shape(o);
ByteBuffer bb = flatten(o);
return (T)new SerializedNDArray(NDArrayType.INT8, shape, bb);
}
private ByteBuffer flatten(Object o){
long[] shape = shape(o);
long prod = shape.length == 0 ? 0 : 1;
for(long l : shape)
prod *= l;
long bufferLength = prod * 1L; //Float = 4 bytes per element
Preconditions.checkState(prod < Integer.MAX_VALUE, "More than 2 billion bytes in Java byte array - unable to convert to SerializedNDArray");
ByteBuffer bb = ByteBuffer.allocateDirect((int)bufferLength).order(ByteOrder.LITTLE_ENDIAN);
//ByteBuffer byteBuffer = bb.asReadOnlyBuffer();
int rank = rank(o);
switch (rank){
case 1:
bb.put((byte[])o);
break;
case 2:
put((byte[][])o, bb);
break;
case 3:
put((byte[][][])o, bb);
break;
case 4:
put((byte[][][][])o, bb);
break;
case 5:
put((byte[][][][][])o, bb);
break;
default:
throw new IllegalStateException("Unable to convert: " + o.getClass());
}
return bb;
}
private int rank(Object o){
if(o instanceof byte[]) {
return 1;
} else if(o instanceof byte[][]) {
return 2;
} else if(o instanceof byte[][][]) {
return 3;
} else if(o instanceof byte[][][][]) {
return 4;
} else if(o instanceof byte[][][][][]) {
return 5;
}
throw new UnsupportedOperationException();
}
private long[] shape(Object o) {
int rank = rank(o);
if(rank == 1) {
byte[] f = (byte[])o;
return new long[]{f.length};
} else if(o instanceof byte[][]) {
byte[][] f = (byte[][])o;
return new long[]{f.length, f[0].length};
} else if(o instanceof byte[][][]) {
byte[][][] f3 = (byte[][][])o;
return new long[]{f3.length, f3[0].length, f3[0][0].length};
} else if(o instanceof byte[][][][]) {
byte[][][][] f4 = (byte[][][][])o;
return new long[]{f4.length, f4[0].length, f4[0][0].length, f4[0][0][0].length};
} else if(o instanceof byte[][][][][]) {
byte[][][][][] f5 = (byte[][][][][])o;
return new long[]{f5.length, f5[0].length, f5[0][0].length, f5[0][0][0].length, f5[0][0][0][0].length};
}
throw new UnsupportedOperationException("All values are null");
}
private void put(byte[][] toAdd, ByteBuffer byteBuffer){
for( int i=0; i<toAdd.length; i++ ){
byteBuffer.put(toAdd[i]);
}
}
private void put(byte[][][] toAdd, ByteBuffer byteBuffer){
for(int i=0; i<toAdd.length; i++ ){
put(toAdd[i], byteBuffer);
}
}
private void put(byte[][][][] toAdd, ByteBuffer byteBuffer){
for(int i=0; i<toAdd.length; i++ ){
put(toAdd[i], byteBuffer);
}
}
private void put(byte[][][][][] toAdd, ByteBuffer byteBuffer){
for(int i=0; i<toAdd.length; i++ ){
put(toAdd[i], byteBuffer);
}
}
}
public static class ShortToSerializedConverter implements NDArrayConverter {
@Override
public boolean canConvert(NDArray from, NDArrayFormat to) {
return false;
}
@Override
public boolean canConvert(NDArray from, Class<?> to) {
if(SerializedNDArray.class == to){
Object o = from.get();
return o instanceof short[] ||
o instanceof short[][] ||
o instanceof short[][][] ||
o instanceof short[][][][] ||
o instanceof short[][][][][];
}
return false;
}
@Override
public <T> T convert(NDArray from, NDArrayFormat<T> to) {
throw new UnsupportedOperationException("Not supported: conversion to " + to);
}
@Override
public <T> T convert(NDArray from, Class<T> to) {
Preconditions.checkState(canConvert(from, to), "Not able to convert: %s to %s", from, to);
Object o = from.get();
long[] shape = shape(o);
ByteBuffer bb = flatten(o);
return (T)new SerializedNDArray(NDArrayType.INT16, shape, bb);
}
private ByteBuffer flatten(Object o){
long[] shape = shape(o);
long prod = shape.length == 0 ? 0 : 1;
for(long l : shape)
prod *= l;
long bufferLength = prod * 4L; //Float = 4 bytes per element
Preconditions.checkState(prod < Integer.MAX_VALUE, "More than 2 billion bytes in Java short array - unable to convert to SerializedNDArray");
ByteBuffer bb = ByteBuffer.allocateDirect((int)bufferLength).order(ByteOrder.LITTLE_ENDIAN);
ShortBuffer sb = bb.asShortBuffer();
int rank = rank(o);
switch (rank){
case 1:
sb.put((short[])o);
break;
case 2:
put((short[][])o, sb);
break;
case 3:
put((short[][][])o, sb);
break;
case 4:
put((short[][][][])o, sb);
break;
case 5:
put((short[][][][][])o, sb);
break;
default:
throw new IllegalStateException("Unable to convert: " + o.getClass());
}
return bb;
}
private int rank(Object o){
if(o instanceof short[]) {
return 1;
} else if(o instanceof short[][]) {
return 2;
} else if(o instanceof short[][][]) {
return 3;
} else if(o instanceof short[][][][]) {
return 4;
} else if(o instanceof short[][][][][]) {
return 5;
}
throw new UnsupportedOperationException();
}
private long[] shape(Object o) {
int rank = rank(o);
if(rank == 1) {
short[] f = (short[])o;
return new long[]{f.length};
} else if(o instanceof short[][]) {
short[][] f = (short[][])o;
return new long[]{f.length, f[0].length};
} else if(o instanceof short[][][]) {
short[][][] f3 = (short[][][])o;
return new long[]{f3.length, f3[0].length, f3[0][0].length};
} else if(o instanceof short[][][][]) {
short[][][][] f4 = (short[][][][])o;
return new long[]{f4.length, f4[0].length, f4[0][0].length, f4[0][0][0].length};
} else if(o instanceof short[][][][][]) {
short[][][][][] f5 = (short[][][][][])o;
return new long[]{f5.length, f5[0].length, f5[0][0].length, f5[0][0][0].length, f5[0][0][0][0].length};
}
throw new UnsupportedOperationException("All values are null");
}
private void put(short[][] toAdd, ShortBuffer sb){
for( int i=0; i<toAdd.length; i++ ){
sb.put(toAdd[i]);
}
}
private void put(short[][][] toAdd, ShortBuffer sb){
for(int i=0; i<toAdd.length; i++ ){
put(toAdd[i], sb);
}
}
private void put(short[][][][] toAdd, ShortBuffer sb){
for(int i=0; i<toAdd.length; i++ ){
put(toAdd[i], sb);
}
}
private void put(short[][][][][] toAdd, ShortBuffer sb){
for(int i=0; i<toAdd.length; i++ ){
put(toAdd[i], sb);
}
}
}
public static class IntToSerializedConverter implements NDArrayConverter {
@Override
public boolean canConvert(NDArray from, NDArrayFormat to) {
return false;
}
@Override
public boolean canConvert(NDArray from, Class<?> to) {
if(SerializedNDArray.class == to){
Object o = from.get();
return o instanceof int[] ||
o instanceof int[][] ||
o instanceof int[][][] ||
o instanceof int[][][][] ||
o instanceof int[][][][][];
}
return false;
}
@Override
public <T> T convert(NDArray from, NDArrayFormat<T> to) {
throw new UnsupportedOperationException("Not supported: conversion to " + to);
}
@Override
public <T> T convert(NDArray from, Class<T> to) {
Preconditions.checkState(canConvert(from, to), "Not able to convert: %s to %s", from, to);
Object o = from.get();
long[] shape = shape(o);
ByteBuffer bb = flatten(o);
return (T)new SerializedNDArray(NDArrayType.INT32, shape, bb);
}
private ByteBuffer flatten(Object o){
long[] shape = shape(o);
long prod = shape.length == 0 ? 0 : 1;
for(long l : shape)
prod *= l;
long bufferLength = prod * 32L; //Float = 4 bytes per element
Preconditions.checkState(prod < Integer.MAX_VALUE, "More than 2 billion bytes in Java int array - unable to convert to SerializedNDArray");
ByteBuffer bb = ByteBuffer.allocateDirect((int)bufferLength).order(ByteOrder.LITTLE_ENDIAN);
IntBuffer ib = bb.asIntBuffer();
int rank = rank(o);
switch (rank){
case 1:
ib.put((int[])o);
break;
case 2:
put((int[][])o, ib);
break;
case 3:
put((int[][][])o, ib);
break;
case 4:
put((int[][][][])o, ib);
break;
case 5:
put((int[][][][][])o, ib);
break;
default:
throw new IllegalStateException("Unable to convert: " + o.getClass());
}
return bb;
}
private int rank(Object o){
if(o instanceof int[]) {
return 1;
} else if(o instanceof int[][]) {
return 2;
} else if(o instanceof int[][][]) {
return 3;
} else if(o instanceof int[][][][]) {
return 4;
} else if(o instanceof int[][][][][]) {
return 5;
}
throw new UnsupportedOperationException();
}
private long[] shape(Object o) {
int rank = rank(o);
if(rank == 1) {
int[] f = (int[])o;
return new long[]{f.length};
} else if(o instanceof int[][]) {
int[][] f = (int[][])o;
return new long[]{f.length, f[0].length};
} else if(o instanceof int[][][]) {
int[][][] f3 = (int[][][])o;
return new long[]{f3.length, f3[0].length, f3[0][0].length};
} else if(o instanceof int[][][][]) {
int[][][][] f4 = (int[][][][])o;
return new long[]{f4.length, f4[0].length, f4[0][0].length, f4[0][0][0].length};
} else if(o instanceof int[][][][][]) {
int[][][][][] f5 = (int[][][][][])o;
return new long[]{f5.length, f5[0].length, f5[0][0].length, f5[0][0][0].length, f5[0][0][0][0].length};
}
throw new UnsupportedOperationException("All values are null");
}
private void put(int[][] toAdd, IntBuffer ib){
for( int i=0; i<toAdd.length; i++ ){
ib.put(toAdd[i]);
}
}
private void put(int[][][] toAdd, IntBuffer ib){
for(int i=0; i<toAdd.length; i++ ){
put(toAdd[i], ib);
}
}
private void put(int[][][][] toAdd, IntBuffer ib){
for(int i=0; i<toAdd.length; i++ ){
put(toAdd[i], ib);
}
}
private void put(int[][][][][] toAdd, IntBuffer ib){
for(int i=0; i<toAdd.length; i++ ){
put(toAdd[i], ib);
}
}
}
public static class LongToSerializedConverter implements NDArrayConverter {
@Override
public boolean canConvert(NDArray from, NDArrayFormat to) {
return false;
}
@Override
public boolean canConvert(NDArray from, Class<?> to) {
if(SerializedNDArray.class == to){
Object o = from.get();
return o instanceof long[] ||
o instanceof long[][] ||
o instanceof long[][][] ||
o instanceof long[][][][] ||
o instanceof long[][][][][];
}
return false;
}
@Override
public <T> T convert(NDArray from, NDArrayFormat<T> to) {
throw new UnsupportedOperationException("Not supported: conversion to " + to);
}
@Override
public <T> T convert(NDArray from, Class<T> to) {
Preconditions.checkState(canConvert(from, to), "Not able to convert: %s to %s", from, to);
Object o = from.get();
long[] shape = shape(o);
ByteBuffer bb = flatten(o);
return (T)new SerializedNDArray(NDArrayType.INT64, shape, bb);
}
private ByteBuffer flatten(Object o){
long[] shape = shape(o);
long prod = shape.length == 0 ? 0 : 1;
for(long l : shape)
prod *= l;
long bufferLength = prod * 64L; //Float = 4 bytes per element
Preconditions.checkState(prod < Integer.MAX_VALUE, "More than 2 billion bytes in Java long array - unable to convert to SerializedNDArray");
ByteBuffer bb = ByteBuffer.allocateDirect((int)bufferLength).order(ByteOrder.LITTLE_ENDIAN);
LongBuffer lb = bb.asLongBuffer();
int rank = rank(o);
switch (rank){
case 1:
lb.put((long[])o);
break;
case 2:
put((long[][])o, lb);
break;
case 3:
put((long[][][])o, lb);
break;
case 4:
put((long[][][][])o, lb);
break;
case 5:
put((long[][][][][])o, lb);
break;
default:
throw new IllegalStateException("Unable to convert: " + o.getClass());
}
return bb;
}
private int rank(Object o){
if(o instanceof long[]) {
return 1;
} else if(o instanceof long[][]) {
return 2;
} else if(o instanceof long[][][]) {
return 3;
} else if(o instanceof long[][][][]) {
return 4;
} else if(o instanceof long[][][][][]) {
return 5;
}
throw new UnsupportedOperationException();
}
private long[] shape(Object o) {
int rank = rank(o);
if(rank == 1) {
long[] f = (long[])o;
return new long[]{f.length};
} else if(o instanceof long[][]) {
long[][] f = (long[][])o;
return new long[]{f.length, f[0].length};
} else if(o instanceof long[][][]) {
long[][][] f3 = (long[][][])o;
return new long[]{f3.length, f3[0].length, f3[0][0].length};
} else if(o instanceof long[][][][]) {
long[][][][] f4 = (long[][][][])o;
return new long[]{f4.length, f4[0].length, f4[0][0].length, f4[0][0][0].length};
} else if(o instanceof long[][][][][]) {
long[][][][][] f5 = (long[][][][][])o;
return new long[]{f5.length, f5[0].length, f5[0][0].length, f5[0][0][0].length, f5[0][0][0][0].length};
}
throw new UnsupportedOperationException("All values are null");
}
private void put(long[][] toAdd, LongBuffer lb){
for( int i=0; i<toAdd.length; i++ ){
lb.put(toAdd[i]);
}
}
private void put(long[][][] toAdd, LongBuffer lb){
for(int i=0; i<toAdd.length; i++ ){
put(toAdd[i], lb);
}
}
private void put(long[][][][] toAdd, LongBuffer lb){
for(int i=0; i<toAdd.length; i++ ){
put(toAdd[i], lb);
}
}
private void put(long[][][][][] toAdd, LongBuffer lb){
for(int i = 0; i < toAdd.length; i++) {
put(toAdd[i], lb);
}
}
}
@AllArgsConstructor
protected abstract static class BaseS2FConverter implements NDArrayConverter {
private Class<?> c;
private int rank;
@Override
public boolean canConvert(NDArray from, NDArrayFormat to) {
return false;
}
@Override
public <T> T convert(NDArray from, NDArrayFormat<T> to) {
throw new UnsupportedOperationException("Not supported: Conversion to " + to);
}
@Override
public boolean canConvert(NDArray from, Class<?> to) {
if(to != c)
return false;
if(!(from.get() instanceof SerializedNDArray)){
return false;
}
SerializedNDArray arr = (SerializedNDArray)from.get();
if(arr.getShape().length != rank)
return false;
if(arr.getType() != sourceType()) {
log.warn("Tried to convert a type of " + arr.getType() + " to " + sourceType() + " consider converting the data type explicitly. We disallow implicit conversion due to performance reasons. ");
}
return arr.getType() == sourceType();
}
abstract protected NDArrayType sourceType();
@Override
public <T> T convert(NDArray from, Class<T> to) {
Preconditions.checkState(canConvert(from, to), "Unable to convert to format: %s", to);
return doConversion(from, to);
}
protected abstract <T> T doConversion(NDArray from, Class<T> to);
}
public static class SerializedToFloat1Converter extends BaseS2FConverter {
public SerializedToFloat1Converter() {
super(float[].class, 1);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
ByteBuffer byteBuffer = SerializedNDArray.resetSerializedNDArrayBuffer(sa);
FloatBuffer fb = sa.getBuffer().asFloatBuffer();
float[] out = new float[fb.remaining()];
fb.get(out);
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.FLOAT; }
}
public static class SerializedToFloat2Converter extends BaseS2FConverter {
public SerializedToFloat2Converter() {
super(float[][].class, 2);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
ByteBuffer byteBuffer = SerializedNDArray.resetSerializedNDArrayBuffer(sa);
FloatBuffer fb = sa.getBuffer().asFloatBuffer();
fb.position(0);
long[] shape = sa.getShape();
float[][] out = new float[(int) shape[0]][(int) shape[1]];
for(float[] f : out){
fb.get(f);
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.FLOAT; }
}
public static class SerializedToFloat3Converter extends BaseS2FConverter {
public SerializedToFloat3Converter() {
super(float[][][].class, 3);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
Buffer buffer = (Buffer) sa.getBuffer();
buffer.rewind();
FloatBuffer fb = sa.getBuffer().asFloatBuffer();
fb.position(0);
long[] shape = sa.getShape();
float[][][] out = new float[(int) shape[0]][(int) shape[1]][(int) shape[2]];
for(float[][] f : out){
for(float[] f2 : f) {
fb.get(f2);
}
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.FLOAT; }
}
public static class SerializedToFloat4Converter extends BaseS2FConverter {
public SerializedToFloat4Converter() {
super(float[][][][].class, 4);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
Buffer buffer = (Buffer) sa.getBuffer();
buffer.rewind();
FloatBuffer fb = sa.getBuffer().asFloatBuffer();
fb.position(0);
long[] shape = sa.getShape();
float[][][][] out = new float[(int) shape[0]][(int) shape[1]][(int) shape[2]][(int) shape[3]];
for(float[][][] f : out){
for(float[][] f2 : f) {
for(float[] f3 : f2) {
fb.get(f3);
}
}
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.FLOAT; }
}
public static class SerializedToFloat5Converter extends BaseS2FConverter {
public SerializedToFloat5Converter() {
super(float[][][][][].class, 5);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
Buffer buffer = sa.getBuffer();
buffer.rewind();
FloatBuffer fb = sa.getBuffer().asFloatBuffer();
fb.position(0);
long[] shape = sa.getShape();
float[][][][][] out = new float[(int) shape[0]][(int) shape[1]][(int) shape[2]][(int) shape[3]][(int)shape[4]];
for(float[][][][] f : out){
for(float[][][] f2 : f) {
for(float[][] f3 : f2) {
for(float[] f4 : f3) {
fb.get(f4);
}
}
}
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.FLOAT; }
}
public static class SerializedToDouble1Converter extends BaseS2FConverter {
public SerializedToDouble1Converter() {
super(double[].class, 1);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
Buffer buffer = sa.getBuffer();
buffer.rewind();
DoubleBuffer db = sa.getBuffer().asDoubleBuffer();
double[] out = new double[db.remaining()];
db.get(out);
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.DOUBLE; }
}
public static class SerializedToDouble2Converter extends BaseS2FConverter {
public SerializedToDouble2Converter() {
super(double[][].class, 2);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
Buffer buffer = (Buffer) sa.getBuffer();
buffer.rewind();
DoubleBuffer fb = sa.getBuffer().asDoubleBuffer();
fb.position(0);
long[] shape = sa.getShape();
double[][] out = new double[(int) shape[0]][(int) shape[1]];
for(double[] f : out){
fb.get(f);
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.DOUBLE; }
}
public static class SerializedToDouble3Converter extends BaseS2FConverter {
public SerializedToDouble3Converter() {
super(double[][][].class, 3);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
Buffer buffer = (Buffer) sa.getBuffer();
buffer.rewind();
DoubleBuffer db = sa.getBuffer().asDoubleBuffer();
db.position(0);
long[] shape = sa.getShape();
double[][][] out = new double[(int) shape[0]][(int) shape[1]][(int) shape[2]];
for(double[][] f : out){
for(double[] f2 : f) {
db.get(f2);
}
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.DOUBLE; }
}
public static class SerializedToDouble4Converter extends BaseS2FConverter {
public SerializedToDouble4Converter() {
super(double[][][][].class, 4);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
Buffer buffer = sa.getBuffer();
buffer.rewind();
DoubleBuffer db = sa.getBuffer().asDoubleBuffer();
db.position(0);
long[] shape = sa.getShape();
double[][][][] out = new double[(int) shape[0]][(int) shape[1]][(int) shape[2]][(int) shape[3]];
for(double[][][] f : out){
for(double[][] f2 : f) {
for(double[] f3 : f2) {
db.get(f3);
}
}
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.DOUBLE; }
}
public static class SerializedToDouble5Converter extends BaseS2FConverter {
public SerializedToDouble5Converter() {
super(double[][][][][].class, 5);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
Buffer buffer = sa.getBuffer();
buffer.rewind();
DoubleBuffer db = sa.getBuffer().asDoubleBuffer();
db.position(0);
long[] shape = sa.getShape();
double[][][][][] out = new double[(int) shape[0]][(int) shape[1]][(int) shape[2]][(int) shape[3]][(int)shape[4]];
for(double[][][][] f : out){
for(double[][][] f2 : f) {
for(double[][] f3 : f2) {
for(double[] f4 : f3) {
db.get(f4);
}
}
}
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.DOUBLE; }
}
public static class SerializedToByte1Converter extends BaseS2FConverter {
public SerializedToByte1Converter() {
super(byte[].class, 1);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
Buffer buffer = sa.getBuffer();
buffer.rewind();
ByteBuffer byteBuffer = sa.getBuffer().asReadOnlyBuffer();
byte[] out = new byte[byteBuffer.remaining()];
byteBuffer.get(out);
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.INT8; }
}
public static class SerializedToByte2Converter extends BaseS2FConverter {
public SerializedToByte2Converter() {
super(byte[][].class, 2);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
ByteBuffer byteBuffer = SerializedNDArray.resetSerializedNDArrayBuffer(sa);
long[] shape = sa.getShape();
byte[][] out = new byte[(int) shape[0]][(int) shape[1]];
for(byte[] f : out){
byteBuffer.get(f);
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.INT8; }
}
public static class SerializedToByte3Converter extends BaseS2FConverter {
public SerializedToByte3Converter() {
super(byte[][][].class, 3);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
ByteBuffer byteBuffer = SerializedNDArray.resetSerializedNDArrayBuffer(sa);
long[] shape = sa.getShape();
byte[][][] out = new byte[(int) shape[0]][(int) shape[1]][(int) shape[2]];
for(byte[][] f : out){
for(byte[] f2 : f) {
byteBuffer.get(f2);
}
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.INT8; }
}
public static class SerializedToByte4Converter extends BaseS2FConverter {
public SerializedToByte4Converter() {
super(byte[][][][].class, 4);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
ByteBuffer byteBuffer = SerializedNDArray.resetSerializedNDArrayBuffer(sa);
long[] shape = sa.getShape();
byte[][][][] out = new byte[(int) shape[0]][(int) shape[1]][(int) shape[2]][(int) shape[3]];
for(byte[][][] f : out){
for(byte[][] f2 : f) {
for(byte[] f3 : f2) {
byteBuffer.get(f3);
}
}
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.INT8; }
}
public static class SerializedToByte5Converter extends BaseS2FConverter {
public SerializedToByte5Converter() {
super(byte[][][][][].class, 5);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
ByteBuffer byteBuffer = SerializedNDArray.resetSerializedNDArrayBuffer(sa);
long[] shape = sa.getShape();
byte[][][][][] out = new byte[(int) shape[0]][(int) shape[1]][(int) shape[2]][(int) shape[3]][(int)shape[4]];
for(byte[][][][] f : out){
for(byte[][][] f2 : f) {
for(byte[][] f3 : f2) {
for(byte[] f4 : f3) {
byteBuffer.get(f4);
}
}
}
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.INT8; }
}
public static class SerializedToShort1Converter extends BaseS2FConverter {
public SerializedToShort1Converter() {
super(short[].class, 1);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
ByteBuffer byteBuffer = SerializedNDArray.resetSerializedNDArrayBuffer(sa);
ShortBuffer sb = sa.getBuffer().asShortBuffer();
short[] out = new short[sb.remaining()];
sb.get(out);
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.INT16; }
}
public static class SerializedToShort2Converter extends BaseS2FConverter {
public SerializedToShort2Converter() {
super(short[][].class, 2);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
ByteBuffer byteBuffer = SerializedNDArray.resetSerializedNDArrayBuffer(sa);
ShortBuffer sb = sa.getBuffer().asShortBuffer();
sb.position(0);
long[] shape = sa.getShape();
short[][] out = new short[(int) shape[0]][(int) shape[1]];
for(short[] f : out){
sb.get(f);
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.INT16; }
}
public static class SerializedToShort3Converter extends BaseS2FConverter {
public SerializedToShort3Converter() {
super(short[][][].class, 3);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
ByteBuffer byteBuffer = SerializedNDArray.resetSerializedNDArrayBuffer(sa);
ShortBuffer sb = sa.getBuffer().asShortBuffer();
sb.position(0);
long[] shape = sa.getShape();
short[][][] out = new short[(int) shape[0]][(int) shape[1]][(int) shape[2]];
for(short[][] f : out){
for(short[] f2 : f) {
sb.get(f2);
}
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.INT16; }
}
public static class SerializedToShort4Converter extends BaseS2FConverter {
public SerializedToShort4Converter() {
super(short[][][][].class, 4);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
ByteBuffer byteBuffer = SerializedNDArray.resetSerializedNDArrayBuffer(sa);
ShortBuffer sb = sa.getBuffer().asShortBuffer();
sb.position(0);
long[] shape = sa.getShape();
short[][][][] out = new short[(int) shape[0]][(int) shape[1]][(int) shape[2]][(int) shape[3]];
for(short[][][] f : out){
for(short[][] f2 : f) {
for(short[] f3 : f2) {
sb.get(f3);
}
}
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.INT16; }
}
public static class SerializedToShort5Converter extends BaseS2FConverter {
public SerializedToShort5Converter() {
super(short[][][][][].class, 5);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
ByteBuffer byteBuffer = SerializedNDArray.resetSerializedNDArrayBuffer(sa);
ShortBuffer sb = sa.getBuffer().asShortBuffer();
sb.position(0);
long[] shape = sa.getShape();
short[][][][][] out = new short[(int) shape[0]][(int) shape[1]][(int) shape[2]][(int) shape[3]][(int)shape[4]];
for(short[][][][] f : out){
for(short[][][] f2 : f) {
for(short[][] f3 : f2) {
for(short[] f4 : f3) {
sb.get(f4);
}
}
}
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.INT16; }
}
public static class SerializedToInt1Converter extends BaseS2FConverter {
public SerializedToInt1Converter() {
super(int[].class, 1);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
ByteBuffer byteBuffer = SerializedNDArray.resetSerializedNDArrayBuffer(sa);
IntBuffer ib = sa.getBuffer().asIntBuffer();
int[] out = new int[ib.remaining()];
ib.get(out);
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.INT32; }
}
public static class SerializedToInt2Converter extends BaseS2FConverter {
public SerializedToInt2Converter() {
super(int[][].class, 2);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
ByteBuffer byteBuffer = SerializedNDArray.resetSerializedNDArrayBuffer(sa);
IntBuffer ib = sa.getBuffer().asIntBuffer();
ib.position(0);
long[] shape = sa.getShape();
int[][] out = new int[(int) shape[0]][(int) shape[1]];
for(int[] f : out){
ib.get(f);
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.INT32; }
}
public static class SerializedToInt3Converter extends BaseS2FConverter {
public SerializedToInt3Converter() {
super(int[][][].class, 3);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
ByteBuffer byteBuffer = SerializedNDArray.resetSerializedNDArrayBuffer(sa);
IntBuffer ib = sa.getBuffer().asIntBuffer();
ib.position(0);
long[] shape = sa.getShape();
int[][][] out = new int[(int) shape[0]][(int) shape[1]][(int) shape[2]];
for(int[][] f : out){
for(int[] f2 : f) {
ib.get(f2);
}
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.INT32; }
}
public static class SerializedToInt4Converter extends BaseS2FConverter {
public SerializedToInt4Converter() {
super(int[][][][].class, 4);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
ByteBuffer byteBuffer = SerializedNDArray.resetSerializedNDArrayBuffer(sa);
IntBuffer ib = sa.getBuffer().asIntBuffer();
ib.position(0);
long[] shape = sa.getShape();
int[][][][] out = new int[(int) shape[0]][(int) shape[1]][(int) shape[2]][(int) shape[3]];
for(int[][][] f : out){
for(int[][] f2 : f) {
for(int[] f3 : f2) {
ib.get(f3);
}
}
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.INT32; }
}
public static class SerializedToInt5Converter extends BaseS2FConverter {
public SerializedToInt5Converter() {
super(int[][][][][].class, 5);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
ByteBuffer byteBuffer = SerializedNDArray.resetSerializedNDArrayBuffer(sa);
IntBuffer ib = sa.getBuffer().asIntBuffer();
ib.position(0);
long[] shape = sa.getShape();
int[][][][][] out = new int[(int) shape[0]][(int) shape[1]][(int) shape[2]][(int) shape[3]][(int)shape[4]];
for(int[][][][] f : out){
for(int[][][] f2 : f) {
for(int[][] f3 : f2) {
for(int[] f4 : f3) {
ib.get(f4);
}
}
}
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.INT32; }
}
public static class SerializedToLong1Converter extends BaseS2FConverter {
public SerializedToLong1Converter() {
super(long[].class, 1);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
ByteBuffer byteBuffer = SerializedNDArray.resetSerializedNDArrayBuffer(sa);
LongBuffer lb = sa.getBuffer().asLongBuffer();
long[] out = new long[lb.remaining()];
lb.get(out);
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.INT64; }
}
public static class SerializedToLong2Converter extends BaseS2FConverter {
public SerializedToLong2Converter() {
super(long[][].class, 2);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
ByteBuffer byteBuffer = SerializedNDArray.resetSerializedNDArrayBuffer(sa);
LongBuffer lb = sa.getBuffer().asLongBuffer();
lb.position(0);
long[] shape = sa.getShape();
long[][] out = new long[(int) shape[0]][(int) shape[1]];
for(long[] f : out){
lb.get(f);
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.INT64; }
}
public static class SerializedToLong3Converter extends BaseS2FConverter {
public SerializedToLong3Converter() {
super(long[][][].class, 3);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
ByteBuffer byteBuffer = SerializedNDArray.resetSerializedNDArrayBuffer(sa);
LongBuffer lb = sa.getBuffer().asLongBuffer();
lb.position(0);
long[] shape = sa.getShape();
long[][][] out = new long[(int) shape[0]][(int) shape[1]][(int) shape[2]];
for(long[][] f : out){
for(long[] f2 : f) {
lb.get(f2);
}
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.INT64; }
}
public static class SerializedToLong4Converter extends BaseS2FConverter {
public SerializedToLong4Converter() {
super(long[][][][].class, 4);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
ByteBuffer byteBuffer = SerializedNDArray.resetSerializedNDArrayBuffer(sa);
LongBuffer lb = sa.getBuffer().asLongBuffer();
lb.position(0);
long[] shape = sa.getShape();
long[][][][] out = new long[(int) shape[0]][(int) shape[1]][(int) shape[2]][(int) shape[3]];
for(long[][][] f : out){
for(long[][] f2 : f) {
for(long[] f3 : f2) {
lb.get(f3);
}
}
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.INT64; }
}
public static class SerializedToLong5Converter extends BaseS2FConverter {
public SerializedToLong5Converter() {
super(long[][][][][].class, 5);
}
@Override
protected <T> T doConversion(NDArray from, Class<T> to){
SerializedNDArray sa = (SerializedNDArray) from.get();
ByteBuffer byteBuffer = SerializedNDArray.resetSerializedNDArrayBuffer(sa);
LongBuffer lb = sa.getBuffer().asLongBuffer();
lb.position(0);
long[] shape = sa.getShape();
long[][][][][] out = new long[(int) shape[0]][(int) shape[1]][(int) shape[2]][(int) shape[3]][(int)shape[4]];
for(long[][][][] f : out){
for(long[][][] f2 : f) {
for(long[][] f3 : f2) {
for(long[] f4 : f3) {
lb.get(f4);
}
}
}
}
return (T) out;
}
protected NDArrayType sourceType() { return NDArrayType.INT64; }
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/format/JavaNDArrayFactory.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.format;
import ai.konduit.serving.pipeline.api.data.NDArray;
import ai.konduit.serving.pipeline.impl.data.ndarray.SerializedNDArray;
import ai.konduit.serving.pipeline.api.format.NDArrayFactory;
import ai.konduit.serving.pipeline.impl.data.wrappers.ListValue;
import java.util.HashSet;
import java.util.Set;
public class JavaNDArrayFactory implements NDArrayFactory {
@Override
public Set<Class<?>> supportedTypes() {
Set<Class<?>> set = new HashSet<>();
set.add(float[].class);
set.add(float[][].class);
set.add(float[][][].class);
set.add(float[][][][].class);
set.add(float[][][][][].class);
set.add(double[].class);
set.add(double[][].class);
set.add(double[][][].class);
set.add(double[][][][].class);
set.add(double[][][][][].class);
set.add(byte[].class);
set.add(byte[][].class);
set.add(byte[][][].class);
set.add(byte[][][][].class);
set.add(byte[][][][][].class);
set.add(short[].class);
set.add(short[][].class);
set.add(short[][][].class);
set.add(short[][][][].class);
set.add(short[][][][][].class);
set.add(int[].class);
set.add(int[][].class);
set.add(int[][][].class);
set.add(int[][][][].class);
set.add(int[][][][][].class);
set.add(long[].class);
set.add(long[][].class);
set.add(long[][][].class);
set.add(long[][][][].class);
set.add(long[][][][][].class);
set.add(SerializedNDArray.class);
return set;
}
@Override
public boolean canCreateFrom(Object o) {
return supportedTypes().contains(o.getClass()); //TODO don't create set on every check
}
@Override
public NDArray create(Object o) {
if(o instanceof float[]){
return new JavaNDArrays.Float1Array((float[]) o);
} else if(o instanceof float[][]){
return new JavaNDArrays.Float2Array((float[][]) o);
} else if(o instanceof float[][][]){
return new JavaNDArrays.Float3Array((float[][][]) o);
} else if(o instanceof float[][][][]) {
return new JavaNDArrays.Float4Array((float[][][][]) o);
} else if(o instanceof float[][][][][]) {
return new JavaNDArrays.Float5Array((float[][][][][]) o);
} else if(o instanceof double[]){
return new JavaNDArrays.Double1Array((double[]) o);
} else if(o instanceof double[][]){
return new JavaNDArrays.Double2Array((double[][]) o);
} else if(o instanceof double[][][]){
return new JavaNDArrays.Double3Array((double[][][]) o);
} else if(o instanceof double[][][][]) {
return new JavaNDArrays.Double4Array((double[][][][]) o);
} else if(o instanceof double[][][][][]) {
return new JavaNDArrays.Double5Array((double[][][][][]) o);
} else if(o instanceof byte[]){
return new JavaNDArrays.Int81Array((byte[]) o);
} else if(o instanceof byte[][]){
return new JavaNDArrays.Int82Array((byte[][]) o);
} else if(o instanceof byte[][][]){
return new JavaNDArrays.Int83Array((byte[][][]) o);
} else if(o instanceof byte[][][][]) {
return new JavaNDArrays.Int84Array((byte[][][][]) o);
} else if(o instanceof byte[][][][][]) {
return new JavaNDArrays.Int85Array((byte[][][][][]) o);
} else if(o instanceof short[]){
return new JavaNDArrays.Int161Array((short[]) o);
} else if(o instanceof short[][]){
return new JavaNDArrays.Int162Array((short[][]) o);
} else if(o instanceof short[][][]){
return new JavaNDArrays.Int163Array((short[][][]) o);
} else if(o instanceof short[][][][]) {
return new JavaNDArrays.Int164Array((short[][][][]) o);
} else if(o instanceof short[][][][][]) {
return new JavaNDArrays.Int165Array((short[][][][][]) o);
} else if(o instanceof int[]){
return new JavaNDArrays.Int321Array((int[]) o);
} else if(o instanceof int[][]){
return new JavaNDArrays.Int322Array((int[][]) o);
} else if(o instanceof int[][][]){
return new JavaNDArrays.Int323Array((int[][][]) o);
} else if(o instanceof int[][][][]) {
return new JavaNDArrays.Int324Array((int[][][][]) o);
} else if(o instanceof int[][][][][]) {
return new JavaNDArrays.Int325Array((int[][][][][]) o);
} else if(o instanceof long[]){
return new JavaNDArrays.Int641Array((long[]) o);
} else if(o instanceof long[][]){
return new JavaNDArrays.Int642Array((long[][]) o);
} else if(o instanceof long[][][]){
return new JavaNDArrays.Int643Array((long[][][]) o);
} else if(o instanceof long[][][][]) {
return new JavaNDArrays.Int644Array((long[][][][]) o);
} else if(o instanceof long[][][][][]) {
return new JavaNDArrays.Int645Array((long[][][][][]) o);
} else if(o instanceof SerializedNDArray) {
return new JavaNDArrays.SNDArray((SerializedNDArray) o);
} else {
throw new RuntimeException("Unable to create NDArray from object: " + o.getClass());
}
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/format/JavaNDArrayFormats.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.format;
import ai.konduit.serving.pipeline.api.format.NDArrayFormat;
public class JavaNDArrayFormats {
public static final NDArrayFormat<float[]> float1d = () -> float[].class;
public static final NDArrayFormat<float[][]> float2d = () -> float[][].class;
public static final NDArrayFormat<float[][][]> float3d = () -> float[][][].class;
public static final NDArrayFormat<float[][][][]> float4d = () -> float[][][][].class;
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/format/JavaNDArrays.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.format;
import ai.konduit.serving.pipeline.api.data.NDArray;
import ai.konduit.serving.pipeline.api.data.NDArrayType;
import ai.konduit.serving.pipeline.impl.data.ndarray.BaseNDArray;
import ai.konduit.serving.pipeline.impl.data.ndarray.SerializedNDArray;
import ai.konduit.serving.pipeline.util.ObjectMappers;
import org.nd4j.common.base.Preconditions;
public class JavaNDArrays {
public static class SNDArray extends BaseNDArray<SerializedNDArray> {
public SNDArray(SerializedNDArray array) {
super(array);
}
@Override
public NDArrayType type() {
return array.getType();
}
@Override
public long[] shape() {
return array.getShape();
}
@Override
public long size(int dimension) {
int rank = rank();
Preconditions.checkState(dimension >= -rank && dimension < rank, "Invalid dimension: Got %s for rank %s array", dimension, rank);
if(dimension < 0)
dimension += rank;
return array.getShape()[dimension];
}
@Override
public int rank() {
return array.getShape().length;
}
}
private static abstract class BaseFloatArray<T> extends BaseNDArray<T>{
protected final long[] shape;
public BaseFloatArray(T array, long[] shape) {
super(array);
this.shape = shape;
}
@Override
public NDArrayType type() {
return NDArrayType.FLOAT;
}
@Override
public long[] shape() {
return shape;
}
@Override
public long size(int dimension) {
int rank = rank();
Preconditions.checkState(dimension >= -rank && dimension < rank, "Invalid dimension: Got %s for rank %s array", dimension, rank);
if(dimension < 0)
dimension += rank;
return shape[dimension];
}
@Override
public int rank() {
return shape.length;
}
}
public static class Float1Array extends BaseFloatArray<float[]>{
public Float1Array(float[] array) {
super(array, new long[]{array.length});
}
}
public static class Float2Array extends BaseFloatArray<float[][]>{
public Float2Array(float[][] array) {
super(array, new long[]{array.length, array[0].length});
}
}
public static class Float3Array extends BaseFloatArray<float[][][]>{
public Float3Array(float[][][] array) {
super(array, new long[]{array.length, array[0].length, array[0][0].length});
}
}
public static class Float4Array extends BaseFloatArray<float[][][][]>{
public Float4Array(float[][][][] array) {
super(array, new long[]{array.length, array[0].length, array[0][0].length, array[0][0][0].length});
}
}
public static class Float5Array extends BaseFloatArray<float[][][][][]>{
public Float5Array(float[][][][][] array) {
super(array, new long[]{array.length, array[0].length, array[0][0].length, array[0][0][0].length, array[0][0][0][0].length});
}
}
@Override
public String toString() {
return ObjectMappers.toJson(this);
}
private static abstract class BaseDoubleArray<T> extends BaseNDArray<T>{
protected final long[] shape;
public BaseDoubleArray(T array, long[] shape) {
super(array);
this.shape = shape;
}
@Override
public NDArrayType type() {
return NDArrayType.DOUBLE;
}
@Override
public long[] shape() {
return shape;
}
@Override
public long size(int dimension) {
int rank = rank();
Preconditions.checkState(dimension >= -rank && dimension < rank, "Invalid dimension: Got %s for rank %s array", dimension, rank);
if(dimension < 0)
dimension += rank;
return shape[dimension];
}
@Override
public int rank() {
return shape.length;
}
}
public static class Double1Array extends BaseDoubleArray<double[]>{
public Double1Array(double[] array) {
super(array, new long[]{array.length});
}
}
public static class Double2Array extends BaseDoubleArray<double[][]>{
public Double2Array(double[][] array) {
super(array, new long[]{array.length, array[0].length});
}
}
public static class Double3Array extends BaseDoubleArray<double[][][]>{
public Double3Array(double[][][] array) {
super(array, new long[]{array.length, array[0].length, array[0][0].length});
}
}
public static class Double4Array extends BaseDoubleArray<double[][][][]>{
public Double4Array(double[][][][] array) {
super(array, new long[]{array.length, array[0].length, array[0][0].length, array[0][0][0].length});
}
}
public static class Double5Array extends BaseDoubleArray<double[][][][][]>{
public Double5Array(double[][][][][] array) {
super(array, new long[]{array.length, array[0].length, array[0][0].length, array[0][0][0].length, array[0][0][0][0].length});
}
}
private static abstract class BaseBoolArray<T> extends BaseNDArray<T>{
protected final long[] shape;
public BaseBoolArray(T array, long[] shape) {
super(array);
this.shape = shape;
}
@Override
public NDArrayType type() {
return NDArrayType.BOOL;
}
@Override
public long[] shape() {
return shape;
}
@Override
public long size(int dimension) {
int rank = rank();
Preconditions.checkState(dimension >= -rank && dimension < rank, "Invalid dimension: Got %s for rank %s array", dimension, rank);
if(dimension < 0)
dimension += rank;
return shape[dimension];
}
@Override
public int rank() {
return shape.length;
}
}
public static class Bool1Array extends BaseBoolArray<boolean[]>{
public Bool1Array(boolean[] array) {
super(array, new long[]{array.length});
}
}
public static class Bool2Array extends BaseBoolArray<boolean[][]>{
public Bool2Array(boolean[][] array) {
super(array, new long[]{array.length, array[0].length});
}
}
public static class Bool3Array extends BaseBoolArray<boolean[][][]>{
public Bool3Array(boolean[][][] array) {
super(array, new long[]{array.length, array[0].length, array[0][0].length});
}
}
public static class Bool4Array extends BaseBoolArray<boolean[][][][]>{
public Bool4Array(boolean[][][][] array) {
super(array, new long[]{array.length, array[0].length, array[0][0].length, array[0][0][0].length});
}
}
public static class Bool5Array extends BaseBoolArray<boolean[][][][][]>{
public Bool5Array(boolean[][][][][] array) {
super(array, new long[]{array.length, array[0].length, array[0][0].length, array[0][0][0].length, array[0][0][0][0].length});
}
}
private static abstract class BaseInt8Array<T> extends BaseNDArray<T>{
protected final long[] shape;
public BaseInt8Array(T array, long[] shape) {
super(array);
this.shape = shape;
}
@Override
public NDArrayType type() {
return NDArrayType.INT8;
}
@Override
public long[] shape() {
return shape;
}
@Override
public long size(int dimension) {
int rank = rank();
Preconditions.checkState(dimension >= -rank && dimension < rank, "Invalid dimension: Got %s for rank %s array", dimension, rank);
if(dimension < 0)
dimension += rank;
return shape[dimension];
}
@Override
public int rank() {
return shape.length;
}
}
public static class Int81Array extends BaseInt8Array<byte[]>{
public Int81Array(byte[] array) {
super(array, new long[]{array.length});
}
}
public static class Int82Array extends BaseInt8Array<byte[][]>{
public Int82Array(byte[][] array) {
super(array, new long[]{array.length, array[0].length});
}
}
public static class Int83Array extends BaseInt8Array<byte[][][]>{
public Int83Array(byte[][][] array) {
super(array, new long[]{array.length, array[0].length, array[0][0].length});
}
}
public static class Int84Array extends BaseInt8Array<byte[][][][]>{
public Int84Array(byte[][][][] array) {
super(array, new long[]{array.length, array[0].length, array[0][0].length, array[0][0][0].length});
}
}
public static class Int85Array extends BaseInt8Array<byte[][][][][]>{
public Int85Array(byte[][][][][] array) {
super(array, new long[]{array.length, array[0].length, array[0][0].length, array[0][0][0].length, array[0][0][0][0].length});
}
}
private static abstract class BaseInt16Array<T> extends BaseNDArray<T>{
protected final long[] shape;
public BaseInt16Array(T array, long[] shape) {
super(array);
this.shape = shape;
}
@Override
public NDArrayType type() {
return NDArrayType.INT16;
}
@Override
public long[] shape() {
return shape;
}
@Override
public long size(int dimension) {
int rank = rank();
Preconditions.checkState(dimension >= -rank && dimension < rank, "Invalid dimension: Got %s for rank %s array", dimension, rank);
if(dimension < 0)
dimension += rank;
return shape[dimension];
}
@Override
public int rank() {
return shape.length;
}
}
public static class Int161Array extends BaseInt16Array<short[]>{
public Int161Array(short[] array) {
super(array, new long[]{array.length});
}
}
public static class Int162Array extends BaseInt16Array<short[][]>{
public Int162Array(short[][] array) {
super(array, new long[]{array.length, array[0].length});
}
}
public static class Int163Array extends BaseInt16Array<short[][][]>{
public Int163Array(short[][][] array) {
super(array, new long[]{array.length, array[0].length, array[0][0].length});
}
}
public static class Int164Array extends BaseInt16Array<short[][][][]>{
public Int164Array(short[][][][] array) {
super(array, new long[]{array.length, array[0].length, array[0][0].length, array[0][0][0].length});
}
}
public static class Int165Array extends BaseInt16Array<short[][][][][]>{
public Int165Array(short[][][][][] array) {
super(array, new long[]{array.length, array[0].length, array[0][0].length, array[0][0][0].length, array[0][0][0][0].length});
}
}
private static abstract class BaseInt32Array<T> extends BaseNDArray<T>{
protected final long[] shape;
public BaseInt32Array(T array, long[] shape) {
super(array);
this.shape = shape;
}
@Override
public NDArrayType type() {
return NDArrayType.INT32;
}
@Override
public long[] shape() {
return shape;
}
@Override
public long size(int dimension) {
int rank = rank();
Preconditions.checkState(dimension >= -rank && dimension < rank, "Invalid dimension: Got %s for rank %s array", dimension, rank);
if(dimension < 0)
dimension += rank;
return shape[dimension];
}
@Override
public int rank() {
return shape.length;
}
}
public static class Int321Array extends BaseInt32Array<int[]>{
public Int321Array(int[] array) {
super(array, new long[]{array.length});
}
}
public static class Int322Array extends BaseInt32Array<int[][]>{
public Int322Array(int[][] array) {
super(array, new long[]{array.length, array[0].length});
}
}
public static class Int323Array extends BaseInt32Array<int[][][]>{
public Int323Array(int[][][] array) {
super(array, new long[]{array.length, array[0].length, array[0][0].length});
}
}
public static class Int324Array extends BaseInt32Array<int[][][][]>{
public Int324Array(int[][][][] array) {
super(array, new long[]{array.length, array[0].length, array[0][0].length, array[0][0][0].length});
}
}
public static class Int325Array extends BaseInt32Array<int[][][][][]>{
public Int325Array(int[][][][][] array) {
super(array, new long[]{array.length, array[0].length, array[0][0].length, array[0][0][0].length, array[0][0][0][0].length});
}
}
private static abstract class BaseInt64Array<T> extends BaseNDArray<T>{
protected final long[] shape;
public BaseInt64Array(T array, long[] shape) {
super(array);
this.shape = shape;
}
@Override
public NDArrayType type() {
return NDArrayType.INT64;
}
@Override
public long[] shape() {
return shape;
}
@Override
public long size(int dimension) {
int rank = rank();
Preconditions.checkState(dimension >= -rank && dimension < rank, "Invalid dimension: Got %s for rank %s array", dimension, rank);
if(dimension < 0)
dimension += rank;
return shape[dimension];
}
@Override
public int rank() {
return shape.length;
}
}
public static class Int641Array extends BaseInt64Array<long[]>{
public Int641Array(long[] array) {
super(array, new long[]{array.length});
}
}
public static class Int642Array extends BaseInt64Array<long[][]>{
public Int642Array(long[][] array) {
super(array, new long[]{array.length, array[0].length});
}
}
public static class Int643Array extends BaseInt64Array<long[][][]>{
public Int643Array(long[][][] array) {
super(array, new long[]{array.length, array[0].length, array[0][0].length});
}
}
public static class Int644Array extends BaseInt64Array<long[][][][]>{
public Int644Array(long[][][][] array) {
super(array, new long[]{array.length, array[0].length, array[0][0].length, array[0][0][0].length});
}
}
public static class Int645Array extends BaseInt64Array<long[][][][][]>{
public Int645Array(long[][][][][] array) {
super(array, new long[]{array.length, array[0].length, array[0][0].length, array[0][0][0].length, array[0][0][0][0].length});
}
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/metrics/MetricsProvider.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.impl.metrics;
public interface MetricsProvider {
io.micrometer.core.instrument.MeterRegistry getRegistry();
Object getEndpoint();
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/pipeline/AsyncPipeline.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.pipeline;
import ai.konduit.serving.pipeline.api.pipeline.Trigger;
import ai.konduit.serving.pipeline.api.pipeline.Pipeline;
import ai.konduit.serving.pipeline.api.pipeline.PipelineExecutor;
import ai.konduit.serving.pipeline.impl.pipeline.serde.AsyncPipelineSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.nd4j.shade.jackson.annotation.JsonProperty;
import org.nd4j.shade.jackson.databind.annotation.JsonSerialize;
/**
* AsyncPipeline is used for situations such as processing streams of data. The idea is that an AsyncPipeline
* may perform execution in the background (internally); when the AsyncPipeline is queried, it may return the last processed
* Data output. The behaviour of the AsyncPipeline is determined by the underlying Trigger.<br>
* Note that because of the asynchronous nature of AsyncPipeline, the input Data instance may not actually be used
* when executing the underlying pipeline. This means that AsyncPipeline is restricted to situations where the Data is loaded within
* the pipeline itself, or no (external) input is required. For example, when an image (video frame) is loaded by FrameCaptureStep.
*
* @author Alex Black
*/
@Data
@Accessors(fluent = true)
@JsonSerialize(using = AsyncPipelineSerializer.class)
@Schema(description = "AsyncPipeline is used for situations such as processing streams of data. The idea is that an AsyncPipeline" +
" may perform execution in the background (internally); when the AsyncPipeline is queried, it may return the last processed" +
" Data output. The behaviour of the AsyncPipeline is determined by the underlying Trigger.<br>" +
"Note that because of the asynchronous nature of AsyncPipeline, the input Data instance may not actually be used " +
"when executing the underlying pipeline. This means that AsyncPipeline is restricted to situations where the Data is loaded within " +
"the pipeline itself, or no (external) input is required. For example, when an image (video frame) is loaded by FrameCaptureStep.")
public class AsyncPipeline implements Pipeline, AutoCloseable {
@Schema(description = "The underlying pipeline")
protected final Pipeline underlying;
@Schema(description = "The async pipeline trigger")
protected final Trigger trigger;
@EqualsAndHashCode.Exclude
@ToString.Exclude
protected AsyncPipelineExecutor executor;
public AsyncPipeline(@NonNull @JsonProperty("underlying") Pipeline underlying, @NonNull @JsonProperty("trigger") Trigger trigger){
this.underlying = underlying;
this.trigger = trigger;
}
@Override
public synchronized PipelineExecutor executor() {
if(executor == null){
executor = new AsyncPipelineExecutor(this);
}
return executor;
}
@Override
public int size() {
return underlying.size();
}
@Override
public String id() {
return underlying.id();
}
public void start(){
//Thread is started in the underlying executor constructor
executor();
}
@Override
public void close() {
trigger.stop();
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/pipeline/AsyncPipelineExecutor.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.pipeline;
import ai.konduit.serving.pipeline.api.context.Profiler;
import ai.konduit.serving.pipeline.api.context.ProfilerConfig;
import ai.konduit.serving.pipeline.api.data.Data;
import ai.konduit.serving.pipeline.api.pipeline.Trigger;
import ai.konduit.serving.pipeline.api.pipeline.Pipeline;
import ai.konduit.serving.pipeline.api.pipeline.PipelineExecutor;
import ai.konduit.serving.pipeline.api.step.PipelineStepRunner;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import java.util.List;
@Slf4j
public class AsyncPipelineExecutor implements PipelineExecutor {
protected final AsyncPipeline pipeline;
protected final Trigger trigger;
protected final PipelineExecutor underlyingExec;
public AsyncPipelineExecutor(AsyncPipeline pipeline){
this.pipeline = pipeline;
this.trigger = pipeline.trigger();
this.underlyingExec = pipeline.underlying().executor();
//Set up trigger callback:
trigger.setCallback(underlyingExec::exec);
}
@Override
public Pipeline getPipeline() {
return pipeline;
}
@Override
public List<PipelineStepRunner> getRunners() {
return underlyingExec.getRunners();
}
@Override
public Data exec(Data data) {
return trigger.query(data);
}
@Override
public Logger getLogger() {
return log;
}
@Override
public void profilerConfig(ProfilerConfig profilerConfig) {
underlyingExec.profilerConfig(profilerConfig);
}
@Override
public Profiler profiler() {
return underlyingExec.profiler();
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/pipeline/BasePipelineExecutor.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.impl.pipeline;
import ai.konduit.serving.pipeline.api.context.Context;
import ai.konduit.serving.pipeline.api.data.Data;
import ai.konduit.serving.pipeline.api.pipeline.Pipeline;
import ai.konduit.serving.pipeline.api.pipeline.PipelineExecutor;
import ai.konduit.serving.pipeline.api.step.PipelineStep;
import ai.konduit.serving.pipeline.api.step.PipelineStepRunner;
import ai.konduit.serving.pipeline.api.step.PipelineStepRunnerFactory;
import ai.konduit.serving.pipeline.registry.PipelineRegistry;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
import org.nd4j.common.base.Preconditions;
import org.slf4j.Logger;
import java.util.ArrayList;
import java.util.List;
@Slf4j
public abstract class BasePipelineExecutor implements PipelineExecutor {
PipelineStepRunner getRunner(@NonNull PipelineStep step) {
List<PipelineStepRunnerFactory> factories = PipelineRegistry.getStepRunnerFactories();
PipelineStepRunnerFactory f = null;
for (PipelineStepRunnerFactory psrf : factories) {
if (psrf.canRun(step)) {
if (f != null) {
log.warn("TODO - Multiple PipelineStepRunnerFactory instances can run pipeline {} - {} and {}", step.getClass(), f.getClass(), psrf.getClass());
}
f = psrf;
//TODO make debug level later
//log.info("PipelineStepRunnerFactory {} used to run step {}", psrf.getClass().getName(), ps.getClass().getName());
}
}
if (f == null) {
StringBuilder msg = new StringBuilder("Unable to execute pipeline step of type " + step.getClass().getName() + ": No PipelineStepRunnerFactory instances"
+ " are available that can execute this pipeline step.\nThis likely means a required dependency is missing for executing this pipeline." +
"\nAvailable executor factories:");
if (factories.isEmpty()) {
msg.append(" <None>");
}
boolean first = true;
for (PipelineStepRunnerFactory psrf : factories) {
if (!first)
msg.append("\n");
msg.append(" ").append(psrf.getClass().getName());
first = false;
}
throw new IllegalStateException(msg.toString());
}
PipelineStepRunner r = f.create(step);
Preconditions.checkNotNull(r, "Failed to create PipelineStepRunner: PipelineStepRunnerFactory.create(...) returned null: " +
"Pipeline step %s, PipelineStepRunnerFactory %s", step.getClass(), f.getClass());
return r;
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/pipeline/GraphPipeline.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.impl.pipeline;
import ai.konduit.serving.annotation.json.JsonName;
import ai.konduit.serving.pipeline.api.pipeline.Pipeline;
import ai.konduit.serving.pipeline.api.pipeline.PipelineExecutor;
import ai.konduit.serving.pipeline.impl.pipeline.graph.GraphStep;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.nd4j.shade.jackson.annotation.JsonProperty;
import org.nd4j.shade.jackson.annotation.JsonPropertyOrder;
import java.util.Map;
import java.util.UUID;
/**
* A pipeline with a graph structure - possibly including conditional operations, etc.
* Use {@link ai.konduit.serving.pipeline.impl.pipeline.graph.GraphBuilder} to construct new instances:
* Usage:
* <pre>
* {@code
* GraphBuilder b = new GraphBuilder();
* GraphStep input = b.input();
* GraphStep output = input.then("myStep", ...);
* Pipeline p = b.build(output);
* }</pre>
*
* @author Alex Black
* @see SequencePipeline
*/
@Data
@Accessors(fluent = true)
@JsonPropertyOrder({"outputStep", "steps"})
@Schema(description = "A type of pipeline that defines the execution flow in a directed acyclic graph (DAG) of configurable steps. " +
"The execution flow can also contain optional steps.")
@JsonName("GRAPH_PIPELINE")
public class GraphPipeline implements Pipeline {
public static final String INPUT_KEY = "input";
@Schema(description = "A map of configurable graph steps that defines a directed acyclic graph (DAG) of a pipeline execution.")
private final Map<String, GraphStep> steps;
@Schema(description = "Name of the output step in the graph pipeline map.")
private final String outputStep;
@Schema(description = "A unique identifier that's used to differentiate among different executing pipelines. Used " +
"for identifying a pipeline while reporting metrics.")
@EqualsAndHashCode.Exclude
private String id;
public GraphPipeline(@JsonProperty("steps") Map<String, GraphStep> steps,
@JsonProperty("outputStep") String outputStep,
@JsonProperty("id") String id){
this.steps = steps;
this.outputStep = outputStep;
this.id = id;
}
@Override
public PipelineExecutor executor() {
return new GraphPipelineExecutor(this);
}
@Override
public int size() {
return steps != null ? steps.size() : 0;
}
@Override
public String id() {
if(id == null)
id = UUID.randomUUID().toString().substring(0, 8);
return id;
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/pipeline/GraphPipelineExecutor.java
|
/*
* ******************************************************************************
* * Copyright (c) 2022 Konduit K.K.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://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.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package ai.konduit.serving.pipeline.impl.pipeline;
import ai.konduit.serving.pipeline.api.context.Profiler;
import ai.konduit.serving.pipeline.api.context.ProfilerConfig;
import ai.konduit.serving.pipeline.api.data.Data;
import ai.konduit.serving.pipeline.api.pipeline.Pipeline;
import ai.konduit.serving.pipeline.api.step.PipelineStep;
import ai.konduit.serving.pipeline.api.step.PipelineStepRunner;
import ai.konduit.serving.pipeline.impl.pipeline.graph.*;
import ai.konduit.serving.pipeline.impl.pipeline.graph.SwitchOutput;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nd4j.common.base.Preconditions;
import org.slf4j.Logger;
import java.util.*;
/**
* An executer for {@link GraphPipeline} instances
*
* @author Alex Black
*/
@Slf4j
@AllArgsConstructor
public class GraphPipelineExecutor extends BasePipelineExecutor {
private final GraphPipeline pipeline;
private Map<String,PipelineStepRunner> runners;
private Map<String,List<String>> inputsFor; //Key: a step. Value: The steps that this is an input for: i.e., key -> X exists
private ProfilerConfig profilerConfig;
public GraphPipelineExecutor(GraphPipeline pipeline){
this.pipeline = pipeline;
Map<String, GraphStep> steps = pipeline.steps();
inputsFor = new HashMap<>();
for(Map.Entry<String, GraphStep> e : steps.entrySet()){
GraphStep g = e.getValue();
List<String> inputs = g.inputs();
for(String s : inputs){
List<String> l = inputsFor.computeIfAbsent(s, x -> new ArrayList<>());
l.add(e.getKey());
}
}
//Initialize runners:
runners = new HashMap<>();
for(Map.Entry<String, GraphStep> e : steps.entrySet()){
GraphStep g = e.getValue();
if(g.hasStep()){
PipelineStep s = g.getStep();
PipelineStepRunner r = getRunner(s);
runners.put(e.getKey(), r);
}
if(g instanceof MergeStep || g instanceof SwitchStep || g instanceof AnyStep){
runners.put(e.getKey(), null);
}
}
}
@Override
public Pipeline getPipeline() {
return pipeline;
}
@Override
public List<PipelineStepRunner> getRunners() {
return new ArrayList<>(runners.values());
}
@Override
public Data exec(Data in) {
Queue<String> canExec = new LinkedList<>();
Set<String> canExecSet = new HashSet<>();
Map<String,Data> stepOutputData = new HashMap<>();
stepOutputData.put(GraphPipeline.INPUT_KEY, in);
Map<String,GraphStep> m = pipeline.steps();
for(Map.Entry<String, GraphStep> e : m.entrySet()){
List<String> inputs = e.getValue().inputs();
if(inputs != null && inputs.size() == 1 && inputs.get(0).equals(GraphPipeline.INPUT_KEY)){
canExec.add(e.getKey());
canExecSet.add(e.getKey());
}
}
Data out = null;
if(m.size() == 1){
//No steps other than input - no-op
out = in;
}
while(!canExec.isEmpty()){
String next = canExec.remove();
log.trace("Executing step: {}", next);
canExecSet.remove(next);
GraphStep gs = m.get(next);
List<String> inputs = gs.inputs();
int switchOut = -1;
Data stepOut = null;
if(gs instanceof MergeStep) {
stepOut = Data.empty();
for (String s : inputs) {
Data d = stepOutputData.get(s);
stepOut.merge(false, d);
}
} else if(gs instanceof SwitchStep) {
SwitchStep s = (SwitchStep)gs;
Data inData = stepOutputData.get(inputs.get(0));
switchOut = s.switchFn().selectOutput(inData);
stepOut = inData;
} else if(gs instanceof AnyStep) {
List<String> stepInputs = gs.inputs();
for (String s : stepInputs) {
if (stepOutputData.containsKey(s)) {
stepOut = stepOutputData.get(s);
break;
}
}
} else if(gs instanceof SwitchOutput){
stepOut = stepOutputData.get(gs.input());
} else if(gs instanceof PipelineGraphStep){
Preconditions.checkState(inputs.size() == 1, "PipelineSteps should only have 1 input: got inputs %s", inputs);;
if (inputs.size() != 1 && !GraphPipeline.INPUT_KEY.equals(next))
throw new IllegalStateException("Execution of steps with numInputs != 1 is not supported: " + next + ".numInputs=" + inputs.size());
PipelineStepRunner exec = runners.get(next);
Data inData = stepOutputData.get(inputs.get(0));
Preconditions.checkState(inData != null, "Input data is null for step %s - input %s", next, 0);
try {
stepOut = exec.exec(null, inData);
} catch (Throwable t){
throw new RuntimeException("Execution failed in pipeline step \"" + next + "\" of type " + exec.getPipelineStep().getClass().getSimpleName(), t);
}
} else {
throw new UnsupportedOperationException("Execution support not yet implemented: " + gs);
}
if(stepOut == null)
throw new IllegalStateException("Got null output from step \"" + next + "\"");
if(next.equals(pipeline.outputStep())){
out = stepOut;
break;
}
stepOutputData.put(next, stepOut);
//Check what can now be executed
//TODO This should be optimized
Map<String, GraphStep> steps = pipeline.steps();
for(String s : steps.keySet()){
if(canExecSet.contains(s))
continue;
if(stepOutputData.containsKey(s))
continue;
GraphStep currStep = steps.get(s);
List<String> stepInputs = currStep.inputs();
boolean allSeen;
if(currStep instanceof SwitchOutput) {
allSeen = false;
SwitchOutput so = (SwitchOutput) currStep;
String switchIn = so.input();
if (switchIn.equals(next) && so.outputNum() == switchOut) {
//Just executed the switch this iteration
allSeen = true;
}
} else if(currStep instanceof AnyStep ){
//Can execute the Any step if at least one of the inputs are available
allSeen = false;
for (String inName : stepInputs) {
if (stepOutputData.containsKey(inName)) {
allSeen = true;
break;
}
}
} else {
//StandardPipelineStep, MergeStep
allSeen = true;
for (String inName : stepInputs) {
if (!stepOutputData.containsKey(inName)) {
allSeen = false;
break;
}
}
}
if(allSeen) {
canExec.add(s);
canExecSet.add(s);
//log.info("Can now exec: {}", s);
}
}
}
if(out == null)
throw new IllegalStateException("Could not get output");
return out;
}
@Override
public Logger getLogger() {
return log;
}
@Override
public void profilerConfig(ProfilerConfig profilerConfig) {
this.profilerConfig = profilerConfig;
}
@Override
public Profiler profiler() {
throw new UnsupportedOperationException("Not yet implemented");
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/pipeline/SequencePipeline.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.impl.pipeline;
import ai.konduit.serving.annotation.json.JsonName;
import ai.konduit.serving.pipeline.api.pipeline.Pipeline;
import ai.konduit.serving.pipeline.api.pipeline.PipelineExecutor;
import ai.konduit.serving.pipeline.api.step.PipelineStep;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;
import org.nd4j.shade.jackson.annotation.JsonProperty;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
* SequencePipeline is a simple stack of pipeline steps - the output of one is fed into the next
*
* @author Alex Black
* @see GraphPipeline
*/
@Data
@Accessors(fluent = true)
@Schema(description = "A type of pipeline that defines the execution flow in a series of configurable steps.")
@JsonName("SEQUENCE_PIPELINE")
public class SequencePipeline implements Pipeline {
@Getter
@Schema(description = "A list/sequence of configurable steps that determines the way a pipeline is executed.")
private List<PipelineStep> steps;
@Schema(description = "A unique identifier that's used to differentiate among different executing pipelines. Used " +
"for identifying a pipeline while reporting metrics.")
@EqualsAndHashCode.Exclude
private String id;
public SequencePipeline(@JsonProperty("steps") List<PipelineStep> steps, @JsonProperty("id") String id) {
this.steps = steps;
this.id = id;
}
@Override
public PipelineExecutor executor() {
return new SequencePipelineExecutor(this);
}
@Override
public int size() {
return steps != null ? steps.size() : 0;
}
@Override
public String id() {
if(id == null)
id = UUID.randomUUID().toString().substring(0, 8);
return id;
}
public static Builder builder(){
return new Builder();
}
public static class Builder {
protected List<PipelineStep> steps = new ArrayList<>();
private String id;
public Builder add(PipelineStep step){
this.steps.add(step);
return this;
}
public Builder id(String id){
this.id = id;
return this;
}
public SequencePipeline build(){
return new SequencePipeline(steps, id);
}
}
}
|
0
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl
|
java-sources/ai/konduit/serving/konduit-serving-pipeline/0.3.0/ai/konduit/serving/pipeline/impl/pipeline/SequencePipelineExecutor.java
|
/* ******************************************************************************
* Copyright (c) 2022 Konduit K.K.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package ai.konduit.serving.pipeline.impl.pipeline;
import ai.konduit.serving.pipeline.api.context.*;
import ai.konduit.serving.pipeline.api.data.Data;
import ai.konduit.serving.pipeline.api.pipeline.Pipeline;
import ai.konduit.serving.pipeline.api.step.PipelineStep;
import ai.konduit.serving.pipeline.api.step.PipelineStepRunner;
import ai.konduit.serving.pipeline.impl.context.DefaultContext;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import java.util.ArrayList;
import java.util.List;
/**
* An executor for {@link SequencePipeline}s
*
* @author Alex Black
*/
@Slf4j
public class SequencePipelineExecutor extends BasePipelineExecutor {
private SequencePipeline pipeline;
private List<PipelineStepRunner> runners;
private ProfilerConfig profilerConfig;
private Profiler profiler = new NoOpProfiler();
private Metrics metrics;
private Context ctx;
public SequencePipelineExecutor(@NonNull SequencePipeline p) {
this.pipeline = p;
//Initialize
runners = new ArrayList<>();
List<PipelineStep> steps = p.steps();
for (PipelineStep ps : steps) {
PipelineStepRunner r = getRunner(ps);
runners.add(r);
}
}
@Override
public Pipeline getPipeline() {
return pipeline;
}
@Override
public List<PipelineStepRunner> getRunners() {
return runners;
}
@Override
public Data exec(Data data) {
if (ctx == null) {
metrics = new PipelineMetrics(pipeline.id());
ctx = new DefaultContext(metrics, profiler);
}
Data current = data;
for (PipelineStepRunner psr : runners) {
String name = psr.name();
profiler.eventStart(name);
((PipelineMetrics)metrics).setInstanceName(name);
((PipelineMetrics)metrics).setStepName(psr.getPipelineStep().name());
current = psr.exec(ctx, current);
profiler.eventEnd(name);
//Ensure that the step didn't open but not close any profiles
profiler.closeAll();
}
return current;
}
@Override
public Logger getLogger() {
return log;
}
@Override
public void profilerConfig(ProfilerConfig profilerConfig) {
this.profilerConfig = profilerConfig;
if (profilerConfig != null) {
this.profiler = new PipelineProfiler(profilerConfig);
} else {
this.profiler = new NoOpProfiler();
}
}
@Override
public Profiler profiler() {
return profiler;
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.