public final class CacheKeyPolicy extends GeneratedMessageV3 implements CacheKeyPolicyOrBuilder
Message containing what to include in the cache key for a request for Cloud CDN.
Protobuf type google.cloud.compute.v1.CacheKeyPolicy
Static Fields
INCLUDE_HOST_FIELD_NUMBER
public static final int INCLUDE_HOST_FIELD_NUMBER
Field Value
INCLUDE_PROTOCOL_FIELD_NUMBER
public static final int INCLUDE_PROTOCOL_FIELD_NUMBER
Field Value
INCLUDE_QUERY_STRING_FIELD_NUMBER
public static final int INCLUDE_QUERY_STRING_FIELD_NUMBER
Field Value
QUERY_STRING_BLACKLIST_FIELD_NUMBER
public static final int QUERY_STRING_BLACKLIST_FIELD_NUMBER
Field Value
QUERY_STRING_WHITELIST_FIELD_NUMBER
public static final int QUERY_STRING_WHITELIST_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static CacheKeyPolicy getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static CacheKeyPolicy.Builder newBuilder()
Returns
newBuilder(CacheKeyPolicy prototype)
public static CacheKeyPolicy.Builder newBuilder(CacheKeyPolicy prototype)
Parameter
Returns
public static CacheKeyPolicy parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static CacheKeyPolicy parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static CacheKeyPolicy parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static CacheKeyPolicy parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static CacheKeyPolicy parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static CacheKeyPolicy parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static CacheKeyPolicy parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static CacheKeyPolicy parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static CacheKeyPolicy parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static CacheKeyPolicy parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static CacheKeyPolicy parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static CacheKeyPolicy parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<CacheKeyPolicy> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getDefaultInstanceForType()
public CacheKeyPolicy getDefaultInstanceForType()
Returns
getIncludeHost()
public boolean getIncludeHost()
If true, requests to different hosts will be cached separately.
optional bool include_host = 486867679;
Returns
Type | Description |
boolean | The includeHost.
|
getIncludeProtocol()
public boolean getIncludeProtocol()
If true, http and https requests will be cached separately.
optional bool include_protocol = 303507535;
Returns
Type | Description |
boolean | The includeProtocol.
|
getIncludeQueryString()
public boolean getIncludeQueryString()
If true, include query string parameters in the cache key according to query_string_whitelist and query_string_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely.
optional bool include_query_string = 474036639;
Returns
Type | Description |
boolean | The includeQueryString.
|
getParserForType()
public Parser<CacheKeyPolicy> getParserForType()
Returns
Overrides
getQueryStringBlacklist(int index)
public String getQueryStringBlacklist(int index)
Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters.
repeated string query_string_blacklist = 354964742;
Parameter
Name | Description |
index | int
The index of the element to return.
|
Returns
Type | Description |
String | The queryStringBlacklist at the given index.
|
getQueryStringBlacklistBytes(int index)
public ByteString getQueryStringBlacklistBytes(int index)
Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters.
repeated string query_string_blacklist = 354964742;
Parameter
Name | Description |
index | int
The index of the value to return.
|
Returns
Type | Description |
ByteString | The bytes of the queryStringBlacklist at the given index.
|
getQueryStringBlacklistCount()
public int getQueryStringBlacklistCount()
Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters.
repeated string query_string_blacklist = 354964742;
Returns
Type | Description |
int | The count of queryStringBlacklist.
|
getQueryStringBlacklistList()
public ProtocolStringList getQueryStringBlacklistList()
Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters.
repeated string query_string_blacklist = 354964742;
Returns
getQueryStringWhitelist(int index)
public String getQueryStringWhitelist(int index)
Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters.
repeated string query_string_whitelist = 52456496;
Parameter
Name | Description |
index | int
The index of the element to return.
|
Returns
Type | Description |
String | The queryStringWhitelist at the given index.
|
getQueryStringWhitelistBytes(int index)
public ByteString getQueryStringWhitelistBytes(int index)
Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters.
repeated string query_string_whitelist = 52456496;
Parameter
Name | Description |
index | int
The index of the value to return.
|
Returns
Type | Description |
ByteString | The bytes of the queryStringWhitelist at the given index.
|
getQueryStringWhitelistCount()
public int getQueryStringWhitelistCount()
Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters.
repeated string query_string_whitelist = 52456496;
Returns
Type | Description |
int | The count of queryStringWhitelist.
|
getQueryStringWhitelistList()
public ProtocolStringList getQueryStringWhitelistList()
Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters.
repeated string query_string_whitelist = 52456496;
Returns
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
hasIncludeHost()
public boolean hasIncludeHost()
If true, requests to different hosts will be cached separately.
optional bool include_host = 486867679;
Returns
Type | Description |
boolean | Whether the includeHost field is set.
|
hasIncludeProtocol()
public boolean hasIncludeProtocol()
If true, http and https requests will be cached separately.
optional bool include_protocol = 303507535;
Returns
Type | Description |
boolean | Whether the includeProtocol field is set.
|
hasIncludeQueryString()
public boolean hasIncludeQueryString()
If true, include query string parameters in the cache key according to query_string_whitelist and query_string_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely.
optional bool include_query_string = 474036639;
Returns
Type | Description |
boolean | Whether the includeQueryString field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public CacheKeyPolicy.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected CacheKeyPolicy.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public CacheKeyPolicy.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions