
io.envoyproxy.envoy.extensions.wasm.v3.VmConfig Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/extensions/wasm/v3/wasm.proto
// Protobuf Java Version: 3.25.1
package io.envoyproxy.envoy.extensions.wasm.v3;
/**
*
* Configuration for a Wasm VM.
* [#next-free-field: 8]
*
*
* Protobuf type {@code envoy.extensions.wasm.v3.VmConfig}
*/
public final class VmConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.extensions.wasm.v3.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();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.extensions.wasm.v3.WasmProto.internal_static_envoy_extensions_wasm_v3_VmConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.extensions.wasm.v3.WasmProto.internal_static_envoy_extensions_wasm_v3_VmConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.extensions.wasm.v3.VmConfig.class, io.envoyproxy.envoy.extensions.wasm.v3.VmConfig.Builder.class);
}
private int bitField0_;
public static final int VM_ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
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.
* [#comment: TODO: add ref for details.]
*
*
* string vm_id = 1;
* @return The vmId.
*/
@java.lang.Override
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.
* [#comment: TODO: add ref for details.]
*
*
* string vm_id = 1;
* @return The bytes for vmId.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object runtime_ = "";
/**
*
* The Wasm runtime type, defaults to the first available Wasm engine used at Envoy build-time.
* The priority to search for the available engine is: v8 -> wasmtime -> wamr.
* Available Wasm runtime types are registered as extensions. The following runtimes are included
* in Envoy code base:
*
* .. _extension_envoy.wasm.runtime.null:
*
* **envoy.wasm.runtime.null**: Null sandbox, the Wasm module must be compiled and linked into the
* Envoy binary. The registered name is given in the ``code`` field as ``inline_string``.
*
* .. _extension_envoy.wasm.runtime.v8:
*
* **envoy.wasm.runtime.v8**: `V8 <https://v8.dev/>`_-based WebAssembly runtime.
*
* .. _extension_envoy.wasm.runtime.wamr:
*
* **envoy.wasm.runtime.wamr**: `WAMR <https://github.com/bytecodealliance/wasm-micro-runtime/>`_-based WebAssembly runtime.
* This runtime is not enabled in the official build.
*
* .. _extension_envoy.wasm.runtime.wasmtime:
*
* **envoy.wasm.runtime.wasmtime**: `Wasmtime <https://wasmtime.dev/>`_-based WebAssembly runtime.
* This runtime is not enabled in the official build.
*
* [#extension-category: envoy.wasm.runtime]
*
*
* string runtime = 2;
* @return The runtime.
*/
@java.lang.Override
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, defaults to the first available Wasm engine used at Envoy build-time.
* The priority to search for the available engine is: v8 -> wasmtime -> wamr.
* Available Wasm runtime types are registered as extensions. The following runtimes are included
* in Envoy code base:
*
* .. _extension_envoy.wasm.runtime.null:
*
* **envoy.wasm.runtime.null**: Null sandbox, the Wasm module must be compiled and linked into the
* Envoy binary. The registered name is given in the ``code`` field as ``inline_string``.
*
* .. _extension_envoy.wasm.runtime.v8:
*
* **envoy.wasm.runtime.v8**: `V8 <https://v8.dev/>`_-based WebAssembly runtime.
*
* .. _extension_envoy.wasm.runtime.wamr:
*
* **envoy.wasm.runtime.wamr**: `WAMR <https://github.com/bytecodealliance/wasm-micro-runtime/>`_-based WebAssembly runtime.
* This runtime is not enabled in the official build.
*
* .. _extension_envoy.wasm.runtime.wasmtime:
*
* **envoy.wasm.runtime.wasmtime**: `Wasmtime <https://wasmtime.dev/>`_-based WebAssembly runtime.
* This runtime is not enabled in the official build.
*
* [#extension-category: envoy.wasm.runtime]
*
*
* string runtime = 2;
* @return The bytes for runtime.
*/
@java.lang.Override
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.config.core.v3.AsyncDataSource code_;
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.config.core.v3.AsyncDataSource code = 3;
* @return Whether the code field is set.
*/
@java.lang.Override
public boolean hasCode() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.config.core.v3.AsyncDataSource code = 3;
* @return The code.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.AsyncDataSource getCode() {
return code_ == null ? io.envoyproxy.envoy.config.core.v3.AsyncDataSource.getDefaultInstance() : code_;
}
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.config.core.v3.AsyncDataSource code = 3;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.AsyncDataSourceOrBuilder getCodeOrBuilder() {
return code_ == null ? io.envoyproxy.envoy.config.core.v3.AsyncDataSource.getDefaultInstance() : code_;
}
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.Struct`` is serialized as JSON before
* passing it to the plugin. ``google.protobuf.BytesValue`` and
* ``google.protobuf.StringValue`` are passed directly without the wrapper.
*
*
* .google.protobuf.Any configuration = 4;
* @return Whether the configuration field is set.
*/
@java.lang.Override
public boolean hasConfiguration() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* The Wasm configuration used in initialization of a new VM
* (proxy_on_start). ``google.protobuf.Struct`` is serialized as JSON before
* passing it to the plugin. ``google.protobuf.BytesValue`` and
* ``google.protobuf.StringValue`` are passed directly without the wrapper.
*
*
* .google.protobuf.Any configuration = 4;
* @return The configuration.
*/
@java.lang.Override
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.Struct`` is serialized as JSON before
* passing it to the plugin. ``google.protobuf.BytesValue`` and
* ``google.protobuf.StringValue`` are passed directly without the wrapper.
*
*
* .google.protobuf.Any configuration = 4;
*/
@java.lang.Override
public com.google.protobuf.AnyOrBuilder getConfigurationOrBuilder() {
return configuration_ == null ? com.google.protobuf.Any.getDefaultInstance() : configuration_;
}
public static final int ALLOW_PRECOMPILED_FIELD_NUMBER = 5;
private boolean allowPrecompiled_ = false;
/**
*
* 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;
* @return The allowPrecompiled.
*/
@java.lang.Override
public boolean getAllowPrecompiled() {
return allowPrecompiled_;
}
public static final int NACK_ON_CODE_CACHE_MISS_FIELD_NUMBER = 6;
private boolean nackOnCodeCacheMiss_ = false;
/**
*
* If true and the code needs to be remotely fetched and it is not in the cache then NACK the configuration
* update and do a background fetch to fill the cache, otherwise fetch the code asynchronously and enter
* warming state.
*
*
* bool nack_on_code_cache_miss = 6;
* @return The nackOnCodeCacheMiss.
*/
@java.lang.Override
public boolean getNackOnCodeCacheMiss() {
return nackOnCodeCacheMiss_;
}
public static final int ENVIRONMENT_VARIABLES_FIELD_NUMBER = 7;
private io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariables environmentVariables_;
/**
*
* Specifies environment variables to be injected to this VM which will be available through
* WASI's ``environ_get`` and ``environ_get_sizes`` system calls. Note that these functions
* are generally called implicitly by your language's standard library. Therefore, you do not
* need to call them directly. You can access environment variables in the same way you would
* on native platforms.
* Warning: Envoy rejects the configuration if there's conflict of key space.
*
*
* .envoy.extensions.wasm.v3.EnvironmentVariables environment_variables = 7;
* @return Whether the environmentVariables field is set.
*/
@java.lang.Override
public boolean hasEnvironmentVariables() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Specifies environment variables to be injected to this VM which will be available through
* WASI's ``environ_get`` and ``environ_get_sizes`` system calls. Note that these functions
* are generally called implicitly by your language's standard library. Therefore, you do not
* need to call them directly. You can access environment variables in the same way you would
* on native platforms.
* Warning: Envoy rejects the configuration if there's conflict of key space.
*
*
* .envoy.extensions.wasm.v3.EnvironmentVariables environment_variables = 7;
* @return The environmentVariables.
*/
@java.lang.Override
public io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariables getEnvironmentVariables() {
return environmentVariables_ == null ? io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariables.getDefaultInstance() : environmentVariables_;
}
/**
*
* Specifies environment variables to be injected to this VM which will be available through
* WASI's ``environ_get`` and ``environ_get_sizes`` system calls. Note that these functions
* are generally called implicitly by your language's standard library. Therefore, you do not
* need to call them directly. You can access environment variables in the same way you would
* on native platforms.
* Warning: Envoy rejects the configuration if there's conflict of key space.
*
*
* .envoy.extensions.wasm.v3.EnvironmentVariables environment_variables = 7;
*/
@java.lang.Override
public io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariablesOrBuilder getEnvironmentVariablesOrBuilder() {
return environmentVariables_ == null ? io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariables.getDefaultInstance() : environmentVariables_;
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vmId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, vmId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runtime_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, runtime_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(3, getCode());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(4, getConfiguration());
}
if (allowPrecompiled_ != false) {
output.writeBool(5, allowPrecompiled_);
}
if (nackOnCodeCacheMiss_ != false) {
output.writeBool(6, nackOnCodeCacheMiss_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(7, getEnvironmentVariables());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vmId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, vmId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runtime_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, runtime_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getCode());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getConfiguration());
}
if (allowPrecompiled_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(5, allowPrecompiled_);
}
if (nackOnCodeCacheMiss_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, nackOnCodeCacheMiss_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getEnvironmentVariables());
}
size += getUnknownFields().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.extensions.wasm.v3.VmConfig)) {
return super.equals(obj);
}
io.envoyproxy.envoy.extensions.wasm.v3.VmConfig other = (io.envoyproxy.envoy.extensions.wasm.v3.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 (getNackOnCodeCacheMiss()
!= other.getNackOnCodeCacheMiss()) return false;
if (hasEnvironmentVariables() != other.hasEnvironmentVariables()) return false;
if (hasEnvironmentVariables()) {
if (!getEnvironmentVariables()
.equals(other.getEnvironmentVariables())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) 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 = (37 * hash) + NACK_ON_CODE_CACHE_MISS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getNackOnCodeCacheMiss());
if (hasEnvironmentVariables()) {
hash = (37 * hash) + ENVIRONMENT_VARIABLES_FIELD_NUMBER;
hash = (53 * hash) + getEnvironmentVariables().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.extensions.wasm.v3.VmConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.wasm.v3.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.extensions.wasm.v3.VmConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.wasm.v3.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.extensions.wasm.v3.VmConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.wasm.v3.VmConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.extensions.wasm.v3.VmConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.wasm.v3.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.extensions.wasm.v3.VmConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.wasm.v3.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.extensions.wasm.v3.VmConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.wasm.v3.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.extensions.wasm.v3.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: 8]
*
*
* Protobuf type {@code envoy.extensions.wasm.v3.VmConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.extensions.wasm.v3.VmConfig)
io.envoyproxy.envoy.extensions.wasm.v3.VmConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.extensions.wasm.v3.WasmProto.internal_static_envoy_extensions_wasm_v3_VmConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.extensions.wasm.v3.WasmProto.internal_static_envoy_extensions_wasm_v3_VmConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.extensions.wasm.v3.VmConfig.class, io.envoyproxy.envoy.extensions.wasm.v3.VmConfig.Builder.class);
}
// Construct using io.envoyproxy.envoy.extensions.wasm.v3.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) {
getCodeFieldBuilder();
getConfigurationFieldBuilder();
getEnvironmentVariablesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
vmId_ = "";
runtime_ = "";
code_ = null;
if (codeBuilder_ != null) {
codeBuilder_.dispose();
codeBuilder_ = null;
}
configuration_ = null;
if (configurationBuilder_ != null) {
configurationBuilder_.dispose();
configurationBuilder_ = null;
}
allowPrecompiled_ = false;
nackOnCodeCacheMiss_ = false;
environmentVariables_ = null;
if (environmentVariablesBuilder_ != null) {
environmentVariablesBuilder_.dispose();
environmentVariablesBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.extensions.wasm.v3.WasmProto.internal_static_envoy_extensions_wasm_v3_VmConfig_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.wasm.v3.VmConfig getDefaultInstanceForType() {
return io.envoyproxy.envoy.extensions.wasm.v3.VmConfig.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.wasm.v3.VmConfig build() {
io.envoyproxy.envoy.extensions.wasm.v3.VmConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.wasm.v3.VmConfig buildPartial() {
io.envoyproxy.envoy.extensions.wasm.v3.VmConfig result = new io.envoyproxy.envoy.extensions.wasm.v3.VmConfig(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(io.envoyproxy.envoy.extensions.wasm.v3.VmConfig result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.vmId_ = vmId_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.runtime_ = runtime_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.code_ = codeBuilder_ == null
? code_
: codeBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.configuration_ = configurationBuilder_ == null
? configuration_
: configurationBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.allowPrecompiled_ = allowPrecompiled_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.nackOnCodeCacheMiss_ = nackOnCodeCacheMiss_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.environmentVariables_ = environmentVariablesBuilder_ == null
? environmentVariables_
: environmentVariablesBuilder_.build();
to_bitField0_ |= 0x00000004;
}
result.bitField0_ |= to_bitField0_;
}
@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.extensions.wasm.v3.VmConfig) {
return mergeFrom((io.envoyproxy.envoy.extensions.wasm.v3.VmConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.extensions.wasm.v3.VmConfig other) {
if (other == io.envoyproxy.envoy.extensions.wasm.v3.VmConfig.getDefaultInstance()) return this;
if (!other.getVmId().isEmpty()) {
vmId_ = other.vmId_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getRuntime().isEmpty()) {
runtime_ = other.runtime_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasCode()) {
mergeCode(other.getCode());
}
if (other.hasConfiguration()) {
mergeConfiguration(other.getConfiguration());
}
if (other.getAllowPrecompiled() != false) {
setAllowPrecompiled(other.getAllowPrecompiled());
}
if (other.getNackOnCodeCacheMiss() != false) {
setNackOnCodeCacheMiss(other.getNackOnCodeCacheMiss());
}
if (other.hasEnvironmentVariables()) {
mergeEnvironmentVariables(other.getEnvironmentVariables());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
vmId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
runtime_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
input.readMessage(
getCodeFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
input.readMessage(
getConfigurationFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 40: {
allowPrecompiled_ = input.readBool();
bitField0_ |= 0x00000010;
break;
} // case 40
case 48: {
nackOnCodeCacheMiss_ = input.readBool();
bitField0_ |= 0x00000020;
break;
} // case 48
case 58: {
input.readMessage(
getEnvironmentVariablesFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000040;
break;
} // case 58
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
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.
* [#comment: TODO: add ref for details.]
*
*
* string vm_id = 1;
* @return The vmId.
*/
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.
* [#comment: TODO: add ref for details.]
*
*
* string vm_id = 1;
* @return The bytes for vmId.
*/
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.
* [#comment: TODO: add ref for details.]
*
*
* string vm_id = 1;
* @param value The vmId to set.
* @return This builder for chaining.
*/
public Builder setVmId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
vmId_ = value;
bitField0_ |= 0x00000001;
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.
* [#comment: TODO: add ref for details.]
*
*
* string vm_id = 1;
* @return This builder for chaining.
*/
public Builder clearVmId() {
vmId_ = getDefaultInstance().getVmId();
bitField0_ = (bitField0_ & ~0x00000001);
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.
* [#comment: TODO: add ref for details.]
*
*
* string vm_id = 1;
* @param value The bytes for vmId to set.
* @return This builder for chaining.
*/
public Builder setVmIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
vmId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object runtime_ = "";
/**
*
* The Wasm runtime type, defaults to the first available Wasm engine used at Envoy build-time.
* The priority to search for the available engine is: v8 -> wasmtime -> wamr.
* Available Wasm runtime types are registered as extensions. The following runtimes are included
* in Envoy code base:
*
* .. _extension_envoy.wasm.runtime.null:
*
* **envoy.wasm.runtime.null**: Null sandbox, the Wasm module must be compiled and linked into the
* Envoy binary. The registered name is given in the ``code`` field as ``inline_string``.
*
* .. _extension_envoy.wasm.runtime.v8:
*
* **envoy.wasm.runtime.v8**: `V8 <https://v8.dev/>`_-based WebAssembly runtime.
*
* .. _extension_envoy.wasm.runtime.wamr:
*
* **envoy.wasm.runtime.wamr**: `WAMR <https://github.com/bytecodealliance/wasm-micro-runtime/>`_-based WebAssembly runtime.
* This runtime is not enabled in the official build.
*
* .. _extension_envoy.wasm.runtime.wasmtime:
*
* **envoy.wasm.runtime.wasmtime**: `Wasmtime <https://wasmtime.dev/>`_-based WebAssembly runtime.
* This runtime is not enabled in the official build.
*
* [#extension-category: envoy.wasm.runtime]
*
*
* string runtime = 2;
* @return The runtime.
*/
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, defaults to the first available Wasm engine used at Envoy build-time.
* The priority to search for the available engine is: v8 -> wasmtime -> wamr.
* Available Wasm runtime types are registered as extensions. The following runtimes are included
* in Envoy code base:
*
* .. _extension_envoy.wasm.runtime.null:
*
* **envoy.wasm.runtime.null**: Null sandbox, the Wasm module must be compiled and linked into the
* Envoy binary. The registered name is given in the ``code`` field as ``inline_string``.
*
* .. _extension_envoy.wasm.runtime.v8:
*
* **envoy.wasm.runtime.v8**: `V8 <https://v8.dev/>`_-based WebAssembly runtime.
*
* .. _extension_envoy.wasm.runtime.wamr:
*
* **envoy.wasm.runtime.wamr**: `WAMR <https://github.com/bytecodealliance/wasm-micro-runtime/>`_-based WebAssembly runtime.
* This runtime is not enabled in the official build.
*
* .. _extension_envoy.wasm.runtime.wasmtime:
*
* **envoy.wasm.runtime.wasmtime**: `Wasmtime <https://wasmtime.dev/>`_-based WebAssembly runtime.
* This runtime is not enabled in the official build.
*
* [#extension-category: envoy.wasm.runtime]
*
*
* string runtime = 2;
* @return The bytes for runtime.
*/
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, defaults to the first available Wasm engine used at Envoy build-time.
* The priority to search for the available engine is: v8 -> wasmtime -> wamr.
* Available Wasm runtime types are registered as extensions. The following runtimes are included
* in Envoy code base:
*
* .. _extension_envoy.wasm.runtime.null:
*
* **envoy.wasm.runtime.null**: Null sandbox, the Wasm module must be compiled and linked into the
* Envoy binary. The registered name is given in the ``code`` field as ``inline_string``.
*
* .. _extension_envoy.wasm.runtime.v8:
*
* **envoy.wasm.runtime.v8**: `V8 <https://v8.dev/>`_-based WebAssembly runtime.
*
* .. _extension_envoy.wasm.runtime.wamr:
*
* **envoy.wasm.runtime.wamr**: `WAMR <https://github.com/bytecodealliance/wasm-micro-runtime/>`_-based WebAssembly runtime.
* This runtime is not enabled in the official build.
*
* .. _extension_envoy.wasm.runtime.wasmtime:
*
* **envoy.wasm.runtime.wasmtime**: `Wasmtime <https://wasmtime.dev/>`_-based WebAssembly runtime.
* This runtime is not enabled in the official build.
*
* [#extension-category: envoy.wasm.runtime]
*
*
* string runtime = 2;
* @param value The runtime to set.
* @return This builder for chaining.
*/
public Builder setRuntime(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
runtime_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The Wasm runtime type, defaults to the first available Wasm engine used at Envoy build-time.
* The priority to search for the available engine is: v8 -> wasmtime -> wamr.
* Available Wasm runtime types are registered as extensions. The following runtimes are included
* in Envoy code base:
*
* .. _extension_envoy.wasm.runtime.null:
*
* **envoy.wasm.runtime.null**: Null sandbox, the Wasm module must be compiled and linked into the
* Envoy binary. The registered name is given in the ``code`` field as ``inline_string``.
*
* .. _extension_envoy.wasm.runtime.v8:
*
* **envoy.wasm.runtime.v8**: `V8 <https://v8.dev/>`_-based WebAssembly runtime.
*
* .. _extension_envoy.wasm.runtime.wamr:
*
* **envoy.wasm.runtime.wamr**: `WAMR <https://github.com/bytecodealliance/wasm-micro-runtime/>`_-based WebAssembly runtime.
* This runtime is not enabled in the official build.
*
* .. _extension_envoy.wasm.runtime.wasmtime:
*
* **envoy.wasm.runtime.wasmtime**: `Wasmtime <https://wasmtime.dev/>`_-based WebAssembly runtime.
* This runtime is not enabled in the official build.
*
* [#extension-category: envoy.wasm.runtime]
*
*
* string runtime = 2;
* @return This builder for chaining.
*/
public Builder clearRuntime() {
runtime_ = getDefaultInstance().getRuntime();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* The Wasm runtime type, defaults to the first available Wasm engine used at Envoy build-time.
* The priority to search for the available engine is: v8 -> wasmtime -> wamr.
* Available Wasm runtime types are registered as extensions. The following runtimes are included
* in Envoy code base:
*
* .. _extension_envoy.wasm.runtime.null:
*
* **envoy.wasm.runtime.null**: Null sandbox, the Wasm module must be compiled and linked into the
* Envoy binary. The registered name is given in the ``code`` field as ``inline_string``.
*
* .. _extension_envoy.wasm.runtime.v8:
*
* **envoy.wasm.runtime.v8**: `V8 <https://v8.dev/>`_-based WebAssembly runtime.
*
* .. _extension_envoy.wasm.runtime.wamr:
*
* **envoy.wasm.runtime.wamr**: `WAMR <https://github.com/bytecodealliance/wasm-micro-runtime/>`_-based WebAssembly runtime.
* This runtime is not enabled in the official build.
*
* .. _extension_envoy.wasm.runtime.wasmtime:
*
* **envoy.wasm.runtime.wasmtime**: `Wasmtime <https://wasmtime.dev/>`_-based WebAssembly runtime.
* This runtime is not enabled in the official build.
*
* [#extension-category: envoy.wasm.runtime]
*
*
* string runtime = 2;
* @param value The bytes for runtime to set.
* @return This builder for chaining.
*/
public Builder setRuntimeBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
runtime_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private io.envoyproxy.envoy.config.core.v3.AsyncDataSource code_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.AsyncDataSource, io.envoyproxy.envoy.config.core.v3.AsyncDataSource.Builder, io.envoyproxy.envoy.config.core.v3.AsyncDataSourceOrBuilder> codeBuilder_;
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.config.core.v3.AsyncDataSource code = 3;
* @return Whether the code field is set.
*/
public boolean hasCode() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.config.core.v3.AsyncDataSource code = 3;
* @return The code.
*/
public io.envoyproxy.envoy.config.core.v3.AsyncDataSource getCode() {
if (codeBuilder_ == null) {
return code_ == null ? io.envoyproxy.envoy.config.core.v3.AsyncDataSource.getDefaultInstance() : code_;
} else {
return codeBuilder_.getMessage();
}
}
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.config.core.v3.AsyncDataSource code = 3;
*/
public Builder setCode(io.envoyproxy.envoy.config.core.v3.AsyncDataSource value) {
if (codeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
code_ = value;
} else {
codeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.config.core.v3.AsyncDataSource code = 3;
*/
public Builder setCode(
io.envoyproxy.envoy.config.core.v3.AsyncDataSource.Builder builderForValue) {
if (codeBuilder_ == null) {
code_ = builderForValue.build();
} else {
codeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.config.core.v3.AsyncDataSource code = 3;
*/
public Builder mergeCode(io.envoyproxy.envoy.config.core.v3.AsyncDataSource value) {
if (codeBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
code_ != null &&
code_ != io.envoyproxy.envoy.config.core.v3.AsyncDataSource.getDefaultInstance()) {
getCodeBuilder().mergeFrom(value);
} else {
code_ = value;
}
} else {
codeBuilder_.mergeFrom(value);
}
if (code_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.config.core.v3.AsyncDataSource code = 3;
*/
public Builder clearCode() {
bitField0_ = (bitField0_ & ~0x00000004);
code_ = null;
if (codeBuilder_ != null) {
codeBuilder_.dispose();
codeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.config.core.v3.AsyncDataSource code = 3;
*/
public io.envoyproxy.envoy.config.core.v3.AsyncDataSource.Builder getCodeBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getCodeFieldBuilder().getBuilder();
}
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.config.core.v3.AsyncDataSource code = 3;
*/
public io.envoyproxy.envoy.config.core.v3.AsyncDataSourceOrBuilder getCodeOrBuilder() {
if (codeBuilder_ != null) {
return codeBuilder_.getMessageOrBuilder();
} else {
return code_ == null ?
io.envoyproxy.envoy.config.core.v3.AsyncDataSource.getDefaultInstance() : code_;
}
}
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.config.core.v3.AsyncDataSource code = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.AsyncDataSource, io.envoyproxy.envoy.config.core.v3.AsyncDataSource.Builder, io.envoyproxy.envoy.config.core.v3.AsyncDataSourceOrBuilder>
getCodeFieldBuilder() {
if (codeBuilder_ == null) {
codeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.AsyncDataSource, io.envoyproxy.envoy.config.core.v3.AsyncDataSource.Builder, io.envoyproxy.envoy.config.core.v3.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.Struct`` is serialized as JSON before
* passing it to the plugin. ``google.protobuf.BytesValue`` and
* ``google.protobuf.StringValue`` are passed directly without the wrapper.
*
*
* .google.protobuf.Any configuration = 4;
* @return Whether the configuration field is set.
*/
public boolean hasConfiguration() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* The Wasm configuration used in initialization of a new VM
* (proxy_on_start). ``google.protobuf.Struct`` is serialized as JSON before
* passing it to the plugin. ``google.protobuf.BytesValue`` and
* ``google.protobuf.StringValue`` are passed directly without the wrapper.
*
*
* .google.protobuf.Any configuration = 4;
* @return The configuration.
*/
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.Struct`` is serialized as JSON before
* passing it to the plugin. ``google.protobuf.BytesValue`` and
* ``google.protobuf.StringValue`` are passed directly without the wrapper.
*
*
* .google.protobuf.Any configuration = 4;
*/
public Builder setConfiguration(com.google.protobuf.Any value) {
if (configurationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
configuration_ = value;
} else {
configurationBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* The Wasm configuration used in initialization of a new VM
* (proxy_on_start). ``google.protobuf.Struct`` is serialized as JSON before
* passing it to the plugin. ``google.protobuf.BytesValue`` and
* ``google.protobuf.StringValue`` are passed directly without the wrapper.
*
*
* .google.protobuf.Any configuration = 4;
*/
public Builder setConfiguration(
com.google.protobuf.Any.Builder builderForValue) {
if (configurationBuilder_ == null) {
configuration_ = builderForValue.build();
} else {
configurationBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* The Wasm configuration used in initialization of a new VM
* (proxy_on_start). ``google.protobuf.Struct`` is serialized as JSON before
* passing it to the plugin. ``google.protobuf.BytesValue`` and
* ``google.protobuf.StringValue`` are passed directly without the wrapper.
*
*
* .google.protobuf.Any configuration = 4;
*/
public Builder mergeConfiguration(com.google.protobuf.Any value) {
if (configurationBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
configuration_ != null &&
configuration_ != com.google.protobuf.Any.getDefaultInstance()) {
getConfigurationBuilder().mergeFrom(value);
} else {
configuration_ = value;
}
} else {
configurationBuilder_.mergeFrom(value);
}
if (configuration_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
* The Wasm configuration used in initialization of a new VM
* (proxy_on_start). ``google.protobuf.Struct`` is serialized as JSON before
* passing it to the plugin. ``google.protobuf.BytesValue`` and
* ``google.protobuf.StringValue`` are passed directly without the wrapper.
*
*
* .google.protobuf.Any configuration = 4;
*/
public Builder clearConfiguration() {
bitField0_ = (bitField0_ & ~0x00000008);
configuration_ = null;
if (configurationBuilder_ != null) {
configurationBuilder_.dispose();
configurationBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The Wasm configuration used in initialization of a new VM
* (proxy_on_start). ``google.protobuf.Struct`` is serialized as JSON before
* passing it to the plugin. ``google.protobuf.BytesValue`` and
* ``google.protobuf.StringValue`` are passed directly without the wrapper.
*
*
* .google.protobuf.Any configuration = 4;
*/
public com.google.protobuf.Any.Builder getConfigurationBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getConfigurationFieldBuilder().getBuilder();
}
/**
*
* The Wasm configuration used in initialization of a new VM
* (proxy_on_start). ``google.protobuf.Struct`` is serialized as JSON before
* passing it to the plugin. ``google.protobuf.BytesValue`` and
* ``google.protobuf.StringValue`` are passed directly without the wrapper.
*
*
* .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.Struct`` is serialized as JSON before
* passing it to the plugin. ``google.protobuf.BytesValue`` and
* ``google.protobuf.StringValue`` are passed directly without the wrapper.
*
*
* .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;
* @return The allowPrecompiled.
*/
@java.lang.Override
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;
* @param value The allowPrecompiled to set.
* @return This builder for chaining.
*/
public Builder setAllowPrecompiled(boolean value) {
allowPrecompiled_ = value;
bitField0_ |= 0x00000010;
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;
* @return This builder for chaining.
*/
public Builder clearAllowPrecompiled() {
bitField0_ = (bitField0_ & ~0x00000010);
allowPrecompiled_ = false;
onChanged();
return this;
}
private boolean nackOnCodeCacheMiss_ ;
/**
*
* If true and the code needs to be remotely fetched and it is not in the cache then NACK the configuration
* update and do a background fetch to fill the cache, otherwise fetch the code asynchronously and enter
* warming state.
*
*
* bool nack_on_code_cache_miss = 6;
* @return The nackOnCodeCacheMiss.
*/
@java.lang.Override
public boolean getNackOnCodeCacheMiss() {
return nackOnCodeCacheMiss_;
}
/**
*
* If true and the code needs to be remotely fetched and it is not in the cache then NACK the configuration
* update and do a background fetch to fill the cache, otherwise fetch the code asynchronously and enter
* warming state.
*
*
* bool nack_on_code_cache_miss = 6;
* @param value The nackOnCodeCacheMiss to set.
* @return This builder for chaining.
*/
public Builder setNackOnCodeCacheMiss(boolean value) {
nackOnCodeCacheMiss_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* If true and the code needs to be remotely fetched and it is not in the cache then NACK the configuration
* update and do a background fetch to fill the cache, otherwise fetch the code asynchronously and enter
* warming state.
*
*
* bool nack_on_code_cache_miss = 6;
* @return This builder for chaining.
*/
public Builder clearNackOnCodeCacheMiss() {
bitField0_ = (bitField0_ & ~0x00000020);
nackOnCodeCacheMiss_ = false;
onChanged();
return this;
}
private io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariables environmentVariables_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariables, io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariables.Builder, io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariablesOrBuilder> environmentVariablesBuilder_;
/**
*
* Specifies environment variables to be injected to this VM which will be available through
* WASI's ``environ_get`` and ``environ_get_sizes`` system calls. Note that these functions
* are generally called implicitly by your language's standard library. Therefore, you do not
* need to call them directly. You can access environment variables in the same way you would
* on native platforms.
* Warning: Envoy rejects the configuration if there's conflict of key space.
*
*
* .envoy.extensions.wasm.v3.EnvironmentVariables environment_variables = 7;
* @return Whether the environmentVariables field is set.
*/
public boolean hasEnvironmentVariables() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* Specifies environment variables to be injected to this VM which will be available through
* WASI's ``environ_get`` and ``environ_get_sizes`` system calls. Note that these functions
* are generally called implicitly by your language's standard library. Therefore, you do not
* need to call them directly. You can access environment variables in the same way you would
* on native platforms.
* Warning: Envoy rejects the configuration if there's conflict of key space.
*
*
* .envoy.extensions.wasm.v3.EnvironmentVariables environment_variables = 7;
* @return The environmentVariables.
*/
public io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariables getEnvironmentVariables() {
if (environmentVariablesBuilder_ == null) {
return environmentVariables_ == null ? io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariables.getDefaultInstance() : environmentVariables_;
} else {
return environmentVariablesBuilder_.getMessage();
}
}
/**
*
* Specifies environment variables to be injected to this VM which will be available through
* WASI's ``environ_get`` and ``environ_get_sizes`` system calls. Note that these functions
* are generally called implicitly by your language's standard library. Therefore, you do not
* need to call them directly. You can access environment variables in the same way you would
* on native platforms.
* Warning: Envoy rejects the configuration if there's conflict of key space.
*
*
* .envoy.extensions.wasm.v3.EnvironmentVariables environment_variables = 7;
*/
public Builder setEnvironmentVariables(io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariables value) {
if (environmentVariablesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
environmentVariables_ = value;
} else {
environmentVariablesBuilder_.setMessage(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* Specifies environment variables to be injected to this VM which will be available through
* WASI's ``environ_get`` and ``environ_get_sizes`` system calls. Note that these functions
* are generally called implicitly by your language's standard library. Therefore, you do not
* need to call them directly. You can access environment variables in the same way you would
* on native platforms.
* Warning: Envoy rejects the configuration if there's conflict of key space.
*
*
* .envoy.extensions.wasm.v3.EnvironmentVariables environment_variables = 7;
*/
public Builder setEnvironmentVariables(
io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariables.Builder builderForValue) {
if (environmentVariablesBuilder_ == null) {
environmentVariables_ = builderForValue.build();
} else {
environmentVariablesBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* Specifies environment variables to be injected to this VM which will be available through
* WASI's ``environ_get`` and ``environ_get_sizes`` system calls. Note that these functions
* are generally called implicitly by your language's standard library. Therefore, you do not
* need to call them directly. You can access environment variables in the same way you would
* on native platforms.
* Warning: Envoy rejects the configuration if there's conflict of key space.
*
*
* .envoy.extensions.wasm.v3.EnvironmentVariables environment_variables = 7;
*/
public Builder mergeEnvironmentVariables(io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariables value) {
if (environmentVariablesBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0) &&
environmentVariables_ != null &&
environmentVariables_ != io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariables.getDefaultInstance()) {
getEnvironmentVariablesBuilder().mergeFrom(value);
} else {
environmentVariables_ = value;
}
} else {
environmentVariablesBuilder_.mergeFrom(value);
}
if (environmentVariables_ != null) {
bitField0_ |= 0x00000040;
onChanged();
}
return this;
}
/**
*
* Specifies environment variables to be injected to this VM which will be available through
* WASI's ``environ_get`` and ``environ_get_sizes`` system calls. Note that these functions
* are generally called implicitly by your language's standard library. Therefore, you do not
* need to call them directly. You can access environment variables in the same way you would
* on native platforms.
* Warning: Envoy rejects the configuration if there's conflict of key space.
*
*
* .envoy.extensions.wasm.v3.EnvironmentVariables environment_variables = 7;
*/
public Builder clearEnvironmentVariables() {
bitField0_ = (bitField0_ & ~0x00000040);
environmentVariables_ = null;
if (environmentVariablesBuilder_ != null) {
environmentVariablesBuilder_.dispose();
environmentVariablesBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Specifies environment variables to be injected to this VM which will be available through
* WASI's ``environ_get`` and ``environ_get_sizes`` system calls. Note that these functions
* are generally called implicitly by your language's standard library. Therefore, you do not
* need to call them directly. You can access environment variables in the same way you would
* on native platforms.
* Warning: Envoy rejects the configuration if there's conflict of key space.
*
*
* .envoy.extensions.wasm.v3.EnvironmentVariables environment_variables = 7;
*/
public io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariables.Builder getEnvironmentVariablesBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getEnvironmentVariablesFieldBuilder().getBuilder();
}
/**
*
* Specifies environment variables to be injected to this VM which will be available through
* WASI's ``environ_get`` and ``environ_get_sizes`` system calls. Note that these functions
* are generally called implicitly by your language's standard library. Therefore, you do not
* need to call them directly. You can access environment variables in the same way you would
* on native platforms.
* Warning: Envoy rejects the configuration if there's conflict of key space.
*
*
* .envoy.extensions.wasm.v3.EnvironmentVariables environment_variables = 7;
*/
public io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariablesOrBuilder getEnvironmentVariablesOrBuilder() {
if (environmentVariablesBuilder_ != null) {
return environmentVariablesBuilder_.getMessageOrBuilder();
} else {
return environmentVariables_ == null ?
io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariables.getDefaultInstance() : environmentVariables_;
}
}
/**
*
* Specifies environment variables to be injected to this VM which will be available through
* WASI's ``environ_get`` and ``environ_get_sizes`` system calls. Note that these functions
* are generally called implicitly by your language's standard library. Therefore, you do not
* need to call them directly. You can access environment variables in the same way you would
* on native platforms.
* Warning: Envoy rejects the configuration if there's conflict of key space.
*
*
* .envoy.extensions.wasm.v3.EnvironmentVariables environment_variables = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariables, io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariables.Builder, io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariablesOrBuilder>
getEnvironmentVariablesFieldBuilder() {
if (environmentVariablesBuilder_ == null) {
environmentVariablesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariables, io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariables.Builder, io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariablesOrBuilder>(
getEnvironmentVariables(),
getParentForChildren(),
isClean());
environmentVariables_ = null;
}
return environmentVariablesBuilder_;
}
@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.extensions.wasm.v3.VmConfig)
}
// @@protoc_insertion_point(class_scope:envoy.extensions.wasm.v3.VmConfig)
private static final io.envoyproxy.envoy.extensions.wasm.v3.VmConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.extensions.wasm.v3.VmConfig();
}
public static io.envoyproxy.envoy.extensions.wasm.v3.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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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.extensions.wasm.v3.VmConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy