Class: Google::Apis::ComputeBeta::RegexRewrite
- Inherits:
-
Object
- Object
- Google::Apis::ComputeBeta::RegexRewrite
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/compute_beta/classes.rb,
lib/google/apis/compute_beta/representations.rb,
lib/google/apis/compute_beta/representations.rb
Overview
The spec for modifying the path using a regular expression.
Instance Attribute Summary collapse
-
#path_pattern ⇒ String
Required.
-
#path_substitution ⇒ String
Required.
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.
50017 50018 50019 |
# File 'lib/google/apis/compute_beta/classes.rb', line 50017 def initialize(**args) update!(**args) end |
Instance Attribute Details
#path_pattern ⇒ String
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 Corresponds to the JSON property
pathPattern
50008 50009 50010 |
# File 'lib/google/apis/compute_beta/classes.rb', line 50008 def path_pattern @path_pattern end |
#path_substitution ⇒ String
Required. Required when path pattern is specified. Used to rewrite matching
parts of
the path.
Corresponds to the JSON property pathSubstitution
50015 50016 50017 |
# File 'lib/google/apis/compute_beta/classes.rb', line 50015 def path_substitution @path_substitution end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
50022 50023 50024 50025 |
# File 'lib/google/apis/compute_beta/classes.rb', line 50022 def update!(**args) @path_pattern = args[:path_pattern] if args.key?(:path_pattern) @path_substitution = args[:path_substitution] if args.key?(:path_substitution) end |