2.2.3 (latest) 2.1.3 2.0.4 1.3.5 1.2.2 1.1.1 1.0.6 Reference documentation and code samples for the Google Cloud Appengine Admin V1 Client class UrlMap.

URL pattern and description of how the URL should be handled. App Engine can
handle URLs by executing application code or by serving static files
uploaded with the version, such as images, CSS, or JavaScript.

Generated from protobuf message `google.appengine.v1.UrlMap`

## Namespace

Google \\ Cloud \\ AppEngine \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ url_regex` | `string` URL prefix. Uses regular expression syntax, which means regexp special characters must be escaped, but should not contain groupings. All URLs that begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path. |
| `↳ static_files` | `https://docs.cloud.google.com/php/docs/reference/cloud-appengine-admin/latest/V1.StaticFilesHandler` Returns the contents of a file, such as an image, as the response. |
| `↳ script` | `https://docs.cloud.google.com/php/docs/reference/cloud-appengine-admin/latest/V1.ScriptHandler` Executes a script to handle the requests that match this URL pattern. Only the `auto` value is supported for Node.js in the App Engine standard environment, for example `"script": "auto"`. |
| `↳ api_endpoint` | `https://docs.cloud.google.com/php/docs/reference/cloud-appengine-admin/latest/V1.ApiEndpointHandler` Uses API Endpoints to handle requests. |
| `↳ security_level` | `int` Security (HTTPS) enforcement for this URL. |
| `↳ login` | `int` Level of login required to access this resource. Not supported for Node.js in the App Engine standard environment. |
| `↳ auth_fail_action` | `int` Action to take when users access resources that require authentication. Defaults to `redirect`. |
| `↳ redirect_http_response_code` | `int` `30x` code to use when performing redirects for the `secure` field. Defaults to `302`. |

### getUrlRegex

URL prefix. Uses regular expression syntax, which means regexp
special characters must be escaped, but should not contain groupings.

All URLs that begin with this prefix are handled by this handler, using the
portion of the URL after the prefix as part of the file path.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setUrlRegex

URL prefix. Uses regular expression syntax, which means regexp
special characters must be escaped, but should not contain groupings.

All URLs that begin with this prefix are handled by this handler, using the
portion of the URL after the prefix as part of the file path.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getStaticFiles

Returns the contents of a file, such as an image, as the response.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-appengine-admin/latest/V1.StaticFilesHandler|null` |   |

### hasStaticFiles

### setStaticFiles

Returns the contents of a file, such as an image, as the response.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-appengine-admin/latest/V1.StaticFilesHandler` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getScript

Executes a script to handle the requests that match this URL
pattern. Only the `auto` value is supported for Node.js in the
App Engine standard environment, for example `"script": "auto"`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-appengine-admin/latest/V1.ScriptHandler|null` |   |

### hasScript

### setScript

Executes a script to handle the requests that match this URL
pattern. Only the `auto` value is supported for Node.js in the
App Engine standard environment, for example `"script": "auto"`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-appengine-admin/latest/V1.ScriptHandler` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getApiEndpoint

Uses API Endpoints to handle requests.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-appengine-admin/latest/V1.ApiEndpointHandler|null` |   |

### hasApiEndpoint

### setApiEndpoint

Uses API Endpoints to handle requests.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-appengine-admin/latest/V1.ApiEndpointHandler` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSecurityLevel

Security (HTTPS) enforcement for this URL.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [SecurityLevel](https://docs.cloud.google.com/php/docs/reference/cloud-appengine-admin/latest/V1.SecurityLevel). |

### setSecurityLevel

Security (HTTPS) enforcement for this URL.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [SecurityLevel](https://docs.cloud.google.com/php/docs/reference/cloud-appengine-admin/latest/V1.SecurityLevel). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLogin

Level of login required to access this resource. Not supported for Node.js
in the App Engine standard environment.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [LoginRequirement](https://docs.cloud.google.com/php/docs/reference/cloud-appengine-admin/latest/V1.LoginRequirement). |

### setLogin

Level of login required to access this resource. Not supported for Node.js
in the App Engine standard environment.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [LoginRequirement](https://docs.cloud.google.com/php/docs/reference/cloud-appengine-admin/latest/V1.LoginRequirement). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAuthFailAction

Action to take when users access resources that require
authentication. Defaults to `redirect`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [AuthFailAction](https://docs.cloud.google.com/php/docs/reference/cloud-appengine-admin/latest/V1.AuthFailAction). |

### setAuthFailAction

Action to take when users access resources that require
authentication. Defaults to `redirect`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [AuthFailAction](https://docs.cloud.google.com/php/docs/reference/cloud-appengine-admin/latest/V1.AuthFailAction). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRedirectHttpResponseCode

`30x` code to use when performing redirects for the `secure` field.

Defaults to `302`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [RedirectHttpResponseCode](https://docs.cloud.google.com/php/docs/reference/cloud-appengine-admin/latest/V1.UrlMap.RedirectHttpResponseCode). |

### setRedirectHttpResponseCode

`30x` code to use when performing redirects for the `secure` field.

Defaults to `302`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [RedirectHttpResponseCode](https://docs.cloud.google.com/php/docs/reference/cloud-appengine-admin/latest/V1.UrlMap.RedirectHttpResponseCode). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getHandlerType

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |