1.7.0 (latest) 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

    public sealed class Gateway : IMessage<Gateway>, IEquatable<Gateway>, IDeepCloneable<Gateway>, IBufferMessage, IMessage

Reference documentation and code samples for the Network Services v1 API class Gateway.

Gateway represents the configuration for a proxy, typically a load balancer.
It captures the ip:port over which the services are exposed by the proxy,
along with any policy configurations. Routes have reference to to Gateways to
dictate how requests should be routed by this Gateway.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> Gateway

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Gateway](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.Gateway), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Gateway](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.Gateway), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Gateway](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.Gateway), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.NetworkServices.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1)

## Assembly

Google.Cloud.NetworkServices.V1.dll

## Constructors

### Gateway()

    public Gateway()

### Gateway(Gateway)

    public Gateway(Gateway other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.Gateway` |

## Properties

### Addresses

    public RepeatedField<string> Addresses { get; }

Optional. Zero or one IPv4 or IPv6 address on which the Gateway will
receive the traffic. When no address is provided, an IP from the subnetwork
is allocated

This field only applies to gateways of type 'SECURE_WEB_GATEWAY'.
Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### AddressesAsAddressNames

    public ResourceNameList<AddressName> AddressesAsAddressNames { get; }

[AddressName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.AddressName)-typed view over the [Addresses](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.Gateway#Google_Cloud_NetworkServices_V1_Gateway_Addresses) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNameList-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.AddressName` |   |

### AllPorts

    public bool AllPorts { get; set; }

Optional. If true, the Gateway will listen on all ports. This is mutually
exclusive with the `ports` field. This field only applies to gateways of
type 'SECURE_WEB_GATEWAY'.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### AllowGlobalAccess

    public bool AllowGlobalAccess { get; set; }

Optional. If true, the gateway will allow traffic from clients outside of
the region where the gateway is located.
This field is configurable only for gateways of type SECURE_WEB_GATEWAY.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### CertificateUrls

    public RepeatedField<string> CertificateUrls { get; }

Optional. A fully-qualified Certificates URL reference. The proxy presents
a Certificate (selected based on SNI) when establishing a TLS connection.
This feature only applies to gateways of type 'SECURE_WEB_GATEWAY'.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### CertificateUrlsAsCertificateNames

    public ResourceNameList<CertificateName> CertificateUrlsAsCertificateNames { get; }

[CertificateName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.CertificateName)-typed view over the [CertificateUrls](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.Gateway#Google_Cloud_NetworkServices_V1_Gateway_CertificateUrls) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNameList-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.CertificateName` |   |

### CreateTime

    public Timestamp CreateTime { get; set; }

Output only. The timestamp when the resource was created.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### Description

    public string Description { get; set; }

Optional. A free-text description of the resource. Max length 1024
characters.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### EnvoyHeaders

    public EnvoyHeaders EnvoyHeaders { get; set; }

Optional. Determines if envoy will insert internal debug headers into
upstream requests. Other Envoy headers may still be injected. By default,
envoy will not insert any debug headers.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EnvoyHeaders` |   |

### GatewayName

    public GatewayName GatewayName { get; set; }

[GatewayName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.GatewayName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.Gateway#Google_Cloud_NetworkServices_V1_Gateway_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.GatewayName` |   |

### GatewaySecurityPolicy

    public string GatewaySecurityPolicy { get; set; }

Optional. A fully-qualified GatewaySecurityPolicy URL reference.
Defines how a server should apply security policy to inbound
(VM to Proxy) initiated connections.

For example:
`projects/*/locations/*/gatewaySecurityPolicies/swg-policy`.

This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### GatewaySecurityPolicyAsGatewaySecurityPolicyName

    public GatewaySecurityPolicyName GatewaySecurityPolicyAsGatewaySecurityPolicyName { get; set; }

[GatewaySecurityPolicyName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.GatewaySecurityPolicyName)-typed view over the [GatewaySecurityPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.Gateway#Google_Cloud_NetworkServices_V1_Gateway_GatewaySecurityPolicy) resource
name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.GatewaySecurityPolicyName` |   |

### HasEnvoyHeaders

    public bool HasEnvoyHeaders { get; }

Gets whether the "envoy_headers" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### IpVersion

    public Gateway.Types.IpVersion IpVersion { get; set; }

Optional. The IP Version that will be used by this gateway. Valid options
are IPV4 or IPV6. Default is IPV4.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.Gatewayhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.Gateway.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.Gateway.Types.IpVersion` |   |

### Labels

    public MapField<string, string> Labels { get; }

Optional. Set of label tags associated with the Gateway resource.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.MapField-2.htmlhttps://learn.microsoft.com/dotnet/api/system.stringhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### Name

    public string Name { get; set; }

Identifier. Name of the Gateway resource. It matches pattern
`projects/*/locations/*/gateways/<gateway_name>`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Network

    public string Network { get; set; }

Optional. The relative resource name identifying the VPC network that is
using this configuration. For example:
`projects/*/global/networks/network-1`.

Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY'.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### NetworkAsNetworkName

    public NetworkName NetworkAsNetworkName { get; set; }

[NetworkName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.NetworkName)-typed view over the [Network](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.Gateway#Google_Cloud_NetworkServices_V1_Gateway_Network) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.NetworkName` |   |

### Ports

    public RepeatedField<int> Ports { get; }

Required. One or more port numbers (1-65535), on which the Gateway will
receive traffic. The proxy binds to the specified ports.
Gateways of type 'SECURE_WEB_GATEWAY' are limited to 5 ports.
Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and
support multiple ports.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://learn.microsoft.com/dotnet/api/system.int32` |   |

### RoutingMode

    public Gateway.Types.RoutingMode RoutingMode { get; set; }

Optional. The routing mode of the Gateway.
This field is configurable only for gateways of type SECURE_WEB_GATEWAY.
This field is required for gateways of type SECURE_WEB_GATEWAY.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.Gatewayhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.Gateway.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.Gateway.Types.RoutingMode` |   |

### Scope

    public string Scope { get; set; }

Optional. Scope determines how configuration across multiple Gateway
instances are merged. The configuration for multiple Gateway instances with
the same scope will be merged as presented as a single configuration to the
proxy/load balancer.

Max length 64 characters.
Scope should start with a letter and can only have letters, numbers,
hyphens.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### SelfLink

    public string SelfLink { get; set; }

Output only. Server-defined URL of this resource

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ServerTlsPolicy

    public string ServerTlsPolicy { get; set; }

Optional. A fully-qualified ServerTLSPolicy URL reference. Specifies how
TLS traffic is terminated. If empty, TLS termination is disabled.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ServerTlsPolicyAsServerTlsPolicyName

    public ServerTlsPolicyName ServerTlsPolicyAsServerTlsPolicyName { get; set; }

[ServerTlsPolicyName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.ServerTlsPolicyName)-typed view over the [ServerTlsPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.Gateway#Google_Cloud_NetworkServices_V1_Gateway_ServerTlsPolicy) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.ServerTlsPolicyName` |   |

### Subnetwork

    public string Subnetwork { get; set; }

Optional. The relative resource name identifying the subnetwork in which
this SWG is allocated. For example:
`projects/*/regions/us-central1/subnetworks/network-1`

Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY".

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### SubnetworkAsSubnetworkName

    public SubnetworkName SubnetworkAsSubnetworkName { get; set; }

[SubnetworkName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.SubnetworkName)-typed view over the [Subnetwork](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.Gateway#Google_Cloud_NetworkServices_V1_Gateway_Subnetwork) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.SubnetworkName` |   |

### Type

    public Gateway.Types.Type Type { get; set; }

Immutable. The type of the customer managed gateway.
This field is required. If unspecified, an error is returned.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.Gatewayhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.Gateway.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.Gateway.Types.Type` |   |

### UpdateTime

    public Timestamp UpdateTime { get; set; }

Output only. The timestamp when the resource was updated.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |