Class: Google::Apis::ComputeAlpha::RegexRewrite
- Inherits:
-
Object
- Object
- Google::Apis::ComputeAlpha::RegexRewrite
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/compute_alpha/classes.rb,
lib/google/apis/compute_alpha/representations.rb,
lib/google/apis/compute_alpha/representations.rb
Overview
The spec for modifying the path using a regular expression.
Instance Attribute Summary collapse
-
#path_pattern ⇒ String
The regular expression used to match against the URL path.
-
#path_substitution ⇒ String
Required when path pattern is specified.
Instance Method Summary collapse
-
#initialize(**args) ⇒ RegexRewrite
constructor
A new instance of RegexRewrite.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ RegexRewrite
Returns a new instance of RegexRewrite.
55869 55870 55871 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 55869 def initialize(**args) update!(**args) end |
Instance Attribute Details
#path_pattern ⇒ String
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 Corresponds to the JSON property
pathPattern
55861 55862 55863 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 55861 def path_pattern @path_pattern end |
#path_substitution ⇒ String
Required when path pattern is specified. Used to rewrite matching parts of
the path.
Corresponds to the JSON property pathSubstitution
55867 55868 55869 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 55867 def path_substitution @path_substitution end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
55874 55875 55876 55877 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 55874 def update!(**args) @path_pattern = args[:path_pattern] if args.key?(:path_pattern) @path_substitution = args[:path_substitution] if args.key?(:path_substitution) end |