Class RegexRewrite.Builder (1.109.0)

public static final class RegexRewrite.Builder extends GeneratedMessage.Builder<RegexRewrite.Builder> implements RegexRewriteOrBuilder

The spec for modifying the path using a regular expression.

Protobuf type google.cloud.compute.v1.RegexRewrite

Static Methods

getDescriptor()

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

Methods

build()

public RegexRewrite build()
Returns
Type Description
RegexRewrite

buildPartial()

public RegexRewrite buildPartial()
Returns
Type Description
RegexRewrite

clear()

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

clearPathPattern()

public RegexRewrite.Builder clearPathPattern()

Required. The regular expression used to match against the URL path. It uses RE2 syntax with the following constraints:

  • Any single character operators
  • Groups are allowed to have only submatch operator inside
  • Groups are allowed only without any char repetition, e.g. .*
  • Any char repetition, e.g. .*, is only allowed to be used in a single regex together with:

  • Empty string operators

  • Other repetitions
  • Ranges
  • Repetitions of ranges

  • Ranges are only allowed to have:

  • Character range

  • Digits range
  • Symbols listed in characters allowed for ranges

optional string path_pattern = 316473718;

Returns
Type Description
RegexRewrite.Builder

This builder for chaining.

clearPathSubstitution()

public RegexRewrite.Builder clearPathSubstitution()

Required. Required when path pattern is specified. Used to rewrite matching parts of the path.

optional string path_substitution = 268020951;

Returns
Type Description
RegexRewrite.Builder

This builder for chaining.

getDefaultInstanceForType()

public RegexRewrite getDefaultInstanceForType()
Returns
Type Description
RegexRewrite

getDescriptorForType()

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

getPathPattern()

public String getPathPattern()

Required. The regular expression used to match against the URL path. It uses RE2 syntax with the following constraints:

  • Any single character operators
  • Groups are allowed to have only submatch operator inside
  • Groups are allowed only without any char repetition, e.g. .*
  • Any char repetition, e.g. .*, is only allowed to be used in a single regex together with:

  • Empty string operators

  • Other repetitions
  • Ranges
  • Repetitions of ranges

  • Ranges are only allowed to have:

  • Character range

  • Digits range
  • Symbols listed in characters allowed for ranges

optional string path_pattern = 316473718;

Returns
Type Description
String

The pathPattern.

getPathPatternBytes()

public ByteString getPathPatternBytes()

Required. The regular expression used to match against the URL path. It uses RE2 syntax with the following constraints:

  • Any single character operators
  • Groups are allowed to have only submatch operator inside
  • Groups are allowed only without any char repetition, e.g. .*
  • Any char repetition, e.g. .*, is only allowed to be used in a single regex together with:

  • Empty string operators

  • Other repetitions
  • Ranges
  • Repetitions of ranges

  • Ranges are only allowed to have:

  • Character range

  • Digits range
  • Symbols listed in characters allowed for ranges

optional string path_pattern = 316473718;

Returns
Type Description
ByteString

The bytes for pathPattern.

getPathSubstitution()

public String getPathSubstitution()

Required. Required when path pattern is specified. Used to rewrite matching parts of the path.

optional string path_substitution = 268020951;

Returns
Type Description
String

The pathSubstitution.

getPathSubstitutionBytes()

public ByteString getPathSubstitutionBytes()

Required. Required when path pattern is specified. Used to rewrite matching parts of the path.

optional string path_substitution = 268020951;

Returns
Type Description
ByteString

The bytes for pathSubstitution.

hasPathPattern()

public boolean hasPathPattern()

Required. The regular expression used to match against the URL path. It uses RE2 syntax with the following constraints:

  • Any single character operators
  • Groups are allowed to have only submatch operator inside
  • Groups are allowed only without any char repetition, e.g. .*
  • Any char repetition, e.g. .*, is only allowed to be used in a single regex together with:

  • Empty string operators

  • Other repetitions
  • Ranges
  • Repetitions of ranges

  • Ranges are only allowed to have:

  • Character range

  • Digits range
  • Symbols listed in characters allowed for ranges

optional string path_pattern = 316473718;

Returns
Type Description
boolean

Whether the pathPattern field is set.

hasPathSubstitution()

public boolean hasPathSubstitution()

Required. Required when path pattern is specified. Used to rewrite matching parts of the path.

optional string path_substitution = 268020951;

Returns
Type Description
boolean

Whether the pathSubstitution field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(RegexRewrite other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setPathPattern(String value)

public RegexRewrite.Builder setPathPattern(String value)

Required. The regular expression used to match against the URL path. It uses RE2 syntax with the following constraints:

  • Any single character operators
  • Groups are allowed to have only submatch operator inside
  • Groups are allowed only without any char repetition, e.g. .*
  • Any char repetition, e.g. .*, is only allowed to be used in a single regex together with:

  • Empty string operators

  • Other repetitions
  • Ranges
  • Repetitions of ranges

  • Ranges are only allowed to have:

  • Character range

  • Digits range
  • Symbols listed in characters allowed for ranges

optional string path_pattern = 316473718;

Parameter
Name Description
value String

The pathPattern to set.

Returns
Type Description
RegexRewrite.Builder

This builder for chaining.

setPathPatternBytes(ByteString value)

public RegexRewrite.Builder setPathPatternBytes(ByteString value)

Required. The regular expression used to match against the URL path. It uses RE2 syntax with the following constraints:

  • Any single character operators
  • Groups are allowed to have only submatch operator inside
  • Groups are allowed only without any char repetition, e.g. .*
  • Any char repetition, e.g. .*, is only allowed to be used in a single regex together with:

  • Empty string operators

  • Other repetitions
  • Ranges
  • Repetitions of ranges

  • Ranges are only allowed to have:

  • Character range

  • Digits range
  • Symbols listed in characters allowed for ranges

optional string path_pattern = 316473718;

Parameter
Name Description
value ByteString

The bytes for pathPattern to set.

Returns
Type Description
RegexRewrite.Builder

This builder for chaining.

setPathSubstitution(String value)

public RegexRewrite.Builder setPathSubstitution(String value)

Required. Required when path pattern is specified. Used to rewrite matching parts of the path.

optional string path_substitution = 268020951;

Parameter
Name Description
value String

The pathSubstitution to set.

Returns
Type Description
RegexRewrite.Builder

This builder for chaining.

setPathSubstitutionBytes(ByteString value)

public RegexRewrite.Builder setPathSubstitutionBytes(ByteString value)

Required. Required when path pattern is specified. Used to rewrite matching parts of the path.

optional string path_substitution = 268020951;

Parameter
Name Description
value ByteString

The bytes for pathSubstitution to set.

Returns
Type Description
RegexRewrite.Builder

This builder for chaining.