Class CacheInvalidationRule.Builder (1.93.0)

public static final class CacheInvalidationRule.Builder extends GeneratedMessage.Builder<CacheInvalidationRule.Builder> implements CacheInvalidationRuleOrBuilder

Protobuf type google.cloud.compute.v1.CacheInvalidationRule

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllCacheTags(Iterable<String> values)

public CacheInvalidationRule.Builder addAllCacheTags(Iterable<String> values)

A list of cache tags used to identify cached objects.

  • Cache tags are specified when the response is first cached, by setting the Cache-Tag response header at the origin.
  • Multiple cache tags in the same invalidation request are treated as Boolean OR - for example, tag1 OR tag2 OR tag3.
  • If other fields are also specified, these are treated as Boolean AND with any tags.

Up to 10 tags can be specified in a single invalidation request.

repeated string cache_tags = 29073078;

Parameter
Name Description
values Iterable<String>

The cacheTags to add.

Returns
Type Description
CacheInvalidationRule.Builder

This builder for chaining.

addCacheTags(String value)

public CacheInvalidationRule.Builder addCacheTags(String value)

A list of cache tags used to identify cached objects.

  • Cache tags are specified when the response is first cached, by setting the Cache-Tag response header at the origin.
  • Multiple cache tags in the same invalidation request are treated as Boolean OR - for example, tag1 OR tag2 OR tag3.
  • If other fields are also specified, these are treated as Boolean AND with any tags.

Up to 10 tags can be specified in a single invalidation request.

repeated string cache_tags = 29073078;

Parameter
Name Description
value String

The cacheTags to add.

Returns
Type Description
CacheInvalidationRule.Builder

This builder for chaining.

addCacheTagsBytes(ByteString value)

public CacheInvalidationRule.Builder addCacheTagsBytes(ByteString value)

A list of cache tags used to identify cached objects.

  • Cache tags are specified when the response is first cached, by setting the Cache-Tag response header at the origin.
  • Multiple cache tags in the same invalidation request are treated as Boolean OR - for example, tag1 OR tag2 OR tag3.
  • If other fields are also specified, these are treated as Boolean AND with any tags.

Up to 10 tags can be specified in a single invalidation request.

repeated string cache_tags = 29073078;

Parameter
Name Description
value ByteString

The bytes of the cacheTags to add.

Returns
Type Description
CacheInvalidationRule.Builder

This builder for chaining.

build()

public CacheInvalidationRule build()
Returns
Type Description
CacheInvalidationRule

buildPartial()

public CacheInvalidationRule buildPartial()
Returns
Type Description
CacheInvalidationRule

clear()

public CacheInvalidationRule.Builder clear()
Returns
Type Description
CacheInvalidationRule.Builder
Overrides

clearCacheTags()

public CacheInvalidationRule.Builder clearCacheTags()

A list of cache tags used to identify cached objects.

  • Cache tags are specified when the response is first cached, by setting the Cache-Tag response header at the origin.
  • Multiple cache tags in the same invalidation request are treated as Boolean OR - for example, tag1 OR tag2 OR tag3.
  • If other fields are also specified, these are treated as Boolean AND with any tags.

Up to 10 tags can be specified in a single invalidation request.

repeated string cache_tags = 29073078;

Returns
Type Description
CacheInvalidationRule.Builder

This builder for chaining.

clearHost()

public CacheInvalidationRule.Builder clearHost()

If set, this invalidation rule will only apply to requests with a Host header matching host.

optional string host = 3208616;

Returns
Type Description
CacheInvalidationRule.Builder

This builder for chaining.

clearPath()

public CacheInvalidationRule.Builder clearPath()

optional string path = 3433509;

Returns
Type Description
CacheInvalidationRule.Builder

This builder for chaining.

getCacheTags(int index)

public String getCacheTags(int index)

A list of cache tags used to identify cached objects.

  • Cache tags are specified when the response is first cached, by setting the Cache-Tag response header at the origin.
  • Multiple cache tags in the same invalidation request are treated as Boolean OR - for example, tag1 OR tag2 OR tag3.
  • If other fields are also specified, these are treated as Boolean AND with any tags.

Up to 10 tags can be specified in a single invalidation request.

repeated string cache_tags = 29073078;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The cacheTags at the given index.

getCacheTagsBytes(int index)

public ByteString getCacheTagsBytes(int index)

A list of cache tags used to identify cached objects.

  • Cache tags are specified when the response is first cached, by setting the Cache-Tag response header at the origin.
  • Multiple cache tags in the same invalidation request are treated as Boolean OR - for example, tag1 OR tag2 OR tag3.
  • If other fields are also specified, these are treated as Boolean AND with any tags.

Up to 10 tags can be specified in a single invalidation request.

repeated string cache_tags = 29073078;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the cacheTags at the given index.

getCacheTagsCount()

public int getCacheTagsCount()

A list of cache tags used to identify cached objects.

  • Cache tags are specified when the response is first cached, by setting the Cache-Tag response header at the origin.
  • Multiple cache tags in the same invalidation request are treated as Boolean OR - for example, tag1 OR tag2 OR tag3.
  • If other fields are also specified, these are treated as Boolean AND with any tags.

Up to 10 tags can be specified in a single invalidation request.

repeated string cache_tags = 29073078;

Returns
Type Description
int

The count of cacheTags.

getCacheTagsList()

public ProtocolStringList getCacheTagsList()

A list of cache tags used to identify cached objects.

  • Cache tags are specified when the response is first cached, by setting the Cache-Tag response header at the origin.
  • Multiple cache tags in the same invalidation request are treated as Boolean OR - for example, tag1 OR tag2 OR tag3.
  • If other fields are also specified, these are treated as Boolean AND with any tags.

Up to 10 tags can be specified in a single invalidation request.

repeated string cache_tags = 29073078;

Returns
Type Description
ProtocolStringList

A list containing the cacheTags.

getDefaultInstanceForType()

public CacheInvalidationRule getDefaultInstanceForType()
Returns
Type Description
CacheInvalidationRule

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getHost()

public String getHost()

If set, this invalidation rule will only apply to requests with a Host header matching host.

optional string host = 3208616;

Returns
Type Description
String

The host.

getHostBytes()

public ByteString getHostBytes()

If set, this invalidation rule will only apply to requests with a Host header matching host.

optional string host = 3208616;

Returns
Type Description
ByteString

The bytes for host.

getPath()

public String getPath()

optional string path = 3433509;

Returns
Type Description
String

The path.

getPathBytes()

public ByteString getPathBytes()

optional string path = 3433509;

Returns
Type Description
ByteString

The bytes for path.

hasHost()

public boolean hasHost()

If set, this invalidation rule will only apply to requests with a Host header matching host.

optional string host = 3208616;

Returns
Type Description
boolean

Whether the host field is set.

hasPath()

public boolean hasPath()

optional string path = 3433509;

Returns
Type Description
boolean

Whether the path field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CacheInvalidationRule other)

public CacheInvalidationRule.Builder mergeFrom(CacheInvalidationRule other)
Parameter
Name Description
other CacheInvalidationRule
Returns
Type Description
CacheInvalidationRule.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CacheInvalidationRule.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CacheInvalidationRule.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public CacheInvalidationRule.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
CacheInvalidationRule.Builder
Overrides

setCacheTags(int index, String value)

public CacheInvalidationRule.Builder setCacheTags(int index, String value)

A list of cache tags used to identify cached objects.

  • Cache tags are specified when the response is first cached, by setting the Cache-Tag response header at the origin.
  • Multiple cache tags in the same invalidation request are treated as Boolean OR - for example, tag1 OR tag2 OR tag3.
  • If other fields are also specified, these are treated as Boolean AND with any tags.

Up to 10 tags can be specified in a single invalidation request.

repeated string cache_tags = 29073078;

Parameters
Name Description
index int

The index to set the value at.

value String

The cacheTags to set.

Returns
Type Description
CacheInvalidationRule.Builder

This builder for chaining.

setHost(String value)

public CacheInvalidationRule.Builder setHost(String value)

If set, this invalidation rule will only apply to requests with a Host header matching host.

optional string host = 3208616;

Parameter
Name Description
value String

The host to set.

Returns
Type Description
CacheInvalidationRule.Builder

This builder for chaining.

setHostBytes(ByteString value)

public CacheInvalidationRule.Builder setHostBytes(ByteString value)

If set, this invalidation rule will only apply to requests with a Host header matching host.

optional string host = 3208616;

Parameter
Name Description
value ByteString

The bytes for host to set.

Returns
Type Description
CacheInvalidationRule.Builder

This builder for chaining.

setPath(String value)

public CacheInvalidationRule.Builder setPath(String value)

optional string path = 3433509;

Parameter
Name Description
value String

The path to set.

Returns
Type Description
CacheInvalidationRule.Builder

This builder for chaining.

setPathBytes(ByteString value)

public CacheInvalidationRule.Builder setPathBytes(ByteString value)

optional string path = 3433509;

Parameter
Name Description
value ByteString

The bytes for path to set.

Returns
Type Description
CacheInvalidationRule.Builder

This builder for chaining.