// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/service/ext_proc/v3/external_processor.proto
package io.envoyproxy.envoy.service.ext_proc.v3;
/**
*
* This message causes the filter to attempt to create a locally
* generated response, send it downstream, stop processing
* additional filters, and ignore any additional messages received
* from the remote server for this request or response. If a response
* has already started, then this will either ship the reply directly
* to the downstream codec, or reset the stream.
* [#next-free-field: 6]
*
*
* Protobuf type {@code envoy.service.ext_proc.v3.ImmediateResponse}
*/
public final class ImmediateResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.service.ext_proc.v3.ImmediateResponse)
ImmediateResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use ImmediateResponse.newBuilder() to construct.
private ImmediateResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ImmediateResponse() {
body_ = "";
details_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ImmediateResponse();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ImmediateResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
io.envoyproxy.envoy.type.v3.HttpStatus.Builder subBuilder = null;
if (status_ != null) {
subBuilder = status_.toBuilder();
}
status_ = input.readMessage(io.envoyproxy.envoy.type.v3.HttpStatus.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(status_);
status_ = subBuilder.buildPartial();
}
break;
}
case 18: {
io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutation.Builder subBuilder = null;
if (headers_ != null) {
subBuilder = headers_.toBuilder();
}
headers_ = input.readMessage(io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutation.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(headers_);
headers_ = subBuilder.buildPartial();
}
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
body_ = s;
break;
}
case 34: {
io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatus.Builder subBuilder = null;
if (grpcStatus_ != null) {
subBuilder = grpcStatus_.toBuilder();
}
grpcStatus_ = input.readMessage(io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatus.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(grpcStatus_);
grpcStatus_ = subBuilder.buildPartial();
}
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
details_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.service.ext_proc.v3.ExternalProcessorProto.internal_static_envoy_service_ext_proc_v3_ImmediateResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.service.ext_proc.v3.ExternalProcessorProto.internal_static_envoy_service_ext_proc_v3_ImmediateResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse.class, io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse.Builder.class);
}
public static final int STATUS_FIELD_NUMBER = 1;
private io.envoyproxy.envoy.type.v3.HttpStatus status_;
/**
*
* The response code to return
*
*
* .envoy.type.v3.HttpStatus status = 1 [(.validate.rules) = { ... }
* @return Whether the status field is set.
*/
@java.lang.Override
public boolean hasStatus() {
return status_ != null;
}
/**
*
* The response code to return
*
*
* .envoy.type.v3.HttpStatus status = 1 [(.validate.rules) = { ... }
* @return The status.
*/
@java.lang.Override
public io.envoyproxy.envoy.type.v3.HttpStatus getStatus() {
return status_ == null ? io.envoyproxy.envoy.type.v3.HttpStatus.getDefaultInstance() : status_;
}
/**
*
* The response code to return
*
*
* .envoy.type.v3.HttpStatus status = 1 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.type.v3.HttpStatusOrBuilder getStatusOrBuilder() {
return getStatus();
}
public static final int HEADERS_FIELD_NUMBER = 2;
private io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutation headers_;
/**
*
* Apply changes to the default headers, which will include content-type.
*
*
* .envoy.service.ext_proc.v3.HeaderMutation headers = 2;
* @return Whether the headers field is set.
*/
@java.lang.Override
public boolean hasHeaders() {
return headers_ != null;
}
/**
*
* Apply changes to the default headers, which will include content-type.
*
*
* .envoy.service.ext_proc.v3.HeaderMutation headers = 2;
* @return The headers.
*/
@java.lang.Override
public io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutation getHeaders() {
return headers_ == null ? io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutation.getDefaultInstance() : headers_;
}
/**
*
* Apply changes to the default headers, which will include content-type.
*
*
* .envoy.service.ext_proc.v3.HeaderMutation headers = 2;
*/
@java.lang.Override
public io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutationOrBuilder getHeadersOrBuilder() {
return getHeaders();
}
public static final int BODY_FIELD_NUMBER = 3;
private volatile java.lang.Object body_;
/**
*
* The message body to return with the response which is sent using the
* text/plain content type, or encoded in the grpc-message header.
*
*
* string body = 3;
* @return The body.
*/
@java.lang.Override
public java.lang.String getBody() {
java.lang.Object ref = body_;
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();
body_ = s;
return s;
}
}
/**
*
* The message body to return with the response which is sent using the
* text/plain content type, or encoded in the grpc-message header.
*
*
* string body = 3;
* @return The bytes for body.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getBodyBytes() {
java.lang.Object ref = body_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
body_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int GRPC_STATUS_FIELD_NUMBER = 4;
private io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatus grpcStatus_;
/**
*
* If set, then include a gRPC status trailer.
*
*
* .envoy.service.ext_proc.v3.GrpcStatus grpc_status = 4;
* @return Whether the grpcStatus field is set.
*/
@java.lang.Override
public boolean hasGrpcStatus() {
return grpcStatus_ != null;
}
/**
*
* If set, then include a gRPC status trailer.
*
*
* .envoy.service.ext_proc.v3.GrpcStatus grpc_status = 4;
* @return The grpcStatus.
*/
@java.lang.Override
public io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatus getGrpcStatus() {
return grpcStatus_ == null ? io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatus.getDefaultInstance() : grpcStatus_;
}
/**
*
* If set, then include a gRPC status trailer.
*
*
* .envoy.service.ext_proc.v3.GrpcStatus grpc_status = 4;
*/
@java.lang.Override
public io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatusOrBuilder getGrpcStatusOrBuilder() {
return getGrpcStatus();
}
public static final int DETAILS_FIELD_NUMBER = 5;
private volatile java.lang.Object details_;
/**
*
* A string detailing why this local reply was sent, which may be included
* in log and debug output (e.g. this populates the %RESPONSE_CODE_DETAILS%
* command operator field for use in access logging).
*
*
* string details = 5;
* @return The details.
*/
@java.lang.Override
public java.lang.String getDetails() {
java.lang.Object ref = details_;
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();
details_ = s;
return s;
}
}
/**
*
* A string detailing why this local reply was sent, which may be included
* in log and debug output (e.g. this populates the %RESPONSE_CODE_DETAILS%
* command operator field for use in access logging).
*
*
* string details = 5;
* @return The bytes for details.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDetailsBytes() {
java.lang.Object ref = details_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
details_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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 (status_ != null) {
output.writeMessage(1, getStatus());
}
if (headers_ != null) {
output.writeMessage(2, getHeaders());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(body_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, body_);
}
if (grpcStatus_ != null) {
output.writeMessage(4, getGrpcStatus());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, details_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (status_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getStatus());
}
if (headers_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getHeaders());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(body_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, body_);
}
if (grpcStatus_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getGrpcStatus());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, details_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse)) {
return super.equals(obj);
}
io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse other = (io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse) obj;
if (hasStatus() != other.hasStatus()) return false;
if (hasStatus()) {
if (!getStatus()
.equals(other.getStatus())) return false;
}
if (hasHeaders() != other.hasHeaders()) return false;
if (hasHeaders()) {
if (!getHeaders()
.equals(other.getHeaders())) return false;
}
if (!getBody()
.equals(other.getBody())) return false;
if (hasGrpcStatus() != other.hasGrpcStatus()) return false;
if (hasGrpcStatus()) {
if (!getGrpcStatus()
.equals(other.getGrpcStatus())) return false;
}
if (!getDetails()
.equals(other.getDetails())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasStatus()) {
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + getStatus().hashCode();
}
if (hasHeaders()) {
hash = (37 * hash) + HEADERS_FIELD_NUMBER;
hash = (53 * hash) + getHeaders().hashCode();
}
hash = (37 * hash) + BODY_FIELD_NUMBER;
hash = (53 * hash) + getBody().hashCode();
if (hasGrpcStatus()) {
hash = (37 * hash) + GRPC_STATUS_FIELD_NUMBER;
hash = (53 * hash) + getGrpcStatus().hashCode();
}
hash = (37 * hash) + DETAILS_FIELD_NUMBER;
hash = (53 * hash) + getDetails().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse 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.service.ext_proc.v3.ImmediateResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse 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.service.ext_proc.v3.ImmediateResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse 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.service.ext_proc.v3.ImmediateResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse 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.service.ext_proc.v3.ImmediateResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse 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.service.ext_proc.v3.ImmediateResponse 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;
}
/**
*
* This message causes the filter to attempt to create a locally
* generated response, send it downstream, stop processing
* additional filters, and ignore any additional messages received
* from the remote server for this request or response. If a response
* has already started, then this will either ship the reply directly
* to the downstream codec, or reset the stream.
* [#next-free-field: 6]
*
*
* Protobuf type {@code envoy.service.ext_proc.v3.ImmediateResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.service.ext_proc.v3.ImmediateResponse)
io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.service.ext_proc.v3.ExternalProcessorProto.internal_static_envoy_service_ext_proc_v3_ImmediateResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.service.ext_proc.v3.ExternalProcessorProto.internal_static_envoy_service_ext_proc_v3_ImmediateResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse.class, io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse.Builder.class);
}
// Construct using io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse.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();
if (statusBuilder_ == null) {
status_ = null;
} else {
status_ = null;
statusBuilder_ = null;
}
if (headersBuilder_ == null) {
headers_ = null;
} else {
headers_ = null;
headersBuilder_ = null;
}
body_ = "";
if (grpcStatusBuilder_ == null) {
grpcStatus_ = null;
} else {
grpcStatus_ = null;
grpcStatusBuilder_ = null;
}
details_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.service.ext_proc.v3.ExternalProcessorProto.internal_static_envoy_service_ext_proc_v3_ImmediateResponse_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse getDefaultInstanceForType() {
return io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse build() {
io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse buildPartial() {
io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse result = new io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse(this);
if (statusBuilder_ == null) {
result.status_ = status_;
} else {
result.status_ = statusBuilder_.build();
}
if (headersBuilder_ == null) {
result.headers_ = headers_;
} else {
result.headers_ = headersBuilder_.build();
}
result.body_ = body_;
if (grpcStatusBuilder_ == null) {
result.grpcStatus_ = grpcStatus_;
} else {
result.grpcStatus_ = grpcStatusBuilder_.build();
}
result.details_ = details_;
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.service.ext_proc.v3.ImmediateResponse) {
return mergeFrom((io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse other) {
if (other == io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse.getDefaultInstance()) return this;
if (other.hasStatus()) {
mergeStatus(other.getStatus());
}
if (other.hasHeaders()) {
mergeHeaders(other.getHeaders());
}
if (!other.getBody().isEmpty()) {
body_ = other.body_;
onChanged();
}
if (other.hasGrpcStatus()) {
mergeGrpcStatus(other.getGrpcStatus());
}
if (!other.getDetails().isEmpty()) {
details_ = other.details_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private io.envoyproxy.envoy.type.v3.HttpStatus status_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.type.v3.HttpStatus, io.envoyproxy.envoy.type.v3.HttpStatus.Builder, io.envoyproxy.envoy.type.v3.HttpStatusOrBuilder> statusBuilder_;
/**
*
* The response code to return
*
*
* .envoy.type.v3.HttpStatus status = 1 [(.validate.rules) = { ... }
* @return Whether the status field is set.
*/
public boolean hasStatus() {
return statusBuilder_ != null || status_ != null;
}
/**
*
* The response code to return
*
*
* .envoy.type.v3.HttpStatus status = 1 [(.validate.rules) = { ... }
* @return The status.
*/
public io.envoyproxy.envoy.type.v3.HttpStatus getStatus() {
if (statusBuilder_ == null) {
return status_ == null ? io.envoyproxy.envoy.type.v3.HttpStatus.getDefaultInstance() : status_;
} else {
return statusBuilder_.getMessage();
}
}
/**
*
* The response code to return
*
*
* .envoy.type.v3.HttpStatus status = 1 [(.validate.rules) = { ... }
*/
public Builder setStatus(io.envoyproxy.envoy.type.v3.HttpStatus value) {
if (statusBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
status_ = value;
onChanged();
} else {
statusBuilder_.setMessage(value);
}
return this;
}
/**
*
* The response code to return
*
*
* .envoy.type.v3.HttpStatus status = 1 [(.validate.rules) = { ... }
*/
public Builder setStatus(
io.envoyproxy.envoy.type.v3.HttpStatus.Builder builderForValue) {
if (statusBuilder_ == null) {
status_ = builderForValue.build();
onChanged();
} else {
statusBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The response code to return
*
*
* .envoy.type.v3.HttpStatus status = 1 [(.validate.rules) = { ... }
*/
public Builder mergeStatus(io.envoyproxy.envoy.type.v3.HttpStatus value) {
if (statusBuilder_ == null) {
if (status_ != null) {
status_ =
io.envoyproxy.envoy.type.v3.HttpStatus.newBuilder(status_).mergeFrom(value).buildPartial();
} else {
status_ = value;
}
onChanged();
} else {
statusBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The response code to return
*
*
* .envoy.type.v3.HttpStatus status = 1 [(.validate.rules) = { ... }
*/
public Builder clearStatus() {
if (statusBuilder_ == null) {
status_ = null;
onChanged();
} else {
status_ = null;
statusBuilder_ = null;
}
return this;
}
/**
*
* The response code to return
*
*
* .envoy.type.v3.HttpStatus status = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.type.v3.HttpStatus.Builder getStatusBuilder() {
onChanged();
return getStatusFieldBuilder().getBuilder();
}
/**
*
* The response code to return
*
*
* .envoy.type.v3.HttpStatus status = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.type.v3.HttpStatusOrBuilder getStatusOrBuilder() {
if (statusBuilder_ != null) {
return statusBuilder_.getMessageOrBuilder();
} else {
return status_ == null ?
io.envoyproxy.envoy.type.v3.HttpStatus.getDefaultInstance() : status_;
}
}
/**
*
* The response code to return
*
*
* .envoy.type.v3.HttpStatus status = 1 [(.validate.rules) = { ... }
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.type.v3.HttpStatus, io.envoyproxy.envoy.type.v3.HttpStatus.Builder, io.envoyproxy.envoy.type.v3.HttpStatusOrBuilder>
getStatusFieldBuilder() {
if (statusBuilder_ == null) {
statusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.type.v3.HttpStatus, io.envoyproxy.envoy.type.v3.HttpStatus.Builder, io.envoyproxy.envoy.type.v3.HttpStatusOrBuilder>(
getStatus(),
getParentForChildren(),
isClean());
status_ = null;
}
return statusBuilder_;
}
private io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutation headers_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutation, io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutation.Builder, io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutationOrBuilder> headersBuilder_;
/**
*
* Apply changes to the default headers, which will include content-type.
*
*
* .envoy.service.ext_proc.v3.HeaderMutation headers = 2;
* @return Whether the headers field is set.
*/
public boolean hasHeaders() {
return headersBuilder_ != null || headers_ != null;
}
/**
*
* Apply changes to the default headers, which will include content-type.
*
*
* .envoy.service.ext_proc.v3.HeaderMutation headers = 2;
* @return The headers.
*/
public io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutation getHeaders() {
if (headersBuilder_ == null) {
return headers_ == null ? io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutation.getDefaultInstance() : headers_;
} else {
return headersBuilder_.getMessage();
}
}
/**
*
* Apply changes to the default headers, which will include content-type.
*
*
* .envoy.service.ext_proc.v3.HeaderMutation headers = 2;
*/
public Builder setHeaders(io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutation value) {
if (headersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
headers_ = value;
onChanged();
} else {
headersBuilder_.setMessage(value);
}
return this;
}
/**
*
* Apply changes to the default headers, which will include content-type.
*
*
* .envoy.service.ext_proc.v3.HeaderMutation headers = 2;
*/
public Builder setHeaders(
io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutation.Builder builderForValue) {
if (headersBuilder_ == null) {
headers_ = builderForValue.build();
onChanged();
} else {
headersBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Apply changes to the default headers, which will include content-type.
*
*
* .envoy.service.ext_proc.v3.HeaderMutation headers = 2;
*/
public Builder mergeHeaders(io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutation value) {
if (headersBuilder_ == null) {
if (headers_ != null) {
headers_ =
io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutation.newBuilder(headers_).mergeFrom(value).buildPartial();
} else {
headers_ = value;
}
onChanged();
} else {
headersBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Apply changes to the default headers, which will include content-type.
*
*
* .envoy.service.ext_proc.v3.HeaderMutation headers = 2;
*/
public Builder clearHeaders() {
if (headersBuilder_ == null) {
headers_ = null;
onChanged();
} else {
headers_ = null;
headersBuilder_ = null;
}
return this;
}
/**
*
* Apply changes to the default headers, which will include content-type.
*
*
* .envoy.service.ext_proc.v3.HeaderMutation headers = 2;
*/
public io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutation.Builder getHeadersBuilder() {
onChanged();
return getHeadersFieldBuilder().getBuilder();
}
/**
*
* Apply changes to the default headers, which will include content-type.
*
*
* .envoy.service.ext_proc.v3.HeaderMutation headers = 2;
*/
public io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutationOrBuilder getHeadersOrBuilder() {
if (headersBuilder_ != null) {
return headersBuilder_.getMessageOrBuilder();
} else {
return headers_ == null ?
io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutation.getDefaultInstance() : headers_;
}
}
/**
*
* Apply changes to the default headers, which will include content-type.
*
*
* .envoy.service.ext_proc.v3.HeaderMutation headers = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutation, io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutation.Builder, io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutationOrBuilder>
getHeadersFieldBuilder() {
if (headersBuilder_ == null) {
headersBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutation, io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutation.Builder, io.envoyproxy.envoy.service.ext_proc.v3.HeaderMutationOrBuilder>(
getHeaders(),
getParentForChildren(),
isClean());
headers_ = null;
}
return headersBuilder_;
}
private java.lang.Object body_ = "";
/**
*
* The message body to return with the response which is sent using the
* text/plain content type, or encoded in the grpc-message header.
*
*
* string body = 3;
* @return The body.
*/
public java.lang.String getBody() {
java.lang.Object ref = body_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
body_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The message body to return with the response which is sent using the
* text/plain content type, or encoded in the grpc-message header.
*
*
* string body = 3;
* @return The bytes for body.
*/
public com.google.protobuf.ByteString
getBodyBytes() {
java.lang.Object ref = body_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
body_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The message body to return with the response which is sent using the
* text/plain content type, or encoded in the grpc-message header.
*
*
* string body = 3;
* @param value The body to set.
* @return This builder for chaining.
*/
public Builder setBody(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
body_ = value;
onChanged();
return this;
}
/**
*
* The message body to return with the response which is sent using the
* text/plain content type, or encoded in the grpc-message header.
*
*
* string body = 3;
* @return This builder for chaining.
*/
public Builder clearBody() {
body_ = getDefaultInstance().getBody();
onChanged();
return this;
}
/**
*
* The message body to return with the response which is sent using the
* text/plain content type, or encoded in the grpc-message header.
*
*
* string body = 3;
* @param value The bytes for body to set.
* @return This builder for chaining.
*/
public Builder setBodyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
body_ = value;
onChanged();
return this;
}
private io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatus grpcStatus_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatus, io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatus.Builder, io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatusOrBuilder> grpcStatusBuilder_;
/**
*
* If set, then include a gRPC status trailer.
*
*
* .envoy.service.ext_proc.v3.GrpcStatus grpc_status = 4;
* @return Whether the grpcStatus field is set.
*/
public boolean hasGrpcStatus() {
return grpcStatusBuilder_ != null || grpcStatus_ != null;
}
/**
*
* If set, then include a gRPC status trailer.
*
*
* .envoy.service.ext_proc.v3.GrpcStatus grpc_status = 4;
* @return The grpcStatus.
*/
public io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatus getGrpcStatus() {
if (grpcStatusBuilder_ == null) {
return grpcStatus_ == null ? io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatus.getDefaultInstance() : grpcStatus_;
} else {
return grpcStatusBuilder_.getMessage();
}
}
/**
*
* If set, then include a gRPC status trailer.
*
*
* .envoy.service.ext_proc.v3.GrpcStatus grpc_status = 4;
*/
public Builder setGrpcStatus(io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatus value) {
if (grpcStatusBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
grpcStatus_ = value;
onChanged();
} else {
grpcStatusBuilder_.setMessage(value);
}
return this;
}
/**
*
* If set, then include a gRPC status trailer.
*
*
* .envoy.service.ext_proc.v3.GrpcStatus grpc_status = 4;
*/
public Builder setGrpcStatus(
io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatus.Builder builderForValue) {
if (grpcStatusBuilder_ == null) {
grpcStatus_ = builderForValue.build();
onChanged();
} else {
grpcStatusBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* If set, then include a gRPC status trailer.
*
*
* .envoy.service.ext_proc.v3.GrpcStatus grpc_status = 4;
*/
public Builder mergeGrpcStatus(io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatus value) {
if (grpcStatusBuilder_ == null) {
if (grpcStatus_ != null) {
grpcStatus_ =
io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatus.newBuilder(grpcStatus_).mergeFrom(value).buildPartial();
} else {
grpcStatus_ = value;
}
onChanged();
} else {
grpcStatusBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* If set, then include a gRPC status trailer.
*
*
* .envoy.service.ext_proc.v3.GrpcStatus grpc_status = 4;
*/
public Builder clearGrpcStatus() {
if (grpcStatusBuilder_ == null) {
grpcStatus_ = null;
onChanged();
} else {
grpcStatus_ = null;
grpcStatusBuilder_ = null;
}
return this;
}
/**
*
* If set, then include a gRPC status trailer.
*
*
* .envoy.service.ext_proc.v3.GrpcStatus grpc_status = 4;
*/
public io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatus.Builder getGrpcStatusBuilder() {
onChanged();
return getGrpcStatusFieldBuilder().getBuilder();
}
/**
*
* If set, then include a gRPC status trailer.
*
*
* .envoy.service.ext_proc.v3.GrpcStatus grpc_status = 4;
*/
public io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatusOrBuilder getGrpcStatusOrBuilder() {
if (grpcStatusBuilder_ != null) {
return grpcStatusBuilder_.getMessageOrBuilder();
} else {
return grpcStatus_ == null ?
io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatus.getDefaultInstance() : grpcStatus_;
}
}
/**
*
* If set, then include a gRPC status trailer.
*
*
* .envoy.service.ext_proc.v3.GrpcStatus grpc_status = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatus, io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatus.Builder, io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatusOrBuilder>
getGrpcStatusFieldBuilder() {
if (grpcStatusBuilder_ == null) {
grpcStatusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatus, io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatus.Builder, io.envoyproxy.envoy.service.ext_proc.v3.GrpcStatusOrBuilder>(
getGrpcStatus(),
getParentForChildren(),
isClean());
grpcStatus_ = null;
}
return grpcStatusBuilder_;
}
private java.lang.Object details_ = "";
/**
*
* A string detailing why this local reply was sent, which may be included
* in log and debug output (e.g. this populates the %RESPONSE_CODE_DETAILS%
* command operator field for use in access logging).
*
*
* string details = 5;
* @return The details.
*/
public java.lang.String getDetails() {
java.lang.Object ref = details_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
details_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* A string detailing why this local reply was sent, which may be included
* in log and debug output (e.g. this populates the %RESPONSE_CODE_DETAILS%
* command operator field for use in access logging).
*
*
* string details = 5;
* @return The bytes for details.
*/
public com.google.protobuf.ByteString
getDetailsBytes() {
java.lang.Object ref = details_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
details_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* A string detailing why this local reply was sent, which may be included
* in log and debug output (e.g. this populates the %RESPONSE_CODE_DETAILS%
* command operator field for use in access logging).
*
*
* string details = 5;
* @param value The details to set.
* @return This builder for chaining.
*/
public Builder setDetails(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
details_ = value;
onChanged();
return this;
}
/**
*
* A string detailing why this local reply was sent, which may be included
* in log and debug output (e.g. this populates the %RESPONSE_CODE_DETAILS%
* command operator field for use in access logging).
*
*
* string details = 5;
* @return This builder for chaining.
*/
public Builder clearDetails() {
details_ = getDefaultInstance().getDetails();
onChanged();
return this;
}
/**
*
* A string detailing why this local reply was sent, which may be included
* in log and debug output (e.g. this populates the %RESPONSE_CODE_DETAILS%
* command operator field for use in access logging).
*
*
* string details = 5;
* @param value The bytes for details to set.
* @return This builder for chaining.
*/
public Builder setDetailsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
details_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.service.ext_proc.v3.ImmediateResponse)
}
// @@protoc_insertion_point(class_scope:envoy.service.ext_proc.v3.ImmediateResponse)
private static final io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse();
}
public static io.envoyproxy.envoy.service.ext_proc.v3.ImmediateResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ImmediateResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ImmediateResponse(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.service.ext_proc.v3.ImmediateResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}