com.github.tjake.jlama.net.CombineResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jlama-net Show documentation
Show all versions of jlama-net Show documentation
Jlama: A modern LLM inference engine for Java
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: JlamaService.proto
package com.github.tjake.jlama.net;
/**
* Protobuf type {@code com.github.tjake.jlama.net.CombineResponse}
*/
public final class CombineResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.github.tjake.jlama.net.CombineResponse)
CombineResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use CombineResponse.newBuilder() to construct.
private CombineResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CombineResponse() {
tensor_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CombineResponse();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CombineResponse(
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)) {
tensor_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
tensor_.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)) {
tensor_ = java.util.Collections.unmodifiableList(tensor_); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.github.tjake.jlama.net.JlamaServiceOuterClass.internal_static_com_github_tjake_jlama_net_CombineResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.github.tjake.jlama.net.JlamaServiceOuterClass.internal_static_com_github_tjake_jlama_net_CombineResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.github.tjake.jlama.net.CombineResponse.class, com.github.tjake.jlama.net.CombineResponse.Builder.class);
}
public static final int TENSOR_FIELD_NUMBER = 1;
private java.util.List tensor_;
/**
* repeated bytes tensor = 1;
* @return A list containing the tensor.
*/
@java.lang.Override
public java.util.List
getTensorList() {
return tensor_;
}
/**
* repeated bytes tensor = 1;
* @return The count of tensor.
*/
public int getTensorCount() {
return tensor_.size();
}
/**
* repeated bytes tensor = 1;
* @param index The index of the element to return.
* @return The tensor at the given index.
*/
public com.google.protobuf.ByteString getTensor(int index) {
return tensor_.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 < tensor_.size(); i++) {
output.writeBytes(1, tensor_.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 < tensor_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(tensor_.get(i));
}
size += dataSize;
size += 1 * getTensorList().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 com.github.tjake.jlama.net.CombineResponse)) {
return super.equals(obj);
}
com.github.tjake.jlama.net.CombineResponse other = (com.github.tjake.jlama.net.CombineResponse) obj;
if (!getTensorList()
.equals(other.getTensorList())) 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 (getTensorCount() > 0) {
hash = (37 * hash) + TENSOR_FIELD_NUMBER;
hash = (53 * hash) + getTensorList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.github.tjake.jlama.net.CombineResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.github.tjake.jlama.net.CombineResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.github.tjake.jlama.net.CombineResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.github.tjake.jlama.net.CombineResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.github.tjake.jlama.net.CombineResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.github.tjake.jlama.net.CombineResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.github.tjake.jlama.net.CombineResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.github.tjake.jlama.net.CombineResponse 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 com.github.tjake.jlama.net.CombineResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.github.tjake.jlama.net.CombineResponse 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 com.github.tjake.jlama.net.CombineResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.github.tjake.jlama.net.CombineResponse 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(com.github.tjake.jlama.net.CombineResponse 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 com.github.tjake.jlama.net.CombineResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.github.tjake.jlama.net.CombineResponse)
com.github.tjake.jlama.net.CombineResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.github.tjake.jlama.net.JlamaServiceOuterClass.internal_static_com_github_tjake_jlama_net_CombineResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.github.tjake.jlama.net.JlamaServiceOuterClass.internal_static_com_github_tjake_jlama_net_CombineResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.github.tjake.jlama.net.CombineResponse.class, com.github.tjake.jlama.net.CombineResponse.Builder.class);
}
// Construct using com.github.tjake.jlama.net.CombineResponse.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();
tensor_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.github.tjake.jlama.net.JlamaServiceOuterClass.internal_static_com_github_tjake_jlama_net_CombineResponse_descriptor;
}
@java.lang.Override
public com.github.tjake.jlama.net.CombineResponse getDefaultInstanceForType() {
return com.github.tjake.jlama.net.CombineResponse.getDefaultInstance();
}
@java.lang.Override
public com.github.tjake.jlama.net.CombineResponse build() {
com.github.tjake.jlama.net.CombineResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.github.tjake.jlama.net.CombineResponse buildPartial() {
com.github.tjake.jlama.net.CombineResponse result = new com.github.tjake.jlama.net.CombineResponse(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) != 0)) {
tensor_ = java.util.Collections.unmodifiableList(tensor_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.tensor_ = tensor_;
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 com.github.tjake.jlama.net.CombineResponse) {
return mergeFrom((com.github.tjake.jlama.net.CombineResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.github.tjake.jlama.net.CombineResponse other) {
if (other == com.github.tjake.jlama.net.CombineResponse.getDefaultInstance()) return this;
if (!other.tensor_.isEmpty()) {
if (tensor_.isEmpty()) {
tensor_ = other.tensor_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureTensorIsMutable();
tensor_.addAll(other.tensor_);
}
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 {
com.github.tjake.jlama.net.CombineResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.github.tjake.jlama.net.CombineResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List tensor_ = java.util.Collections.emptyList();
private void ensureTensorIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
tensor_ = new java.util.ArrayList(tensor_);
bitField0_ |= 0x00000001;
}
}
/**
* repeated bytes tensor = 1;
* @return A list containing the tensor.
*/
public java.util.List
getTensorList() {
return ((bitField0_ & 0x00000001) != 0) ?
java.util.Collections.unmodifiableList(tensor_) : tensor_;
}
/**
* repeated bytes tensor = 1;
* @return The count of tensor.
*/
public int getTensorCount() {
return tensor_.size();
}
/**
* repeated bytes tensor = 1;
* @param index The index of the element to return.
* @return The tensor at the given index.
*/
public com.google.protobuf.ByteString getTensor(int index) {
return tensor_.get(index);
}
/**
* repeated bytes tensor = 1;
* @param index The index to set the value at.
* @param value The tensor to set.
* @return This builder for chaining.
*/
public Builder setTensor(
int index, com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureTensorIsMutable();
tensor_.set(index, value);
onChanged();
return this;
}
/**
* repeated bytes tensor = 1;
* @param value The tensor to add.
* @return This builder for chaining.
*/
public Builder addTensor(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureTensorIsMutable();
tensor_.add(value);
onChanged();
return this;
}
/**
* repeated bytes tensor = 1;
* @param values The tensor to add.
* @return This builder for chaining.
*/
public Builder addAllTensor(
java.lang.Iterable extends com.google.protobuf.ByteString> values) {
ensureTensorIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, tensor_);
onChanged();
return this;
}
/**
* repeated bytes tensor = 1;
* @return This builder for chaining.
*/
public Builder clearTensor() {
tensor_ = 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:com.github.tjake.jlama.net.CombineResponse)
}
// @@protoc_insertion_point(class_scope:com.github.tjake.jlama.net.CombineResponse)
private static final com.github.tjake.jlama.net.CombineResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.github.tjake.jlama.net.CombineResponse();
}
public static com.github.tjake.jlama.net.CombineResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CombineResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CombineResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.github.tjake.jlama.net.CombineResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}