io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/data/accesslog/v2/accesslog.proto
package io.envoyproxy.envoy.data.accesslog.v2;
/**
*
* [#next-free-field: 14]
*
*
* Protobuf type {@code envoy.data.accesslog.v2.HTTPRequestProperties}
*/
public final class HTTPRequestProperties extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.data.accesslog.v2.HTTPRequestProperties)
HTTPRequestPropertiesOrBuilder {
private static final long serialVersionUID = 0L;
// Use HTTPRequestProperties.newBuilder() to construct.
private HTTPRequestProperties(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private HTTPRequestProperties() {
requestMethod_ = 0;
scheme_ = "";
authority_ = "";
path_ = "";
userAgent_ = "";
referer_ = "";
forwardedFor_ = "";
requestId_ = "";
originalPath_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new HTTPRequestProperties();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private HTTPRequestProperties(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
int rawValue = input.readEnum();
requestMethod_ = rawValue;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
scheme_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
authority_ = s;
break;
}
case 34: {
com.google.protobuf.UInt32Value.Builder subBuilder = null;
if (port_ != null) {
subBuilder = port_.toBuilder();
}
port_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(port_);
port_ = subBuilder.buildPartial();
}
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
path_ = s;
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
userAgent_ = s;
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
referer_ = s;
break;
}
case 66: {
java.lang.String s = input.readStringRequireUtf8();
forwardedFor_ = s;
break;
}
case 74: {
java.lang.String s = input.readStringRequireUtf8();
requestId_ = s;
break;
}
case 82: {
java.lang.String s = input.readStringRequireUtf8();
originalPath_ = s;
break;
}
case 88: {
requestHeadersBytes_ = input.readUInt64();
break;
}
case 96: {
requestBodyBytes_ = input.readUInt64();
break;
}
case 106: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
requestHeaders_ = com.google.protobuf.MapField.newMapField(
RequestHeadersDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
requestHeaders__ = input.readMessage(
RequestHeadersDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
requestHeaders_.getMutableMap().put(
requestHeaders__.getKey(), requestHeaders__.getValue());
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.data.accesslog.v2.AccesslogProto.internal_static_envoy_data_accesslog_v2_HTTPRequestProperties_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 13:
return internalGetRequestHeaders();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.data.accesslog.v2.AccesslogProto.internal_static_envoy_data_accesslog_v2_HTTPRequestProperties_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties.class, io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties.Builder.class);
}
public static final int REQUEST_METHOD_FIELD_NUMBER = 1;
private int requestMethod_;
/**
*
* The request method (RFC 7231/2616).
*
*
* .envoy.api.v2.core.RequestMethod request_method = 1 [(.validate.rules) = { ... }
* @return The enum numeric value on the wire for requestMethod.
*/
@java.lang.Override public int getRequestMethodValue() {
return requestMethod_;
}
/**
*
* The request method (RFC 7231/2616).
*
*
* .envoy.api.v2.core.RequestMethod request_method = 1 [(.validate.rules) = { ... }
* @return The requestMethod.
*/
@java.lang.Override public io.envoyproxy.envoy.api.v2.core.RequestMethod getRequestMethod() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.api.v2.core.RequestMethod result = io.envoyproxy.envoy.api.v2.core.RequestMethod.valueOf(requestMethod_);
return result == null ? io.envoyproxy.envoy.api.v2.core.RequestMethod.UNRECOGNIZED : result;
}
public static final int SCHEME_FIELD_NUMBER = 2;
private volatile java.lang.Object scheme_;
/**
*
* The scheme portion of the incoming request URI.
*
*
* string scheme = 2;
* @return The scheme.
*/
@java.lang.Override
public java.lang.String getScheme() {
java.lang.Object ref = scheme_;
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();
scheme_ = s;
return s;
}
}
/**
*
* The scheme portion of the incoming request URI.
*
*
* string scheme = 2;
* @return The bytes for scheme.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSchemeBytes() {
java.lang.Object ref = scheme_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
scheme_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int AUTHORITY_FIELD_NUMBER = 3;
private volatile java.lang.Object authority_;
/**
*
* HTTP/2 ``:authority`` or HTTP/1.1 ``Host`` header value.
*
*
* string authority = 3;
* @return The authority.
*/
@java.lang.Override
public java.lang.String getAuthority() {
java.lang.Object ref = authority_;
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();
authority_ = s;
return s;
}
}
/**
*
* HTTP/2 ``:authority`` or HTTP/1.1 ``Host`` header value.
*
*
* string authority = 3;
* @return The bytes for authority.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAuthorityBytes() {
java.lang.Object ref = authority_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
authority_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PORT_FIELD_NUMBER = 4;
private com.google.protobuf.UInt32Value port_;
/**
*
* The port of the incoming request URI
* (unused currently, as port is composed onto authority).
*
*
* .google.protobuf.UInt32Value port = 4;
* @return Whether the port field is set.
*/
@java.lang.Override
public boolean hasPort() {
return port_ != null;
}
/**
*
* The port of the incoming request URI
* (unused currently, as port is composed onto authority).
*
*
* .google.protobuf.UInt32Value port = 4;
* @return The port.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getPort() {
return port_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : port_;
}
/**
*
* The port of the incoming request URI
* (unused currently, as port is composed onto authority).
*
*
* .google.protobuf.UInt32Value port = 4;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getPortOrBuilder() {
return getPort();
}
public static final int PATH_FIELD_NUMBER = 5;
private volatile java.lang.Object path_;
/**
*
* The path portion from the incoming request URI.
*
*
* string path = 5;
* @return The path.
*/
@java.lang.Override
public java.lang.String getPath() {
java.lang.Object ref = path_;
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();
path_ = s;
return s;
}
}
/**
*
* The path portion from the incoming request URI.
*
*
* string path = 5;
* @return The bytes for path.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPathBytes() {
java.lang.Object ref = path_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
path_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int USER_AGENT_FIELD_NUMBER = 6;
private volatile java.lang.Object userAgent_;
/**
*
* Value of the ``User-Agent`` request header.
*
*
* string user_agent = 6;
* @return The userAgent.
*/
@java.lang.Override
public java.lang.String getUserAgent() {
java.lang.Object ref = userAgent_;
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();
userAgent_ = s;
return s;
}
}
/**
*
* Value of the ``User-Agent`` request header.
*
*
* string user_agent = 6;
* @return The bytes for userAgent.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getUserAgentBytes() {
java.lang.Object ref = userAgent_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
userAgent_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int REFERER_FIELD_NUMBER = 7;
private volatile java.lang.Object referer_;
/**
*
* Value of the ``Referer`` request header.
*
*
* string referer = 7;
* @return The referer.
*/
@java.lang.Override
public java.lang.String getReferer() {
java.lang.Object ref = referer_;
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();
referer_ = s;
return s;
}
}
/**
*
* Value of the ``Referer`` request header.
*
*
* string referer = 7;
* @return The bytes for referer.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getRefererBytes() {
java.lang.Object ref = referer_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
referer_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FORWARDED_FOR_FIELD_NUMBER = 8;
private volatile java.lang.Object forwardedFor_;
/**
*
* Value of the ``X-Forwarded-For`` request header.
*
*
* string forwarded_for = 8;
* @return The forwardedFor.
*/
@java.lang.Override
public java.lang.String getForwardedFor() {
java.lang.Object ref = forwardedFor_;
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();
forwardedFor_ = s;
return s;
}
}
/**
*
* Value of the ``X-Forwarded-For`` request header.
*
*
* string forwarded_for = 8;
* @return The bytes for forwardedFor.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getForwardedForBytes() {
java.lang.Object ref = forwardedFor_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
forwardedFor_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int REQUEST_ID_FIELD_NUMBER = 9;
private volatile java.lang.Object requestId_;
/**
*
* Value of the ``X-Request-Id`` request header
* This header is used by Envoy to uniquely identify a request.
* It will be generated for all external requests and internal requests that
* do not already have a request ID.
*
*
* string request_id = 9;
* @return The requestId.
*/
@java.lang.Override
public java.lang.String getRequestId() {
java.lang.Object ref = requestId_;
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();
requestId_ = s;
return s;
}
}
/**
*
* Value of the ``X-Request-Id`` request header
* This header is used by Envoy to uniquely identify a request.
* It will be generated for all external requests and internal requests that
* do not already have a request ID.
*
*
* string request_id = 9;
* @return The bytes for requestId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getRequestIdBytes() {
java.lang.Object ref = requestId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
requestId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ORIGINAL_PATH_FIELD_NUMBER = 10;
private volatile java.lang.Object originalPath_;
/**
*
* Value of the ``X-Envoy-Original-Path`` request header.
*
*
* string original_path = 10;
* @return The originalPath.
*/
@java.lang.Override
public java.lang.String getOriginalPath() {
java.lang.Object ref = originalPath_;
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();
originalPath_ = s;
return s;
}
}
/**
*
* Value of the ``X-Envoy-Original-Path`` request header.
*
*
* string original_path = 10;
* @return The bytes for originalPath.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getOriginalPathBytes() {
java.lang.Object ref = originalPath_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
originalPath_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int REQUEST_HEADERS_BYTES_FIELD_NUMBER = 11;
private long requestHeadersBytes_;
/**
*
* Size of the HTTP request headers in bytes.
* This value is captured from the OSI layer 7 perspective, i.e. it does not
* include overhead from framing or encoding at other networking layers.
*
*
* uint64 request_headers_bytes = 11;
* @return The requestHeadersBytes.
*/
@java.lang.Override
public long getRequestHeadersBytes() {
return requestHeadersBytes_;
}
public static final int REQUEST_BODY_BYTES_FIELD_NUMBER = 12;
private long requestBodyBytes_;
/**
*
* Size of the HTTP request body in bytes.
* This value is captured from the OSI layer 7 perspective, i.e. it does not
* include overhead from framing or encoding at other networking layers.
*
*
* uint64 request_body_bytes = 12;
* @return The requestBodyBytes.
*/
@java.lang.Override
public long getRequestBodyBytes() {
return requestBodyBytes_;
}
public static final int REQUEST_HEADERS_FIELD_NUMBER = 13;
private static final class RequestHeadersDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
io.envoyproxy.envoy.data.accesslog.v2.AccesslogProto.internal_static_envoy_data_accesslog_v2_HTTPRequestProperties_RequestHeadersEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> requestHeaders_;
private com.google.protobuf.MapField
internalGetRequestHeaders() {
if (requestHeaders_ == null) {
return com.google.protobuf.MapField.emptyMapField(
RequestHeadersDefaultEntryHolder.defaultEntry);
}
return requestHeaders_;
}
public int getRequestHeadersCount() {
return internalGetRequestHeaders().getMap().size();
}
/**
*
* Map of additional headers that have been configured to be logged.
*
*
* map<string, string> request_headers = 13;
*/
@java.lang.Override
public boolean containsRequestHeaders(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetRequestHeaders().getMap().containsKey(key);
}
/**
* Use {@link #getRequestHeadersMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getRequestHeaders() {
return getRequestHeadersMap();
}
/**
*
* Map of additional headers that have been configured to be logged.
*
*
* map<string, string> request_headers = 13;
*/
@java.lang.Override
public java.util.Map getRequestHeadersMap() {
return internalGetRequestHeaders().getMap();
}
/**
*
* Map of additional headers that have been configured to be logged.
*
*
* map<string, string> request_headers = 13;
*/
@java.lang.Override
public java.lang.String getRequestHeadersOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetRequestHeaders().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Map of additional headers that have been configured to be logged.
*
*
* map<string, string> request_headers = 13;
*/
@java.lang.Override
public java.lang.String getRequestHeadersOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetRequestHeaders().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
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 (requestMethod_ != io.envoyproxy.envoy.api.v2.core.RequestMethod.METHOD_UNSPECIFIED.getNumber()) {
output.writeEnum(1, requestMethod_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scheme_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, scheme_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authority_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, authority_);
}
if (port_ != null) {
output.writeMessage(4, getPort());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, path_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userAgent_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, userAgent_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referer_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, referer_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(forwardedFor_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, forwardedFor_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, requestId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(originalPath_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, originalPath_);
}
if (requestHeadersBytes_ != 0L) {
output.writeUInt64(11, requestHeadersBytes_);
}
if (requestBodyBytes_ != 0L) {
output.writeUInt64(12, requestBodyBytes_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetRequestHeaders(),
RequestHeadersDefaultEntryHolder.defaultEntry,
13);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (requestMethod_ != io.envoyproxy.envoy.api.v2.core.RequestMethod.METHOD_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, requestMethod_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scheme_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, scheme_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authority_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, authority_);
}
if (port_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getPort());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, path_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userAgent_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, userAgent_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referer_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, referer_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(forwardedFor_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, forwardedFor_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, requestId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(originalPath_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, originalPath_);
}
if (requestHeadersBytes_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(11, requestHeadersBytes_);
}
if (requestBodyBytes_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(12, requestBodyBytes_);
}
for (java.util.Map.Entry entry
: internalGetRequestHeaders().getMap().entrySet()) {
com.google.protobuf.MapEntry
requestHeaders__ = RequestHeadersDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(13, requestHeaders__);
}
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.data.accesslog.v2.HTTPRequestProperties)) {
return super.equals(obj);
}
io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties other = (io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties) obj;
if (requestMethod_ != other.requestMethod_) return false;
if (!getScheme()
.equals(other.getScheme())) return false;
if (!getAuthority()
.equals(other.getAuthority())) return false;
if (hasPort() != other.hasPort()) return false;
if (hasPort()) {
if (!getPort()
.equals(other.getPort())) return false;
}
if (!getPath()
.equals(other.getPath())) return false;
if (!getUserAgent()
.equals(other.getUserAgent())) return false;
if (!getReferer()
.equals(other.getReferer())) return false;
if (!getForwardedFor()
.equals(other.getForwardedFor())) return false;
if (!getRequestId()
.equals(other.getRequestId())) return false;
if (!getOriginalPath()
.equals(other.getOriginalPath())) return false;
if (getRequestHeadersBytes()
!= other.getRequestHeadersBytes()) return false;
if (getRequestBodyBytes()
!= other.getRequestBodyBytes()) return false;
if (!internalGetRequestHeaders().equals(
other.internalGetRequestHeaders())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + REQUEST_METHOD_FIELD_NUMBER;
hash = (53 * hash) + requestMethod_;
hash = (37 * hash) + SCHEME_FIELD_NUMBER;
hash = (53 * hash) + getScheme().hashCode();
hash = (37 * hash) + AUTHORITY_FIELD_NUMBER;
hash = (53 * hash) + getAuthority().hashCode();
if (hasPort()) {
hash = (37 * hash) + PORT_FIELD_NUMBER;
hash = (53 * hash) + getPort().hashCode();
}
hash = (37 * hash) + PATH_FIELD_NUMBER;
hash = (53 * hash) + getPath().hashCode();
hash = (37 * hash) + USER_AGENT_FIELD_NUMBER;
hash = (53 * hash) + getUserAgent().hashCode();
hash = (37 * hash) + REFERER_FIELD_NUMBER;
hash = (53 * hash) + getReferer().hashCode();
hash = (37 * hash) + FORWARDED_FOR_FIELD_NUMBER;
hash = (53 * hash) + getForwardedFor().hashCode();
hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER;
hash = (53 * hash) + getRequestId().hashCode();
hash = (37 * hash) + ORIGINAL_PATH_FIELD_NUMBER;
hash = (53 * hash) + getOriginalPath().hashCode();
hash = (37 * hash) + REQUEST_HEADERS_BYTES_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getRequestHeadersBytes());
hash = (37 * hash) + REQUEST_BODY_BYTES_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getRequestBodyBytes());
if (!internalGetRequestHeaders().getMap().isEmpty()) {
hash = (37 * hash) + REQUEST_HEADERS_FIELD_NUMBER;
hash = (53 * hash) + internalGetRequestHeaders().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties 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.data.accesslog.v2.HTTPRequestProperties parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties 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.data.accesslog.v2.HTTPRequestProperties parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties 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.data.accesslog.v2.HTTPRequestProperties parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties 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.data.accesslog.v2.HTTPRequestProperties parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties 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.data.accesslog.v2.HTTPRequestProperties 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;
}
/**
*
* [#next-free-field: 14]
*
*
* Protobuf type {@code envoy.data.accesslog.v2.HTTPRequestProperties}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.data.accesslog.v2.HTTPRequestProperties)
io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestPropertiesOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.data.accesslog.v2.AccesslogProto.internal_static_envoy_data_accesslog_v2_HTTPRequestProperties_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 13:
return internalGetRequestHeaders();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 13:
return internalGetMutableRequestHeaders();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.data.accesslog.v2.AccesslogProto.internal_static_envoy_data_accesslog_v2_HTTPRequestProperties_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties.class, io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties.Builder.class);
}
// Construct using io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties.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();
requestMethod_ = 0;
scheme_ = "";
authority_ = "";
if (portBuilder_ == null) {
port_ = null;
} else {
port_ = null;
portBuilder_ = null;
}
path_ = "";
userAgent_ = "";
referer_ = "";
forwardedFor_ = "";
requestId_ = "";
originalPath_ = "";
requestHeadersBytes_ = 0L;
requestBodyBytes_ = 0L;
internalGetMutableRequestHeaders().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.data.accesslog.v2.AccesslogProto.internal_static_envoy_data_accesslog_v2_HTTPRequestProperties_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties getDefaultInstanceForType() {
return io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties build() {
io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties buildPartial() {
io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties result = new io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties(this);
int from_bitField0_ = bitField0_;
result.requestMethod_ = requestMethod_;
result.scheme_ = scheme_;
result.authority_ = authority_;
if (portBuilder_ == null) {
result.port_ = port_;
} else {
result.port_ = portBuilder_.build();
}
result.path_ = path_;
result.userAgent_ = userAgent_;
result.referer_ = referer_;
result.forwardedFor_ = forwardedFor_;
result.requestId_ = requestId_;
result.originalPath_ = originalPath_;
result.requestHeadersBytes_ = requestHeadersBytes_;
result.requestBodyBytes_ = requestBodyBytes_;
result.requestHeaders_ = internalGetRequestHeaders();
result.requestHeaders_.makeImmutable();
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.data.accesslog.v2.HTTPRequestProperties) {
return mergeFrom((io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties other) {
if (other == io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties.getDefaultInstance()) return this;
if (other.requestMethod_ != 0) {
setRequestMethodValue(other.getRequestMethodValue());
}
if (!other.getScheme().isEmpty()) {
scheme_ = other.scheme_;
onChanged();
}
if (!other.getAuthority().isEmpty()) {
authority_ = other.authority_;
onChanged();
}
if (other.hasPort()) {
mergePort(other.getPort());
}
if (!other.getPath().isEmpty()) {
path_ = other.path_;
onChanged();
}
if (!other.getUserAgent().isEmpty()) {
userAgent_ = other.userAgent_;
onChanged();
}
if (!other.getReferer().isEmpty()) {
referer_ = other.referer_;
onChanged();
}
if (!other.getForwardedFor().isEmpty()) {
forwardedFor_ = other.forwardedFor_;
onChanged();
}
if (!other.getRequestId().isEmpty()) {
requestId_ = other.requestId_;
onChanged();
}
if (!other.getOriginalPath().isEmpty()) {
originalPath_ = other.originalPath_;
onChanged();
}
if (other.getRequestHeadersBytes() != 0L) {
setRequestHeadersBytes(other.getRequestHeadersBytes());
}
if (other.getRequestBodyBytes() != 0L) {
setRequestBodyBytes(other.getRequestBodyBytes());
}
internalGetMutableRequestHeaders().mergeFrom(
other.internalGetRequestHeaders());
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.data.accesslog.v2.HTTPRequestProperties parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int requestMethod_ = 0;
/**
*
* The request method (RFC 7231/2616).
*
*
* .envoy.api.v2.core.RequestMethod request_method = 1 [(.validate.rules) = { ... }
* @return The enum numeric value on the wire for requestMethod.
*/
@java.lang.Override public int getRequestMethodValue() {
return requestMethod_;
}
/**
*
* The request method (RFC 7231/2616).
*
*
* .envoy.api.v2.core.RequestMethod request_method = 1 [(.validate.rules) = { ... }
* @param value The enum numeric value on the wire for requestMethod to set.
* @return This builder for chaining.
*/
public Builder setRequestMethodValue(int value) {
requestMethod_ = value;
onChanged();
return this;
}
/**
*
* The request method (RFC 7231/2616).
*
*
* .envoy.api.v2.core.RequestMethod request_method = 1 [(.validate.rules) = { ... }
* @return The requestMethod.
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.core.RequestMethod getRequestMethod() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.api.v2.core.RequestMethod result = io.envoyproxy.envoy.api.v2.core.RequestMethod.valueOf(requestMethod_);
return result == null ? io.envoyproxy.envoy.api.v2.core.RequestMethod.UNRECOGNIZED : result;
}
/**
*
* The request method (RFC 7231/2616).
*
*
* .envoy.api.v2.core.RequestMethod request_method = 1 [(.validate.rules) = { ... }
* @param value The requestMethod to set.
* @return This builder for chaining.
*/
public Builder setRequestMethod(io.envoyproxy.envoy.api.v2.core.RequestMethod value) {
if (value == null) {
throw new NullPointerException();
}
requestMethod_ = value.getNumber();
onChanged();
return this;
}
/**
*
* The request method (RFC 7231/2616).
*
*
* .envoy.api.v2.core.RequestMethod request_method = 1 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearRequestMethod() {
requestMethod_ = 0;
onChanged();
return this;
}
private java.lang.Object scheme_ = "";
/**
*
* The scheme portion of the incoming request URI.
*
*
* string scheme = 2;
* @return The scheme.
*/
public java.lang.String getScheme() {
java.lang.Object ref = scheme_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
scheme_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The scheme portion of the incoming request URI.
*
*
* string scheme = 2;
* @return The bytes for scheme.
*/
public com.google.protobuf.ByteString
getSchemeBytes() {
java.lang.Object ref = scheme_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
scheme_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The scheme portion of the incoming request URI.
*
*
* string scheme = 2;
* @param value The scheme to set.
* @return This builder for chaining.
*/
public Builder setScheme(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
scheme_ = value;
onChanged();
return this;
}
/**
*
* The scheme portion of the incoming request URI.
*
*
* string scheme = 2;
* @return This builder for chaining.
*/
public Builder clearScheme() {
scheme_ = getDefaultInstance().getScheme();
onChanged();
return this;
}
/**
*
* The scheme portion of the incoming request URI.
*
*
* string scheme = 2;
* @param value The bytes for scheme to set.
* @return This builder for chaining.
*/
public Builder setSchemeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
scheme_ = value;
onChanged();
return this;
}
private java.lang.Object authority_ = "";
/**
*
* HTTP/2 ``:authority`` or HTTP/1.1 ``Host`` header value.
*
*
* string authority = 3;
* @return The authority.
*/
public java.lang.String getAuthority() {
java.lang.Object ref = authority_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
authority_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* HTTP/2 ``:authority`` or HTTP/1.1 ``Host`` header value.
*
*
* string authority = 3;
* @return The bytes for authority.
*/
public com.google.protobuf.ByteString
getAuthorityBytes() {
java.lang.Object ref = authority_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
authority_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* HTTP/2 ``:authority`` or HTTP/1.1 ``Host`` header value.
*
*
* string authority = 3;
* @param value The authority to set.
* @return This builder for chaining.
*/
public Builder setAuthority(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
authority_ = value;
onChanged();
return this;
}
/**
*
* HTTP/2 ``:authority`` or HTTP/1.1 ``Host`` header value.
*
*
* string authority = 3;
* @return This builder for chaining.
*/
public Builder clearAuthority() {
authority_ = getDefaultInstance().getAuthority();
onChanged();
return this;
}
/**
*
* HTTP/2 ``:authority`` or HTTP/1.1 ``Host`` header value.
*
*
* string authority = 3;
* @param value The bytes for authority to set.
* @return This builder for chaining.
*/
public Builder setAuthorityBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
authority_ = value;
onChanged();
return this;
}
private com.google.protobuf.UInt32Value port_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> portBuilder_;
/**
*
* The port of the incoming request URI
* (unused currently, as port is composed onto authority).
*
*
* .google.protobuf.UInt32Value port = 4;
* @return Whether the port field is set.
*/
public boolean hasPort() {
return portBuilder_ != null || port_ != null;
}
/**
*
* The port of the incoming request URI
* (unused currently, as port is composed onto authority).
*
*
* .google.protobuf.UInt32Value port = 4;
* @return The port.
*/
public com.google.protobuf.UInt32Value getPort() {
if (portBuilder_ == null) {
return port_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : port_;
} else {
return portBuilder_.getMessage();
}
}
/**
*
* The port of the incoming request URI
* (unused currently, as port is composed onto authority).
*
*
* .google.protobuf.UInt32Value port = 4;
*/
public Builder setPort(com.google.protobuf.UInt32Value value) {
if (portBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
port_ = value;
onChanged();
} else {
portBuilder_.setMessage(value);
}
return this;
}
/**
*
* The port of the incoming request URI
* (unused currently, as port is composed onto authority).
*
*
* .google.protobuf.UInt32Value port = 4;
*/
public Builder setPort(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (portBuilder_ == null) {
port_ = builderForValue.build();
onChanged();
} else {
portBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The port of the incoming request URI
* (unused currently, as port is composed onto authority).
*
*
* .google.protobuf.UInt32Value port = 4;
*/
public Builder mergePort(com.google.protobuf.UInt32Value value) {
if (portBuilder_ == null) {
if (port_ != null) {
port_ =
com.google.protobuf.UInt32Value.newBuilder(port_).mergeFrom(value).buildPartial();
} else {
port_ = value;
}
onChanged();
} else {
portBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The port of the incoming request URI
* (unused currently, as port is composed onto authority).
*
*
* .google.protobuf.UInt32Value port = 4;
*/
public Builder clearPort() {
if (portBuilder_ == null) {
port_ = null;
onChanged();
} else {
port_ = null;
portBuilder_ = null;
}
return this;
}
/**
*
* The port of the incoming request URI
* (unused currently, as port is composed onto authority).
*
*
* .google.protobuf.UInt32Value port = 4;
*/
public com.google.protobuf.UInt32Value.Builder getPortBuilder() {
onChanged();
return getPortFieldBuilder().getBuilder();
}
/**
*
* The port of the incoming request URI
* (unused currently, as port is composed onto authority).
*
*
* .google.protobuf.UInt32Value port = 4;
*/
public com.google.protobuf.UInt32ValueOrBuilder getPortOrBuilder() {
if (portBuilder_ != null) {
return portBuilder_.getMessageOrBuilder();
} else {
return port_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : port_;
}
}
/**
*
* The port of the incoming request URI
* (unused currently, as port is composed onto authority).
*
*
* .google.protobuf.UInt32Value port = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getPortFieldBuilder() {
if (portBuilder_ == null) {
portBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getPort(),
getParentForChildren(),
isClean());
port_ = null;
}
return portBuilder_;
}
private java.lang.Object path_ = "";
/**
*
* The path portion from the incoming request URI.
*
*
* string path = 5;
* @return The path.
*/
public java.lang.String getPath() {
java.lang.Object ref = path_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
path_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The path portion from the incoming request URI.
*
*
* string path = 5;
* @return The bytes for path.
*/
public com.google.protobuf.ByteString
getPathBytes() {
java.lang.Object ref = path_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
path_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The path portion from the incoming request URI.
*
*
* string path = 5;
* @param value The path to set.
* @return This builder for chaining.
*/
public Builder setPath(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
path_ = value;
onChanged();
return this;
}
/**
*
* The path portion from the incoming request URI.
*
*
* string path = 5;
* @return This builder for chaining.
*/
public Builder clearPath() {
path_ = getDefaultInstance().getPath();
onChanged();
return this;
}
/**
*
* The path portion from the incoming request URI.
*
*
* string path = 5;
* @param value The bytes for path to set.
* @return This builder for chaining.
*/
public Builder setPathBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
path_ = value;
onChanged();
return this;
}
private java.lang.Object userAgent_ = "";
/**
*
* Value of the ``User-Agent`` request header.
*
*
* string user_agent = 6;
* @return The userAgent.
*/
public java.lang.String getUserAgent() {
java.lang.Object ref = userAgent_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
userAgent_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Value of the ``User-Agent`` request header.
*
*
* string user_agent = 6;
* @return The bytes for userAgent.
*/
public com.google.protobuf.ByteString
getUserAgentBytes() {
java.lang.Object ref = userAgent_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
userAgent_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Value of the ``User-Agent`` request header.
*
*
* string user_agent = 6;
* @param value The userAgent to set.
* @return This builder for chaining.
*/
public Builder setUserAgent(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
userAgent_ = value;
onChanged();
return this;
}
/**
*
* Value of the ``User-Agent`` request header.
*
*
* string user_agent = 6;
* @return This builder for chaining.
*/
public Builder clearUserAgent() {
userAgent_ = getDefaultInstance().getUserAgent();
onChanged();
return this;
}
/**
*
* Value of the ``User-Agent`` request header.
*
*
* string user_agent = 6;
* @param value The bytes for userAgent to set.
* @return This builder for chaining.
*/
public Builder setUserAgentBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
userAgent_ = value;
onChanged();
return this;
}
private java.lang.Object referer_ = "";
/**
*
* Value of the ``Referer`` request header.
*
*
* string referer = 7;
* @return The referer.
*/
public java.lang.String getReferer() {
java.lang.Object ref = referer_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
referer_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Value of the ``Referer`` request header.
*
*
* string referer = 7;
* @return The bytes for referer.
*/
public com.google.protobuf.ByteString
getRefererBytes() {
java.lang.Object ref = referer_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
referer_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Value of the ``Referer`` request header.
*
*
* string referer = 7;
* @param value The referer to set.
* @return This builder for chaining.
*/
public Builder setReferer(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
referer_ = value;
onChanged();
return this;
}
/**
*
* Value of the ``Referer`` request header.
*
*
* string referer = 7;
* @return This builder for chaining.
*/
public Builder clearReferer() {
referer_ = getDefaultInstance().getReferer();
onChanged();
return this;
}
/**
*
* Value of the ``Referer`` request header.
*
*
* string referer = 7;
* @param value The bytes for referer to set.
* @return This builder for chaining.
*/
public Builder setRefererBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
referer_ = value;
onChanged();
return this;
}
private java.lang.Object forwardedFor_ = "";
/**
*
* Value of the ``X-Forwarded-For`` request header.
*
*
* string forwarded_for = 8;
* @return The forwardedFor.
*/
public java.lang.String getForwardedFor() {
java.lang.Object ref = forwardedFor_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
forwardedFor_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Value of the ``X-Forwarded-For`` request header.
*
*
* string forwarded_for = 8;
* @return The bytes for forwardedFor.
*/
public com.google.protobuf.ByteString
getForwardedForBytes() {
java.lang.Object ref = forwardedFor_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
forwardedFor_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Value of the ``X-Forwarded-For`` request header.
*
*
* string forwarded_for = 8;
* @param value The forwardedFor to set.
* @return This builder for chaining.
*/
public Builder setForwardedFor(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
forwardedFor_ = value;
onChanged();
return this;
}
/**
*
* Value of the ``X-Forwarded-For`` request header.
*
*
* string forwarded_for = 8;
* @return This builder for chaining.
*/
public Builder clearForwardedFor() {
forwardedFor_ = getDefaultInstance().getForwardedFor();
onChanged();
return this;
}
/**
*
* Value of the ``X-Forwarded-For`` request header.
*
*
* string forwarded_for = 8;
* @param value The bytes for forwardedFor to set.
* @return This builder for chaining.
*/
public Builder setForwardedForBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
forwardedFor_ = value;
onChanged();
return this;
}
private java.lang.Object requestId_ = "";
/**
*
* Value of the ``X-Request-Id`` request header
* This header is used by Envoy to uniquely identify a request.
* It will be generated for all external requests and internal requests that
* do not already have a request ID.
*
*
* string request_id = 9;
* @return The requestId.
*/
public java.lang.String getRequestId() {
java.lang.Object ref = requestId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
requestId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Value of the ``X-Request-Id`` request header
* This header is used by Envoy to uniquely identify a request.
* It will be generated for all external requests and internal requests that
* do not already have a request ID.
*
*
* string request_id = 9;
* @return The bytes for requestId.
*/
public com.google.protobuf.ByteString
getRequestIdBytes() {
java.lang.Object ref = requestId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
requestId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Value of the ``X-Request-Id`` request header
* This header is used by Envoy to uniquely identify a request.
* It will be generated for all external requests and internal requests that
* do not already have a request ID.
*
*
* string request_id = 9;
* @param value The requestId to set.
* @return This builder for chaining.
*/
public Builder setRequestId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
requestId_ = value;
onChanged();
return this;
}
/**
*
* Value of the ``X-Request-Id`` request header
* This header is used by Envoy to uniquely identify a request.
* It will be generated for all external requests and internal requests that
* do not already have a request ID.
*
*
* string request_id = 9;
* @return This builder for chaining.
*/
public Builder clearRequestId() {
requestId_ = getDefaultInstance().getRequestId();
onChanged();
return this;
}
/**
*
* Value of the ``X-Request-Id`` request header
* This header is used by Envoy to uniquely identify a request.
* It will be generated for all external requests and internal requests that
* do not already have a request ID.
*
*
* string request_id = 9;
* @param value The bytes for requestId to set.
* @return This builder for chaining.
*/
public Builder setRequestIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
requestId_ = value;
onChanged();
return this;
}
private java.lang.Object originalPath_ = "";
/**
*
* Value of the ``X-Envoy-Original-Path`` request header.
*
*
* string original_path = 10;
* @return The originalPath.
*/
public java.lang.String getOriginalPath() {
java.lang.Object ref = originalPath_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
originalPath_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Value of the ``X-Envoy-Original-Path`` request header.
*
*
* string original_path = 10;
* @return The bytes for originalPath.
*/
public com.google.protobuf.ByteString
getOriginalPathBytes() {
java.lang.Object ref = originalPath_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
originalPath_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Value of the ``X-Envoy-Original-Path`` request header.
*
*
* string original_path = 10;
* @param value The originalPath to set.
* @return This builder for chaining.
*/
public Builder setOriginalPath(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
originalPath_ = value;
onChanged();
return this;
}
/**
*
* Value of the ``X-Envoy-Original-Path`` request header.
*
*
* string original_path = 10;
* @return This builder for chaining.
*/
public Builder clearOriginalPath() {
originalPath_ = getDefaultInstance().getOriginalPath();
onChanged();
return this;
}
/**
*
* Value of the ``X-Envoy-Original-Path`` request header.
*
*
* string original_path = 10;
* @param value The bytes for originalPath to set.
* @return This builder for chaining.
*/
public Builder setOriginalPathBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
originalPath_ = value;
onChanged();
return this;
}
private long requestHeadersBytes_ ;
/**
*
* Size of the HTTP request headers in bytes.
* This value is captured from the OSI layer 7 perspective, i.e. it does not
* include overhead from framing or encoding at other networking layers.
*
*
* uint64 request_headers_bytes = 11;
* @return The requestHeadersBytes.
*/
@java.lang.Override
public long getRequestHeadersBytes() {
return requestHeadersBytes_;
}
/**
*
* Size of the HTTP request headers in bytes.
* This value is captured from the OSI layer 7 perspective, i.e. it does not
* include overhead from framing or encoding at other networking layers.
*
*
* uint64 request_headers_bytes = 11;
* @param value The requestHeadersBytes to set.
* @return This builder for chaining.
*/
public Builder setRequestHeadersBytes(long value) {
requestHeadersBytes_ = value;
onChanged();
return this;
}
/**
*
* Size of the HTTP request headers in bytes.
* This value is captured from the OSI layer 7 perspective, i.e. it does not
* include overhead from framing or encoding at other networking layers.
*
*
* uint64 request_headers_bytes = 11;
* @return This builder for chaining.
*/
public Builder clearRequestHeadersBytes() {
requestHeadersBytes_ = 0L;
onChanged();
return this;
}
private long requestBodyBytes_ ;
/**
*
* Size of the HTTP request body in bytes.
* This value is captured from the OSI layer 7 perspective, i.e. it does not
* include overhead from framing or encoding at other networking layers.
*
*
* uint64 request_body_bytes = 12;
* @return The requestBodyBytes.
*/
@java.lang.Override
public long getRequestBodyBytes() {
return requestBodyBytes_;
}
/**
*
* Size of the HTTP request body in bytes.
* This value is captured from the OSI layer 7 perspective, i.e. it does not
* include overhead from framing or encoding at other networking layers.
*
*
* uint64 request_body_bytes = 12;
* @param value The requestBodyBytes to set.
* @return This builder for chaining.
*/
public Builder setRequestBodyBytes(long value) {
requestBodyBytes_ = value;
onChanged();
return this;
}
/**
*
* Size of the HTTP request body in bytes.
* This value is captured from the OSI layer 7 perspective, i.e. it does not
* include overhead from framing or encoding at other networking layers.
*
*
* uint64 request_body_bytes = 12;
* @return This builder for chaining.
*/
public Builder clearRequestBodyBytes() {
requestBodyBytes_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> requestHeaders_;
private com.google.protobuf.MapField
internalGetRequestHeaders() {
if (requestHeaders_ == null) {
return com.google.protobuf.MapField.emptyMapField(
RequestHeadersDefaultEntryHolder.defaultEntry);
}
return requestHeaders_;
}
private com.google.protobuf.MapField
internalGetMutableRequestHeaders() {
onChanged();;
if (requestHeaders_ == null) {
requestHeaders_ = com.google.protobuf.MapField.newMapField(
RequestHeadersDefaultEntryHolder.defaultEntry);
}
if (!requestHeaders_.isMutable()) {
requestHeaders_ = requestHeaders_.copy();
}
return requestHeaders_;
}
public int getRequestHeadersCount() {
return internalGetRequestHeaders().getMap().size();
}
/**
*
* Map of additional headers that have been configured to be logged.
*
*
* map<string, string> request_headers = 13;
*/
@java.lang.Override
public boolean containsRequestHeaders(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetRequestHeaders().getMap().containsKey(key);
}
/**
* Use {@link #getRequestHeadersMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getRequestHeaders() {
return getRequestHeadersMap();
}
/**
*
* Map of additional headers that have been configured to be logged.
*
*
* map<string, string> request_headers = 13;
*/
@java.lang.Override
public java.util.Map getRequestHeadersMap() {
return internalGetRequestHeaders().getMap();
}
/**
*
* Map of additional headers that have been configured to be logged.
*
*
* map<string, string> request_headers = 13;
*/
@java.lang.Override
public java.lang.String getRequestHeadersOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetRequestHeaders().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Map of additional headers that have been configured to be logged.
*
*
* map<string, string> request_headers = 13;
*/
@java.lang.Override
public java.lang.String getRequestHeadersOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetRequestHeaders().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearRequestHeaders() {
internalGetMutableRequestHeaders().getMutableMap()
.clear();
return this;
}
/**
*
* Map of additional headers that have been configured to be logged.
*
*
* map<string, string> request_headers = 13;
*/
public Builder removeRequestHeaders(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableRequestHeaders().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableRequestHeaders() {
return internalGetMutableRequestHeaders().getMutableMap();
}
/**
*
* Map of additional headers that have been configured to be logged.
*
*
* map<string, string> request_headers = 13;
*/
public Builder putRequestHeaders(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutableRequestHeaders().getMutableMap()
.put(key, value);
return this;
}
/**
*
* Map of additional headers that have been configured to be logged.
*
*
* map<string, string> request_headers = 13;
*/
public Builder putAllRequestHeaders(
java.util.Map values) {
internalGetMutableRequestHeaders().getMutableMap()
.putAll(values);
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.data.accesslog.v2.HTTPRequestProperties)
}
// @@protoc_insertion_point(class_scope:envoy.data.accesslog.v2.HTTPRequestProperties)
private static final io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties();
}
public static io.envoyproxy.envoy.data.accesslog.v2.HTTPRequestProperties getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HTTPRequestProperties parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HTTPRequestProperties(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.data.accesslog.v2.HTTPRequestProperties getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}