#include <path_matcher.h>
A matcher for the path portion of the URL. The BackendService from the longest-matched rule will serve the URL. If no rule was matched, the default service will be used.
◆ PathMatcher() [1/2]
google_compute_api::PathMatcher::PathMatcher |
( |
const Json::Value & |
storage | ) |
|
|
explicit |
Standard constructor for an immutable data object instance.
- Parameters
-
[in] | storage | The underlying data storage for this instance. |
◆ PathMatcher() [2/2]
google_compute_api::PathMatcher::PathMatcher |
( |
Json::Value * |
storage | ) |
|
|
explicit |
Standard constructor for a mutable data object instance.
- Parameters
-
[in] | storage | The underlying data storage for this instance. |
◆ ~PathMatcher()
google_compute_api::PathMatcher::~PathMatcher |
( |
| ) |
|
|
virtual |
◆ clear_default_service()
void google_compute_api::PathMatcher::clear_default_service |
( |
| ) |
|
|
inline |
Clears the 'defaultService
' attribute.
◆ clear_description()
void google_compute_api::PathMatcher::clear_description |
( |
| ) |
|
|
inline |
Clears the 'description
' attribute.
◆ clear_name()
void google_compute_api::PathMatcher::clear_name |
( |
| ) |
|
|
inline |
Clears the 'name
' attribute.
◆ clear_path_rules()
void google_compute_api::PathMatcher::clear_path_rules |
( |
| ) |
|
|
inline |
Clears the 'pathRules
' attribute.
◆ get_default_service()
const StringPiece google_compute_api::PathMatcher::get_default_service |
( |
| ) |
const |
|
inline |
Get the value of the 'defaultService
' attribute.
◆ get_description()
const StringPiece google_compute_api::PathMatcher::get_description |
( |
| ) |
const |
|
inline |
Get the value of the 'description
' attribute.
◆ get_name()
const StringPiece google_compute_api::PathMatcher::get_name |
( |
| ) |
const |
|
inline |
Get the value of the 'name
' attribute.
◆ get_path_rules()
const client::JsonCppArray<PathRule > google_compute_api::PathMatcher::get_path_rules |
( |
| ) |
const |
Get a reference to the value of the 'pathRules
' attribute.
◆ GetTypeName()
const StringPiece google_compute_api::PathMatcher::GetTypeName |
( |
| ) |
const |
|
inline |
◆ has_default_service()
bool google_compute_api::PathMatcher::has_default_service |
( |
| ) |
const |
|
inline |
Determine if the 'defaultService
' attribute was set.
- Returns
- true if the '
defaultService
' attribute was set.
◆ has_description()
bool google_compute_api::PathMatcher::has_description |
( |
| ) |
const |
|
inline |
Determine if the 'description
' attribute was set.
- Returns
- true if the '
description
' attribute was set.
◆ has_name()
bool google_compute_api::PathMatcher::has_name |
( |
| ) |
const |
|
inline |
Determine if the 'name
' attribute was set.
- Returns
- true if the '
name
' attribute was set.
◆ has_path_rules()
bool google_compute_api::PathMatcher::has_path_rules |
( |
| ) |
const |
|
inline |
Determine if the 'pathRules
' attribute was set.
- Returns
- true if the '
pathRules
' attribute was set.
◆ mutable_pathRules()
client::JsonCppArray<PathRule > google_compute_api::PathMatcher::mutable_pathRules |
( |
| ) |
|
Gets a reference to a mutable value of the 'pathRules
' property.
The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis. For example: a pathRule with a path /a/b/c will match before /a/b irrespective of the order in which those paths appear in this list. Only one of pathRules or routeRules must be set.
- Returns
- The result can be modified to change the attribute value.
◆ New()
Creates a new default instance.
- Returns
- Ownership is passed back to the caller.
◆ set_default_service()
void google_compute_api::PathMatcher::set_default_service |
( |
const StringPiece & |
value | ) |
|
|
inline |
Change the 'defaultService
' attribute.
The full or partial URL to the BackendService resource. This will be used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource:
- https://www.googleapis.com/compute/v1/projects/project/global/backendServ ices/backendService
- compute/v1/projects/project/global/backendServices/backendService
- global/backendServices/backendService If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
- compute.backendBuckets.use
- compute.backendServices.use.
- Parameters
-
◆ set_description()
void google_compute_api::PathMatcher::set_description |
( |
const StringPiece & |
value | ) |
|
|
inline |
Change the 'description
' attribute.
An optional description of this resource. Provide this property when you create the resource.
- Parameters
-
◆ set_name()
void google_compute_api::PathMatcher::set_name |
( |
const StringPiece & |
value | ) |
|
|
inline |
Change the 'name
' attribute.
The name to which this PathMatcher is referred by the HostRule.
- Parameters
-
The documentation for this class was generated from the following files: