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) {
}
}
@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;
nackOnCodeCacheMiss_ = false;
if (environmentVariablesBuilder_ == null) {
environmentVariables_ = null;
} else {
environmentVariables_ = null;
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);
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_;
result.nackOnCodeCacheMiss_ = nackOnCodeCacheMiss_;
if (environmentVariablesBuilder_ == null) {
result.environmentVariables_ = environmentVariables_;
} else {
result.environmentVariables_ = environmentVariablesBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof 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_;
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());
}
if (other.getNackOnCodeCacheMiss() != false) {
setNackOnCodeCacheMiss(other.getNackOnCodeCacheMiss());
}
if (other.hasEnvironmentVariables()) {
mergeEnvironmentVariables(other.getEnvironmentVariables());
}
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.extensions.wasm.v3.VmConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.extensions.wasm.v3.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.
* [#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;
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();
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;
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 -> wavm.
* 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.wavm:
* **envoy.wasm.runtime.wavm**: `WAVM <https://wavm.github.io/>`_-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 -> wavm.
* 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.wavm:
* **envoy.wasm.runtime.wavm**: `WAVM <https://wavm.github.io/>`_-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 -> wavm.
* 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.wavm:
* **envoy.wasm.runtime.wavm**: `WAVM <https://wavm.github.io/>`_-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;
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 -> wavm.
* 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.wavm:
* **envoy.wasm.runtime.wavm**: `WAVM <https://wavm.github.io/>`_-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();
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 -> wavm.
* 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.wavm:
* **envoy.wasm.runtime.wavm**: `WAVM <https://wavm.github.io/>`_-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;
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 codeBuilder_ != null || code_ != null;
}
/**
*
* 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;
onChanged();
} else {
codeBuilder_.setMessage(value);
}
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();
onChanged();
} else {
codeBuilder_.setMessage(builderForValue.build());
}
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 (code_ != null) {
code_ =
io.envoyproxy.envoy.config.core.v3.AsyncDataSource.newBuilder(code_).mergeFrom(value).buildPartial();
} else {
code_ = value;
}
onChanged();
} else {
codeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The Wasm code that Envoy will execute.
*
*
* .envoy.config.core.v3.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.config.core.v3.AsyncDataSource code = 3;
*/
public io.envoyproxy.envoy.config.core.v3.AsyncDataSource.Builder getCodeBuilder() {
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 configurationBuilder_ != null || configuration_ != null;
}
/**
*
* 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;
onChanged();
} else {
configurationBuilder_.setMessage(value);
}
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();
onChanged();
} else {
configurationBuilder_.setMessage(builderForValue.build());
}
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 (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.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() {
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.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() {
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;
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() {
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;
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() {
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 mostly implicitly
* called in your language's standard library, so you do not need to call them directly and you can access to env
* vars just like when you do 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 environmentVariablesBuilder_ != null || environmentVariables_ != null;
}
/**
*
* 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 mostly implicitly
* called in your language's standard library, so you do not need to call them directly and you can access to env
* vars just like when you do 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 mostly implicitly
* called in your language's standard library, so you do not need to call them directly and you can access to env
* vars just like when you do 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;
onChanged();
} else {
environmentVariablesBuilder_.setMessage(value);
}
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 mostly implicitly
* called in your language's standard library, so you do not need to call them directly and you can access to env
* vars just like when you do 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();
onChanged();
} else {
environmentVariablesBuilder_.setMessage(builderForValue.build());
}
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 mostly implicitly
* called in your language's standard library, so you do not need to call them directly and you can access to env
* vars just like when you do 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 (environmentVariables_ != null) {
environmentVariables_ =
io.envoyproxy.envoy.extensions.wasm.v3.EnvironmentVariables.newBuilder(environmentVariables_).mergeFrom(value).buildPartial();
} else {
environmentVariables_ = value;
}
onChanged();
} else {
environmentVariablesBuilder_.mergeFrom(value);
}
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 mostly implicitly
* called in your language's standard library, so you do not need to call them directly and you can access to env
* vars just like when you do 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() {
if (environmentVariablesBuilder_ == null) {
environmentVariables_ = null;
onChanged();
} else {
environmentVariables_ = null;
environmentVariablesBuilder_ = null;
}
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 mostly implicitly
* called in your language's standard library, so you do not need to call them directly and you can access to env
* vars just like when you do 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() {
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 mostly implicitly
* called in your language's standard library, so you do not need to call them directly and you can access to env
* vars just like when you do 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 mostly implicitly
* called in your language's standard library, so you do not need to call them directly and you can access to env
* vars just like when you do 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 {
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.extensions.wasm.v3.VmConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}