// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/extensions/geoip_providers/common/v3/common.proto
package io.envoyproxy.envoy.extensions.geoip_providers.common.v3;
/**
* Protobuf type {@code envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig}
*/
public final class CommonGeoipProviderConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig)
CommonGeoipProviderConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use CommonGeoipProviderConfig.newBuilder() to construct.
private CommonGeoipProviderConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CommonGeoipProviderConfig() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CommonGeoipProviderConfig();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CommonGeoipProviderConfig(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd.Builder subBuilder = null;
if (geoHeadersToAdd_ != null) {
subBuilder = geoHeadersToAdd_.toBuilder();
}
geoHeadersToAdd_ = input.readMessage(io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(geoHeadersToAdd_);
geoHeadersToAdd_ = 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.extensions.geoip_providers.common.v3.CommonProto.internal_static_envoy_extensions_geoip_providers_common_v3_CommonGeoipProviderConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonProto.internal_static_envoy_extensions_geoip_providers_common_v3_CommonGeoipProviderConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.class, io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.Builder.class);
}
public interface GeolocationHeadersToAddOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd)
com.google.protobuf.MessageOrBuilder {
/**
*
* If set, the header will be used to populate the country ISO code associated with the IP address.
*
*
* string country = 1 [(.validate.rules) = { ... }
* @return The country.
*/
java.lang.String getCountry();
/**
*
* If set, the header will be used to populate the country ISO code associated with the IP address.
*
*
* string country = 1 [(.validate.rules) = { ... }
* @return The bytes for country.
*/
com.google.protobuf.ByteString
getCountryBytes();
/**
*
* If set, the header will be used to populate the city associated with the IP address.
*
*
* string city = 2 [(.validate.rules) = { ... }
* @return The city.
*/
java.lang.String getCity();
/**
*
* If set, the header will be used to populate the city associated with the IP address.
*
*
* string city = 2 [(.validate.rules) = { ... }
* @return The bytes for city.
*/
com.google.protobuf.ByteString
getCityBytes();
/**
*
* If set, the header will be used to populate the region ISO code associated with the IP address.
* The least specific subdivision will be selected as region value.
*
*
* string region = 3 [(.validate.rules) = { ... }
* @return The region.
*/
java.lang.String getRegion();
/**
*
* If set, the header will be used to populate the region ISO code associated with the IP address.
* The least specific subdivision will be selected as region value.
*
*
* string region = 3 [(.validate.rules) = { ... }
* @return The bytes for region.
*/
com.google.protobuf.ByteString
getRegionBytes();
/**
*
* If set, the header will be used to populate the ASN associated with the IP address.
*
*
* string asn = 4 [(.validate.rules) = { ... }
* @return The asn.
*/
java.lang.String getAsn();
/**
*
* If set, the header will be used to populate the ASN associated with the IP address.
*
*
* string asn = 4 [(.validate.rules) = { ... }
* @return The bytes for asn.
*/
com.google.protobuf.ByteString
getAsnBytes();
/**
*
* If set, the IP address will be checked if it belongs to any type of anonymization network (e.g. VPN, public proxy etc)
* and header will be populated with the check result. Header value will be set to either "true" or "false" depending on the check result.
*
*
* string is_anon = 5 [(.validate.rules) = { ... }
* @return The isAnon.
*/
java.lang.String getIsAnon();
/**
*
* If set, the IP address will be checked if it belongs to any type of anonymization network (e.g. VPN, public proxy etc)
* and header will be populated with the check result. Header value will be set to either "true" or "false" depending on the check result.
*
*
* string is_anon = 5 [(.validate.rules) = { ... }
* @return The bytes for isAnon.
*/
com.google.protobuf.ByteString
getIsAnonBytes();
/**
*
* If set, the IP address will be checked if it belongs to a VPN and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_vpn = 6 [(.validate.rules) = { ... }
* @return The anonVpn.
*/
java.lang.String getAnonVpn();
/**
*
* If set, the IP address will be checked if it belongs to a VPN and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_vpn = 6 [(.validate.rules) = { ... }
* @return The bytes for anonVpn.
*/
com.google.protobuf.ByteString
getAnonVpnBytes();
/**
*
* If set, the IP address will be checked if it belongs to a hosting provider and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_hosting = 7 [(.validate.rules) = { ... }
* @return The anonHosting.
*/
java.lang.String getAnonHosting();
/**
*
* If set, the IP address will be checked if it belongs to a hosting provider and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_hosting = 7 [(.validate.rules) = { ... }
* @return The bytes for anonHosting.
*/
com.google.protobuf.ByteString
getAnonHostingBytes();
/**
*
* If set, the IP address will be checked if it belongs to a TOR exit node and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_tor = 8 [(.validate.rules) = { ... }
* @return The anonTor.
*/
java.lang.String getAnonTor();
/**
*
* If set, the IP address will be checked if it belongs to a TOR exit node and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_tor = 8 [(.validate.rules) = { ... }
* @return The bytes for anonTor.
*/
com.google.protobuf.ByteString
getAnonTorBytes();
/**
*
* If set, the IP address will be checked if it belongs to a public proxy and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_proxy = 9 [(.validate.rules) = { ... }
* @return The anonProxy.
*/
java.lang.String getAnonProxy();
/**
*
* If set, the IP address will be checked if it belongs to a public proxy and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_proxy = 9 [(.validate.rules) = { ... }
* @return The bytes for anonProxy.
*/
com.google.protobuf.ByteString
getAnonProxyBytes();
}
/**
*
* The set of geolocation headers to add to request. If any of the configured headers is present
* in the incoming request, it will be overridden by the :ref:`Geoip filter <config_http_filters_geoip>`.
* [#next-free-field: 10]
*
*
* Protobuf type {@code envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd}
*/
public static final class GeolocationHeadersToAdd extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd)
GeolocationHeadersToAddOrBuilder {
private static final long serialVersionUID = 0L;
// Use GeolocationHeadersToAdd.newBuilder() to construct.
private GeolocationHeadersToAdd(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private GeolocationHeadersToAdd() {
country_ = "";
city_ = "";
region_ = "";
asn_ = "";
isAnon_ = "";
anonVpn_ = "";
anonHosting_ = "";
anonTor_ = "";
anonProxy_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new GeolocationHeadersToAdd();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GeolocationHeadersToAdd(
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: {
java.lang.String s = input.readStringRequireUtf8();
country_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
city_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
region_ = s;
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
asn_ = s;
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
isAnon_ = s;
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
anonVpn_ = s;
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
anonHosting_ = s;
break;
}
case 66: {
java.lang.String s = input.readStringRequireUtf8();
anonTor_ = s;
break;
}
case 74: {
java.lang.String s = input.readStringRequireUtf8();
anonProxy_ = 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.extensions.geoip_providers.common.v3.CommonProto.internal_static_envoy_extensions_geoip_providers_common_v3_CommonGeoipProviderConfig_GeolocationHeadersToAdd_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonProto.internal_static_envoy_extensions_geoip_providers_common_v3_CommonGeoipProviderConfig_GeolocationHeadersToAdd_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd.class, io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd.Builder.class);
}
public static final int COUNTRY_FIELD_NUMBER = 1;
private volatile java.lang.Object country_;
/**
*
* If set, the header will be used to populate the country ISO code associated with the IP address.
*
*
* string country = 1 [(.validate.rules) = { ... }
* @return The country.
*/
@java.lang.Override
public java.lang.String getCountry() {
java.lang.Object ref = country_;
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();
country_ = s;
return s;
}
}
/**
*
* If set, the header will be used to populate the country ISO code associated with the IP address.
*
*
* string country = 1 [(.validate.rules) = { ... }
* @return The bytes for country.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getCountryBytes() {
java.lang.Object ref = country_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
country_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CITY_FIELD_NUMBER = 2;
private volatile java.lang.Object city_;
/**
*
* If set, the header will be used to populate the city associated with the IP address.
*
*
* string city = 2 [(.validate.rules) = { ... }
* @return The city.
*/
@java.lang.Override
public java.lang.String getCity() {
java.lang.Object ref = city_;
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();
city_ = s;
return s;
}
}
/**
*
* If set, the header will be used to populate the city associated with the IP address.
*
*
* string city = 2 [(.validate.rules) = { ... }
* @return The bytes for city.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getCityBytes() {
java.lang.Object ref = city_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
city_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int REGION_FIELD_NUMBER = 3;
private volatile java.lang.Object region_;
/**
*
* If set, the header will be used to populate the region ISO code associated with the IP address.
* The least specific subdivision will be selected as region value.
*
*
* string region = 3 [(.validate.rules) = { ... }
* @return The region.
*/
@java.lang.Override
public java.lang.String getRegion() {
java.lang.Object ref = region_;
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();
region_ = s;
return s;
}
}
/**
*
* If set, the header will be used to populate the region ISO code associated with the IP address.
* The least specific subdivision will be selected as region value.
*
*
* string region = 3 [(.validate.rules) = { ... }
* @return The bytes for region.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getRegionBytes() {
java.lang.Object ref = region_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
region_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ASN_FIELD_NUMBER = 4;
private volatile java.lang.Object asn_;
/**
*
* If set, the header will be used to populate the ASN associated with the IP address.
*
*
* string asn = 4 [(.validate.rules) = { ... }
* @return The asn.
*/
@java.lang.Override
public java.lang.String getAsn() {
java.lang.Object ref = asn_;
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();
asn_ = s;
return s;
}
}
/**
*
* If set, the header will be used to populate the ASN associated with the IP address.
*
*
* string asn = 4 [(.validate.rules) = { ... }
* @return The bytes for asn.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAsnBytes() {
java.lang.Object ref = asn_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
asn_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int IS_ANON_FIELD_NUMBER = 5;
private volatile java.lang.Object isAnon_;
/**
*
* If set, the IP address will be checked if it belongs to any type of anonymization network (e.g. VPN, public proxy etc)
* and header will be populated with the check result. Header value will be set to either "true" or "false" depending on the check result.
*
*
* string is_anon = 5 [(.validate.rules) = { ... }
* @return The isAnon.
*/
@java.lang.Override
public java.lang.String getIsAnon() {
java.lang.Object ref = isAnon_;
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();
isAnon_ = s;
return s;
}
}
/**
*
* If set, the IP address will be checked if it belongs to any type of anonymization network (e.g. VPN, public proxy etc)
* and header will be populated with the check result. Header value will be set to either "true" or "false" depending on the check result.
*
*
* string is_anon = 5 [(.validate.rules) = { ... }
* @return The bytes for isAnon.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIsAnonBytes() {
java.lang.Object ref = isAnon_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
isAnon_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ANON_VPN_FIELD_NUMBER = 6;
private volatile java.lang.Object anonVpn_;
/**
*
* If set, the IP address will be checked if it belongs to a VPN and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_vpn = 6 [(.validate.rules) = { ... }
* @return The anonVpn.
*/
@java.lang.Override
public java.lang.String getAnonVpn() {
java.lang.Object ref = anonVpn_;
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();
anonVpn_ = s;
return s;
}
}
/**
*
* If set, the IP address will be checked if it belongs to a VPN and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_vpn = 6 [(.validate.rules) = { ... }
* @return The bytes for anonVpn.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAnonVpnBytes() {
java.lang.Object ref = anonVpn_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
anonVpn_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ANON_HOSTING_FIELD_NUMBER = 7;
private volatile java.lang.Object anonHosting_;
/**
*
* If set, the IP address will be checked if it belongs to a hosting provider and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_hosting = 7 [(.validate.rules) = { ... }
* @return The anonHosting.
*/
@java.lang.Override
public java.lang.String getAnonHosting() {
java.lang.Object ref = anonHosting_;
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();
anonHosting_ = s;
return s;
}
}
/**
*
* If set, the IP address will be checked if it belongs to a hosting provider and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_hosting = 7 [(.validate.rules) = { ... }
* @return The bytes for anonHosting.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAnonHostingBytes() {
java.lang.Object ref = anonHosting_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
anonHosting_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ANON_TOR_FIELD_NUMBER = 8;
private volatile java.lang.Object anonTor_;
/**
*
* If set, the IP address will be checked if it belongs to a TOR exit node and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_tor = 8 [(.validate.rules) = { ... }
* @return The anonTor.
*/
@java.lang.Override
public java.lang.String getAnonTor() {
java.lang.Object ref = anonTor_;
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();
anonTor_ = s;
return s;
}
}
/**
*
* If set, the IP address will be checked if it belongs to a TOR exit node and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_tor = 8 [(.validate.rules) = { ... }
* @return The bytes for anonTor.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAnonTorBytes() {
java.lang.Object ref = anonTor_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
anonTor_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ANON_PROXY_FIELD_NUMBER = 9;
private volatile java.lang.Object anonProxy_;
/**
*
* If set, the IP address will be checked if it belongs to a public proxy and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_proxy = 9 [(.validate.rules) = { ... }
* @return The anonProxy.
*/
@java.lang.Override
public java.lang.String getAnonProxy() {
java.lang.Object ref = anonProxy_;
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();
anonProxy_ = s;
return s;
}
}
/**
*
* If set, the IP address will be checked if it belongs to a public proxy and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_proxy = 9 [(.validate.rules) = { ... }
* @return The bytes for anonProxy.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAnonProxyBytes() {
java.lang.Object ref = anonProxy_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
anonProxy_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(country_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, country_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(city_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, city_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, region_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(asn_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, asn_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(isAnon_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, isAnon_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(anonVpn_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, anonVpn_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(anonHosting_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, anonHosting_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(anonTor_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, anonTor_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(anonProxy_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, anonProxy_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(country_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, country_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(city_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, city_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, region_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(asn_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, asn_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(isAnon_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, isAnon_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(anonVpn_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, anonVpn_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(anonHosting_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, anonHosting_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(anonTor_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, anonTor_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(anonProxy_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, anonProxy_);
}
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.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd)) {
return super.equals(obj);
}
io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd other = (io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd) obj;
if (!getCountry()
.equals(other.getCountry())) return false;
if (!getCity()
.equals(other.getCity())) return false;
if (!getRegion()
.equals(other.getRegion())) return false;
if (!getAsn()
.equals(other.getAsn())) return false;
if (!getIsAnon()
.equals(other.getIsAnon())) return false;
if (!getAnonVpn()
.equals(other.getAnonVpn())) return false;
if (!getAnonHosting()
.equals(other.getAnonHosting())) return false;
if (!getAnonTor()
.equals(other.getAnonTor())) return false;
if (!getAnonProxy()
.equals(other.getAnonProxy())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + COUNTRY_FIELD_NUMBER;
hash = (53 * hash) + getCountry().hashCode();
hash = (37 * hash) + CITY_FIELD_NUMBER;
hash = (53 * hash) + getCity().hashCode();
hash = (37 * hash) + REGION_FIELD_NUMBER;
hash = (53 * hash) + getRegion().hashCode();
hash = (37 * hash) + ASN_FIELD_NUMBER;
hash = (53 * hash) + getAsn().hashCode();
hash = (37 * hash) + IS_ANON_FIELD_NUMBER;
hash = (53 * hash) + getIsAnon().hashCode();
hash = (37 * hash) + ANON_VPN_FIELD_NUMBER;
hash = (53 * hash) + getAnonVpn().hashCode();
hash = (37 * hash) + ANON_HOSTING_FIELD_NUMBER;
hash = (53 * hash) + getAnonHosting().hashCode();
hash = (37 * hash) + ANON_TOR_FIELD_NUMBER;
hash = (53 * hash) + getAnonTor().hashCode();
hash = (37 * hash) + ANON_PROXY_FIELD_NUMBER;
hash = (53 * hash) + getAnonProxy().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd 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.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd 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.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd 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.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd 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.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd 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.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd 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;
}
/**
*
* The set of geolocation headers to add to request. If any of the configured headers is present
* in the incoming request, it will be overridden by the :ref:`Geoip filter <config_http_filters_geoip>`.
* [#next-free-field: 10]
*
*
* Protobuf type {@code envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd)
io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAddOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonProto.internal_static_envoy_extensions_geoip_providers_common_v3_CommonGeoipProviderConfig_GeolocationHeadersToAdd_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonProto.internal_static_envoy_extensions_geoip_providers_common_v3_CommonGeoipProviderConfig_GeolocationHeadersToAdd_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd.class, io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd.Builder.class);
}
// Construct using io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd.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();
country_ = "";
city_ = "";
region_ = "";
asn_ = "";
isAnon_ = "";
anonVpn_ = "";
anonHosting_ = "";
anonTor_ = "";
anonProxy_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonProto.internal_static_envoy_extensions_geoip_providers_common_v3_CommonGeoipProviderConfig_GeolocationHeadersToAdd_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd getDefaultInstanceForType() {
return io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd build() {
io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd buildPartial() {
io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd result = new io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd(this);
result.country_ = country_;
result.city_ = city_;
result.region_ = region_;
result.asn_ = asn_;
result.isAnon_ = isAnon_;
result.anonVpn_ = anonVpn_;
result.anonHosting_ = anonHosting_;
result.anonTor_ = anonTor_;
result.anonProxy_ = anonProxy_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd) {
return mergeFrom((io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd other) {
if (other == io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd.getDefaultInstance()) return this;
if (!other.getCountry().isEmpty()) {
country_ = other.country_;
onChanged();
}
if (!other.getCity().isEmpty()) {
city_ = other.city_;
onChanged();
}
if (!other.getRegion().isEmpty()) {
region_ = other.region_;
onChanged();
}
if (!other.getAsn().isEmpty()) {
asn_ = other.asn_;
onChanged();
}
if (!other.getIsAnon().isEmpty()) {
isAnon_ = other.isAnon_;
onChanged();
}
if (!other.getAnonVpn().isEmpty()) {
anonVpn_ = other.anonVpn_;
onChanged();
}
if (!other.getAnonHosting().isEmpty()) {
anonHosting_ = other.anonHosting_;
onChanged();
}
if (!other.getAnonTor().isEmpty()) {
anonTor_ = other.anonTor_;
onChanged();
}
if (!other.getAnonProxy().isEmpty()) {
anonProxy_ = other.anonProxy_;
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.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object country_ = "";
/**
*
* If set, the header will be used to populate the country ISO code associated with the IP address.
*
*
* string country = 1 [(.validate.rules) = { ... }
* @return The country.
*/
public java.lang.String getCountry() {
java.lang.Object ref = country_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
country_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If set, the header will be used to populate the country ISO code associated with the IP address.
*
*
* string country = 1 [(.validate.rules) = { ... }
* @return The bytes for country.
*/
public com.google.protobuf.ByteString
getCountryBytes() {
java.lang.Object ref = country_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
country_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If set, the header will be used to populate the country ISO code associated with the IP address.
*
*
* string country = 1 [(.validate.rules) = { ... }
* @param value The country to set.
* @return This builder for chaining.
*/
public Builder setCountry(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
country_ = value;
onChanged();
return this;
}
/**
*
* If set, the header will be used to populate the country ISO code associated with the IP address.
*
*
* string country = 1 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearCountry() {
country_ = getDefaultInstance().getCountry();
onChanged();
return this;
}
/**
*
* If set, the header will be used to populate the country ISO code associated with the IP address.
*
*
* string country = 1 [(.validate.rules) = { ... }
* @param value The bytes for country to set.
* @return This builder for chaining.
*/
public Builder setCountryBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
country_ = value;
onChanged();
return this;
}
private java.lang.Object city_ = "";
/**
*
* If set, the header will be used to populate the city associated with the IP address.
*
*
* string city = 2 [(.validate.rules) = { ... }
* @return The city.
*/
public java.lang.String getCity() {
java.lang.Object ref = city_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
city_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If set, the header will be used to populate the city associated with the IP address.
*
*
* string city = 2 [(.validate.rules) = { ... }
* @return The bytes for city.
*/
public com.google.protobuf.ByteString
getCityBytes() {
java.lang.Object ref = city_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
city_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If set, the header will be used to populate the city associated with the IP address.
*
*
* string city = 2 [(.validate.rules) = { ... }
* @param value The city to set.
* @return This builder for chaining.
*/
public Builder setCity(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
city_ = value;
onChanged();
return this;
}
/**
*
* If set, the header will be used to populate the city associated with the IP address.
*
*
* string city = 2 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearCity() {
city_ = getDefaultInstance().getCity();
onChanged();
return this;
}
/**
*
* If set, the header will be used to populate the city associated with the IP address.
*
*
* string city = 2 [(.validate.rules) = { ... }
* @param value The bytes for city to set.
* @return This builder for chaining.
*/
public Builder setCityBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
city_ = value;
onChanged();
return this;
}
private java.lang.Object region_ = "";
/**
*
* If set, the header will be used to populate the region ISO code associated with the IP address.
* The least specific subdivision will be selected as region value.
*
*
* string region = 3 [(.validate.rules) = { ... }
* @return The region.
*/
public java.lang.String getRegion() {
java.lang.Object ref = region_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
region_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If set, the header will be used to populate the region ISO code associated with the IP address.
* The least specific subdivision will be selected as region value.
*
*
* string region = 3 [(.validate.rules) = { ... }
* @return The bytes for region.
*/
public com.google.protobuf.ByteString
getRegionBytes() {
java.lang.Object ref = region_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
region_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If set, the header will be used to populate the region ISO code associated with the IP address.
* The least specific subdivision will be selected as region value.
*
*
* string region = 3 [(.validate.rules) = { ... }
* @param value The region to set.
* @return This builder for chaining.
*/
public Builder setRegion(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
region_ = value;
onChanged();
return this;
}
/**
*
* If set, the header will be used to populate the region ISO code associated with the IP address.
* The least specific subdivision will be selected as region value.
*
*
* string region = 3 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearRegion() {
region_ = getDefaultInstance().getRegion();
onChanged();
return this;
}
/**
*
* If set, the header will be used to populate the region ISO code associated with the IP address.
* The least specific subdivision will be selected as region value.
*
*
* string region = 3 [(.validate.rules) = { ... }
* @param value The bytes for region to set.
* @return This builder for chaining.
*/
public Builder setRegionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
region_ = value;
onChanged();
return this;
}
private java.lang.Object asn_ = "";
/**
*
* If set, the header will be used to populate the ASN associated with the IP address.
*
*
* string asn = 4 [(.validate.rules) = { ... }
* @return The asn.
*/
public java.lang.String getAsn() {
java.lang.Object ref = asn_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
asn_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If set, the header will be used to populate the ASN associated with the IP address.
*
*
* string asn = 4 [(.validate.rules) = { ... }
* @return The bytes for asn.
*/
public com.google.protobuf.ByteString
getAsnBytes() {
java.lang.Object ref = asn_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
asn_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If set, the header will be used to populate the ASN associated with the IP address.
*
*
* string asn = 4 [(.validate.rules) = { ... }
* @param value The asn to set.
* @return This builder for chaining.
*/
public Builder setAsn(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
asn_ = value;
onChanged();
return this;
}
/**
*
* If set, the header will be used to populate the ASN associated with the IP address.
*
*
* string asn = 4 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearAsn() {
asn_ = getDefaultInstance().getAsn();
onChanged();
return this;
}
/**
*
* If set, the header will be used to populate the ASN associated with the IP address.
*
*
* string asn = 4 [(.validate.rules) = { ... }
* @param value The bytes for asn to set.
* @return This builder for chaining.
*/
public Builder setAsnBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
asn_ = value;
onChanged();
return this;
}
private java.lang.Object isAnon_ = "";
/**
*
* If set, the IP address will be checked if it belongs to any type of anonymization network (e.g. VPN, public proxy etc)
* and header will be populated with the check result. Header value will be set to either "true" or "false" depending on the check result.
*
*
* string is_anon = 5 [(.validate.rules) = { ... }
* @return The isAnon.
*/
public java.lang.String getIsAnon() {
java.lang.Object ref = isAnon_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
isAnon_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If set, the IP address will be checked if it belongs to any type of anonymization network (e.g. VPN, public proxy etc)
* and header will be populated with the check result. Header value will be set to either "true" or "false" depending on the check result.
*
*
* string is_anon = 5 [(.validate.rules) = { ... }
* @return The bytes for isAnon.
*/
public com.google.protobuf.ByteString
getIsAnonBytes() {
java.lang.Object ref = isAnon_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
isAnon_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If set, the IP address will be checked if it belongs to any type of anonymization network (e.g. VPN, public proxy etc)
* and header will be populated with the check result. Header value will be set to either "true" or "false" depending on the check result.
*
*
* string is_anon = 5 [(.validate.rules) = { ... }
* @param value The isAnon to set.
* @return This builder for chaining.
*/
public Builder setIsAnon(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
isAnon_ = value;
onChanged();
return this;
}
/**
*
* If set, the IP address will be checked if it belongs to any type of anonymization network (e.g. VPN, public proxy etc)
* and header will be populated with the check result. Header value will be set to either "true" or "false" depending on the check result.
*
*
* string is_anon = 5 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearIsAnon() {
isAnon_ = getDefaultInstance().getIsAnon();
onChanged();
return this;
}
/**
*
* If set, the IP address will be checked if it belongs to any type of anonymization network (e.g. VPN, public proxy etc)
* and header will be populated with the check result. Header value will be set to either "true" or "false" depending on the check result.
*
*
* string is_anon = 5 [(.validate.rules) = { ... }
* @param value The bytes for isAnon to set.
* @return This builder for chaining.
*/
public Builder setIsAnonBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
isAnon_ = value;
onChanged();
return this;
}
private java.lang.Object anonVpn_ = "";
/**
*
* If set, the IP address will be checked if it belongs to a VPN and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_vpn = 6 [(.validate.rules) = { ... }
* @return The anonVpn.
*/
public java.lang.String getAnonVpn() {
java.lang.Object ref = anonVpn_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
anonVpn_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If set, the IP address will be checked if it belongs to a VPN and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_vpn = 6 [(.validate.rules) = { ... }
* @return The bytes for anonVpn.
*/
public com.google.protobuf.ByteString
getAnonVpnBytes() {
java.lang.Object ref = anonVpn_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
anonVpn_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If set, the IP address will be checked if it belongs to a VPN and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_vpn = 6 [(.validate.rules) = { ... }
* @param value The anonVpn to set.
* @return This builder for chaining.
*/
public Builder setAnonVpn(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
anonVpn_ = value;
onChanged();
return this;
}
/**
*
* If set, the IP address will be checked if it belongs to a VPN and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_vpn = 6 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearAnonVpn() {
anonVpn_ = getDefaultInstance().getAnonVpn();
onChanged();
return this;
}
/**
*
* If set, the IP address will be checked if it belongs to a VPN and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_vpn = 6 [(.validate.rules) = { ... }
* @param value The bytes for anonVpn to set.
* @return This builder for chaining.
*/
public Builder setAnonVpnBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
anonVpn_ = value;
onChanged();
return this;
}
private java.lang.Object anonHosting_ = "";
/**
*
* If set, the IP address will be checked if it belongs to a hosting provider and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_hosting = 7 [(.validate.rules) = { ... }
* @return The anonHosting.
*/
public java.lang.String getAnonHosting() {
java.lang.Object ref = anonHosting_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
anonHosting_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If set, the IP address will be checked if it belongs to a hosting provider and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_hosting = 7 [(.validate.rules) = { ... }
* @return The bytes for anonHosting.
*/
public com.google.protobuf.ByteString
getAnonHostingBytes() {
java.lang.Object ref = anonHosting_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
anonHosting_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If set, the IP address will be checked if it belongs to a hosting provider and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_hosting = 7 [(.validate.rules) = { ... }
* @param value The anonHosting to set.
* @return This builder for chaining.
*/
public Builder setAnonHosting(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
anonHosting_ = value;
onChanged();
return this;
}
/**
*
* If set, the IP address will be checked if it belongs to a hosting provider and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_hosting = 7 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearAnonHosting() {
anonHosting_ = getDefaultInstance().getAnonHosting();
onChanged();
return this;
}
/**
*
* If set, the IP address will be checked if it belongs to a hosting provider and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_hosting = 7 [(.validate.rules) = { ... }
* @param value The bytes for anonHosting to set.
* @return This builder for chaining.
*/
public Builder setAnonHostingBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
anonHosting_ = value;
onChanged();
return this;
}
private java.lang.Object anonTor_ = "";
/**
*
* If set, the IP address will be checked if it belongs to a TOR exit node and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_tor = 8 [(.validate.rules) = { ... }
* @return The anonTor.
*/
public java.lang.String getAnonTor() {
java.lang.Object ref = anonTor_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
anonTor_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If set, the IP address will be checked if it belongs to a TOR exit node and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_tor = 8 [(.validate.rules) = { ... }
* @return The bytes for anonTor.
*/
public com.google.protobuf.ByteString
getAnonTorBytes() {
java.lang.Object ref = anonTor_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
anonTor_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If set, the IP address will be checked if it belongs to a TOR exit node and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_tor = 8 [(.validate.rules) = { ... }
* @param value The anonTor to set.
* @return This builder for chaining.
*/
public Builder setAnonTor(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
anonTor_ = value;
onChanged();
return this;
}
/**
*
* If set, the IP address will be checked if it belongs to a TOR exit node and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_tor = 8 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearAnonTor() {
anonTor_ = getDefaultInstance().getAnonTor();
onChanged();
return this;
}
/**
*
* If set, the IP address will be checked if it belongs to a TOR exit node and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_tor = 8 [(.validate.rules) = { ... }
* @param value The bytes for anonTor to set.
* @return This builder for chaining.
*/
public Builder setAnonTorBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
anonTor_ = value;
onChanged();
return this;
}
private java.lang.Object anonProxy_ = "";
/**
*
* If set, the IP address will be checked if it belongs to a public proxy and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_proxy = 9 [(.validate.rules) = { ... }
* @return The anonProxy.
*/
public java.lang.String getAnonProxy() {
java.lang.Object ref = anonProxy_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
anonProxy_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If set, the IP address will be checked if it belongs to a public proxy and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_proxy = 9 [(.validate.rules) = { ... }
* @return The bytes for anonProxy.
*/
public com.google.protobuf.ByteString
getAnonProxyBytes() {
java.lang.Object ref = anonProxy_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
anonProxy_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If set, the IP address will be checked if it belongs to a public proxy and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_proxy = 9 [(.validate.rules) = { ... }
* @param value The anonProxy to set.
* @return This builder for chaining.
*/
public Builder setAnonProxy(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
anonProxy_ = value;
onChanged();
return this;
}
/**
*
* If set, the IP address will be checked if it belongs to a public proxy and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_proxy = 9 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearAnonProxy() {
anonProxy_ = getDefaultInstance().getAnonProxy();
onChanged();
return this;
}
/**
*
* If set, the IP address will be checked if it belongs to a public proxy and header will be populated with the check result.
* Header value will be set to either "true" or "false" depending on the check result.
*
*
* string anon_proxy = 9 [(.validate.rules) = { ... }
* @param value The bytes for anonProxy to set.
* @return This builder for chaining.
*/
public Builder setAnonProxyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
anonProxy_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd)
}
// @@protoc_insertion_point(class_scope:envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd)
private static final io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd();
}
public static io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public GeolocationHeadersToAdd parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new GeolocationHeadersToAdd(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int GEO_HEADERS_TO_ADD_FIELD_NUMBER = 1;
private io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd geoHeadersToAdd_;
/**
*
* Configuration for geolocation headers to add to request.
*
*
* .envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd geo_headers_to_add = 1 [(.validate.rules) = { ... }
* @return Whether the geoHeadersToAdd field is set.
*/
@java.lang.Override
public boolean hasGeoHeadersToAdd() {
return geoHeadersToAdd_ != null;
}
/**
*
* Configuration for geolocation headers to add to request.
*
*
* .envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd geo_headers_to_add = 1 [(.validate.rules) = { ... }
* @return The geoHeadersToAdd.
*/
@java.lang.Override
public io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd getGeoHeadersToAdd() {
return geoHeadersToAdd_ == null ? io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd.getDefaultInstance() : geoHeadersToAdd_;
}
/**
*
* Configuration for geolocation headers to add to request.
*
*
* .envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd geo_headers_to_add = 1 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAddOrBuilder getGeoHeadersToAddOrBuilder() {
return getGeoHeadersToAdd();
}
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 (geoHeadersToAdd_ != null) {
output.writeMessage(1, getGeoHeadersToAdd());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (geoHeadersToAdd_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getGeoHeadersToAdd());
}
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.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig)) {
return super.equals(obj);
}
io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig other = (io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig) obj;
if (hasGeoHeadersToAdd() != other.hasGeoHeadersToAdd()) return false;
if (hasGeoHeadersToAdd()) {
if (!getGeoHeadersToAdd()
.equals(other.getGeoHeadersToAdd())) 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 (hasGeoHeadersToAdd()) {
hash = (37 * hash) + GEO_HEADERS_TO_ADD_FIELD_NUMBER;
hash = (53 * hash) + getGeoHeadersToAdd().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig 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.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig 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.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig 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.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig 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.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig 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.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig 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;
}
/**
* Protobuf type {@code envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig)
io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonProto.internal_static_envoy_extensions_geoip_providers_common_v3_CommonGeoipProviderConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonProto.internal_static_envoy_extensions_geoip_providers_common_v3_CommonGeoipProviderConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.class, io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.Builder.class);
}
// Construct using io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.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 (geoHeadersToAddBuilder_ == null) {
geoHeadersToAdd_ = null;
} else {
geoHeadersToAdd_ = null;
geoHeadersToAddBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonProto.internal_static_envoy_extensions_geoip_providers_common_v3_CommonGeoipProviderConfig_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig getDefaultInstanceForType() {
return io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig build() {
io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig buildPartial() {
io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig result = new io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig(this);
if (geoHeadersToAddBuilder_ == null) {
result.geoHeadersToAdd_ = geoHeadersToAdd_;
} else {
result.geoHeadersToAdd_ = geoHeadersToAddBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig) {
return mergeFrom((io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig other) {
if (other == io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.getDefaultInstance()) return this;
if (other.hasGeoHeadersToAdd()) {
mergeGeoHeadersToAdd(other.getGeoHeadersToAdd());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd geoHeadersToAdd_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd, io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd.Builder, io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAddOrBuilder> geoHeadersToAddBuilder_;
/**
*
* Configuration for geolocation headers to add to request.
*
*
* .envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd geo_headers_to_add = 1 [(.validate.rules) = { ... }
* @return Whether the geoHeadersToAdd field is set.
*/
public boolean hasGeoHeadersToAdd() {
return geoHeadersToAddBuilder_ != null || geoHeadersToAdd_ != null;
}
/**
*
* Configuration for geolocation headers to add to request.
*
*
* .envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd geo_headers_to_add = 1 [(.validate.rules) = { ... }
* @return The geoHeadersToAdd.
*/
public io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd getGeoHeadersToAdd() {
if (geoHeadersToAddBuilder_ == null) {
return geoHeadersToAdd_ == null ? io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd.getDefaultInstance() : geoHeadersToAdd_;
} else {
return geoHeadersToAddBuilder_.getMessage();
}
}
/**
*
* Configuration for geolocation headers to add to request.
*
*
* .envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd geo_headers_to_add = 1 [(.validate.rules) = { ... }
*/
public Builder setGeoHeadersToAdd(io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd value) {
if (geoHeadersToAddBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
geoHeadersToAdd_ = value;
onChanged();
} else {
geoHeadersToAddBuilder_.setMessage(value);
}
return this;
}
/**
*
* Configuration for geolocation headers to add to request.
*
*
* .envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd geo_headers_to_add = 1 [(.validate.rules) = { ... }
*/
public Builder setGeoHeadersToAdd(
io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd.Builder builderForValue) {
if (geoHeadersToAddBuilder_ == null) {
geoHeadersToAdd_ = builderForValue.build();
onChanged();
} else {
geoHeadersToAddBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Configuration for geolocation headers to add to request.
*
*
* .envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd geo_headers_to_add = 1 [(.validate.rules) = { ... }
*/
public Builder mergeGeoHeadersToAdd(io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd value) {
if (geoHeadersToAddBuilder_ == null) {
if (geoHeadersToAdd_ != null) {
geoHeadersToAdd_ =
io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd.newBuilder(geoHeadersToAdd_).mergeFrom(value).buildPartial();
} else {
geoHeadersToAdd_ = value;
}
onChanged();
} else {
geoHeadersToAddBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Configuration for geolocation headers to add to request.
*
*
* .envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd geo_headers_to_add = 1 [(.validate.rules) = { ... }
*/
public Builder clearGeoHeadersToAdd() {
if (geoHeadersToAddBuilder_ == null) {
geoHeadersToAdd_ = null;
onChanged();
} else {
geoHeadersToAdd_ = null;
geoHeadersToAddBuilder_ = null;
}
return this;
}
/**
*
* Configuration for geolocation headers to add to request.
*
*
* .envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd geo_headers_to_add = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd.Builder getGeoHeadersToAddBuilder() {
onChanged();
return getGeoHeadersToAddFieldBuilder().getBuilder();
}
/**
*
* Configuration for geolocation headers to add to request.
*
*
* .envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd geo_headers_to_add = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAddOrBuilder getGeoHeadersToAddOrBuilder() {
if (geoHeadersToAddBuilder_ != null) {
return geoHeadersToAddBuilder_.getMessageOrBuilder();
} else {
return geoHeadersToAdd_ == null ?
io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd.getDefaultInstance() : geoHeadersToAdd_;
}
}
/**
*
* Configuration for geolocation headers to add to request.
*
*
* .envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd geo_headers_to_add = 1 [(.validate.rules) = { ... }
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd, io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd.Builder, io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAddOrBuilder>
getGeoHeadersToAddFieldBuilder() {
if (geoHeadersToAddBuilder_ == null) {
geoHeadersToAddBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd, io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAdd.Builder, io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig.GeolocationHeadersToAddOrBuilder>(
getGeoHeadersToAdd(),
getParentForChildren(),
isClean());
geoHeadersToAdd_ = null;
}
return geoHeadersToAddBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig)
}
// @@protoc_insertion_point(class_scope:envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig)
private static final io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig();
}
public static io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CommonGeoipProviderConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CommonGeoipProviderConfig(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.geoip_providers.common.v3.CommonGeoipProviderConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}