All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.envoyproxy.envoy.service.auth.v2.AttributeContext Maven / Gradle / Ivy

There is a newer version: 1.0.47
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: envoy/service/auth/v2/attribute_context.proto

// Protobuf Java Version: 3.25.1
package io.envoyproxy.envoy.service.auth.v2;

/**
 * 
 * An attribute is a piece of metadata that describes an activity on a network.
 * For example, the size of an HTTP request, or the status code of an HTTP response.
 *
 * Each attribute has a type and a name, which is logically defined as a proto message field
 * of the `AttributeContext`. The `AttributeContext` is a collection of individual attributes
 * supported by Envoy authorization system.
 * [#comment: The following items are left out of this proto
 * Request.Auth field for jwt tokens
 * Request.Api for api management
 * Origin peer that originated the request
 * Caching Protocol
 * request_context return values to inject back into the filter chain
 * peer.claims -- from X.509 extensions
 * Configuration
 * - field mask to send
 * - which return values from request_context are copied back
 * - which return values are copied into request_headers]
 * [#next-free-field: 12]
 * 
* * Protobuf type {@code envoy.service.auth.v2.AttributeContext} */ public final class AttributeContext extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:envoy.service.auth.v2.AttributeContext) AttributeContextOrBuilder { private static final long serialVersionUID = 0L; // Use AttributeContext.newBuilder() to construct. private AttributeContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private AttributeContext() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new AttributeContext(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.service.auth.v2.AttributeContextProto.internal_static_envoy_service_auth_v2_AttributeContext_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 10: return internalGetContextExtensions(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.service.auth.v2.AttributeContextProto.internal_static_envoy_service_auth_v2_AttributeContext_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.service.auth.v2.AttributeContext.class, io.envoyproxy.envoy.service.auth.v2.AttributeContext.Builder.class); } public interface PeerOrBuilder extends // @@protoc_insertion_point(interface_extends:envoy.service.auth.v2.AttributeContext.Peer) com.google.protobuf.MessageOrBuilder { /** *
     * The address of the peer, this is typically the IP address.
     * It can also be UDS path, or others.
     * 
* * .envoy.api.v2.core.Address address = 1; * @return Whether the address field is set. */ boolean hasAddress(); /** *
     * The address of the peer, this is typically the IP address.
     * It can also be UDS path, or others.
     * 
* * .envoy.api.v2.core.Address address = 1; * @return The address. */ io.envoyproxy.envoy.api.v2.core.Address getAddress(); /** *
     * The address of the peer, this is typically the IP address.
     * It can also be UDS path, or others.
     * 
* * .envoy.api.v2.core.Address address = 1; */ io.envoyproxy.envoy.api.v2.core.AddressOrBuilder getAddressOrBuilder(); /** *
     * The canonical service name of the peer.
     * It should be set to :ref:`the HTTP x-envoy-downstream-service-cluster
     * <config_http_conn_man_headers_downstream-service-cluster>`
     * If a more trusted source of the service name is available through mTLS/secure naming, it
     * should be used.
     * 
* * string service = 2; * @return The service. */ java.lang.String getService(); /** *
     * The canonical service name of the peer.
     * It should be set to :ref:`the HTTP x-envoy-downstream-service-cluster
     * <config_http_conn_man_headers_downstream-service-cluster>`
     * If a more trusted source of the service name is available through mTLS/secure naming, it
     * should be used.
     * 
* * string service = 2; * @return The bytes for service. */ com.google.protobuf.ByteString getServiceBytes(); /** *
     * The labels associated with the peer.
     * These could be pod labels for Kubernetes or tags for VMs.
     * The source of the labels could be an X.509 certificate or other configuration.
     * 
* * map<string, string> labels = 3; */ int getLabelsCount(); /** *
     * The labels associated with the peer.
     * These could be pod labels for Kubernetes or tags for VMs.
     * The source of the labels could be an X.509 certificate or other configuration.
     * 
* * map<string, string> labels = 3; */ boolean containsLabels( java.lang.String key); /** * Use {@link #getLabelsMap()} instead. */ @java.lang.Deprecated java.util.Map getLabels(); /** *
     * The labels associated with the peer.
     * These could be pod labels for Kubernetes or tags for VMs.
     * The source of the labels could be an X.509 certificate or other configuration.
     * 
* * map<string, string> labels = 3; */ java.util.Map getLabelsMap(); /** *
     * The labels associated with the peer.
     * These could be pod labels for Kubernetes or tags for VMs.
     * The source of the labels could be an X.509 certificate or other configuration.
     * 
* * map<string, string> labels = 3; */ /* nullable */ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue); /** *
     * The labels associated with the peer.
     * These could be pod labels for Kubernetes or tags for VMs.
     * The source of the labels could be an X.509 certificate or other configuration.
     * 
* * map<string, string> labels = 3; */ java.lang.String getLabelsOrThrow( java.lang.String key); /** *
     * The authenticated identity of this peer.
     * For example, the identity associated with the workload such as a service account.
     * If an X.509 certificate is used to assert the identity this field should be sourced from
     * `URI Subject Alternative Names`, `DNS Subject Alternate Names` or `Subject` in that order.
     * The primary identity should be the principal. The principal format is issuer specific.
     *
     * Example:
     * *    SPIFFE format is `spiffe://trust-domain/path`
     * *    Google account format is `https://accounts.google.com/{userid}`
     * 
* * string principal = 4; * @return The principal. */ java.lang.String getPrincipal(); /** *
     * The authenticated identity of this peer.
     * For example, the identity associated with the workload such as a service account.
     * If an X.509 certificate is used to assert the identity this field should be sourced from
     * `URI Subject Alternative Names`, `DNS Subject Alternate Names` or `Subject` in that order.
     * The primary identity should be the principal. The principal format is issuer specific.
     *
     * Example:
     * *    SPIFFE format is `spiffe://trust-domain/path`
     * *    Google account format is `https://accounts.google.com/{userid}`
     * 
* * string principal = 4; * @return The bytes for principal. */ com.google.protobuf.ByteString getPrincipalBytes(); /** *
     * The X.509 certificate used to authenticate the identify of this peer.
     * When present, the certificate contents are encoded in URL and PEM format.
     * 
* * string certificate = 5; * @return The certificate. */ java.lang.String getCertificate(); /** *
     * The X.509 certificate used to authenticate the identify of this peer.
     * When present, the certificate contents are encoded in URL and PEM format.
     * 
* * string certificate = 5; * @return The bytes for certificate. */ com.google.protobuf.ByteString getCertificateBytes(); } /** *
   * This message defines attributes for a node that handles a network request.
   * The node can be either a service or an application that sends, forwards,
   * or receives the request. Service peers should fill in the `service`,
   * `principal`, and `labels` as appropriate.
   * [#next-free-field: 6]
   * 
* * Protobuf type {@code envoy.service.auth.v2.AttributeContext.Peer} */ public static final class Peer extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:envoy.service.auth.v2.AttributeContext.Peer) PeerOrBuilder { private static final long serialVersionUID = 0L; // Use Peer.newBuilder() to construct. private Peer(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Peer() { service_ = ""; principal_ = ""; certificate_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Peer(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.service.auth.v2.AttributeContextProto.internal_static_envoy_service_auth_v2_AttributeContext_Peer_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 3: return internalGetLabels(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.service.auth.v2.AttributeContextProto.internal_static_envoy_service_auth_v2_AttributeContext_Peer_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.class, io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.Builder.class); } private int bitField0_; public static final int ADDRESS_FIELD_NUMBER = 1; private io.envoyproxy.envoy.api.v2.core.Address address_; /** *
     * The address of the peer, this is typically the IP address.
     * It can also be UDS path, or others.
     * 
* * .envoy.api.v2.core.Address address = 1; * @return Whether the address field is set. */ @java.lang.Override public boolean hasAddress() { return ((bitField0_ & 0x00000001) != 0); } /** *
     * The address of the peer, this is typically the IP address.
     * It can also be UDS path, or others.
     * 
* * .envoy.api.v2.core.Address address = 1; * @return The address. */ @java.lang.Override public io.envoyproxy.envoy.api.v2.core.Address getAddress() { return address_ == null ? io.envoyproxy.envoy.api.v2.core.Address.getDefaultInstance() : address_; } /** *
     * The address of the peer, this is typically the IP address.
     * It can also be UDS path, or others.
     * 
* * .envoy.api.v2.core.Address address = 1; */ @java.lang.Override public io.envoyproxy.envoy.api.v2.core.AddressOrBuilder getAddressOrBuilder() { return address_ == null ? io.envoyproxy.envoy.api.v2.core.Address.getDefaultInstance() : address_; } public static final int SERVICE_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object service_ = ""; /** *
     * The canonical service name of the peer.
     * It should be set to :ref:`the HTTP x-envoy-downstream-service-cluster
     * <config_http_conn_man_headers_downstream-service-cluster>`
     * If a more trusted source of the service name is available through mTLS/secure naming, it
     * should be used.
     * 
* * string service = 2; * @return The service. */ @java.lang.Override public java.lang.String getService() { java.lang.Object ref = service_; 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(); service_ = s; return s; } } /** *
     * The canonical service name of the peer.
     * It should be set to :ref:`the HTTP x-envoy-downstream-service-cluster
     * <config_http_conn_man_headers_downstream-service-cluster>`
     * If a more trusted source of the service name is available through mTLS/secure naming, it
     * should be used.
     * 
* * string service = 2; * @return The bytes for service. */ @java.lang.Override public com.google.protobuf.ByteString getServiceBytes() { java.lang.Object ref = service_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); service_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LABELS_FIELD_NUMBER = 3; private static final class LabelsDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, java.lang.String> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( io.envoyproxy.envoy.service.auth.v2.AttributeContextProto.internal_static_envoy_service_auth_v2_AttributeContext_Peer_LabelsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, java.lang.String> labels_; private com.google.protobuf.MapField internalGetLabels() { if (labels_ == null) { return com.google.protobuf.MapField.emptyMapField( LabelsDefaultEntryHolder.defaultEntry); } return labels_; } public int getLabelsCount() { return internalGetLabels().getMap().size(); } /** *
     * The labels associated with the peer.
     * These could be pod labels for Kubernetes or tags for VMs.
     * The source of the labels could be an X.509 certificate or other configuration.
     * 
* * map<string, string> labels = 3; */ @java.lang.Override public boolean containsLabels( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetLabels().getMap().containsKey(key); } /** * Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } /** *
     * The labels associated with the peer.
     * These could be pod labels for Kubernetes or tags for VMs.
     * The source of the labels could be an X.509 certificate or other configuration.
     * 
* * map<string, string> labels = 3; */ @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** *
     * The labels associated with the peer.
     * These could be pod labels for Kubernetes or tags for VMs.
     * The source of the labels could be an X.509 certificate or other configuration.
     * 
* * map<string, string> labels = 3; */ @java.lang.Override public /* nullable */ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * The labels associated with the peer.
     * These could be pod labels for Kubernetes or tags for VMs.
     * The source of the labels could be an X.509 certificate or other configuration.
     * 
* * map<string, string> labels = 3; */ @java.lang.Override public java.lang.String getLabelsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int PRINCIPAL_FIELD_NUMBER = 4; @SuppressWarnings("serial") private volatile java.lang.Object principal_ = ""; /** *
     * The authenticated identity of this peer.
     * For example, the identity associated with the workload such as a service account.
     * If an X.509 certificate is used to assert the identity this field should be sourced from
     * `URI Subject Alternative Names`, `DNS Subject Alternate Names` or `Subject` in that order.
     * The primary identity should be the principal. The principal format is issuer specific.
     *
     * Example:
     * *    SPIFFE format is `spiffe://trust-domain/path`
     * *    Google account format is `https://accounts.google.com/{userid}`
     * 
* * string principal = 4; * @return The principal. */ @java.lang.Override public java.lang.String getPrincipal() { java.lang.Object ref = principal_; 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(); principal_ = s; return s; } } /** *
     * The authenticated identity of this peer.
     * For example, the identity associated with the workload such as a service account.
     * If an X.509 certificate is used to assert the identity this field should be sourced from
     * `URI Subject Alternative Names`, `DNS Subject Alternate Names` or `Subject` in that order.
     * The primary identity should be the principal. The principal format is issuer specific.
     *
     * Example:
     * *    SPIFFE format is `spiffe://trust-domain/path`
     * *    Google account format is `https://accounts.google.com/{userid}`
     * 
* * string principal = 4; * @return The bytes for principal. */ @java.lang.Override public com.google.protobuf.ByteString getPrincipalBytes() { java.lang.Object ref = principal_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); principal_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CERTIFICATE_FIELD_NUMBER = 5; @SuppressWarnings("serial") private volatile java.lang.Object certificate_ = ""; /** *
     * The X.509 certificate used to authenticate the identify of this peer.
     * When present, the certificate contents are encoded in URL and PEM format.
     * 
* * string certificate = 5; * @return The certificate. */ @java.lang.Override public java.lang.String getCertificate() { java.lang.Object ref = certificate_; 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(); certificate_ = s; return s; } } /** *
     * The X.509 certificate used to authenticate the identify of this peer.
     * When present, the certificate contents are encoded in URL and PEM format.
     * 
* * string certificate = 5; * @return The bytes for certificate. */ @java.lang.Override public com.google.protobuf.ByteString getCertificateBytes() { java.lang.Object ref = certificate_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); certificate_ = 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 (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getAddress()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, service_); } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 3); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principal_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, principal_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(certificate_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, certificate_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getAddress()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, service_); } for (java.util.Map.Entry entry : internalGetLabels().getMap().entrySet()) { com.google.protobuf.MapEntry labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, labels__); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principal_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, principal_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(certificate_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, certificate_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer)) { return super.equals(obj); } io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer other = (io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer) obj; if (hasAddress() != other.hasAddress()) return false; if (hasAddress()) { if (!getAddress() .equals(other.getAddress())) return false; } if (!getService() .equals(other.getService())) return false; if (!internalGetLabels().equals( other.internalGetLabels())) return false; if (!getPrincipal() .equals(other.getPrincipal())) return false; if (!getCertificate() .equals(other.getCertificate())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasAddress()) { hash = (37 * hash) + ADDRESS_FIELD_NUMBER; hash = (53 * hash) + getAddress().hashCode(); } hash = (37 * hash) + SERVICE_FIELD_NUMBER; hash = (53 * hash) + getService().hashCode(); if (!internalGetLabels().getMap().isEmpty()) { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } hash = (37 * hash) + PRINCIPAL_FIELD_NUMBER; hash = (53 * hash) + getPrincipal().hashCode(); hash = (37 * hash) + CERTIFICATE_FIELD_NUMBER; hash = (53 * hash) + getCertificate().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer 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.auth.v2.AttributeContext.Peer parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer 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.auth.v2.AttributeContext.Peer parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer 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.auth.v2.AttributeContext.Peer parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer 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.auth.v2.AttributeContext.Peer parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer 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.auth.v2.AttributeContext.Peer 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 defines attributes for a node that handles a network request.
     * The node can be either a service or an application that sends, forwards,
     * or receives the request. Service peers should fill in the `service`,
     * `principal`, and `labels` as appropriate.
     * [#next-free-field: 6]
     * 
* * Protobuf type {@code envoy.service.auth.v2.AttributeContext.Peer} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:envoy.service.auth.v2.AttributeContext.Peer) io.envoyproxy.envoy.service.auth.v2.AttributeContext.PeerOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.service.auth.v2.AttributeContextProto.internal_static_envoy_service_auth_v2_AttributeContext_Peer_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 3: return internalGetLabels(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 3: return internalGetMutableLabels(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.service.auth.v2.AttributeContextProto.internal_static_envoy_service_auth_v2_AttributeContext_Peer_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.class, io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.Builder.class); } // Construct using io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getAddressFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; address_ = null; if (addressBuilder_ != null) { addressBuilder_.dispose(); addressBuilder_ = null; } service_ = ""; internalGetMutableLabels().clear(); principal_ = ""; certificate_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.envoyproxy.envoy.service.auth.v2.AttributeContextProto.internal_static_envoy_service_auth_v2_AttributeContext_Peer_descriptor; } @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer getDefaultInstanceForType() { return io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.getDefaultInstance(); } @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer build() { io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer buildPartial() { io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer result = new io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.address_ = addressBuilder_ == null ? address_ : addressBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.service_ = service_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); } if (((from_bitField0_ & 0x00000008) != 0)) { result.principal_ = principal_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.certificate_ = certificate_; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer) { return mergeFrom((io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer other) { if (other == io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.getDefaultInstance()) return this; if (other.hasAddress()) { mergeAddress(other.getAddress()); } if (!other.getService().isEmpty()) { service_ = other.service_; bitField0_ |= 0x00000002; onChanged(); } internalGetMutableLabels().mergeFrom( other.internalGetLabels()); bitField0_ |= 0x00000004; if (!other.getPrincipal().isEmpty()) { principal_ = other.principal_; bitField0_ |= 0x00000008; onChanged(); } if (!other.getCertificate().isEmpty()) { certificate_ = other.certificate_; bitField0_ |= 0x00000010; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { input.readMessage( getAddressFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { service_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { com.google.protobuf.MapEntry labels__ = input.readMessage( LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableLabels().getMutableMap().put( labels__.getKey(), labels__.getValue()); bitField0_ |= 0x00000004; break; } // case 26 case 34: { principal_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000008; break; } // case 34 case 42: { certificate_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000010; break; } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private io.envoyproxy.envoy.api.v2.core.Address address_; private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.api.v2.core.Address, io.envoyproxy.envoy.api.v2.core.Address.Builder, io.envoyproxy.envoy.api.v2.core.AddressOrBuilder> addressBuilder_; /** *
       * The address of the peer, this is typically the IP address.
       * It can also be UDS path, or others.
       * 
* * .envoy.api.v2.core.Address address = 1; * @return Whether the address field is set. */ public boolean hasAddress() { return ((bitField0_ & 0x00000001) != 0); } /** *
       * The address of the peer, this is typically the IP address.
       * It can also be UDS path, or others.
       * 
* * .envoy.api.v2.core.Address address = 1; * @return The address. */ public io.envoyproxy.envoy.api.v2.core.Address getAddress() { if (addressBuilder_ == null) { return address_ == null ? io.envoyproxy.envoy.api.v2.core.Address.getDefaultInstance() : address_; } else { return addressBuilder_.getMessage(); } } /** *
       * The address of the peer, this is typically the IP address.
       * It can also be UDS path, or others.
       * 
* * .envoy.api.v2.core.Address address = 1; */ public Builder setAddress(io.envoyproxy.envoy.api.v2.core.Address value) { if (addressBuilder_ == null) { if (value == null) { throw new NullPointerException(); } address_ = value; } else { addressBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** *
       * The address of the peer, this is typically the IP address.
       * It can also be UDS path, or others.
       * 
* * .envoy.api.v2.core.Address address = 1; */ public Builder setAddress( io.envoyproxy.envoy.api.v2.core.Address.Builder builderForValue) { if (addressBuilder_ == null) { address_ = builderForValue.build(); } else { addressBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** *
       * The address of the peer, this is typically the IP address.
       * It can also be UDS path, or others.
       * 
* * .envoy.api.v2.core.Address address = 1; */ public Builder mergeAddress(io.envoyproxy.envoy.api.v2.core.Address value) { if (addressBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && address_ != null && address_ != io.envoyproxy.envoy.api.v2.core.Address.getDefaultInstance()) { getAddressBuilder().mergeFrom(value); } else { address_ = value; } } else { addressBuilder_.mergeFrom(value); } if (address_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** *
       * The address of the peer, this is typically the IP address.
       * It can also be UDS path, or others.
       * 
* * .envoy.api.v2.core.Address address = 1; */ public Builder clearAddress() { bitField0_ = (bitField0_ & ~0x00000001); address_ = null; if (addressBuilder_ != null) { addressBuilder_.dispose(); addressBuilder_ = null; } onChanged(); return this; } /** *
       * The address of the peer, this is typically the IP address.
       * It can also be UDS path, or others.
       * 
* * .envoy.api.v2.core.Address address = 1; */ public io.envoyproxy.envoy.api.v2.core.Address.Builder getAddressBuilder() { bitField0_ |= 0x00000001; onChanged(); return getAddressFieldBuilder().getBuilder(); } /** *
       * The address of the peer, this is typically the IP address.
       * It can also be UDS path, or others.
       * 
* * .envoy.api.v2.core.Address address = 1; */ public io.envoyproxy.envoy.api.v2.core.AddressOrBuilder getAddressOrBuilder() { if (addressBuilder_ != null) { return addressBuilder_.getMessageOrBuilder(); } else { return address_ == null ? io.envoyproxy.envoy.api.v2.core.Address.getDefaultInstance() : address_; } } /** *
       * The address of the peer, this is typically the IP address.
       * It can also be UDS path, or others.
       * 
* * .envoy.api.v2.core.Address address = 1; */ private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.api.v2.core.Address, io.envoyproxy.envoy.api.v2.core.Address.Builder, io.envoyproxy.envoy.api.v2.core.AddressOrBuilder> getAddressFieldBuilder() { if (addressBuilder_ == null) { addressBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.api.v2.core.Address, io.envoyproxy.envoy.api.v2.core.Address.Builder, io.envoyproxy.envoy.api.v2.core.AddressOrBuilder>( getAddress(), getParentForChildren(), isClean()); address_ = null; } return addressBuilder_; } private java.lang.Object service_ = ""; /** *
       * The canonical service name of the peer.
       * It should be set to :ref:`the HTTP x-envoy-downstream-service-cluster
       * <config_http_conn_man_headers_downstream-service-cluster>`
       * If a more trusted source of the service name is available through mTLS/secure naming, it
       * should be used.
       * 
* * string service = 2; * @return The service. */ public java.lang.String getService() { java.lang.Object ref = service_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); service_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * The canonical service name of the peer.
       * It should be set to :ref:`the HTTP x-envoy-downstream-service-cluster
       * <config_http_conn_man_headers_downstream-service-cluster>`
       * If a more trusted source of the service name is available through mTLS/secure naming, it
       * should be used.
       * 
* * string service = 2; * @return The bytes for service. */ public com.google.protobuf.ByteString getServiceBytes() { java.lang.Object ref = service_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); service_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * The canonical service name of the peer.
       * It should be set to :ref:`the HTTP x-envoy-downstream-service-cluster
       * <config_http_conn_man_headers_downstream-service-cluster>`
       * If a more trusted source of the service name is available through mTLS/secure naming, it
       * should be used.
       * 
* * string service = 2; * @param value The service to set. * @return This builder for chaining. */ public Builder setService( java.lang.String value) { if (value == null) { throw new NullPointerException(); } service_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
       * The canonical service name of the peer.
       * It should be set to :ref:`the HTTP x-envoy-downstream-service-cluster
       * <config_http_conn_man_headers_downstream-service-cluster>`
       * If a more trusted source of the service name is available through mTLS/secure naming, it
       * should be used.
       * 
* * string service = 2; * @return This builder for chaining. */ public Builder clearService() { service_ = getDefaultInstance().getService(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
       * The canonical service name of the peer.
       * It should be set to :ref:`the HTTP x-envoy-downstream-service-cluster
       * <config_http_conn_man_headers_downstream-service-cluster>`
       * If a more trusted source of the service name is available through mTLS/secure naming, it
       * should be used.
       * 
* * string service = 2; * @param value The bytes for service to set. * @return This builder for chaining. */ public Builder setServiceBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); service_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private com.google.protobuf.MapField< java.lang.String, java.lang.String> labels_; private com.google.protobuf.MapField internalGetLabels() { if (labels_ == null) { return com.google.protobuf.MapField.emptyMapField( LabelsDefaultEntryHolder.defaultEntry); } return labels_; } private com.google.protobuf.MapField internalGetMutableLabels() { if (labels_ == null) { labels_ = com.google.protobuf.MapField.newMapField( LabelsDefaultEntryHolder.defaultEntry); } if (!labels_.isMutable()) { labels_ = labels_.copy(); } bitField0_ |= 0x00000004; onChanged(); return labels_; } public int getLabelsCount() { return internalGetLabels().getMap().size(); } /** *
       * The labels associated with the peer.
       * These could be pod labels for Kubernetes or tags for VMs.
       * The source of the labels could be an X.509 certificate or other configuration.
       * 
* * map<string, string> labels = 3; */ @java.lang.Override public boolean containsLabels( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetLabels().getMap().containsKey(key); } /** * Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } /** *
       * The labels associated with the peer.
       * These could be pod labels for Kubernetes or tags for VMs.
       * The source of the labels could be an X.509 certificate or other configuration.
       * 
* * map<string, string> labels = 3; */ @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** *
       * The labels associated with the peer.
       * These could be pod labels for Kubernetes or tags for VMs.
       * The source of the labels could be an X.509 certificate or other configuration.
       * 
* * map<string, string> labels = 3; */ @java.lang.Override public /* nullable */ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
       * The labels associated with the peer.
       * These could be pod labels for Kubernetes or tags for VMs.
       * The source of the labels could be an X.509 certificate or other configuration.
       * 
* * map<string, string> labels = 3; */ @java.lang.Override public java.lang.String getLabelsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearLabels() { bitField0_ = (bitField0_ & ~0x00000004); internalGetMutableLabels().getMutableMap() .clear(); return this; } /** *
       * The labels associated with the peer.
       * These could be pod labels for Kubernetes or tags for VMs.
       * The source of the labels could be an X.509 certificate or other configuration.
       * 
* * map<string, string> labels = 3; */ public Builder removeLabels( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableLabels().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableLabels() { bitField0_ |= 0x00000004; return internalGetMutableLabels().getMutableMap(); } /** *
       * The labels associated with the peer.
       * These could be pod labels for Kubernetes or tags for VMs.
       * The source of the labels could be an X.509 certificate or other configuration.
       * 
* * map<string, string> labels = 3; */ public Builder putLabels( java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableLabels().getMutableMap() .put(key, value); bitField0_ |= 0x00000004; return this; } /** *
       * The labels associated with the peer.
       * These could be pod labels for Kubernetes or tags for VMs.
       * The source of the labels could be an X.509 certificate or other configuration.
       * 
* * map<string, string> labels = 3; */ public Builder putAllLabels( java.util.Map values) { internalGetMutableLabels().getMutableMap() .putAll(values); bitField0_ |= 0x00000004; return this; } private java.lang.Object principal_ = ""; /** *
       * The authenticated identity of this peer.
       * For example, the identity associated with the workload such as a service account.
       * If an X.509 certificate is used to assert the identity this field should be sourced from
       * `URI Subject Alternative Names`, `DNS Subject Alternate Names` or `Subject` in that order.
       * The primary identity should be the principal. The principal format is issuer specific.
       *
       * Example:
       * *    SPIFFE format is `spiffe://trust-domain/path`
       * *    Google account format is `https://accounts.google.com/{userid}`
       * 
* * string principal = 4; * @return The principal. */ public java.lang.String getPrincipal() { java.lang.Object ref = principal_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); principal_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * The authenticated identity of this peer.
       * For example, the identity associated with the workload such as a service account.
       * If an X.509 certificate is used to assert the identity this field should be sourced from
       * `URI Subject Alternative Names`, `DNS Subject Alternate Names` or `Subject` in that order.
       * The primary identity should be the principal. The principal format is issuer specific.
       *
       * Example:
       * *    SPIFFE format is `spiffe://trust-domain/path`
       * *    Google account format is `https://accounts.google.com/{userid}`
       * 
* * string principal = 4; * @return The bytes for principal. */ public com.google.protobuf.ByteString getPrincipalBytes() { java.lang.Object ref = principal_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); principal_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * The authenticated identity of this peer.
       * For example, the identity associated with the workload such as a service account.
       * If an X.509 certificate is used to assert the identity this field should be sourced from
       * `URI Subject Alternative Names`, `DNS Subject Alternate Names` or `Subject` in that order.
       * The primary identity should be the principal. The principal format is issuer specific.
       *
       * Example:
       * *    SPIFFE format is `spiffe://trust-domain/path`
       * *    Google account format is `https://accounts.google.com/{userid}`
       * 
* * string principal = 4; * @param value The principal to set. * @return This builder for chaining. */ public Builder setPrincipal( java.lang.String value) { if (value == null) { throw new NullPointerException(); } principal_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** *
       * The authenticated identity of this peer.
       * For example, the identity associated with the workload such as a service account.
       * If an X.509 certificate is used to assert the identity this field should be sourced from
       * `URI Subject Alternative Names`, `DNS Subject Alternate Names` or `Subject` in that order.
       * The primary identity should be the principal. The principal format is issuer specific.
       *
       * Example:
       * *    SPIFFE format is `spiffe://trust-domain/path`
       * *    Google account format is `https://accounts.google.com/{userid}`
       * 
* * string principal = 4; * @return This builder for chaining. */ public Builder clearPrincipal() { principal_ = getDefaultInstance().getPrincipal(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } /** *
       * The authenticated identity of this peer.
       * For example, the identity associated with the workload such as a service account.
       * If an X.509 certificate is used to assert the identity this field should be sourced from
       * `URI Subject Alternative Names`, `DNS Subject Alternate Names` or `Subject` in that order.
       * The primary identity should be the principal. The principal format is issuer specific.
       *
       * Example:
       * *    SPIFFE format is `spiffe://trust-domain/path`
       * *    Google account format is `https://accounts.google.com/{userid}`
       * 
* * string principal = 4; * @param value The bytes for principal to set. * @return This builder for chaining. */ public Builder setPrincipalBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); principal_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } private java.lang.Object certificate_ = ""; /** *
       * The X.509 certificate used to authenticate the identify of this peer.
       * When present, the certificate contents are encoded in URL and PEM format.
       * 
* * string certificate = 5; * @return The certificate. */ public java.lang.String getCertificate() { java.lang.Object ref = certificate_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); certificate_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * The X.509 certificate used to authenticate the identify of this peer.
       * When present, the certificate contents are encoded in URL and PEM format.
       * 
* * string certificate = 5; * @return The bytes for certificate. */ public com.google.protobuf.ByteString getCertificateBytes() { java.lang.Object ref = certificate_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); certificate_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * The X.509 certificate used to authenticate the identify of this peer.
       * When present, the certificate contents are encoded in URL and PEM format.
       * 
* * string certificate = 5; * @param value The certificate to set. * @return This builder for chaining. */ public Builder setCertificate( java.lang.String value) { if (value == null) { throw new NullPointerException(); } certificate_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** *
       * The X.509 certificate used to authenticate the identify of this peer.
       * When present, the certificate contents are encoded in URL and PEM format.
       * 
* * string certificate = 5; * @return This builder for chaining. */ public Builder clearCertificate() { certificate_ = getDefaultInstance().getCertificate(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** *
       * The X.509 certificate used to authenticate the identify of this peer.
       * When present, the certificate contents are encoded in URL and PEM format.
       * 
* * string certificate = 5; * @param value The bytes for certificate to set. * @return This builder for chaining. */ public Builder setCertificateBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); certificate_ = value; bitField0_ |= 0x00000010; 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.auth.v2.AttributeContext.Peer) } // @@protoc_insertion_point(class_scope:envoy.service.auth.v2.AttributeContext.Peer) private static final io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer(); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Peer parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface RequestOrBuilder extends // @@protoc_insertion_point(interface_extends:envoy.service.auth.v2.AttributeContext.Request) com.google.protobuf.MessageOrBuilder { /** *
     * The timestamp when the proxy receives the first byte of the request.
     * 
* * .google.protobuf.Timestamp time = 1; * @return Whether the time field is set. */ boolean hasTime(); /** *
     * The timestamp when the proxy receives the first byte of the request.
     * 
* * .google.protobuf.Timestamp time = 1; * @return The time. */ com.google.protobuf.Timestamp getTime(); /** *
     * The timestamp when the proxy receives the first byte of the request.
     * 
* * .google.protobuf.Timestamp time = 1; */ com.google.protobuf.TimestampOrBuilder getTimeOrBuilder(); /** *
     * Represents an HTTP request or an HTTP-like request.
     * 
* * .envoy.service.auth.v2.AttributeContext.HttpRequest http = 2; * @return Whether the http field is set. */ boolean hasHttp(); /** *
     * Represents an HTTP request or an HTTP-like request.
     * 
* * .envoy.service.auth.v2.AttributeContext.HttpRequest http = 2; * @return The http. */ io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest getHttp(); /** *
     * Represents an HTTP request or an HTTP-like request.
     * 
* * .envoy.service.auth.v2.AttributeContext.HttpRequest http = 2; */ io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequestOrBuilder getHttpOrBuilder(); } /** *
   * Represents a network request, such as an HTTP request.
   * 
* * Protobuf type {@code envoy.service.auth.v2.AttributeContext.Request} */ public static final class Request extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:envoy.service.auth.v2.AttributeContext.Request) RequestOrBuilder { private static final long serialVersionUID = 0L; // Use Request.newBuilder() to construct. private Request(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Request() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Request(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.service.auth.v2.AttributeContextProto.internal_static_envoy_service_auth_v2_AttributeContext_Request_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.service.auth.v2.AttributeContextProto.internal_static_envoy_service_auth_v2_AttributeContext_Request_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request.class, io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request.Builder.class); } private int bitField0_; public static final int TIME_FIELD_NUMBER = 1; private com.google.protobuf.Timestamp time_; /** *
     * The timestamp when the proxy receives the first byte of the request.
     * 
* * .google.protobuf.Timestamp time = 1; * @return Whether the time field is set. */ @java.lang.Override public boolean hasTime() { return ((bitField0_ & 0x00000001) != 0); } /** *
     * The timestamp when the proxy receives the first byte of the request.
     * 
* * .google.protobuf.Timestamp time = 1; * @return The time. */ @java.lang.Override public com.google.protobuf.Timestamp getTime() { return time_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : time_; } /** *
     * The timestamp when the proxy receives the first byte of the request.
     * 
* * .google.protobuf.Timestamp time = 1; */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getTimeOrBuilder() { return time_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : time_; } public static final int HTTP_FIELD_NUMBER = 2; private io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest http_; /** *
     * Represents an HTTP request or an HTTP-like request.
     * 
* * .envoy.service.auth.v2.AttributeContext.HttpRequest http = 2; * @return Whether the http field is set. */ @java.lang.Override public boolean hasHttp() { return ((bitField0_ & 0x00000002) != 0); } /** *
     * Represents an HTTP request or an HTTP-like request.
     * 
* * .envoy.service.auth.v2.AttributeContext.HttpRequest http = 2; * @return The http. */ @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest getHttp() { return http_ == null ? io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest.getDefaultInstance() : http_; } /** *
     * Represents an HTTP request or an HTTP-like request.
     * 
* * .envoy.service.auth.v2.AttributeContext.HttpRequest http = 2; */ @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequestOrBuilder getHttpOrBuilder() { return http_ == null ? io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest.getDefaultInstance() : http_; } 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 (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getTime()); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getHttp()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getTime()); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getHttp()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request)) { return super.equals(obj); } io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request other = (io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request) obj; if (hasTime() != other.hasTime()) return false; if (hasTime()) { if (!getTime() .equals(other.getTime())) return false; } if (hasHttp() != other.hasHttp()) return false; if (hasHttp()) { if (!getHttp() .equals(other.getHttp())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasTime()) { hash = (37 * hash) + TIME_FIELD_NUMBER; hash = (53 * hash) + getTime().hashCode(); } if (hasHttp()) { hash = (37 * hash) + HTTP_FIELD_NUMBER; hash = (53 * hash) + getHttp().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request 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.auth.v2.AttributeContext.Request parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request 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.auth.v2.AttributeContext.Request parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request 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.auth.v2.AttributeContext.Request parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request 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.auth.v2.AttributeContext.Request parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request 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.auth.v2.AttributeContext.Request 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; } /** *
     * Represents a network request, such as an HTTP request.
     * 
* * Protobuf type {@code envoy.service.auth.v2.AttributeContext.Request} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:envoy.service.auth.v2.AttributeContext.Request) io.envoyproxy.envoy.service.auth.v2.AttributeContext.RequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.service.auth.v2.AttributeContextProto.internal_static_envoy_service_auth_v2_AttributeContext_Request_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.service.auth.v2.AttributeContextProto.internal_static_envoy_service_auth_v2_AttributeContext_Request_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request.class, io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request.Builder.class); } // Construct using io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getTimeFieldBuilder(); getHttpFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; time_ = null; if (timeBuilder_ != null) { timeBuilder_.dispose(); timeBuilder_ = null; } http_ = null; if (httpBuilder_ != null) { httpBuilder_.dispose(); httpBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.envoyproxy.envoy.service.auth.v2.AttributeContextProto.internal_static_envoy_service_auth_v2_AttributeContext_Request_descriptor; } @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request getDefaultInstanceForType() { return io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request.getDefaultInstance(); } @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request build() { io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request buildPartial() { io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request result = new io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.time_ = timeBuilder_ == null ? time_ : timeBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.http_ = httpBuilder_ == null ? http_ : httpBuilder_.build(); to_bitField0_ |= 0x00000002; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request) { return mergeFrom((io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request other) { if (other == io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request.getDefaultInstance()) return this; if (other.hasTime()) { mergeTime(other.getTime()); } if (other.hasHttp()) { mergeHttp(other.getHttp()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { input.readMessage( getTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage( getHttpFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private com.google.protobuf.Timestamp time_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timeBuilder_; /** *
       * The timestamp when the proxy receives the first byte of the request.
       * 
* * .google.protobuf.Timestamp time = 1; * @return Whether the time field is set. */ public boolean hasTime() { return ((bitField0_ & 0x00000001) != 0); } /** *
       * The timestamp when the proxy receives the first byte of the request.
       * 
* * .google.protobuf.Timestamp time = 1; * @return The time. */ public com.google.protobuf.Timestamp getTime() { if (timeBuilder_ == null) { return time_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : time_; } else { return timeBuilder_.getMessage(); } } /** *
       * The timestamp when the proxy receives the first byte of the request.
       * 
* * .google.protobuf.Timestamp time = 1; */ public Builder setTime(com.google.protobuf.Timestamp value) { if (timeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } time_ = value; } else { timeBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** *
       * The timestamp when the proxy receives the first byte of the request.
       * 
* * .google.protobuf.Timestamp time = 1; */ public Builder setTime( com.google.protobuf.Timestamp.Builder builderForValue) { if (timeBuilder_ == null) { time_ = builderForValue.build(); } else { timeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** *
       * The timestamp when the proxy receives the first byte of the request.
       * 
* * .google.protobuf.Timestamp time = 1; */ public Builder mergeTime(com.google.protobuf.Timestamp value) { if (timeBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && time_ != null && time_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getTimeBuilder().mergeFrom(value); } else { time_ = value; } } else { timeBuilder_.mergeFrom(value); } if (time_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** *
       * The timestamp when the proxy receives the first byte of the request.
       * 
* * .google.protobuf.Timestamp time = 1; */ public Builder clearTime() { bitField0_ = (bitField0_ & ~0x00000001); time_ = null; if (timeBuilder_ != null) { timeBuilder_.dispose(); timeBuilder_ = null; } onChanged(); return this; } /** *
       * The timestamp when the proxy receives the first byte of the request.
       * 
* * .google.protobuf.Timestamp time = 1; */ public com.google.protobuf.Timestamp.Builder getTimeBuilder() { bitField0_ |= 0x00000001; onChanged(); return getTimeFieldBuilder().getBuilder(); } /** *
       * The timestamp when the proxy receives the first byte of the request.
       * 
* * .google.protobuf.Timestamp time = 1; */ public com.google.protobuf.TimestampOrBuilder getTimeOrBuilder() { if (timeBuilder_ != null) { return timeBuilder_.getMessageOrBuilder(); } else { return time_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : time_; } } /** *
       * The timestamp when the proxy receives the first byte of the request.
       * 
* * .google.protobuf.Timestamp time = 1; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getTimeFieldBuilder() { if (timeBuilder_ == null) { timeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getTime(), getParentForChildren(), isClean()); time_ = null; } return timeBuilder_; } private io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest http_; private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest, io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest.Builder, io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequestOrBuilder> httpBuilder_; /** *
       * Represents an HTTP request or an HTTP-like request.
       * 
* * .envoy.service.auth.v2.AttributeContext.HttpRequest http = 2; * @return Whether the http field is set. */ public boolean hasHttp() { return ((bitField0_ & 0x00000002) != 0); } /** *
       * Represents an HTTP request or an HTTP-like request.
       * 
* * .envoy.service.auth.v2.AttributeContext.HttpRequest http = 2; * @return The http. */ public io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest getHttp() { if (httpBuilder_ == null) { return http_ == null ? io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest.getDefaultInstance() : http_; } else { return httpBuilder_.getMessage(); } } /** *
       * Represents an HTTP request or an HTTP-like request.
       * 
* * .envoy.service.auth.v2.AttributeContext.HttpRequest http = 2; */ public Builder setHttp(io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest value) { if (httpBuilder_ == null) { if (value == null) { throw new NullPointerException(); } http_ = value; } else { httpBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** *
       * Represents an HTTP request or an HTTP-like request.
       * 
* * .envoy.service.auth.v2.AttributeContext.HttpRequest http = 2; */ public Builder setHttp( io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest.Builder builderForValue) { if (httpBuilder_ == null) { http_ = builderForValue.build(); } else { httpBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** *
       * Represents an HTTP request or an HTTP-like request.
       * 
* * .envoy.service.auth.v2.AttributeContext.HttpRequest http = 2; */ public Builder mergeHttp(io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest value) { if (httpBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && http_ != null && http_ != io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest.getDefaultInstance()) { getHttpBuilder().mergeFrom(value); } else { http_ = value; } } else { httpBuilder_.mergeFrom(value); } if (http_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** *
       * Represents an HTTP request or an HTTP-like request.
       * 
* * .envoy.service.auth.v2.AttributeContext.HttpRequest http = 2; */ public Builder clearHttp() { bitField0_ = (bitField0_ & ~0x00000002); http_ = null; if (httpBuilder_ != null) { httpBuilder_.dispose(); httpBuilder_ = null; } onChanged(); return this; } /** *
       * Represents an HTTP request or an HTTP-like request.
       * 
* * .envoy.service.auth.v2.AttributeContext.HttpRequest http = 2; */ public io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest.Builder getHttpBuilder() { bitField0_ |= 0x00000002; onChanged(); return getHttpFieldBuilder().getBuilder(); } /** *
       * Represents an HTTP request or an HTTP-like request.
       * 
* * .envoy.service.auth.v2.AttributeContext.HttpRequest http = 2; */ public io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequestOrBuilder getHttpOrBuilder() { if (httpBuilder_ != null) { return httpBuilder_.getMessageOrBuilder(); } else { return http_ == null ? io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest.getDefaultInstance() : http_; } } /** *
       * Represents an HTTP request or an HTTP-like request.
       * 
* * .envoy.service.auth.v2.AttributeContext.HttpRequest http = 2; */ private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest, io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest.Builder, io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequestOrBuilder> getHttpFieldBuilder() { if (httpBuilder_ == null) { httpBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest, io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest.Builder, io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequestOrBuilder>( getHttp(), getParentForChildren(), isClean()); http_ = null; } return httpBuilder_; } @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.auth.v2.AttributeContext.Request) } // @@protoc_insertion_point(class_scope:envoy.service.auth.v2.AttributeContext.Request) private static final io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request(); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Request parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface HttpRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:envoy.service.auth.v2.AttributeContext.HttpRequest) com.google.protobuf.MessageOrBuilder { /** *
     * The unique ID for a request, which can be propagated to downstream
     * systems. The ID should have low probability of collision
     * within a single day for a specific service.
     * For HTTP requests, it should be X-Request-ID or equivalent.
     * 
* * string id = 1; * @return The id. */ java.lang.String getId(); /** *
     * The unique ID for a request, which can be propagated to downstream
     * systems. The ID should have low probability of collision
     * within a single day for a specific service.
     * For HTTP requests, it should be X-Request-ID or equivalent.
     * 
* * string id = 1; * @return The bytes for id. */ com.google.protobuf.ByteString getIdBytes(); /** *
     * The HTTP request method, such as `GET`, `POST`.
     * 
* * string method = 2; * @return The method. */ java.lang.String getMethod(); /** *
     * The HTTP request method, such as `GET`, `POST`.
     * 
* * string method = 2; * @return The bytes for method. */ com.google.protobuf.ByteString getMethodBytes(); /** *
     * The HTTP request headers. If multiple headers share the same key, they
     * must be merged according to the HTTP spec. All header keys must be
     * lower-cased, because HTTP header keys are case-insensitive.
     * 
* * map<string, string> headers = 3; */ int getHeadersCount(); /** *
     * The HTTP request headers. If multiple headers share the same key, they
     * must be merged according to the HTTP spec. All header keys must be
     * lower-cased, because HTTP header keys are case-insensitive.
     * 
* * map<string, string> headers = 3; */ boolean containsHeaders( java.lang.String key); /** * Use {@link #getHeadersMap()} instead. */ @java.lang.Deprecated java.util.Map getHeaders(); /** *
     * The HTTP request headers. If multiple headers share the same key, they
     * must be merged according to the HTTP spec. All header keys must be
     * lower-cased, because HTTP header keys are case-insensitive.
     * 
* * map<string, string> headers = 3; */ java.util.Map getHeadersMap(); /** *
     * The HTTP request headers. If multiple headers share the same key, they
     * must be merged according to the HTTP spec. All header keys must be
     * lower-cased, because HTTP header keys are case-insensitive.
     * 
* * map<string, string> headers = 3; */ /* nullable */ java.lang.String getHeadersOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue); /** *
     * The HTTP request headers. If multiple headers share the same key, they
     * must be merged according to the HTTP spec. All header keys must be
     * lower-cased, because HTTP header keys are case-insensitive.
     * 
* * map<string, string> headers = 3; */ java.lang.String getHeadersOrThrow( java.lang.String key); /** *
     * The request target, as it appears in the first line of the HTTP request. This includes
     * the URL path and query-string. No decoding is performed.
     * 
* * string path = 4; * @return The path. */ java.lang.String getPath(); /** *
     * The request target, as it appears in the first line of the HTTP request. This includes
     * the URL path and query-string. No decoding is performed.
     * 
* * string path = 4; * @return The bytes for path. */ com.google.protobuf.ByteString getPathBytes(); /** *
     * The HTTP request `Host` or 'Authority` header value.
     * 
* * string host = 5; * @return The host. */ java.lang.String getHost(); /** *
     * The HTTP request `Host` or 'Authority` header value.
     * 
* * string host = 5; * @return The bytes for host. */ com.google.protobuf.ByteString getHostBytes(); /** *
     * The HTTP URL scheme, such as `http` and `https`. This is set for HTTP/2
     * requests only. For HTTP/1.1, use "x-forwarded-for" header value to lookup
     * the scheme of the request.
     * 
* * string scheme = 6; * @return The scheme. */ java.lang.String getScheme(); /** *
     * The HTTP URL scheme, such as `http` and `https`. This is set for HTTP/2
     * requests only. For HTTP/1.1, use "x-forwarded-for" header value to lookup
     * the scheme of the request.
     * 
* * string scheme = 6; * @return The bytes for scheme. */ com.google.protobuf.ByteString getSchemeBytes(); /** *
     * This field is always empty, and exists for compatibility reasons. The HTTP URL query is
     * included in `path` field.
     * 
* * string query = 7; * @return The query. */ java.lang.String getQuery(); /** *
     * This field is always empty, and exists for compatibility reasons. The HTTP URL query is
     * included in `path` field.
     * 
* * string query = 7; * @return The bytes for query. */ com.google.protobuf.ByteString getQueryBytes(); /** *
     * This field is always empty, and exists for compatibility reasons. The URL fragment is
     * not submitted as part of HTTP requests; it is unknowable.
     * 
* * string fragment = 8; * @return The fragment. */ java.lang.String getFragment(); /** *
     * This field is always empty, and exists for compatibility reasons. The URL fragment is
     * not submitted as part of HTTP requests; it is unknowable.
     * 
* * string fragment = 8; * @return The bytes for fragment. */ com.google.protobuf.ByteString getFragmentBytes(); /** *
     * The HTTP request size in bytes. If unknown, it must be -1.
     * 
* * int64 size = 9; * @return The size. */ long getSize(); /** *
     * The network protocol used with the request, such as "HTTP/1.0", "HTTP/1.1", or "HTTP/2".
     *
     * See :repo:`headers.h:ProtocolStrings <source/common/http/headers.h>` for a list of all
     * possible values.
     * 
* * string protocol = 10; * @return The protocol. */ java.lang.String getProtocol(); /** *
     * The network protocol used with the request, such as "HTTP/1.0", "HTTP/1.1", or "HTTP/2".
     *
     * See :repo:`headers.h:ProtocolStrings <source/common/http/headers.h>` for a list of all
     * possible values.
     * 
* * string protocol = 10; * @return The bytes for protocol. */ com.google.protobuf.ByteString getProtocolBytes(); /** *
     * The HTTP request body.
     * 
* * string body = 11; * @return The body. */ java.lang.String getBody(); /** *
     * The HTTP request body.
     * 
* * string body = 11; * @return The bytes for body. */ com.google.protobuf.ByteString getBodyBytes(); } /** *
   * This message defines attributes for an HTTP request.
   * HTTP/1.x, HTTP/2, gRPC are all considered as HTTP requests.
   * [#next-free-field: 12]
   * 
* * Protobuf type {@code envoy.service.auth.v2.AttributeContext.HttpRequest} */ public static final class HttpRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:envoy.service.auth.v2.AttributeContext.HttpRequest) HttpRequestOrBuilder { private static final long serialVersionUID = 0L; // Use HttpRequest.newBuilder() to construct. private HttpRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private HttpRequest() { id_ = ""; method_ = ""; path_ = ""; host_ = ""; scheme_ = ""; query_ = ""; fragment_ = ""; protocol_ = ""; body_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new HttpRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.service.auth.v2.AttributeContextProto.internal_static_envoy_service_auth_v2_AttributeContext_HttpRequest_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 3: return internalGetHeaders(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.service.auth.v2.AttributeContextProto.internal_static_envoy_service_auth_v2_AttributeContext_HttpRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest.class, io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest.Builder.class); } public static final int ID_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object id_ = ""; /** *
     * The unique ID for a request, which can be propagated to downstream
     * systems. The ID should have low probability of collision
     * within a single day for a specific service.
     * For HTTP requests, it should be X-Request-ID or equivalent.
     * 
* * string id = 1; * @return The id. */ @java.lang.Override public java.lang.String getId() { java.lang.Object ref = id_; 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(); id_ = s; return s; } } /** *
     * The unique ID for a request, which can be propagated to downstream
     * systems. The ID should have low probability of collision
     * within a single day for a specific service.
     * For HTTP requests, it should be X-Request-ID or equivalent.
     * 
* * string id = 1; * @return The bytes for id. */ @java.lang.Override public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int METHOD_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object method_ = ""; /** *
     * The HTTP request method, such as `GET`, `POST`.
     * 
* * string method = 2; * @return The method. */ @java.lang.Override public java.lang.String getMethod() { java.lang.Object ref = method_; 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(); method_ = s; return s; } } /** *
     * The HTTP request method, such as `GET`, `POST`.
     * 
* * string method = 2; * @return The bytes for method. */ @java.lang.Override public com.google.protobuf.ByteString getMethodBytes() { java.lang.Object ref = method_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); method_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int HEADERS_FIELD_NUMBER = 3; private static final class HeadersDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, java.lang.String> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( io.envoyproxy.envoy.service.auth.v2.AttributeContextProto.internal_static_envoy_service_auth_v2_AttributeContext_HttpRequest_HeadersEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, java.lang.String> headers_; private com.google.protobuf.MapField internalGetHeaders() { if (headers_ == null) { return com.google.protobuf.MapField.emptyMapField( HeadersDefaultEntryHolder.defaultEntry); } return headers_; } public int getHeadersCount() { return internalGetHeaders().getMap().size(); } /** *
     * The HTTP request headers. If multiple headers share the same key, they
     * must be merged according to the HTTP spec. All header keys must be
     * lower-cased, because HTTP header keys are case-insensitive.
     * 
* * map<string, string> headers = 3; */ @java.lang.Override public boolean containsHeaders( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetHeaders().getMap().containsKey(key); } /** * Use {@link #getHeadersMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getHeaders() { return getHeadersMap(); } /** *
     * The HTTP request headers. If multiple headers share the same key, they
     * must be merged according to the HTTP spec. All header keys must be
     * lower-cased, because HTTP header keys are case-insensitive.
     * 
* * map<string, string> headers = 3; */ @java.lang.Override public java.util.Map getHeadersMap() { return internalGetHeaders().getMap(); } /** *
     * The HTTP request headers. If multiple headers share the same key, they
     * must be merged according to the HTTP spec. All header keys must be
     * lower-cased, because HTTP header keys are case-insensitive.
     * 
* * map<string, string> headers = 3; */ @java.lang.Override public /* nullable */ java.lang.String getHeadersOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetHeaders().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * The HTTP request headers. If multiple headers share the same key, they
     * must be merged according to the HTTP spec. All header keys must be
     * lower-cased, because HTTP header keys are case-insensitive.
     * 
* * map<string, string> headers = 3; */ @java.lang.Override public java.lang.String getHeadersOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetHeaders().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int PATH_FIELD_NUMBER = 4; @SuppressWarnings("serial") private volatile java.lang.Object path_ = ""; /** *
     * The request target, as it appears in the first line of the HTTP request. This includes
     * the URL path and query-string. No decoding is performed.
     * 
* * string path = 4; * @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 request target, as it appears in the first line of the HTTP request. This includes
     * the URL path and query-string. No decoding is performed.
     * 
* * string path = 4; * @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 HOST_FIELD_NUMBER = 5; @SuppressWarnings("serial") private volatile java.lang.Object host_ = ""; /** *
     * The HTTP request `Host` or 'Authority` header value.
     * 
* * string host = 5; * @return The host. */ @java.lang.Override public java.lang.String getHost() { java.lang.Object ref = host_; 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(); host_ = s; return s; } } /** *
     * The HTTP request `Host` or 'Authority` header value.
     * 
* * string host = 5; * @return The bytes for host. */ @java.lang.Override public com.google.protobuf.ByteString getHostBytes() { java.lang.Object ref = host_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); host_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SCHEME_FIELD_NUMBER = 6; @SuppressWarnings("serial") private volatile java.lang.Object scheme_ = ""; /** *
     * The HTTP URL scheme, such as `http` and `https`. This is set for HTTP/2
     * requests only. For HTTP/1.1, use "x-forwarded-for" header value to lookup
     * the scheme of the request.
     * 
* * string scheme = 6; * @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 HTTP URL scheme, such as `http` and `https`. This is set for HTTP/2
     * requests only. For HTTP/1.1, use "x-forwarded-for" header value to lookup
     * the scheme of the request.
     * 
* * string scheme = 6; * @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 QUERY_FIELD_NUMBER = 7; @SuppressWarnings("serial") private volatile java.lang.Object query_ = ""; /** *
     * This field is always empty, and exists for compatibility reasons. The HTTP URL query is
     * included in `path` field.
     * 
* * string query = 7; * @return The query. */ @java.lang.Override public java.lang.String getQuery() { java.lang.Object ref = query_; 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(); query_ = s; return s; } } /** *
     * This field is always empty, and exists for compatibility reasons. The HTTP URL query is
     * included in `path` field.
     * 
* * string query = 7; * @return The bytes for query. */ @java.lang.Override public com.google.protobuf.ByteString getQueryBytes() { java.lang.Object ref = query_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); query_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int FRAGMENT_FIELD_NUMBER = 8; @SuppressWarnings("serial") private volatile java.lang.Object fragment_ = ""; /** *
     * This field is always empty, and exists for compatibility reasons. The URL fragment is
     * not submitted as part of HTTP requests; it is unknowable.
     * 
* * string fragment = 8; * @return The fragment. */ @java.lang.Override public java.lang.String getFragment() { java.lang.Object ref = fragment_; 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(); fragment_ = s; return s; } } /** *
     * This field is always empty, and exists for compatibility reasons. The URL fragment is
     * not submitted as part of HTTP requests; it is unknowable.
     * 
* * string fragment = 8; * @return The bytes for fragment. */ @java.lang.Override public com.google.protobuf.ByteString getFragmentBytes() { java.lang.Object ref = fragment_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); fragment_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SIZE_FIELD_NUMBER = 9; private long size_ = 0L; /** *
     * The HTTP request size in bytes. If unknown, it must be -1.
     * 
* * int64 size = 9; * @return The size. */ @java.lang.Override public long getSize() { return size_; } public static final int PROTOCOL_FIELD_NUMBER = 10; @SuppressWarnings("serial") private volatile java.lang.Object protocol_ = ""; /** *
     * The network protocol used with the request, such as "HTTP/1.0", "HTTP/1.1", or "HTTP/2".
     *
     * See :repo:`headers.h:ProtocolStrings <source/common/http/headers.h>` for a list of all
     * possible values.
     * 
* * string protocol = 10; * @return The protocol. */ @java.lang.Override public java.lang.String getProtocol() { java.lang.Object ref = protocol_; 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(); protocol_ = s; return s; } } /** *
     * The network protocol used with the request, such as "HTTP/1.0", "HTTP/1.1", or "HTTP/2".
     *
     * See :repo:`headers.h:ProtocolStrings <source/common/http/headers.h>` for a list of all
     * possible values.
     * 
* * string protocol = 10; * @return The bytes for protocol. */ @java.lang.Override public com.google.protobuf.ByteString getProtocolBytes() { java.lang.Object ref = protocol_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); protocol_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int BODY_FIELD_NUMBER = 11; @SuppressWarnings("serial") private volatile java.lang.Object body_ = ""; /** *
     * The HTTP request body.
     * 
* * string body = 11; * @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 HTTP request body.
     * 
* * string body = 11; * @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; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(method_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, method_); } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetHeaders(), HeadersDefaultEntryHolder.defaultEntry, 3); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, path_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(host_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, host_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scheme_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, scheme_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, query_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fragment_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, fragment_); } if (size_ != 0L) { output.writeInt64(9, size_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, protocol_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(body_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 11, body_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(method_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, method_); } for (java.util.Map.Entry entry : internalGetHeaders().getMap().entrySet()) { com.google.protobuf.MapEntry headers__ = HeadersDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, headers__); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, path_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(host_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, host_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scheme_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, scheme_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, query_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fragment_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, fragment_); } if (size_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(9, size_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, protocol_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(body_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, body_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest)) { return super.equals(obj); } io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest other = (io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest) obj; if (!getId() .equals(other.getId())) return false; if (!getMethod() .equals(other.getMethod())) return false; if (!internalGetHeaders().equals( other.internalGetHeaders())) return false; if (!getPath() .equals(other.getPath())) return false; if (!getHost() .equals(other.getHost())) return false; if (!getScheme() .equals(other.getScheme())) return false; if (!getQuery() .equals(other.getQuery())) return false; if (!getFragment() .equals(other.getFragment())) return false; if (getSize() != other.getSize()) return false; if (!getProtocol() .equals(other.getProtocol())) return false; if (!getBody() .equals(other.getBody())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); hash = (37 * hash) + METHOD_FIELD_NUMBER; hash = (53 * hash) + getMethod().hashCode(); if (!internalGetHeaders().getMap().isEmpty()) { hash = (37 * hash) + HEADERS_FIELD_NUMBER; hash = (53 * hash) + internalGetHeaders().hashCode(); } hash = (37 * hash) + PATH_FIELD_NUMBER; hash = (53 * hash) + getPath().hashCode(); hash = (37 * hash) + HOST_FIELD_NUMBER; hash = (53 * hash) + getHost().hashCode(); hash = (37 * hash) + SCHEME_FIELD_NUMBER; hash = (53 * hash) + getScheme().hashCode(); hash = (37 * hash) + QUERY_FIELD_NUMBER; hash = (53 * hash) + getQuery().hashCode(); hash = (37 * hash) + FRAGMENT_FIELD_NUMBER; hash = (53 * hash) + getFragment().hashCode(); hash = (37 * hash) + SIZE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getSize()); hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; hash = (53 * hash) + getProtocol().hashCode(); hash = (37 * hash) + BODY_FIELD_NUMBER; hash = (53 * hash) + getBody().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest 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.auth.v2.AttributeContext.HttpRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest 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.auth.v2.AttributeContext.HttpRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest 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.auth.v2.AttributeContext.HttpRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest 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.auth.v2.AttributeContext.HttpRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest 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.auth.v2.AttributeContext.HttpRequest 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 defines attributes for an HTTP request.
     * HTTP/1.x, HTTP/2, gRPC are all considered as HTTP requests.
     * [#next-free-field: 12]
     * 
* * Protobuf type {@code envoy.service.auth.v2.AttributeContext.HttpRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:envoy.service.auth.v2.AttributeContext.HttpRequest) io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.service.auth.v2.AttributeContextProto.internal_static_envoy_service_auth_v2_AttributeContext_HttpRequest_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 3: return internalGetHeaders(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 3: return internalGetMutableHeaders(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.service.auth.v2.AttributeContextProto.internal_static_envoy_service_auth_v2_AttributeContext_HttpRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest.class, io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest.Builder.class); } // Construct using io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; id_ = ""; method_ = ""; internalGetMutableHeaders().clear(); path_ = ""; host_ = ""; scheme_ = ""; query_ = ""; fragment_ = ""; size_ = 0L; protocol_ = ""; body_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.envoyproxy.envoy.service.auth.v2.AttributeContextProto.internal_static_envoy_service_auth_v2_AttributeContext_HttpRequest_descriptor; } @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest getDefaultInstanceForType() { return io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest.getDefaultInstance(); } @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest build() { io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest buildPartial() { io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest result = new io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.id_ = id_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.method_ = method_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.headers_ = internalGetHeaders(); result.headers_.makeImmutable(); } if (((from_bitField0_ & 0x00000008) != 0)) { result.path_ = path_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.host_ = host_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.scheme_ = scheme_; } if (((from_bitField0_ & 0x00000040) != 0)) { result.query_ = query_; } if (((from_bitField0_ & 0x00000080) != 0)) { result.fragment_ = fragment_; } if (((from_bitField0_ & 0x00000100) != 0)) { result.size_ = size_; } if (((from_bitField0_ & 0x00000200) != 0)) { result.protocol_ = protocol_; } if (((from_bitField0_ & 0x00000400) != 0)) { result.body_ = body_; } } @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.auth.v2.AttributeContext.HttpRequest) { return mergeFrom((io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest other) { if (other == io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest.getDefaultInstance()) return this; if (!other.getId().isEmpty()) { id_ = other.id_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getMethod().isEmpty()) { method_ = other.method_; bitField0_ |= 0x00000002; onChanged(); } internalGetMutableHeaders().mergeFrom( other.internalGetHeaders()); bitField0_ |= 0x00000004; if (!other.getPath().isEmpty()) { path_ = other.path_; bitField0_ |= 0x00000008; onChanged(); } if (!other.getHost().isEmpty()) { host_ = other.host_; bitField0_ |= 0x00000010; onChanged(); } if (!other.getScheme().isEmpty()) { scheme_ = other.scheme_; bitField0_ |= 0x00000020; onChanged(); } if (!other.getQuery().isEmpty()) { query_ = other.query_; bitField0_ |= 0x00000040; onChanged(); } if (!other.getFragment().isEmpty()) { fragment_ = other.fragment_; bitField0_ |= 0x00000080; onChanged(); } if (other.getSize() != 0L) { setSize(other.getSize()); } if (!other.getProtocol().isEmpty()) { protocol_ = other.protocol_; bitField0_ |= 0x00000200; onChanged(); } if (!other.getBody().isEmpty()) { body_ = other.body_; bitField0_ |= 0x00000400; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { id_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { method_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { com.google.protobuf.MapEntry headers__ = input.readMessage( HeadersDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableHeaders().getMutableMap().put( headers__.getKey(), headers__.getValue()); bitField0_ |= 0x00000004; break; } // case 26 case 34: { path_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000008; break; } // case 34 case 42: { host_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000010; break; } // case 42 case 50: { scheme_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000020; break; } // case 50 case 58: { query_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000040; break; } // case 58 case 66: { fragment_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000080; break; } // case 66 case 72: { size_ = input.readInt64(); bitField0_ |= 0x00000100; break; } // case 72 case 82: { protocol_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000200; break; } // case 82 case 90: { body_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000400; break; } // case 90 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object id_ = ""; /** *
       * The unique ID for a request, which can be propagated to downstream
       * systems. The ID should have low probability of collision
       * within a single day for a specific service.
       * For HTTP requests, it should be X-Request-ID or equivalent.
       * 
* * string id = 1; * @return The id. */ public java.lang.String getId() { java.lang.Object ref = id_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); id_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * The unique ID for a request, which can be propagated to downstream
       * systems. The ID should have low probability of collision
       * within a single day for a specific service.
       * For HTTP requests, it should be X-Request-ID or equivalent.
       * 
* * string id = 1; * @return The bytes for id. */ public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * The unique ID for a request, which can be propagated to downstream
       * systems. The ID should have low probability of collision
       * within a single day for a specific service.
       * For HTTP requests, it should be X-Request-ID or equivalent.
       * 
* * string id = 1; * @param value The id to set. * @return This builder for chaining. */ public Builder setId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } id_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
       * The unique ID for a request, which can be propagated to downstream
       * systems. The ID should have low probability of collision
       * within a single day for a specific service.
       * For HTTP requests, it should be X-Request-ID or equivalent.
       * 
* * string id = 1; * @return This builder for chaining. */ public Builder clearId() { id_ = getDefaultInstance().getId(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
       * The unique ID for a request, which can be propagated to downstream
       * systems. The ID should have low probability of collision
       * within a single day for a specific service.
       * For HTTP requests, it should be X-Request-ID or equivalent.
       * 
* * string id = 1; * @param value The bytes for id to set. * @return This builder for chaining. */ public Builder setIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); id_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object method_ = ""; /** *
       * The HTTP request method, such as `GET`, `POST`.
       * 
* * string method = 2; * @return The method. */ public java.lang.String getMethod() { java.lang.Object ref = method_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); method_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * The HTTP request method, such as `GET`, `POST`.
       * 
* * string method = 2; * @return The bytes for method. */ public com.google.protobuf.ByteString getMethodBytes() { java.lang.Object ref = method_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); method_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * The HTTP request method, such as `GET`, `POST`.
       * 
* * string method = 2; * @param value The method to set. * @return This builder for chaining. */ public Builder setMethod( java.lang.String value) { if (value == null) { throw new NullPointerException(); } method_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
       * The HTTP request method, such as `GET`, `POST`.
       * 
* * string method = 2; * @return This builder for chaining. */ public Builder clearMethod() { method_ = getDefaultInstance().getMethod(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
       * The HTTP request method, such as `GET`, `POST`.
       * 
* * string method = 2; * @param value The bytes for method to set. * @return This builder for chaining. */ public Builder setMethodBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); method_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private com.google.protobuf.MapField< java.lang.String, java.lang.String> headers_; private com.google.protobuf.MapField internalGetHeaders() { if (headers_ == null) { return com.google.protobuf.MapField.emptyMapField( HeadersDefaultEntryHolder.defaultEntry); } return headers_; } private com.google.protobuf.MapField internalGetMutableHeaders() { if (headers_ == null) { headers_ = com.google.protobuf.MapField.newMapField( HeadersDefaultEntryHolder.defaultEntry); } if (!headers_.isMutable()) { headers_ = headers_.copy(); } bitField0_ |= 0x00000004; onChanged(); return headers_; } public int getHeadersCount() { return internalGetHeaders().getMap().size(); } /** *
       * The HTTP request headers. If multiple headers share the same key, they
       * must be merged according to the HTTP spec. All header keys must be
       * lower-cased, because HTTP header keys are case-insensitive.
       * 
* * map<string, string> headers = 3; */ @java.lang.Override public boolean containsHeaders( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetHeaders().getMap().containsKey(key); } /** * Use {@link #getHeadersMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getHeaders() { return getHeadersMap(); } /** *
       * The HTTP request headers. If multiple headers share the same key, they
       * must be merged according to the HTTP spec. All header keys must be
       * lower-cased, because HTTP header keys are case-insensitive.
       * 
* * map<string, string> headers = 3; */ @java.lang.Override public java.util.Map getHeadersMap() { return internalGetHeaders().getMap(); } /** *
       * The HTTP request headers. If multiple headers share the same key, they
       * must be merged according to the HTTP spec. All header keys must be
       * lower-cased, because HTTP header keys are case-insensitive.
       * 
* * map<string, string> headers = 3; */ @java.lang.Override public /* nullable */ java.lang.String getHeadersOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetHeaders().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
       * The HTTP request headers. If multiple headers share the same key, they
       * must be merged according to the HTTP spec. All header keys must be
       * lower-cased, because HTTP header keys are case-insensitive.
       * 
* * map<string, string> headers = 3; */ @java.lang.Override public java.lang.String getHeadersOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetHeaders().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearHeaders() { bitField0_ = (bitField0_ & ~0x00000004); internalGetMutableHeaders().getMutableMap() .clear(); return this; } /** *
       * The HTTP request headers. If multiple headers share the same key, they
       * must be merged according to the HTTP spec. All header keys must be
       * lower-cased, because HTTP header keys are case-insensitive.
       * 
* * map<string, string> headers = 3; */ public Builder removeHeaders( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableHeaders().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableHeaders() { bitField0_ |= 0x00000004; return internalGetMutableHeaders().getMutableMap(); } /** *
       * The HTTP request headers. If multiple headers share the same key, they
       * must be merged according to the HTTP spec. All header keys must be
       * lower-cased, because HTTP header keys are case-insensitive.
       * 
* * map<string, string> headers = 3; */ public Builder putHeaders( java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableHeaders().getMutableMap() .put(key, value); bitField0_ |= 0x00000004; return this; } /** *
       * The HTTP request headers. If multiple headers share the same key, they
       * must be merged according to the HTTP spec. All header keys must be
       * lower-cased, because HTTP header keys are case-insensitive.
       * 
* * map<string, string> headers = 3; */ public Builder putAllHeaders( java.util.Map values) { internalGetMutableHeaders().getMutableMap() .putAll(values); bitField0_ |= 0x00000004; return this; } private java.lang.Object path_ = ""; /** *
       * The request target, as it appears in the first line of the HTTP request. This includes
       * the URL path and query-string. No decoding is performed.
       * 
* * string path = 4; * @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 request target, as it appears in the first line of the HTTP request. This includes
       * the URL path and query-string. No decoding is performed.
       * 
* * string path = 4; * @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 request target, as it appears in the first line of the HTTP request. This includes
       * the URL path and query-string. No decoding is performed.
       * 
* * string path = 4; * @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; bitField0_ |= 0x00000008; onChanged(); return this; } /** *
       * The request target, as it appears in the first line of the HTTP request. This includes
       * the URL path and query-string. No decoding is performed.
       * 
* * string path = 4; * @return This builder for chaining. */ public Builder clearPath() { path_ = getDefaultInstance().getPath(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } /** *
       * The request target, as it appears in the first line of the HTTP request. This includes
       * the URL path and query-string. No decoding is performed.
       * 
* * string path = 4; * @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; bitField0_ |= 0x00000008; onChanged(); return this; } private java.lang.Object host_ = ""; /** *
       * The HTTP request `Host` or 'Authority` header value.
       * 
* * string host = 5; * @return The host. */ public java.lang.String getHost() { java.lang.Object ref = host_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); host_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * The HTTP request `Host` or 'Authority` header value.
       * 
* * string host = 5; * @return The bytes for host. */ public com.google.protobuf.ByteString getHostBytes() { java.lang.Object ref = host_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); host_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * The HTTP request `Host` or 'Authority` header value.
       * 
* * string host = 5; * @param value The host to set. * @return This builder for chaining. */ public Builder setHost( java.lang.String value) { if (value == null) { throw new NullPointerException(); } host_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** *
       * The HTTP request `Host` or 'Authority` header value.
       * 
* * string host = 5; * @return This builder for chaining. */ public Builder clearHost() { host_ = getDefaultInstance().getHost(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** *
       * The HTTP request `Host` or 'Authority` header value.
       * 
* * string host = 5; * @param value The bytes for host to set. * @return This builder for chaining. */ public Builder setHostBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); host_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } private java.lang.Object scheme_ = ""; /** *
       * The HTTP URL scheme, such as `http` and `https`. This is set for HTTP/2
       * requests only. For HTTP/1.1, use "x-forwarded-for" header value to lookup
       * the scheme of the request.
       * 
* * string scheme = 6; * @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 HTTP URL scheme, such as `http` and `https`. This is set for HTTP/2
       * requests only. For HTTP/1.1, use "x-forwarded-for" header value to lookup
       * the scheme of the request.
       * 
* * string scheme = 6; * @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 HTTP URL scheme, such as `http` and `https`. This is set for HTTP/2
       * requests only. For HTTP/1.1, use "x-forwarded-for" header value to lookup
       * the scheme of the request.
       * 
* * string scheme = 6; * @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; bitField0_ |= 0x00000020; onChanged(); return this; } /** *
       * The HTTP URL scheme, such as `http` and `https`. This is set for HTTP/2
       * requests only. For HTTP/1.1, use "x-forwarded-for" header value to lookup
       * the scheme of the request.
       * 
* * string scheme = 6; * @return This builder for chaining. */ public Builder clearScheme() { scheme_ = getDefaultInstance().getScheme(); bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } /** *
       * The HTTP URL scheme, such as `http` and `https`. This is set for HTTP/2
       * requests only. For HTTP/1.1, use "x-forwarded-for" header value to lookup
       * the scheme of the request.
       * 
* * string scheme = 6; * @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; bitField0_ |= 0x00000020; onChanged(); return this; } private java.lang.Object query_ = ""; /** *
       * This field is always empty, and exists for compatibility reasons. The HTTP URL query is
       * included in `path` field.
       * 
* * string query = 7; * @return The query. */ public java.lang.String getQuery() { java.lang.Object ref = query_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); query_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * This field is always empty, and exists for compatibility reasons. The HTTP URL query is
       * included in `path` field.
       * 
* * string query = 7; * @return The bytes for query. */ public com.google.protobuf.ByteString getQueryBytes() { java.lang.Object ref = query_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); query_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * This field is always empty, and exists for compatibility reasons. The HTTP URL query is
       * included in `path` field.
       * 
* * string query = 7; * @param value The query to set. * @return This builder for chaining. */ public Builder setQuery( java.lang.String value) { if (value == null) { throw new NullPointerException(); } query_ = value; bitField0_ |= 0x00000040; onChanged(); return this; } /** *
       * This field is always empty, and exists for compatibility reasons. The HTTP URL query is
       * included in `path` field.
       * 
* * string query = 7; * @return This builder for chaining. */ public Builder clearQuery() { query_ = getDefaultInstance().getQuery(); bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } /** *
       * This field is always empty, and exists for compatibility reasons. The HTTP URL query is
       * included in `path` field.
       * 
* * string query = 7; * @param value The bytes for query to set. * @return This builder for chaining. */ public Builder setQueryBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); query_ = value; bitField0_ |= 0x00000040; onChanged(); return this; } private java.lang.Object fragment_ = ""; /** *
       * This field is always empty, and exists for compatibility reasons. The URL fragment is
       * not submitted as part of HTTP requests; it is unknowable.
       * 
* * string fragment = 8; * @return The fragment. */ public java.lang.String getFragment() { java.lang.Object ref = fragment_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); fragment_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * This field is always empty, and exists for compatibility reasons. The URL fragment is
       * not submitted as part of HTTP requests; it is unknowable.
       * 
* * string fragment = 8; * @return The bytes for fragment. */ public com.google.protobuf.ByteString getFragmentBytes() { java.lang.Object ref = fragment_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); fragment_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * This field is always empty, and exists for compatibility reasons. The URL fragment is
       * not submitted as part of HTTP requests; it is unknowable.
       * 
* * string fragment = 8; * @param value The fragment to set. * @return This builder for chaining. */ public Builder setFragment( java.lang.String value) { if (value == null) { throw new NullPointerException(); } fragment_ = value; bitField0_ |= 0x00000080; onChanged(); return this; } /** *
       * This field is always empty, and exists for compatibility reasons. The URL fragment is
       * not submitted as part of HTTP requests; it is unknowable.
       * 
* * string fragment = 8; * @return This builder for chaining. */ public Builder clearFragment() { fragment_ = getDefaultInstance().getFragment(); bitField0_ = (bitField0_ & ~0x00000080); onChanged(); return this; } /** *
       * This field is always empty, and exists for compatibility reasons. The URL fragment is
       * not submitted as part of HTTP requests; it is unknowable.
       * 
* * string fragment = 8; * @param value The bytes for fragment to set. * @return This builder for chaining. */ public Builder setFragmentBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); fragment_ = value; bitField0_ |= 0x00000080; onChanged(); return this; } private long size_ ; /** *
       * The HTTP request size in bytes. If unknown, it must be -1.
       * 
* * int64 size = 9; * @return The size. */ @java.lang.Override public long getSize() { return size_; } /** *
       * The HTTP request size in bytes. If unknown, it must be -1.
       * 
* * int64 size = 9; * @param value The size to set. * @return This builder for chaining. */ public Builder setSize(long value) { size_ = value; bitField0_ |= 0x00000100; onChanged(); return this; } /** *
       * The HTTP request size in bytes. If unknown, it must be -1.
       * 
* * int64 size = 9; * @return This builder for chaining. */ public Builder clearSize() { bitField0_ = (bitField0_ & ~0x00000100); size_ = 0L; onChanged(); return this; } private java.lang.Object protocol_ = ""; /** *
       * The network protocol used with the request, such as "HTTP/1.0", "HTTP/1.1", or "HTTP/2".
       *
       * See :repo:`headers.h:ProtocolStrings <source/common/http/headers.h>` for a list of all
       * possible values.
       * 
* * string protocol = 10; * @return The protocol. */ public java.lang.String getProtocol() { java.lang.Object ref = protocol_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); protocol_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * The network protocol used with the request, such as "HTTP/1.0", "HTTP/1.1", or "HTTP/2".
       *
       * See :repo:`headers.h:ProtocolStrings <source/common/http/headers.h>` for a list of all
       * possible values.
       * 
* * string protocol = 10; * @return The bytes for protocol. */ public com.google.protobuf.ByteString getProtocolBytes() { java.lang.Object ref = protocol_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); protocol_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * The network protocol used with the request, such as "HTTP/1.0", "HTTP/1.1", or "HTTP/2".
       *
       * See :repo:`headers.h:ProtocolStrings <source/common/http/headers.h>` for a list of all
       * possible values.
       * 
* * string protocol = 10; * @param value The protocol to set. * @return This builder for chaining. */ public Builder setProtocol( java.lang.String value) { if (value == null) { throw new NullPointerException(); } protocol_ = value; bitField0_ |= 0x00000200; onChanged(); return this; } /** *
       * The network protocol used with the request, such as "HTTP/1.0", "HTTP/1.1", or "HTTP/2".
       *
       * See :repo:`headers.h:ProtocolStrings <source/common/http/headers.h>` for a list of all
       * possible values.
       * 
* * string protocol = 10; * @return This builder for chaining. */ public Builder clearProtocol() { protocol_ = getDefaultInstance().getProtocol(); bitField0_ = (bitField0_ & ~0x00000200); onChanged(); return this; } /** *
       * The network protocol used with the request, such as "HTTP/1.0", "HTTP/1.1", or "HTTP/2".
       *
       * See :repo:`headers.h:ProtocolStrings <source/common/http/headers.h>` for a list of all
       * possible values.
       * 
* * string protocol = 10; * @param value The bytes for protocol to set. * @return This builder for chaining. */ public Builder setProtocolBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); protocol_ = value; bitField0_ |= 0x00000200; onChanged(); return this; } private java.lang.Object body_ = ""; /** *
       * The HTTP request body.
       * 
* * string body = 11; * @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 HTTP request body.
       * 
* * string body = 11; * @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 HTTP request body.
       * 
* * string body = 11; * @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; bitField0_ |= 0x00000400; onChanged(); return this; } /** *
       * The HTTP request body.
       * 
* * string body = 11; * @return This builder for chaining. */ public Builder clearBody() { body_ = getDefaultInstance().getBody(); bitField0_ = (bitField0_ & ~0x00000400); onChanged(); return this; } /** *
       * The HTTP request body.
       * 
* * string body = 11; * @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; bitField0_ |= 0x00000400; 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.auth.v2.AttributeContext.HttpRequest) } // @@protoc_insertion_point(class_scope:envoy.service.auth.v2.AttributeContext.HttpRequest) private static final io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest(); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public HttpRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; public static final int SOURCE_FIELD_NUMBER = 1; private io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer source_; /** *
   * The source of a network activity, such as starting a TCP connection.
   * In a multi hop network activity, the source represents the sender of the
   * last hop.
   * 
* * .envoy.service.auth.v2.AttributeContext.Peer source = 1; * @return Whether the source field is set. */ @java.lang.Override public boolean hasSource() { return ((bitField0_ & 0x00000001) != 0); } /** *
   * The source of a network activity, such as starting a TCP connection.
   * In a multi hop network activity, the source represents the sender of the
   * last hop.
   * 
* * .envoy.service.auth.v2.AttributeContext.Peer source = 1; * @return The source. */ @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer getSource() { return source_ == null ? io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.getDefaultInstance() : source_; } /** *
   * The source of a network activity, such as starting a TCP connection.
   * In a multi hop network activity, the source represents the sender of the
   * last hop.
   * 
* * .envoy.service.auth.v2.AttributeContext.Peer source = 1; */ @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext.PeerOrBuilder getSourceOrBuilder() { return source_ == null ? io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.getDefaultInstance() : source_; } public static final int DESTINATION_FIELD_NUMBER = 2; private io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer destination_; /** *
   * The destination of a network activity, such as accepting a TCP connection.
   * In a multi hop network activity, the destination represents the receiver of
   * the last hop.
   * 
* * .envoy.service.auth.v2.AttributeContext.Peer destination = 2; * @return Whether the destination field is set. */ @java.lang.Override public boolean hasDestination() { return ((bitField0_ & 0x00000002) != 0); } /** *
   * The destination of a network activity, such as accepting a TCP connection.
   * In a multi hop network activity, the destination represents the receiver of
   * the last hop.
   * 
* * .envoy.service.auth.v2.AttributeContext.Peer destination = 2; * @return The destination. */ @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer getDestination() { return destination_ == null ? io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.getDefaultInstance() : destination_; } /** *
   * The destination of a network activity, such as accepting a TCP connection.
   * In a multi hop network activity, the destination represents the receiver of
   * the last hop.
   * 
* * .envoy.service.auth.v2.AttributeContext.Peer destination = 2; */ @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext.PeerOrBuilder getDestinationOrBuilder() { return destination_ == null ? io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.getDefaultInstance() : destination_; } public static final int REQUEST_FIELD_NUMBER = 4; private io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request request_; /** *
   * Represents a network request, such as an HTTP request.
   * 
* * .envoy.service.auth.v2.AttributeContext.Request request = 4; * @return Whether the request field is set. */ @java.lang.Override public boolean hasRequest() { return ((bitField0_ & 0x00000004) != 0); } /** *
   * Represents a network request, such as an HTTP request.
   * 
* * .envoy.service.auth.v2.AttributeContext.Request request = 4; * @return The request. */ @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request getRequest() { return request_ == null ? io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request.getDefaultInstance() : request_; } /** *
   * Represents a network request, such as an HTTP request.
   * 
* * .envoy.service.auth.v2.AttributeContext.Request request = 4; */ @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext.RequestOrBuilder getRequestOrBuilder() { return request_ == null ? io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request.getDefaultInstance() : request_; } public static final int CONTEXT_EXTENSIONS_FIELD_NUMBER = 10; private static final class ContextExtensionsDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, java.lang.String> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( io.envoyproxy.envoy.service.auth.v2.AttributeContextProto.internal_static_envoy_service_auth_v2_AttributeContext_ContextExtensionsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, java.lang.String> contextExtensions_; private com.google.protobuf.MapField internalGetContextExtensions() { if (contextExtensions_ == null) { return com.google.protobuf.MapField.emptyMapField( ContextExtensionsDefaultEntryHolder.defaultEntry); } return contextExtensions_; } public int getContextExtensionsCount() { return internalGetContextExtensions().getMap().size(); } /** *
   * This is analogous to http_request.headers, however these contents will not be sent to the
   * upstream server. Context_extensions provide an extension mechanism for sending additional
   * information to the auth server without modifying the proto definition. It maps to the
   * internal opaque context in the filter chain.
   * 
* * map<string, string> context_extensions = 10; */ @java.lang.Override public boolean containsContextExtensions( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetContextExtensions().getMap().containsKey(key); } /** * Use {@link #getContextExtensionsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getContextExtensions() { return getContextExtensionsMap(); } /** *
   * This is analogous to http_request.headers, however these contents will not be sent to the
   * upstream server. Context_extensions provide an extension mechanism for sending additional
   * information to the auth server without modifying the proto definition. It maps to the
   * internal opaque context in the filter chain.
   * 
* * map<string, string> context_extensions = 10; */ @java.lang.Override public java.util.Map getContextExtensionsMap() { return internalGetContextExtensions().getMap(); } /** *
   * This is analogous to http_request.headers, however these contents will not be sent to the
   * upstream server. Context_extensions provide an extension mechanism for sending additional
   * information to the auth server without modifying the proto definition. It maps to the
   * internal opaque context in the filter chain.
   * 
* * map<string, string> context_extensions = 10; */ @java.lang.Override public /* nullable */ java.lang.String getContextExtensionsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetContextExtensions().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
   * This is analogous to http_request.headers, however these contents will not be sent to the
   * upstream server. Context_extensions provide an extension mechanism for sending additional
   * information to the auth server without modifying the proto definition. It maps to the
   * internal opaque context in the filter chain.
   * 
* * map<string, string> context_extensions = 10; */ @java.lang.Override public java.lang.String getContextExtensionsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetContextExtensions().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int METADATA_CONTEXT_FIELD_NUMBER = 11; private io.envoyproxy.envoy.api.v2.core.Metadata metadataContext_; /** *
   * Dynamic metadata associated with the request.
   * 
* * .envoy.api.v2.core.Metadata metadata_context = 11; * @return Whether the metadataContext field is set. */ @java.lang.Override public boolean hasMetadataContext() { return ((bitField0_ & 0x00000008) != 0); } /** *
   * Dynamic metadata associated with the request.
   * 
* * .envoy.api.v2.core.Metadata metadata_context = 11; * @return The metadataContext. */ @java.lang.Override public io.envoyproxy.envoy.api.v2.core.Metadata getMetadataContext() { return metadataContext_ == null ? io.envoyproxy.envoy.api.v2.core.Metadata.getDefaultInstance() : metadataContext_; } /** *
   * Dynamic metadata associated with the request.
   * 
* * .envoy.api.v2.core.Metadata metadata_context = 11; */ @java.lang.Override public io.envoyproxy.envoy.api.v2.core.MetadataOrBuilder getMetadataContextOrBuilder() { return metadataContext_ == null ? io.envoyproxy.envoy.api.v2.core.Metadata.getDefaultInstance() : metadataContext_; } 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 (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getSource()); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getDestination()); } if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(4, getRequest()); } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetContextExtensions(), ContextExtensionsDefaultEntryHolder.defaultEntry, 10); if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(11, getMetadataContext()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getSource()); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getDestination()); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getRequest()); } for (java.util.Map.Entry entry : internalGetContextExtensions().getMap().entrySet()) { com.google.protobuf.MapEntry contextExtensions__ = ContextExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(10, contextExtensions__); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(11, getMetadataContext()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.envoyproxy.envoy.service.auth.v2.AttributeContext)) { return super.equals(obj); } io.envoyproxy.envoy.service.auth.v2.AttributeContext other = (io.envoyproxy.envoy.service.auth.v2.AttributeContext) obj; if (hasSource() != other.hasSource()) return false; if (hasSource()) { if (!getSource() .equals(other.getSource())) return false; } if (hasDestination() != other.hasDestination()) return false; if (hasDestination()) { if (!getDestination() .equals(other.getDestination())) return false; } if (hasRequest() != other.hasRequest()) return false; if (hasRequest()) { if (!getRequest() .equals(other.getRequest())) return false; } if (!internalGetContextExtensions().equals( other.internalGetContextExtensions())) return false; if (hasMetadataContext() != other.hasMetadataContext()) return false; if (hasMetadataContext()) { if (!getMetadataContext() .equals(other.getMetadataContext())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasSource()) { hash = (37 * hash) + SOURCE_FIELD_NUMBER; hash = (53 * hash) + getSource().hashCode(); } if (hasDestination()) { hash = (37 * hash) + DESTINATION_FIELD_NUMBER; hash = (53 * hash) + getDestination().hashCode(); } if (hasRequest()) { hash = (37 * hash) + REQUEST_FIELD_NUMBER; hash = (53 * hash) + getRequest().hashCode(); } if (!internalGetContextExtensions().getMap().isEmpty()) { hash = (37 * hash) + CONTEXT_EXTENSIONS_FIELD_NUMBER; hash = (53 * hash) + internalGetContextExtensions().hashCode(); } if (hasMetadataContext()) { hash = (37 * hash) + METADATA_CONTEXT_FIELD_NUMBER; hash = (53 * hash) + getMetadataContext().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext 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.auth.v2.AttributeContext parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext 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.auth.v2.AttributeContext parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext 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.auth.v2.AttributeContext parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext 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.auth.v2.AttributeContext parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext 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.auth.v2.AttributeContext 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; } /** *
   * An attribute is a piece of metadata that describes an activity on a network.
   * For example, the size of an HTTP request, or the status code of an HTTP response.
   *
   * Each attribute has a type and a name, which is logically defined as a proto message field
   * of the `AttributeContext`. The `AttributeContext` is a collection of individual attributes
   * supported by Envoy authorization system.
   * [#comment: The following items are left out of this proto
   * Request.Auth field for jwt tokens
   * Request.Api for api management
   * Origin peer that originated the request
   * Caching Protocol
   * request_context return values to inject back into the filter chain
   * peer.claims -- from X.509 extensions
   * Configuration
   * - field mask to send
   * - which return values from request_context are copied back
   * - which return values are copied into request_headers]
   * [#next-free-field: 12]
   * 
* * Protobuf type {@code envoy.service.auth.v2.AttributeContext} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:envoy.service.auth.v2.AttributeContext) io.envoyproxy.envoy.service.auth.v2.AttributeContextOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.service.auth.v2.AttributeContextProto.internal_static_envoy_service_auth_v2_AttributeContext_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 10: return internalGetContextExtensions(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 10: return internalGetMutableContextExtensions(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.service.auth.v2.AttributeContextProto.internal_static_envoy_service_auth_v2_AttributeContext_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.service.auth.v2.AttributeContext.class, io.envoyproxy.envoy.service.auth.v2.AttributeContext.Builder.class); } // Construct using io.envoyproxy.envoy.service.auth.v2.AttributeContext.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getSourceFieldBuilder(); getDestinationFieldBuilder(); getRequestFieldBuilder(); getMetadataContextFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; source_ = null; if (sourceBuilder_ != null) { sourceBuilder_.dispose(); sourceBuilder_ = null; } destination_ = null; if (destinationBuilder_ != null) { destinationBuilder_.dispose(); destinationBuilder_ = null; } request_ = null; if (requestBuilder_ != null) { requestBuilder_.dispose(); requestBuilder_ = null; } internalGetMutableContextExtensions().clear(); metadataContext_ = null; if (metadataContextBuilder_ != null) { metadataContextBuilder_.dispose(); metadataContextBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.envoyproxy.envoy.service.auth.v2.AttributeContextProto.internal_static_envoy_service_auth_v2_AttributeContext_descriptor; } @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext getDefaultInstanceForType() { return io.envoyproxy.envoy.service.auth.v2.AttributeContext.getDefaultInstance(); } @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext build() { io.envoyproxy.envoy.service.auth.v2.AttributeContext result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext buildPartial() { io.envoyproxy.envoy.service.auth.v2.AttributeContext result = new io.envoyproxy.envoy.service.auth.v2.AttributeContext(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(io.envoyproxy.envoy.service.auth.v2.AttributeContext result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.source_ = sourceBuilder_ == null ? source_ : sourceBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.destination_ = destinationBuilder_ == null ? destination_ : destinationBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000004) != 0)) { result.request_ = requestBuilder_ == null ? request_ : requestBuilder_.build(); to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000008) != 0)) { result.contextExtensions_ = internalGetContextExtensions(); result.contextExtensions_.makeImmutable(); } if (((from_bitField0_ & 0x00000010) != 0)) { result.metadataContext_ = metadataContextBuilder_ == null ? metadataContext_ : metadataContextBuilder_.build(); to_bitField0_ |= 0x00000008; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.envoyproxy.envoy.service.auth.v2.AttributeContext) { return mergeFrom((io.envoyproxy.envoy.service.auth.v2.AttributeContext)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.envoyproxy.envoy.service.auth.v2.AttributeContext other) { if (other == io.envoyproxy.envoy.service.auth.v2.AttributeContext.getDefaultInstance()) return this; if (other.hasSource()) { mergeSource(other.getSource()); } if (other.hasDestination()) { mergeDestination(other.getDestination()); } if (other.hasRequest()) { mergeRequest(other.getRequest()); } internalGetMutableContextExtensions().mergeFrom( other.internalGetContextExtensions()); bitField0_ |= 0x00000008; if (other.hasMetadataContext()) { mergeMetadataContext(other.getMetadataContext()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { input.readMessage( getSourceFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage( getDestinationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 34: { input.readMessage( getRequestFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 34 case 82: { com.google.protobuf.MapEntry contextExtensions__ = input.readMessage( ContextExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableContextExtensions().getMutableMap().put( contextExtensions__.getKey(), contextExtensions__.getValue()); bitField0_ |= 0x00000008; break; } // case 82 case 90: { input.readMessage( getMetadataContextFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 90 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer source_; private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer, io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.Builder, io.envoyproxy.envoy.service.auth.v2.AttributeContext.PeerOrBuilder> sourceBuilder_; /** *
     * The source of a network activity, such as starting a TCP connection.
     * In a multi hop network activity, the source represents the sender of the
     * last hop.
     * 
* * .envoy.service.auth.v2.AttributeContext.Peer source = 1; * @return Whether the source field is set. */ public boolean hasSource() { return ((bitField0_ & 0x00000001) != 0); } /** *
     * The source of a network activity, such as starting a TCP connection.
     * In a multi hop network activity, the source represents the sender of the
     * last hop.
     * 
* * .envoy.service.auth.v2.AttributeContext.Peer source = 1; * @return The source. */ public io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer getSource() { if (sourceBuilder_ == null) { return source_ == null ? io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.getDefaultInstance() : source_; } else { return sourceBuilder_.getMessage(); } } /** *
     * The source of a network activity, such as starting a TCP connection.
     * In a multi hop network activity, the source represents the sender of the
     * last hop.
     * 
* * .envoy.service.auth.v2.AttributeContext.Peer source = 1; */ public Builder setSource(io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer value) { if (sourceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } source_ = value; } else { sourceBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * The source of a network activity, such as starting a TCP connection.
     * In a multi hop network activity, the source represents the sender of the
     * last hop.
     * 
* * .envoy.service.auth.v2.AttributeContext.Peer source = 1; */ public Builder setSource( io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.Builder builderForValue) { if (sourceBuilder_ == null) { source_ = builderForValue.build(); } else { sourceBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * The source of a network activity, such as starting a TCP connection.
     * In a multi hop network activity, the source represents the sender of the
     * last hop.
     * 
* * .envoy.service.auth.v2.AttributeContext.Peer source = 1; */ public Builder mergeSource(io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer value) { if (sourceBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && source_ != null && source_ != io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.getDefaultInstance()) { getSourceBuilder().mergeFrom(value); } else { source_ = value; } } else { sourceBuilder_.mergeFrom(value); } if (source_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** *
     * The source of a network activity, such as starting a TCP connection.
     * In a multi hop network activity, the source represents the sender of the
     * last hop.
     * 
* * .envoy.service.auth.v2.AttributeContext.Peer source = 1; */ public Builder clearSource() { bitField0_ = (bitField0_ & ~0x00000001); source_ = null; if (sourceBuilder_ != null) { sourceBuilder_.dispose(); sourceBuilder_ = null; } onChanged(); return this; } /** *
     * The source of a network activity, such as starting a TCP connection.
     * In a multi hop network activity, the source represents the sender of the
     * last hop.
     * 
* * .envoy.service.auth.v2.AttributeContext.Peer source = 1; */ public io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.Builder getSourceBuilder() { bitField0_ |= 0x00000001; onChanged(); return getSourceFieldBuilder().getBuilder(); } /** *
     * The source of a network activity, such as starting a TCP connection.
     * In a multi hop network activity, the source represents the sender of the
     * last hop.
     * 
* * .envoy.service.auth.v2.AttributeContext.Peer source = 1; */ public io.envoyproxy.envoy.service.auth.v2.AttributeContext.PeerOrBuilder getSourceOrBuilder() { if (sourceBuilder_ != null) { return sourceBuilder_.getMessageOrBuilder(); } else { return source_ == null ? io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.getDefaultInstance() : source_; } } /** *
     * The source of a network activity, such as starting a TCP connection.
     * In a multi hop network activity, the source represents the sender of the
     * last hop.
     * 
* * .envoy.service.auth.v2.AttributeContext.Peer source = 1; */ private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer, io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.Builder, io.envoyproxy.envoy.service.auth.v2.AttributeContext.PeerOrBuilder> getSourceFieldBuilder() { if (sourceBuilder_ == null) { sourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer, io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.Builder, io.envoyproxy.envoy.service.auth.v2.AttributeContext.PeerOrBuilder>( getSource(), getParentForChildren(), isClean()); source_ = null; } return sourceBuilder_; } private io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer destination_; private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer, io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.Builder, io.envoyproxy.envoy.service.auth.v2.AttributeContext.PeerOrBuilder> destinationBuilder_; /** *
     * The destination of a network activity, such as accepting a TCP connection.
     * In a multi hop network activity, the destination represents the receiver of
     * the last hop.
     * 
* * .envoy.service.auth.v2.AttributeContext.Peer destination = 2; * @return Whether the destination field is set. */ public boolean hasDestination() { return ((bitField0_ & 0x00000002) != 0); } /** *
     * The destination of a network activity, such as accepting a TCP connection.
     * In a multi hop network activity, the destination represents the receiver of
     * the last hop.
     * 
* * .envoy.service.auth.v2.AttributeContext.Peer destination = 2; * @return The destination. */ public io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer getDestination() { if (destinationBuilder_ == null) { return destination_ == null ? io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.getDefaultInstance() : destination_; } else { return destinationBuilder_.getMessage(); } } /** *
     * The destination of a network activity, such as accepting a TCP connection.
     * In a multi hop network activity, the destination represents the receiver of
     * the last hop.
     * 
* * .envoy.service.auth.v2.AttributeContext.Peer destination = 2; */ public Builder setDestination(io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer value) { if (destinationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } destination_ = value; } else { destinationBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * The destination of a network activity, such as accepting a TCP connection.
     * In a multi hop network activity, the destination represents the receiver of
     * the last hop.
     * 
* * .envoy.service.auth.v2.AttributeContext.Peer destination = 2; */ public Builder setDestination( io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.Builder builderForValue) { if (destinationBuilder_ == null) { destination_ = builderForValue.build(); } else { destinationBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * The destination of a network activity, such as accepting a TCP connection.
     * In a multi hop network activity, the destination represents the receiver of
     * the last hop.
     * 
* * .envoy.service.auth.v2.AttributeContext.Peer destination = 2; */ public Builder mergeDestination(io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer value) { if (destinationBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && destination_ != null && destination_ != io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.getDefaultInstance()) { getDestinationBuilder().mergeFrom(value); } else { destination_ = value; } } else { destinationBuilder_.mergeFrom(value); } if (destination_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** *
     * The destination of a network activity, such as accepting a TCP connection.
     * In a multi hop network activity, the destination represents the receiver of
     * the last hop.
     * 
* * .envoy.service.auth.v2.AttributeContext.Peer destination = 2; */ public Builder clearDestination() { bitField0_ = (bitField0_ & ~0x00000002); destination_ = null; if (destinationBuilder_ != null) { destinationBuilder_.dispose(); destinationBuilder_ = null; } onChanged(); return this; } /** *
     * The destination of a network activity, such as accepting a TCP connection.
     * In a multi hop network activity, the destination represents the receiver of
     * the last hop.
     * 
* * .envoy.service.auth.v2.AttributeContext.Peer destination = 2; */ public io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.Builder getDestinationBuilder() { bitField0_ |= 0x00000002; onChanged(); return getDestinationFieldBuilder().getBuilder(); } /** *
     * The destination of a network activity, such as accepting a TCP connection.
     * In a multi hop network activity, the destination represents the receiver of
     * the last hop.
     * 
* * .envoy.service.auth.v2.AttributeContext.Peer destination = 2; */ public io.envoyproxy.envoy.service.auth.v2.AttributeContext.PeerOrBuilder getDestinationOrBuilder() { if (destinationBuilder_ != null) { return destinationBuilder_.getMessageOrBuilder(); } else { return destination_ == null ? io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.getDefaultInstance() : destination_; } } /** *
     * The destination of a network activity, such as accepting a TCP connection.
     * In a multi hop network activity, the destination represents the receiver of
     * the last hop.
     * 
* * .envoy.service.auth.v2.AttributeContext.Peer destination = 2; */ private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer, io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.Builder, io.envoyproxy.envoy.service.auth.v2.AttributeContext.PeerOrBuilder> getDestinationFieldBuilder() { if (destinationBuilder_ == null) { destinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer, io.envoyproxy.envoy.service.auth.v2.AttributeContext.Peer.Builder, io.envoyproxy.envoy.service.auth.v2.AttributeContext.PeerOrBuilder>( getDestination(), getParentForChildren(), isClean()); destination_ = null; } return destinationBuilder_; } private io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request request_; private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request, io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request.Builder, io.envoyproxy.envoy.service.auth.v2.AttributeContext.RequestOrBuilder> requestBuilder_; /** *
     * Represents a network request, such as an HTTP request.
     * 
* * .envoy.service.auth.v2.AttributeContext.Request request = 4; * @return Whether the request field is set. */ public boolean hasRequest() { return ((bitField0_ & 0x00000004) != 0); } /** *
     * Represents a network request, such as an HTTP request.
     * 
* * .envoy.service.auth.v2.AttributeContext.Request request = 4; * @return The request. */ public io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request getRequest() { if (requestBuilder_ == null) { return request_ == null ? io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request.getDefaultInstance() : request_; } else { return requestBuilder_.getMessage(); } } /** *
     * Represents a network request, such as an HTTP request.
     * 
* * .envoy.service.auth.v2.AttributeContext.Request request = 4; */ public Builder setRequest(io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request value) { if (requestBuilder_ == null) { if (value == null) { throw new NullPointerException(); } request_ = value; } else { requestBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * Represents a network request, such as an HTTP request.
     * 
* * .envoy.service.auth.v2.AttributeContext.Request request = 4; */ public Builder setRequest( io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request.Builder builderForValue) { if (requestBuilder_ == null) { request_ = builderForValue.build(); } else { requestBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * Represents a network request, such as an HTTP request.
     * 
* * .envoy.service.auth.v2.AttributeContext.Request request = 4; */ public Builder mergeRequest(io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request value) { if (requestBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && request_ != null && request_ != io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request.getDefaultInstance()) { getRequestBuilder().mergeFrom(value); } else { request_ = value; } } else { requestBuilder_.mergeFrom(value); } if (request_ != null) { bitField0_ |= 0x00000004; onChanged(); } return this; } /** *
     * Represents a network request, such as an HTTP request.
     * 
* * .envoy.service.auth.v2.AttributeContext.Request request = 4; */ public Builder clearRequest() { bitField0_ = (bitField0_ & ~0x00000004); request_ = null; if (requestBuilder_ != null) { requestBuilder_.dispose(); requestBuilder_ = null; } onChanged(); return this; } /** *
     * Represents a network request, such as an HTTP request.
     * 
* * .envoy.service.auth.v2.AttributeContext.Request request = 4; */ public io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request.Builder getRequestBuilder() { bitField0_ |= 0x00000004; onChanged(); return getRequestFieldBuilder().getBuilder(); } /** *
     * Represents a network request, such as an HTTP request.
     * 
* * .envoy.service.auth.v2.AttributeContext.Request request = 4; */ public io.envoyproxy.envoy.service.auth.v2.AttributeContext.RequestOrBuilder getRequestOrBuilder() { if (requestBuilder_ != null) { return requestBuilder_.getMessageOrBuilder(); } else { return request_ == null ? io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request.getDefaultInstance() : request_; } } /** *
     * Represents a network request, such as an HTTP request.
     * 
* * .envoy.service.auth.v2.AttributeContext.Request request = 4; */ private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request, io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request.Builder, io.envoyproxy.envoy.service.auth.v2.AttributeContext.RequestOrBuilder> getRequestFieldBuilder() { if (requestBuilder_ == null) { requestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request, io.envoyproxy.envoy.service.auth.v2.AttributeContext.Request.Builder, io.envoyproxy.envoy.service.auth.v2.AttributeContext.RequestOrBuilder>( getRequest(), getParentForChildren(), isClean()); request_ = null; } return requestBuilder_; } private com.google.protobuf.MapField< java.lang.String, java.lang.String> contextExtensions_; private com.google.protobuf.MapField internalGetContextExtensions() { if (contextExtensions_ == null) { return com.google.protobuf.MapField.emptyMapField( ContextExtensionsDefaultEntryHolder.defaultEntry); } return contextExtensions_; } private com.google.protobuf.MapField internalGetMutableContextExtensions() { if (contextExtensions_ == null) { contextExtensions_ = com.google.protobuf.MapField.newMapField( ContextExtensionsDefaultEntryHolder.defaultEntry); } if (!contextExtensions_.isMutable()) { contextExtensions_ = contextExtensions_.copy(); } bitField0_ |= 0x00000008; onChanged(); return contextExtensions_; } public int getContextExtensionsCount() { return internalGetContextExtensions().getMap().size(); } /** *
     * This is analogous to http_request.headers, however these contents will not be sent to the
     * upstream server. Context_extensions provide an extension mechanism for sending additional
     * information to the auth server without modifying the proto definition. It maps to the
     * internal opaque context in the filter chain.
     * 
* * map<string, string> context_extensions = 10; */ @java.lang.Override public boolean containsContextExtensions( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetContextExtensions().getMap().containsKey(key); } /** * Use {@link #getContextExtensionsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getContextExtensions() { return getContextExtensionsMap(); } /** *
     * This is analogous to http_request.headers, however these contents will not be sent to the
     * upstream server. Context_extensions provide an extension mechanism for sending additional
     * information to the auth server without modifying the proto definition. It maps to the
     * internal opaque context in the filter chain.
     * 
* * map<string, string> context_extensions = 10; */ @java.lang.Override public java.util.Map getContextExtensionsMap() { return internalGetContextExtensions().getMap(); } /** *
     * This is analogous to http_request.headers, however these contents will not be sent to the
     * upstream server. Context_extensions provide an extension mechanism for sending additional
     * information to the auth server without modifying the proto definition. It maps to the
     * internal opaque context in the filter chain.
     * 
* * map<string, string> context_extensions = 10; */ @java.lang.Override public /* nullable */ java.lang.String getContextExtensionsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetContextExtensions().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * This is analogous to http_request.headers, however these contents will not be sent to the
     * upstream server. Context_extensions provide an extension mechanism for sending additional
     * information to the auth server without modifying the proto definition. It maps to the
     * internal opaque context in the filter chain.
     * 
* * map<string, string> context_extensions = 10; */ @java.lang.Override public java.lang.String getContextExtensionsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetContextExtensions().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearContextExtensions() { bitField0_ = (bitField0_ & ~0x00000008); internalGetMutableContextExtensions().getMutableMap() .clear(); return this; } /** *
     * This is analogous to http_request.headers, however these contents will not be sent to the
     * upstream server. Context_extensions provide an extension mechanism for sending additional
     * information to the auth server without modifying the proto definition. It maps to the
     * internal opaque context in the filter chain.
     * 
* * map<string, string> context_extensions = 10; */ public Builder removeContextExtensions( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableContextExtensions().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableContextExtensions() { bitField0_ |= 0x00000008; return internalGetMutableContextExtensions().getMutableMap(); } /** *
     * This is analogous to http_request.headers, however these contents will not be sent to the
     * upstream server. Context_extensions provide an extension mechanism for sending additional
     * information to the auth server without modifying the proto definition. It maps to the
     * internal opaque context in the filter chain.
     * 
* * map<string, string> context_extensions = 10; */ public Builder putContextExtensions( java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableContextExtensions().getMutableMap() .put(key, value); bitField0_ |= 0x00000008; return this; } /** *
     * This is analogous to http_request.headers, however these contents will not be sent to the
     * upstream server. Context_extensions provide an extension mechanism for sending additional
     * information to the auth server without modifying the proto definition. It maps to the
     * internal opaque context in the filter chain.
     * 
* * map<string, string> context_extensions = 10; */ public Builder putAllContextExtensions( java.util.Map values) { internalGetMutableContextExtensions().getMutableMap() .putAll(values); bitField0_ |= 0x00000008; return this; } private io.envoyproxy.envoy.api.v2.core.Metadata metadataContext_; private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.api.v2.core.Metadata, io.envoyproxy.envoy.api.v2.core.Metadata.Builder, io.envoyproxy.envoy.api.v2.core.MetadataOrBuilder> metadataContextBuilder_; /** *
     * Dynamic metadata associated with the request.
     * 
* * .envoy.api.v2.core.Metadata metadata_context = 11; * @return Whether the metadataContext field is set. */ public boolean hasMetadataContext() { return ((bitField0_ & 0x00000010) != 0); } /** *
     * Dynamic metadata associated with the request.
     * 
* * .envoy.api.v2.core.Metadata metadata_context = 11; * @return The metadataContext. */ public io.envoyproxy.envoy.api.v2.core.Metadata getMetadataContext() { if (metadataContextBuilder_ == null) { return metadataContext_ == null ? io.envoyproxy.envoy.api.v2.core.Metadata.getDefaultInstance() : metadataContext_; } else { return metadataContextBuilder_.getMessage(); } } /** *
     * Dynamic metadata associated with the request.
     * 
* * .envoy.api.v2.core.Metadata metadata_context = 11; */ public Builder setMetadataContext(io.envoyproxy.envoy.api.v2.core.Metadata value) { if (metadataContextBuilder_ == null) { if (value == null) { throw new NullPointerException(); } metadataContext_ = value; } else { metadataContextBuilder_.setMessage(value); } bitField0_ |= 0x00000010; onChanged(); return this; } /** *
     * Dynamic metadata associated with the request.
     * 
* * .envoy.api.v2.core.Metadata metadata_context = 11; */ public Builder setMetadataContext( io.envoyproxy.envoy.api.v2.core.Metadata.Builder builderForValue) { if (metadataContextBuilder_ == null) { metadataContext_ = builderForValue.build(); } else { metadataContextBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000010; onChanged(); return this; } /** *
     * Dynamic metadata associated with the request.
     * 
* * .envoy.api.v2.core.Metadata metadata_context = 11; */ public Builder mergeMetadataContext(io.envoyproxy.envoy.api.v2.core.Metadata value) { if (metadataContextBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0) && metadataContext_ != null && metadataContext_ != io.envoyproxy.envoy.api.v2.core.Metadata.getDefaultInstance()) { getMetadataContextBuilder().mergeFrom(value); } else { metadataContext_ = value; } } else { metadataContextBuilder_.mergeFrom(value); } if (metadataContext_ != null) { bitField0_ |= 0x00000010; onChanged(); } return this; } /** *
     * Dynamic metadata associated with the request.
     * 
* * .envoy.api.v2.core.Metadata metadata_context = 11; */ public Builder clearMetadataContext() { bitField0_ = (bitField0_ & ~0x00000010); metadataContext_ = null; if (metadataContextBuilder_ != null) { metadataContextBuilder_.dispose(); metadataContextBuilder_ = null; } onChanged(); return this; } /** *
     * Dynamic metadata associated with the request.
     * 
* * .envoy.api.v2.core.Metadata metadata_context = 11; */ public io.envoyproxy.envoy.api.v2.core.Metadata.Builder getMetadataContextBuilder() { bitField0_ |= 0x00000010; onChanged(); return getMetadataContextFieldBuilder().getBuilder(); } /** *
     * Dynamic metadata associated with the request.
     * 
* * .envoy.api.v2.core.Metadata metadata_context = 11; */ public io.envoyproxy.envoy.api.v2.core.MetadataOrBuilder getMetadataContextOrBuilder() { if (metadataContextBuilder_ != null) { return metadataContextBuilder_.getMessageOrBuilder(); } else { return metadataContext_ == null ? io.envoyproxy.envoy.api.v2.core.Metadata.getDefaultInstance() : metadataContext_; } } /** *
     * Dynamic metadata associated with the request.
     * 
* * .envoy.api.v2.core.Metadata metadata_context = 11; */ private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.api.v2.core.Metadata, io.envoyproxy.envoy.api.v2.core.Metadata.Builder, io.envoyproxy.envoy.api.v2.core.MetadataOrBuilder> getMetadataContextFieldBuilder() { if (metadataContextBuilder_ == null) { metadataContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.api.v2.core.Metadata, io.envoyproxy.envoy.api.v2.core.Metadata.Builder, io.envoyproxy.envoy.api.v2.core.MetadataOrBuilder>( getMetadataContext(), getParentForChildren(), isClean()); metadataContext_ = null; } return metadataContextBuilder_; } @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.auth.v2.AttributeContext) } // @@protoc_insertion_point(class_scope:envoy.service.auth.v2.AttributeContext) private static final io.envoyproxy.envoy.service.auth.v2.AttributeContext DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.envoyproxy.envoy.service.auth.v2.AttributeContext(); } public static io.envoyproxy.envoy.service.auth.v2.AttributeContext getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public AttributeContext parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.envoyproxy.envoy.service.auth.v2.AttributeContext getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy