Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/service/auth/v3/attribute_context.proto
package io.envoyproxy.envoy.service.auth.v3;
/**
*
* 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.v3.AttributeContext}
*/
public final class AttributeContext extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.service.auth.v3.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();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private AttributeContext(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer.Builder subBuilder = null;
if (source_ != null) {
subBuilder = source_.toBuilder();
}
source_ = input.readMessage(io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(source_);
source_ = subBuilder.buildPartial();
}
break;
}
case 18: {
io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer.Builder subBuilder = null;
if (destination_ != null) {
subBuilder = destination_.toBuilder();
}
destination_ = input.readMessage(io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(destination_);
destination_ = subBuilder.buildPartial();
}
break;
}
case 34: {
io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request.Builder subBuilder = null;
if (request_ != null) {
subBuilder = request_.toBuilder();
}
request_ = input.readMessage(io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(request_);
request_ = subBuilder.buildPartial();
}
break;
}
case 82: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
contextExtensions_ = com.google.protobuf.MapField.newMapField(
ContextExtensionsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
contextExtensions__ = input.readMessage(
ContextExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
contextExtensions_.getMutableMap().put(
contextExtensions__.getKey(), contextExtensions__.getValue());
break;
}
case 90: {
io.envoyproxy.envoy.config.core.v3.Metadata.Builder subBuilder = null;
if (metadataContext_ != null) {
subBuilder = metadataContext_.toBuilder();
}
metadataContext_ = input.readMessage(io.envoyproxy.envoy.config.core.v3.Metadata.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(metadataContext_);
metadataContext_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.service.auth.v3.AttributeContextProto.internal_static_envoy_service_auth_v3_AttributeContext_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
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.v3.AttributeContextProto.internal_static_envoy_service_auth_v3_AttributeContext_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.service.auth.v3.AttributeContext.class, io.envoyproxy.envoy.service.auth.v3.AttributeContext.Builder.class);
}
public interface PeerOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.service.auth.v3.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.config.core.v3.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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.v3.AttributeContext.Peer}
*/
public static final class Peer extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.service.auth.v3.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();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Peer(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
io.envoyproxy.envoy.config.core.v3.Address.Builder subBuilder = null;
if (address_ != null) {
subBuilder = address_.toBuilder();
}
address_ = input.readMessage(io.envoyproxy.envoy.config.core.v3.Address.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(address_);
address_ = subBuilder.buildPartial();
}
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
service_ = s;
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
labels_ = com.google.protobuf.MapField.newMapField(
LabelsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
labels__ = input.readMessage(
LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
labels_.getMutableMap().put(
labels__.getKey(), labels__.getValue());
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
principal_ = s;
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
certificate_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.service.auth.v3.AttributeContextProto.internal_static_envoy_service_auth_v3_AttributeContext_Peer_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
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.v3.AttributeContextProto.internal_static_envoy_service_auth_v3_AttributeContext_Peer_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer.class, io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer.Builder.class);
}
public static final int ADDRESS_FIELD_NUMBER = 1;
private io.envoyproxy.envoy.config.core.v3.Address address_;
/**
*
* The address of the peer, this is typically the IP address.
* It can also be UDS path, or others.
*
*
* .envoy.config.core.v3.Address address = 1;
* @return Whether the address field is set.
*/
@java.lang.Override
public boolean hasAddress() {
return address_ != null;
}
/**
*
* The address of the peer, this is typically the IP address.
* It can also be UDS path, or others.
*
* The address of the peer, this is typically the IP address.
* It can also be UDS path, or others.
*
*
* .envoy.config.core.v3.Address address = 1;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.AddressOrBuilder getAddressOrBuilder() {
return getAddress();
}
public static final int SERVICE_FIELD_NUMBER = 2;
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.v3.AttributeContextProto.internal_static_envoy_service_auth_v3_AttributeContext_Peer_LabelsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
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.
*
* 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.
*
* 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;
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;
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.
*
* 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.v3.AttributeContext.Peer}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.service.auth.v3.AttributeContext.Peer)
io.envoyproxy.envoy.service.auth.v3.AttributeContext.PeerOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.service.auth.v3.AttributeContextProto.internal_static_envoy_service_auth_v3_AttributeContext_Peer_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 3:
return internalGetLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
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.v3.AttributeContextProto.internal_static_envoy_service_auth_v3_AttributeContext_Peer_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer.class, io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer.Builder.class);
}
// Construct using io.envoyproxy.envoy.service.auth.v3.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) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (addressBuilder_ == null) {
address_ = null;
} else {
address_ = null;
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.v3.AttributeContextProto.internal_static_envoy_service_auth_v3_AttributeContext_Peer_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer getDefaultInstanceForType() {
return io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer build() {
io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer buildPartial() {
io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer result = new io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer(this);
int from_bitField0_ = bitField0_;
if (addressBuilder_ == null) {
result.address_ = address_;
} else {
result.address_ = addressBuilder_.build();
}
result.service_ = service_;
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
result.principal_ = principal_;
result.certificate_ = certificate_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer) {
return mergeFrom((io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer other) {
if (other == io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer.getDefaultInstance()) return this;
if (other.hasAddress()) {
mergeAddress(other.getAddress());
}
if (!other.getService().isEmpty()) {
service_ = other.service_;
onChanged();
}
internalGetMutableLabels().mergeFrom(
other.internalGetLabels());
if (!other.getPrincipal().isEmpty()) {
principal_ = other.principal_;
onChanged();
}
if (!other.getCertificate().isEmpty()) {
certificate_ = other.certificate_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private io.envoyproxy.envoy.config.core.v3.Address address_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.Address, io.envoyproxy.envoy.config.core.v3.Address.Builder, io.envoyproxy.envoy.config.core.v3.AddressOrBuilder> addressBuilder_;
/**
*
* The address of the peer, this is typically the IP address.
* It can also be UDS path, or others.
*
*
* .envoy.config.core.v3.Address address = 1;
* @return Whether the address field is set.
*/
public boolean hasAddress() {
return addressBuilder_ != null || address_ != null;
}
/**
*
* The address of the peer, this is typically the IP address.
* It can also be UDS path, or others.
*
* 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;
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();
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;
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() {
onChanged();;
if (labels_ == null) {
labels_ = com.google.protobuf.MapField.newMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
if (!labels_.isMutable()) {
labels_ = labels_.copy();
}
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.
*
* 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.
*
* 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() {
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() {
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);
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.
*
* 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;
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();
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;
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.
*
* Represents a network request, such as an HTTP request.
*
*
* Protobuf type {@code envoy.service.auth.v3.AttributeContext.Request}
*/
public static final class Request extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.service.auth.v3.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();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Request(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (time_ != null) {
subBuilder = time_.toBuilder();
}
time_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(time_);
time_ = subBuilder.buildPartial();
}
break;
}
case 18: {
io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest.Builder subBuilder = null;
if (http_ != null) {
subBuilder = http_.toBuilder();
}
http_ = input.readMessage(io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(http_);
http_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.service.auth.v3.AttributeContextProto.internal_static_envoy_service_auth_v3_AttributeContext_Request_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.service.auth.v3.AttributeContextProto.internal_static_envoy_service_auth_v3_AttributeContext_Request_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request.class, io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request.Builder.class);
}
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 time_ != null;
}
/**
*
* 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 getTime();
}
public static final int HTTP_FIELD_NUMBER = 2;
private io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest http_;
/**
*
* Represents an HTTP request or an HTTP-like request.
*
*
* .envoy.service.auth.v3.AttributeContext.HttpRequest http = 2;
* @return Whether the http field is set.
*/
@java.lang.Override
public boolean hasHttp() {
return http_ != null;
}
/**
*
* Represents an HTTP request or an HTTP-like request.
*
* Represents an HTTP request or an HTTP-like request.
*
*
* .envoy.service.auth.v3.AttributeContext.HttpRequest http = 2;
*/
@java.lang.Override
public io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequestOrBuilder getHttpOrBuilder() {
return getHttp();
}
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 (time_ != null) {
output.writeMessage(1, getTime());
}
if (http_ != null) {
output.writeMessage(2, getHttp());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (time_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getTime());
}
if (http_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getHttp());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request)) {
return super.equals(obj);
}
io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request other = (io.envoyproxy.envoy.service.auth.v3.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 (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (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) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.auth.v3.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.v3.AttributeContext.Request parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.auth.v3.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.v3.AttributeContext.Request parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.auth.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.AttributeContext.Request}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.service.auth.v3.AttributeContext.Request)
io.envoyproxy.envoy.service.auth.v3.AttributeContext.RequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.service.auth.v3.AttributeContextProto.internal_static_envoy_service_auth_v3_AttributeContext_Request_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.service.auth.v3.AttributeContextProto.internal_static_envoy_service_auth_v3_AttributeContext_Request_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request.class, io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request.Builder.class);
}
// Construct using io.envoyproxy.envoy.service.auth.v3.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) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (timeBuilder_ == null) {
time_ = null;
} else {
time_ = null;
timeBuilder_ = null;
}
if (httpBuilder_ == null) {
http_ = null;
} else {
http_ = null;
httpBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.service.auth.v3.AttributeContextProto.internal_static_envoy_service_auth_v3_AttributeContext_Request_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request getDefaultInstanceForType() {
return io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request build() {
io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request buildPartial() {
io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request result = new io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request(this);
if (timeBuilder_ == null) {
result.time_ = time_;
} else {
result.time_ = timeBuilder_.build();
}
if (httpBuilder_ == null) {
result.http_ = http_;
} else {
result.http_ = httpBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request) {
return mergeFrom((io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request other) {
if (other == io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request.getDefaultInstance()) return this;
if (other.hasTime()) {
mergeTime(other.getTime());
}
if (other.hasHttp()) {
mergeHttp(other.getHttp());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
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 timeBuilder_ != null || time_ != null;
}
/**
*
* 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;
onChanged();
} else {
timeBuilder_.setMessage(value);
}
return this;
}
/**
*
* The timestamp when the proxy receives the first byte of the request.
*
* Represents an HTTP request or an HTTP-like request.
*
*
* .envoy.service.auth.v3.AttributeContext.HttpRequest http = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest, io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest.Builder, io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequestOrBuilder>
getHttpFieldBuilder() {
if (httpBuilder_ == null) {
httpBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest, io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest.Builder, io.envoyproxy.envoy.service.auth.v3.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.v3.AttributeContext.Request)
}
// @@protoc_insertion_point(class_scope:envoy.service.auth.v3.AttributeContext.Request)
private static final io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request();
}
public static io.envoyproxy.envoy.service.auth.v3.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 {
return new Request(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface HttpRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.service.auth.v3.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``.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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();
/**
*
* The HTTP request body in bytes. This is used instead of
* :ref:`body <envoy_v3_api_field_service.auth.v3.AttributeContext.HttpRequest.body>` when
* :ref:`pack_as_bytes <envoy_v3_api_field_extensions.filters.http.ext_authz.v3.BufferSettings.pack_as_bytes>`
* is set to true.
*
* This message defines attributes for an HTTP request.
* HTTP/1.x, HTTP/2, gRPC are all considered as HTTP requests.
* [#next-free-field: 13]
*
*
* Protobuf type {@code envoy.service.auth.v3.AttributeContext.HttpRequest}
*/
public static final class HttpRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.service.auth.v3.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_ = "";
rawBody_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new HttpRequest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private HttpRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
id_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
method_ = s;
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
headers_ = com.google.protobuf.MapField.newMapField(
HeadersDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
headers__ = input.readMessage(
HeadersDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
headers_.getMutableMap().put(
headers__.getKey(), headers__.getValue());
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
path_ = s;
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
host_ = s;
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
scheme_ = s;
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
query_ = s;
break;
}
case 66: {
java.lang.String s = input.readStringRequireUtf8();
fragment_ = s;
break;
}
case 72: {
size_ = input.readInt64();
break;
}
case 82: {
java.lang.String s = input.readStringRequireUtf8();
protocol_ = s;
break;
}
case 90: {
java.lang.String s = input.readStringRequireUtf8();
body_ = s;
break;
}
case 98: {
rawBody_ = input.readBytes();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.service.auth.v3.AttributeContextProto.internal_static_envoy_service_auth_v3_AttributeContext_HttpRequest_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
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.v3.AttributeContextProto.internal_static_envoy_service_auth_v3_AttributeContext_HttpRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest.class, io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
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;
private volatile java.lang.Object method_;
/**
*
* The HTTP request method, such as ``GET``, ``POST``.
*
* 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.v3.AttributeContextProto.internal_static_envoy_service_auth_v3_AttributeContext_HttpRequest_HeadersEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
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.
*
* 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.
*
* 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;
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.
*
* 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;
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_;
/**
*
* 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;
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.
*
* 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;
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;
}
}
public static final int RAW_BODY_FIELD_NUMBER = 12;
private com.google.protobuf.ByteString rawBody_;
/**
*
* The HTTP request body in bytes. This is used instead of
* :ref:`body <envoy_v3_api_field_service.auth.v3.AttributeContext.HttpRequest.body>` when
* :ref:`pack_as_bytes <envoy_v3_api_field_extensions.filters.http.ext_authz.v3.BufferSettings.pack_as_bytes>`
* is set to true.
*
* This message defines attributes for an HTTP request.
* HTTP/1.x, HTTP/2, gRPC are all considered as HTTP requests.
* [#next-free-field: 13]
*
*
* Protobuf type {@code envoy.service.auth.v3.AttributeContext.HttpRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.service.auth.v3.AttributeContext.HttpRequest)
io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.service.auth.v3.AttributeContextProto.internal_static_envoy_service_auth_v3_AttributeContext_HttpRequest_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 3:
return internalGetHeaders();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
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.v3.AttributeContextProto.internal_static_envoy_service_auth_v3_AttributeContext_HttpRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest.class, io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest.Builder.class);
}
// Construct using io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
id_ = "";
method_ = "";
internalGetMutableHeaders().clear();
path_ = "";
host_ = "";
scheme_ = "";
query_ = "";
fragment_ = "";
size_ = 0L;
protocol_ = "";
body_ = "";
rawBody_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.service.auth.v3.AttributeContextProto.internal_static_envoy_service_auth_v3_AttributeContext_HttpRequest_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest getDefaultInstanceForType() {
return io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest build() {
io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest buildPartial() {
io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest result = new io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest(this);
int from_bitField0_ = bitField0_;
result.id_ = id_;
result.method_ = method_;
result.headers_ = internalGetHeaders();
result.headers_.makeImmutable();
result.path_ = path_;
result.host_ = host_;
result.scheme_ = scheme_;
result.query_ = query_;
result.fragment_ = fragment_;
result.size_ = size_;
result.protocol_ = protocol_;
result.body_ = body_;
result.rawBody_ = rawBody_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest) {
return mergeFrom((io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest other) {
if (other == io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (!other.getMethod().isEmpty()) {
method_ = other.method_;
onChanged();
}
internalGetMutableHeaders().mergeFrom(
other.internalGetHeaders());
if (!other.getPath().isEmpty()) {
path_ = other.path_;
onChanged();
}
if (!other.getHost().isEmpty()) {
host_ = other.host_;
onChanged();
}
if (!other.getScheme().isEmpty()) {
scheme_ = other.scheme_;
onChanged();
}
if (!other.getQuery().isEmpty()) {
query_ = other.query_;
onChanged();
}
if (!other.getFragment().isEmpty()) {
fragment_ = other.fragment_;
onChanged();
}
if (other.getSize() != 0L) {
setSize(other.getSize());
}
if (!other.getProtocol().isEmpty()) {
protocol_ = other.protocol_;
onChanged();
}
if (!other.getBody().isEmpty()) {
body_ = other.body_;
onChanged();
}
if (other.getRawBody() != com.google.protobuf.ByteString.EMPTY) {
setRawBody(other.getRawBody());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
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;
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();
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;
onChanged();
return this;
}
private java.lang.Object method_ = "";
/**
*
* The HTTP request method, such as ``GET``, ``POST``.
*
* 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;
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();
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;
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() {
onChanged();;
if (headers_ == null) {
headers_ = com.google.protobuf.MapField.newMapField(
HeadersDefaultEntryHolder.defaultEntry);
}
if (!headers_.isMutable()) {
headers_ = headers_.copy();
}
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.
*
* 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.
*
* 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() {
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() {
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);
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.
*
* 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;
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();
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;
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;
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();
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;
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;
onChanged();
return this;
}
/**
*
* The HTTP request size in bytes. If unknown, it must be -1.
*
* 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.
*
* 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;
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();
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;
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;
onChanged();
return this;
}
/**
*
* The HTTP request body.
*
*
* string body = 11;
* @return This builder for chaining.
*/
public Builder clearBody() {
body_ = getDefaultInstance().getBody();
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;
onChanged();
return this;
}
private com.google.protobuf.ByteString rawBody_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* The HTTP request body in bytes. This is used instead of
* :ref:`body <envoy_v3_api_field_service.auth.v3.AttributeContext.HttpRequest.body>` when
* :ref:`pack_as_bytes <envoy_v3_api_field_extensions.filters.http.ext_authz.v3.BufferSettings.pack_as_bytes>`
* is set to true.
*
* The HTTP request body in bytes. This is used instead of
* :ref:`body <envoy_v3_api_field_service.auth.v3.AttributeContext.HttpRequest.body>` when
* :ref:`pack_as_bytes <envoy_v3_api_field_extensions.filters.http.ext_authz.v3.BufferSettings.pack_as_bytes>`
* is set to true.
*
*
* bytes raw_body = 12;
* @param value The rawBody to set.
* @return This builder for chaining.
*/
public Builder setRawBody(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
rawBody_ = value;
onChanged();
return this;
}
/**
*
* The HTTP request body in bytes. This is used instead of
* :ref:`body <envoy_v3_api_field_service.auth.v3.AttributeContext.HttpRequest.body>` when
* :ref:`pack_as_bytes <envoy_v3_api_field_extensions.filters.http.ext_authz.v3.BufferSettings.pack_as_bytes>`
* is set to true.
*
*
* bytes raw_body = 12;
* @return This builder for chaining.
*/
public Builder clearRawBody() {
rawBody_ = getDefaultInstance().getRawBody();
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.v3.AttributeContext.HttpRequest)
}
// @@protoc_insertion_point(class_scope:envoy.service.auth.v3.AttributeContext.HttpRequest)
private static final io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest();
}
public static io.envoyproxy.envoy.service.auth.v3.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 {
return new HttpRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.envoyproxy.envoy.service.auth.v3.AttributeContext.HttpRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int SOURCE_FIELD_NUMBER = 1;
private io.envoyproxy.envoy.service.auth.v3.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.v3.AttributeContext.Peer source = 1;
* @return Whether the source field is set.
*/
@java.lang.Override
public boolean hasSource() {
return source_ != null;
}
/**
*
* 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.
*
* 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.v3.AttributeContext.Peer source = 1;
*/
@java.lang.Override
public io.envoyproxy.envoy.service.auth.v3.AttributeContext.PeerOrBuilder getSourceOrBuilder() {
return getSource();
}
public static final int DESTINATION_FIELD_NUMBER = 2;
private io.envoyproxy.envoy.service.auth.v3.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.v3.AttributeContext.Peer destination = 2;
* @return Whether the destination field is set.
*/
@java.lang.Override
public boolean hasDestination() {
return destination_ != null;
}
/**
*
* 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.
*
* 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.v3.AttributeContext.Peer destination = 2;
*/
@java.lang.Override
public io.envoyproxy.envoy.service.auth.v3.AttributeContext.PeerOrBuilder getDestinationOrBuilder() {
return getDestination();
}
public static final int REQUEST_FIELD_NUMBER = 4;
private io.envoyproxy.envoy.service.auth.v3.AttributeContext.Request request_;
/**
*
* Represents a network request, such as an HTTP request.
*
*
* .envoy.service.auth.v3.AttributeContext.Request request = 4;
* @return Whether the request field is set.
*/
@java.lang.Override
public boolean hasRequest() {
return request_ != null;
}
/**
*
* Represents a network request, such as an HTTP request.
*
* Represents a network request, such as an HTTP request.
*
*
* .envoy.service.auth.v3.AttributeContext.Request request = 4;
*/
@java.lang.Override
public io.envoyproxy.envoy.service.auth.v3.AttributeContext.RequestOrBuilder getRequestOrBuilder() {
return getRequest();
}
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.v3.AttributeContextProto.internal_static_envoy_service_auth_v3_AttributeContext_ContextExtensionsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
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.
*
* 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.
*
* 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.config.core.v3.Metadata metadataContext_;
/**
*
* Dynamic metadata associated with the request.
*
*
* .envoy.config.core.v3.Metadata metadata_context = 11;
* @return Whether the metadataContext field is set.
*/
@java.lang.Override
public boolean hasMetadataContext() {
return metadataContext_ != null;
}
/**
*
*
* .envoy.config.core.v3.Metadata metadata_context = 11;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.MetadataOrBuilder getMetadataContextOrBuilder() {
return getMetadataContext();
}
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 (source_ != null) {
output.writeMessage(1, getSource());
}
if (destination_ != null) {
output.writeMessage(2, getDestination());
}
if (request_ != null) {
output.writeMessage(4, getRequest());
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetContextExtensions(),
ContextExtensionsDefaultEntryHolder.defaultEntry,
10);
if (metadataContext_ != null) {
output.writeMessage(11, getMetadataContext());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (source_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getSource());
}
if (destination_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getDestination());
}
if (request_ != null) {
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 (metadataContext_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, getMetadataContext());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.service.auth.v3.AttributeContext)) {
return super.equals(obj);
}
io.envoyproxy.envoy.service.auth.v3.AttributeContext other = (io.envoyproxy.envoy.service.auth.v3.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 (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (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) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.service.auth.v3.AttributeContext parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.auth.v3.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.v3.AttributeContext parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.auth.v3.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.v3.AttributeContext parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.auth.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.AttributeContext}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.service.auth.v3.AttributeContext)
io.envoyproxy.envoy.service.auth.v3.AttributeContextOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.service.auth.v3.AttributeContextProto.internal_static_envoy_service_auth_v3_AttributeContext_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 10:
return internalGetContextExtensions();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
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.v3.AttributeContextProto.internal_static_envoy_service_auth_v3_AttributeContext_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.service.auth.v3.AttributeContext.class, io.envoyproxy.envoy.service.auth.v3.AttributeContext.Builder.class);
}
// Construct using io.envoyproxy.envoy.service.auth.v3.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) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (sourceBuilder_ == null) {
source_ = null;
} else {
source_ = null;
sourceBuilder_ = null;
}
if (destinationBuilder_ == null) {
destination_ = null;
} else {
destination_ = null;
destinationBuilder_ = null;
}
if (requestBuilder_ == null) {
request_ = null;
} else {
request_ = null;
requestBuilder_ = null;
}
internalGetMutableContextExtensions().clear();
if (metadataContextBuilder_ == null) {
metadataContext_ = null;
} else {
metadataContext_ = null;
metadataContextBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.service.auth.v3.AttributeContextProto.internal_static_envoy_service_auth_v3_AttributeContext_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.service.auth.v3.AttributeContext getDefaultInstanceForType() {
return io.envoyproxy.envoy.service.auth.v3.AttributeContext.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.service.auth.v3.AttributeContext build() {
io.envoyproxy.envoy.service.auth.v3.AttributeContext result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.service.auth.v3.AttributeContext buildPartial() {
io.envoyproxy.envoy.service.auth.v3.AttributeContext result = new io.envoyproxy.envoy.service.auth.v3.AttributeContext(this);
int from_bitField0_ = bitField0_;
if (sourceBuilder_ == null) {
result.source_ = source_;
} else {
result.source_ = sourceBuilder_.build();
}
if (destinationBuilder_ == null) {
result.destination_ = destination_;
} else {
result.destination_ = destinationBuilder_.build();
}
if (requestBuilder_ == null) {
result.request_ = request_;
} else {
result.request_ = requestBuilder_.build();
}
result.contextExtensions_ = internalGetContextExtensions();
result.contextExtensions_.makeImmutable();
if (metadataContextBuilder_ == null) {
result.metadataContext_ = metadataContext_;
} else {
result.metadataContext_ = metadataContextBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.service.auth.v3.AttributeContext) {
return mergeFrom((io.envoyproxy.envoy.service.auth.v3.AttributeContext)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.service.auth.v3.AttributeContext other) {
if (other == io.envoyproxy.envoy.service.auth.v3.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());
if (other.hasMetadataContext()) {
mergeMetadataContext(other.getMetadataContext());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.service.auth.v3.AttributeContext parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.service.auth.v3.AttributeContext) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer source_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer, io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer.Builder, io.envoyproxy.envoy.service.auth.v3.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.v3.AttributeContext.Peer source = 1;
* @return Whether the source field is set.
*/
public boolean hasSource() {
return sourceBuilder_ != null || source_ != null;
}
/**
*
* 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.
*
* 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.v3.AttributeContext.Peer source = 1;
*/
public Builder setSource(io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer value) {
if (sourceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
source_ = value;
onChanged();
} else {
sourceBuilder_.setMessage(value);
}
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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.v3.AttributeContext.Peer destination = 2;
* @return Whether the destination field is set.
*/
public boolean hasDestination() {
return destinationBuilder_ != null || destination_ != null;
}
/**
*
* 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.
*
* 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.v3.AttributeContext.Peer destination = 2;
*/
public Builder setDestination(io.envoyproxy.envoy.service.auth.v3.AttributeContext.Peer value) {
if (destinationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
destination_ = value;
onChanged();
} else {
destinationBuilder_.setMessage(value);
}
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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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() {
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() {
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);
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.
*