2.3.1 (latest) 2.1.3 2.0.4 1.3.5 1.2.2 1.1.1 1.0.5 Reference documentation and code samples for the Google Cloud Api Gateway V1 Client class Gateway.

A Gateway is an API-aware HTTP proxy. It performs API-Method and/or
API-Consumer specific actions based on an API Config such as authentication,
policy enforcement, and backend selection.

Generated from protobuf message `google.cloud.apigateway.v1.Gateway`

## Namespace

Google \\ Cloud \\ ApiGateway \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. Resource name of the Gateway. Format: projects/{project}/locations/{location}/gateways/{gateway} |
| `↳ create_time` | `Google\Protobuf\Timestamp` Output only. Created time. |
| `↳ update_time` | `Google\Protobuf\Timestamp` Output only. Updated time. |
| `↳ labels` | `array|Google\Protobuf\Internal\MapField` Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. <https://cloud.google.com/compute/docs/labeling-resources> |
| `↳ display_name` | `string` Optional. Display name. |
| `↳ api_config` | `string` Required. Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig} |
| `↳ state` | `int` Output only. The current state of the Gateway. |
| `↳ default_hostname` | `string` Output only. The default hostname that serves traffic for this Gateway. |
| `↳ streaming_mode` | `int` Optional. Immutable. Requests streaming for a new gateway. An attempt to change it on update is rejected. If unset, the service selects the mode. This field records only what was requested and is never modified by the service; read `effective_streaming_mode` for the mode the gateway is served with. |
| `↳ effective_streaming_mode` | `int` Output only. The streaming mode this gateway is actually served with, which the service resolves at creation from `streaming_mode`, the referenced API Config, and the platform default at the time. Read this rather than `streaming_mode` to determine whether a gateway supports streaming. |

### getName

Output only. Resource name of the Gateway.

Format: projects/{project}/locations/{location}/gateways/{gateway}

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

### setName

Output only. Resource name of the Gateway.

Format: projects/{project}/locations/{location}/gateways/{gateway}

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

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

### getCreateTime

Output only. Created time.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. Created time.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

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

### getUpdateTime

Output only. Updated time.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. Updated time.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

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

### getLabels

Optional. Resource labels to represent user-provided metadata.

Refer to cloud documentation on labels for more details.
<https://cloud.google.com/compute/docs/labeling-resources>

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Internal\MapField` |   |

### setLabels

Optional. Resource labels to represent user-provided metadata.

Refer to cloud documentation on labels for more details.
<https://cloud.google.com/compute/docs/labeling-resources>

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|Google\Protobuf\Internal\MapField` |

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

### getDisplayName

Optional. Display name.

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

### setDisplayName

Optional. Display name.

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

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

### getApiConfig

Required. Resource name of the API Config for this Gateway.

Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}

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

### setApiConfig

Required. Resource name of the API Config for this Gateway.

Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}

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

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

### getState

Output only. The current state of the Gateway.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-api-gateway/latest/V1.Gateway.State). |

### setState

Output only. The current state of the Gateway.

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

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

### getDefaultHostname

Output only. The default hostname that serves traffic for this Gateway.

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

### setDefaultHostname

Output only. The default hostname that serves traffic for this Gateway.

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

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

### getStreamingMode

Optional. Immutable. Requests streaming for a new gateway. An attempt to
change it on update is rejected. If unset, the service selects the mode.

This field records only what was requested and is never modified by the
service; read `effective_streaming_mode` for the mode the gateway is served
with.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [StreamingMode](https://docs.cloud.google.com/php/docs/reference/cloud-api-gateway/latest/V1.Gateway.StreamingMode). |

### setStreamingMode

Optional. Immutable. Requests streaming for a new gateway. An attempt to
change it on update is rejected. If unset, the service selects the mode.

This field records only what was requested and is never modified by the
service; read `effective_streaming_mode` for the mode the gateway is served
with.

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

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

### getEffectiveStreamingMode

Output only. The streaming mode this gateway is actually served with, which
the service resolves at creation from `streaming_mode`, the referenced API
Config, and the platform default at the time. Read this rather than
`streaming_mode` to determine whether a gateway supports streaming.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [EffectiveStreamingMode](https://docs.cloud.google.com/php/docs/reference/cloud-api-gateway/latest/V1.Gateway.EffectiveStreamingMode). |

### setEffectiveStreamingMode

Output only. The streaming mode this gateway is actually served with, which
the service resolves at creation from `streaming_mode`, the referenced API
Config, and the platform default at the time. Read this rather than
`streaming_mode` to determine whether a gateway supports streaming.

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

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