Class CacheKeyPolicy (1.8.1)

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
TypeDescription
int

INCLUDE_HTTP_HEADERS_FIELD_NUMBER

public static final int INCLUDE_HTTP_HEADERS_FIELD_NUMBER
Field Value
TypeDescription
int

INCLUDE_NAMED_COOKIES_FIELD_NUMBER

public static final int INCLUDE_NAMED_COOKIES_FIELD_NUMBER
Field Value
TypeDescription
int

INCLUDE_PROTOCOL_FIELD_NUMBER

public static final int INCLUDE_PROTOCOL_FIELD_NUMBER
Field Value
TypeDescription
int

INCLUDE_QUERY_STRING_FIELD_NUMBER

public static final int INCLUDE_QUERY_STRING_FIELD_NUMBER
Field Value
TypeDescription
int

QUERY_STRING_BLACKLIST_FIELD_NUMBER

public static final int QUERY_STRING_BLACKLIST_FIELD_NUMBER
Field Value
TypeDescription
int

QUERY_STRING_WHITELIST_FIELD_NUMBER

public static final int QUERY_STRING_WHITELIST_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static CacheKeyPolicy getDefaultInstance()
Returns
TypeDescription
CacheKeyPolicy

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static CacheKeyPolicy.Builder newBuilder()
Returns
TypeDescription
CacheKeyPolicy.Builder

newBuilder(CacheKeyPolicy prototype)

public static CacheKeyPolicy.Builder newBuilder(CacheKeyPolicy prototype)
Parameter
NameDescription
prototypeCacheKeyPolicy
Returns
TypeDescription
CacheKeyPolicy.Builder

parseDelimitedFrom(InputStream input)

public static CacheKeyPolicy parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CacheKeyPolicy
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CacheKeyPolicy parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CacheKeyPolicy
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static CacheKeyPolicy parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
CacheKeyPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static CacheKeyPolicy parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CacheKeyPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static CacheKeyPolicy parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
CacheKeyPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static CacheKeyPolicy parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CacheKeyPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static CacheKeyPolicy parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
CacheKeyPolicy
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static CacheKeyPolicy parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CacheKeyPolicy
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static CacheKeyPolicy parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CacheKeyPolicy
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CacheKeyPolicy parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CacheKeyPolicy
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static CacheKeyPolicy parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
CacheKeyPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static CacheKeyPolicy parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CacheKeyPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<CacheKeyPolicy> parser()
Returns
TypeDescription
Parser<CacheKeyPolicy>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public CacheKeyPolicy getDefaultInstanceForType()
Returns
TypeDescription
CacheKeyPolicy

getIncludeHost()

public boolean getIncludeHost()

If true, requests to different hosts will be cached separately.

optional bool include_host = 486867679;

Returns
TypeDescription
boolean

The includeHost.

getIncludeHttpHeaders(int index)

public String getIncludeHttpHeaders(int index)

Allows HTTP request headers (by name) to be used in the cache key.

repeated string include_http_headers = 2489606;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The includeHttpHeaders at the given index.

getIncludeHttpHeadersBytes(int index)

public ByteString getIncludeHttpHeadersBytes(int index)

Allows HTTP request headers (by name) to be used in the cache key.

repeated string include_http_headers = 2489606;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the includeHttpHeaders at the given index.

getIncludeHttpHeadersCount()

public int getIncludeHttpHeadersCount()

Allows HTTP request headers (by name) to be used in the cache key.

repeated string include_http_headers = 2489606;

Returns
TypeDescription
int

The count of includeHttpHeaders.

getIncludeHttpHeadersList()

public ProtocolStringList getIncludeHttpHeadersList()

Allows HTTP request headers (by name) to be used in the cache key.

repeated string include_http_headers = 2489606;

Returns
TypeDescription
ProtocolStringList

A list containing the includeHttpHeaders.

getIncludeNamedCookies(int index)

public String getIncludeNamedCookies(int index)

Allows HTTP cookies (by name) to be used in the cache key. The name=value pair will be used in the cache key Cloud CDN generates.

repeated string include_named_cookies = 87316530;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The includeNamedCookies at the given index.

getIncludeNamedCookiesBytes(int index)

public ByteString getIncludeNamedCookiesBytes(int index)

Allows HTTP cookies (by name) to be used in the cache key. The name=value pair will be used in the cache key Cloud CDN generates.

repeated string include_named_cookies = 87316530;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the includeNamedCookies at the given index.

getIncludeNamedCookiesCount()

public int getIncludeNamedCookiesCount()

Allows HTTP cookies (by name) to be used in the cache key. The name=value pair will be used in the cache key Cloud CDN generates.

repeated string include_named_cookies = 87316530;

Returns
TypeDescription
int

The count of includeNamedCookies.

getIncludeNamedCookiesList()

public ProtocolStringList getIncludeNamedCookiesList()

Allows HTTP cookies (by name) to be used in the cache key. The name=value pair will be used in the cache key Cloud CDN generates.

repeated string include_named_cookies = 87316530;

Returns
TypeDescription
ProtocolStringList

A list containing the includeNamedCookies.

getIncludeProtocol()

public boolean getIncludeProtocol()

If true, http and https requests will be cached separately.

optional bool include_protocol = 303507535;

Returns
TypeDescription
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
TypeDescription
boolean

The includeQueryString.

getParserForType()

public Parser<CacheKeyPolicy> getParserForType()
Returns
TypeDescription
Parser<CacheKeyPolicy>
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ProtocolStringList

A list containing the queryStringBlacklist.

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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ProtocolStringList

A list containing the queryStringWhitelist.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasIncludeHost()

public boolean hasIncludeHost()

If true, requests to different hosts will be cached separately.

optional bool include_host = 486867679;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the includeQueryString field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public CacheKeyPolicy.Builder newBuilderForType()
Returns
TypeDescription
CacheKeyPolicy.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected CacheKeyPolicy.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
CacheKeyPolicy.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public CacheKeyPolicy.Builder toBuilder()
Returns
TypeDescription
CacheKeyPolicy.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException