
io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/config/wasm/v2alpha/wasm.proto
package io.envoyproxy.envoy.config.wasm.v2alpha;
/**
*
* Configuration for a Wasm VM.
* [#next-free-field: 6]
* [#not-implemented-hide:] pending implementation.
*
*
* Protobuf type {@code envoy.config.wasm.v2alpha.VmConfig}
*/
public final class VmConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.wasm.v2alpha.VmConfig)
VmConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use VmConfig.newBuilder() to construct.
private VmConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private VmConfig() {
vmId_ = "";
runtime_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new VmConfig();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private VmConfig(
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: {
java.lang.String s = input.readStringRequireUtf8();
vmId_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
runtime_ = s;
break;
}
case 26: {
io.envoyproxy.envoy.api.v2.core.AsyncDataSource.Builder subBuilder = null;
if (code_ != null) {
subBuilder = code_.toBuilder();
}
code_ = input.readMessage(io.envoyproxy.envoy.api.v2.core.AsyncDataSource.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(code_);
code_ = subBuilder.buildPartial();
}
break;
}
case 34: {
com.google.protobuf.Any.Builder subBuilder = null;
if (configuration_ != null) {
subBuilder = configuration_.toBuilder();
}
configuration_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(configuration_);
configuration_ = subBuilder.buildPartial();
}
break;
}
case 40: {
allowPrecompiled_ = input.readBool();
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 io.envoyproxy.envoy.config.wasm.v2alpha.WasmProto.internal_static_envoy_config_wasm_v2alpha_VmConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.wasm.v2alpha.WasmProto.internal_static_envoy_config_wasm_v2alpha_VmConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig.class, io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig.Builder.class);
}
public static final int VM_ID_FIELD_NUMBER = 1;
private volatile java.lang.Object vmId_;
/**
*
* An ID which will be used along with a hash of the wasm code (or the name of the registered Null
* VM plugin) to determine which VM will be used for the plugin. All plugins which use the same
* *vm_id* and code will use the same VM. May be left blank. Sharing a VM between plugins can
* reduce memory utilization and make sharing of data easier which may have security implications.
* See ref: "TODO: add ref" for details.
*
*
* string vm_id = 1;
*/
public java.lang.String getVmId() {
java.lang.Object ref = vmId_;
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();
vmId_ = s;
return s;
}
}
/**
*
* An ID which will be used along with a hash of the wasm code (or the name of the registered Null
* VM plugin) to determine which VM will be used for the plugin. All plugins which use the same
* *vm_id* and code will use the same VM. May be left blank. Sharing a VM between plugins can
* reduce memory utilization and make sharing of data easier which may have security implications.
* See ref: "TODO: add ref" for details.
*
*
* string vm_id = 1;
*/
public com.google.protobuf.ByteString
getVmIdBytes() {
java.lang.Object ref = vmId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
vmId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int RUNTIME_FIELD_NUMBER = 2;
private volatile java.lang.Object runtime_;
/**
*
* The Wasm runtime type (either "v8" or "null" for code compiled into Envoy).
*
*
* string runtime = 2 [(.validate.rules) = { ... }
*/
public java.lang.String getRuntime() {
java.lang.Object ref = runtime_;
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();
runtime_ = s;
return s;
}
}
/**
*
* The Wasm runtime type (either "v8" or "null" for code compiled into Envoy).
*
*
* string runtime = 2 [(.validate.rules) = { ... }
*/
public com.google.protobuf.ByteString
getRuntimeBytes() {
java.lang.Object ref = runtime_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
runtime_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CODE_FIELD_NUMBER = 3;
private io.envoyproxy.envoy.api.v2.core.AsyncDataSource code_;
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.api.v2.core.AsyncDataSource code = 3;
*/
public boolean hasCode() {
return code_ != null;
}
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.api.v2.core.AsyncDataSource code = 3;
*/
public io.envoyproxy.envoy.api.v2.core.AsyncDataSource getCode() {
return code_ == null ? io.envoyproxy.envoy.api.v2.core.AsyncDataSource.getDefaultInstance() : code_;
}
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.api.v2.core.AsyncDataSource code = 3;
*/
public io.envoyproxy.envoy.api.v2.core.AsyncDataSourceOrBuilder getCodeOrBuilder() {
return getCode();
}
public static final int CONFIGURATION_FIELD_NUMBER = 4;
private com.google.protobuf.Any configuration_;
/**
*
* The Wasm configuration used in initialization of a new VM (proxy_on_start).
*
*
* .google.protobuf.Any configuration = 4;
*/
public boolean hasConfiguration() {
return configuration_ != null;
}
/**
*
* The Wasm configuration used in initialization of a new VM (proxy_on_start).
*
*
* .google.protobuf.Any configuration = 4;
*/
public com.google.protobuf.Any getConfiguration() {
return configuration_ == null ? com.google.protobuf.Any.getDefaultInstance() : configuration_;
}
/**
*
* The Wasm configuration used in initialization of a new VM (proxy_on_start).
*
*
* .google.protobuf.Any configuration = 4;
*/
public com.google.protobuf.AnyOrBuilder getConfigurationOrBuilder() {
return getConfiguration();
}
public static final int ALLOW_PRECOMPILED_FIELD_NUMBER = 5;
private boolean allowPrecompiled_;
/**
*
* Allow the wasm file to include pre-compiled code on VMs which support it.
* Warning: this should only be enable for trusted sources as the precompiled code is not
* verified.
*
*
* bool allow_precompiled = 5;
*/
public boolean getAllowPrecompiled() {
return allowPrecompiled_;
}
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 (!getVmIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, vmId_);
}
if (!getRuntimeBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, runtime_);
}
if (code_ != null) {
output.writeMessage(3, getCode());
}
if (configuration_ != null) {
output.writeMessage(4, getConfiguration());
}
if (allowPrecompiled_ != false) {
output.writeBool(5, allowPrecompiled_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getVmIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, vmId_);
}
if (!getRuntimeBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, runtime_);
}
if (code_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getCode());
}
if (configuration_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getConfiguration());
}
if (allowPrecompiled_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(5, allowPrecompiled_);
}
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 io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig other = (io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig) obj;
if (!getVmId()
.equals(other.getVmId())) return false;
if (!getRuntime()
.equals(other.getRuntime())) return false;
if (hasCode() != other.hasCode()) return false;
if (hasCode()) {
if (!getCode()
.equals(other.getCode())) return false;
}
if (hasConfiguration() != other.hasConfiguration()) return false;
if (hasConfiguration()) {
if (!getConfiguration()
.equals(other.getConfiguration())) return false;
}
if (getAllowPrecompiled()
!= other.getAllowPrecompiled()) 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) + VM_ID_FIELD_NUMBER;
hash = (53 * hash) + getVmId().hashCode();
hash = (37 * hash) + RUNTIME_FIELD_NUMBER;
hash = (53 * hash) + getRuntime().hashCode();
if (hasCode()) {
hash = (37 * hash) + CODE_FIELD_NUMBER;
hash = (53 * hash) + getCode().hashCode();
}
if (hasConfiguration()) {
hash = (37 * hash) + CONFIGURATION_FIELD_NUMBER;
hash = (53 * hash) + getConfiguration().hashCode();
}
hash = (37 * hash) + ALLOW_PRECOMPILED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getAllowPrecompiled());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig 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 io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig 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 io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig 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(io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig 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;
}
/**
*
* Configuration for a Wasm VM.
* [#next-free-field: 6]
* [#not-implemented-hide:] pending implementation.
*
*
* Protobuf type {@code envoy.config.wasm.v2alpha.VmConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.wasm.v2alpha.VmConfig)
io.envoyproxy.envoy.config.wasm.v2alpha.VmConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.wasm.v2alpha.WasmProto.internal_static_envoy_config_wasm_v2alpha_VmConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.wasm.v2alpha.WasmProto.internal_static_envoy_config_wasm_v2alpha_VmConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig.class, io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig.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();
vmId_ = "";
runtime_ = "";
if (codeBuilder_ == null) {
code_ = null;
} else {
code_ = null;
codeBuilder_ = null;
}
if (configurationBuilder_ == null) {
configuration_ = null;
} else {
configuration_ = null;
configurationBuilder_ = null;
}
allowPrecompiled_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.wasm.v2alpha.WasmProto.internal_static_envoy_config_wasm_v2alpha_VmConfig_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig build() {
io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig buildPartial() {
io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig result = new io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig(this);
result.vmId_ = vmId_;
result.runtime_ = runtime_;
if (codeBuilder_ == null) {
result.code_ = code_;
} else {
result.code_ = codeBuilder_.build();
}
if (configurationBuilder_ == null) {
result.configuration_ = configuration_;
} else {
result.configuration_ = configurationBuilder_.build();
}
result.allowPrecompiled_ = allowPrecompiled_;
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 io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig) {
return mergeFrom((io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig other) {
if (other == io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig.getDefaultInstance()) return this;
if (!other.getVmId().isEmpty()) {
vmId_ = other.vmId_;
onChanged();
}
if (!other.getRuntime().isEmpty()) {
runtime_ = other.runtime_;
onChanged();
}
if (other.hasCode()) {
mergeCode(other.getCode());
}
if (other.hasConfiguration()) {
mergeConfiguration(other.getConfiguration());
}
if (other.getAllowPrecompiled() != false) {
setAllowPrecompiled(other.getAllowPrecompiled());
}
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 {
io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object vmId_ = "";
/**
*
* An ID which will be used along with a hash of the wasm code (or the name of the registered Null
* VM plugin) to determine which VM will be used for the plugin. All plugins which use the same
* *vm_id* and code will use the same VM. May be left blank. Sharing a VM between plugins can
* reduce memory utilization and make sharing of data easier which may have security implications.
* See ref: "TODO: add ref" for details.
*
*
* string vm_id = 1;
*/
public java.lang.String getVmId() {
java.lang.Object ref = vmId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
vmId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* An ID which will be used along with a hash of the wasm code (or the name of the registered Null
* VM plugin) to determine which VM will be used for the plugin. All plugins which use the same
* *vm_id* and code will use the same VM. May be left blank. Sharing a VM between plugins can
* reduce memory utilization and make sharing of data easier which may have security implications.
* See ref: "TODO: add ref" for details.
*
*
* string vm_id = 1;
*/
public com.google.protobuf.ByteString
getVmIdBytes() {
java.lang.Object ref = vmId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
vmId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* An ID which will be used along with a hash of the wasm code (or the name of the registered Null
* VM plugin) to determine which VM will be used for the plugin. All plugins which use the same
* *vm_id* and code will use the same VM. May be left blank. Sharing a VM between plugins can
* reduce memory utilization and make sharing of data easier which may have security implications.
* See ref: "TODO: add ref" for details.
*
*
* string vm_id = 1;
*/
public Builder setVmId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
vmId_ = value;
onChanged();
return this;
}
/**
*
* An ID which will be used along with a hash of the wasm code (or the name of the registered Null
* VM plugin) to determine which VM will be used for the plugin. All plugins which use the same
* *vm_id* and code will use the same VM. May be left blank. Sharing a VM between plugins can
* reduce memory utilization and make sharing of data easier which may have security implications.
* See ref: "TODO: add ref" for details.
*
*
* string vm_id = 1;
*/
public Builder clearVmId() {
vmId_ = getDefaultInstance().getVmId();
onChanged();
return this;
}
/**
*
* An ID which will be used along with a hash of the wasm code (or the name of the registered Null
* VM plugin) to determine which VM will be used for the plugin. All plugins which use the same
* *vm_id* and code will use the same VM. May be left blank. Sharing a VM between plugins can
* reduce memory utilization and make sharing of data easier which may have security implications.
* See ref: "TODO: add ref" for details.
*
*
* string vm_id = 1;
*/
public Builder setVmIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
vmId_ = value;
onChanged();
return this;
}
private java.lang.Object runtime_ = "";
/**
*
* The Wasm runtime type (either "v8" or "null" for code compiled into Envoy).
*
*
* string runtime = 2 [(.validate.rules) = { ... }
*/
public java.lang.String getRuntime() {
java.lang.Object ref = runtime_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
runtime_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The Wasm runtime type (either "v8" or "null" for code compiled into Envoy).
*
*
* string runtime = 2 [(.validate.rules) = { ... }
*/
public com.google.protobuf.ByteString
getRuntimeBytes() {
java.lang.Object ref = runtime_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
runtime_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The Wasm runtime type (either "v8" or "null" for code compiled into Envoy).
*
*
* string runtime = 2 [(.validate.rules) = { ... }
*/
public Builder setRuntime(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
runtime_ = value;
onChanged();
return this;
}
/**
*
* The Wasm runtime type (either "v8" or "null" for code compiled into Envoy).
*
*
* string runtime = 2 [(.validate.rules) = { ... }
*/
public Builder clearRuntime() {
runtime_ = getDefaultInstance().getRuntime();
onChanged();
return this;
}
/**
*
* The Wasm runtime type (either "v8" or "null" for code compiled into Envoy).
*
*
* string runtime = 2 [(.validate.rules) = { ... }
*/
public Builder setRuntimeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
runtime_ = value;
onChanged();
return this;
}
private io.envoyproxy.envoy.api.v2.core.AsyncDataSource code_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.AsyncDataSource, io.envoyproxy.envoy.api.v2.core.AsyncDataSource.Builder, io.envoyproxy.envoy.api.v2.core.AsyncDataSourceOrBuilder> codeBuilder_;
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.api.v2.core.AsyncDataSource code = 3;
*/
public boolean hasCode() {
return codeBuilder_ != null || code_ != null;
}
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.api.v2.core.AsyncDataSource code = 3;
*/
public io.envoyproxy.envoy.api.v2.core.AsyncDataSource getCode() {
if (codeBuilder_ == null) {
return code_ == null ? io.envoyproxy.envoy.api.v2.core.AsyncDataSource.getDefaultInstance() : code_;
} else {
return codeBuilder_.getMessage();
}
}
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.api.v2.core.AsyncDataSource code = 3;
*/
public Builder setCode(io.envoyproxy.envoy.api.v2.core.AsyncDataSource value) {
if (codeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
code_ = value;
onChanged();
} else {
codeBuilder_.setMessage(value);
}
return this;
}
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.api.v2.core.AsyncDataSource code = 3;
*/
public Builder setCode(
io.envoyproxy.envoy.api.v2.core.AsyncDataSource.Builder builderForValue) {
if (codeBuilder_ == null) {
code_ = builderForValue.build();
onChanged();
} else {
codeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.api.v2.core.AsyncDataSource code = 3;
*/
public Builder mergeCode(io.envoyproxy.envoy.api.v2.core.AsyncDataSource value) {
if (codeBuilder_ == null) {
if (code_ != null) {
code_ =
io.envoyproxy.envoy.api.v2.core.AsyncDataSource.newBuilder(code_).mergeFrom(value).buildPartial();
} else {
code_ = value;
}
onChanged();
} else {
codeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.api.v2.core.AsyncDataSource code = 3;
*/
public Builder clearCode() {
if (codeBuilder_ == null) {
code_ = null;
onChanged();
} else {
code_ = null;
codeBuilder_ = null;
}
return this;
}
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.api.v2.core.AsyncDataSource code = 3;
*/
public io.envoyproxy.envoy.api.v2.core.AsyncDataSource.Builder getCodeBuilder() {
onChanged();
return getCodeFieldBuilder().getBuilder();
}
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.api.v2.core.AsyncDataSource code = 3;
*/
public io.envoyproxy.envoy.api.v2.core.AsyncDataSourceOrBuilder getCodeOrBuilder() {
if (codeBuilder_ != null) {
return codeBuilder_.getMessageOrBuilder();
} else {
return code_ == null ?
io.envoyproxy.envoy.api.v2.core.AsyncDataSource.getDefaultInstance() : code_;
}
}
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.api.v2.core.AsyncDataSource code = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.AsyncDataSource, io.envoyproxy.envoy.api.v2.core.AsyncDataSource.Builder, io.envoyproxy.envoy.api.v2.core.AsyncDataSourceOrBuilder>
getCodeFieldBuilder() {
if (codeBuilder_ == null) {
codeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.AsyncDataSource, io.envoyproxy.envoy.api.v2.core.AsyncDataSource.Builder, io.envoyproxy.envoy.api.v2.core.AsyncDataSourceOrBuilder>(
getCode(),
getParentForChildren(),
isClean());
code_ = null;
}
return codeBuilder_;
}
private com.google.protobuf.Any configuration_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> configurationBuilder_;
/**
*
* The Wasm configuration used in initialization of a new VM (proxy_on_start).
*
*
* .google.protobuf.Any configuration = 4;
*/
public boolean hasConfiguration() {
return configurationBuilder_ != null || configuration_ != null;
}
/**
*
* The Wasm configuration used in initialization of a new VM (proxy_on_start).
*
*
* .google.protobuf.Any configuration = 4;
*/
public com.google.protobuf.Any getConfiguration() {
if (configurationBuilder_ == null) {
return configuration_ == null ? com.google.protobuf.Any.getDefaultInstance() : configuration_;
} else {
return configurationBuilder_.getMessage();
}
}
/**
*
* The Wasm configuration used in initialization of a new VM (proxy_on_start).
*
*
* .google.protobuf.Any configuration = 4;
*/
public Builder setConfiguration(com.google.protobuf.Any value) {
if (configurationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
configuration_ = value;
onChanged();
} else {
configurationBuilder_.setMessage(value);
}
return this;
}
/**
*
* The Wasm configuration used in initialization of a new VM (proxy_on_start).
*
*
* .google.protobuf.Any configuration = 4;
*/
public Builder setConfiguration(
com.google.protobuf.Any.Builder builderForValue) {
if (configurationBuilder_ == null) {
configuration_ = builderForValue.build();
onChanged();
} else {
configurationBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The Wasm configuration used in initialization of a new VM (proxy_on_start).
*
*
* .google.protobuf.Any configuration = 4;
*/
public Builder mergeConfiguration(com.google.protobuf.Any value) {
if (configurationBuilder_ == null) {
if (configuration_ != null) {
configuration_ =
com.google.protobuf.Any.newBuilder(configuration_).mergeFrom(value).buildPartial();
} else {
configuration_ = value;
}
onChanged();
} else {
configurationBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The Wasm configuration used in initialization of a new VM (proxy_on_start).
*
*
* .google.protobuf.Any configuration = 4;
*/
public Builder clearConfiguration() {
if (configurationBuilder_ == null) {
configuration_ = null;
onChanged();
} else {
configuration_ = null;
configurationBuilder_ = null;
}
return this;
}
/**
*
* The Wasm configuration used in initialization of a new VM (proxy_on_start).
*
*
* .google.protobuf.Any configuration = 4;
*/
public com.google.protobuf.Any.Builder getConfigurationBuilder() {
onChanged();
return getConfigurationFieldBuilder().getBuilder();
}
/**
*
* The Wasm configuration used in initialization of a new VM (proxy_on_start).
*
*
* .google.protobuf.Any configuration = 4;
*/
public com.google.protobuf.AnyOrBuilder getConfigurationOrBuilder() {
if (configurationBuilder_ != null) {
return configurationBuilder_.getMessageOrBuilder();
} else {
return configuration_ == null ?
com.google.protobuf.Any.getDefaultInstance() : configuration_;
}
}
/**
*
* The Wasm configuration used in initialization of a new VM (proxy_on_start).
*
*
* .google.protobuf.Any configuration = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>
getConfigurationFieldBuilder() {
if (configurationBuilder_ == null) {
configurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
getConfiguration(),
getParentForChildren(),
isClean());
configuration_ = null;
}
return configurationBuilder_;
}
private boolean allowPrecompiled_ ;
/**
*
* Allow the wasm file to include pre-compiled code on VMs which support it.
* Warning: this should only be enable for trusted sources as the precompiled code is not
* verified.
*
*
* bool allow_precompiled = 5;
*/
public boolean getAllowPrecompiled() {
return allowPrecompiled_;
}
/**
*
* Allow the wasm file to include pre-compiled code on VMs which support it.
* Warning: this should only be enable for trusted sources as the precompiled code is not
* verified.
*
*
* bool allow_precompiled = 5;
*/
public Builder setAllowPrecompiled(boolean value) {
allowPrecompiled_ = value;
onChanged();
return this;
}
/**
*
* Allow the wasm file to include pre-compiled code on VMs which support it.
* Warning: this should only be enable for trusted sources as the precompiled code is not
* verified.
*
*
* bool allow_precompiled = 5;
*/
public Builder clearAllowPrecompiled() {
allowPrecompiled_ = false;
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:envoy.config.wasm.v2alpha.VmConfig)
}
// @@protoc_insertion_point(class_scope:envoy.config.wasm.v2alpha.VmConfig)
private static final io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig();
}
public static io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public VmConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new VmConfig(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 io.envoyproxy.envoy.config.wasm.v2alpha.VmConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy