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 HttpRoute.Types.HttpDirectResponse : IMessage<HttpRoute.Types.HttpDirectResponse>, IEquatable<HttpRoute.Types.HttpDirectResponse>, IDeepCloneable<HttpRoute.Types.HttpDirectResponse>, IBufferMessage, IMessage

Reference documentation and code samples for the Network Services v1 API class HttpRoute.Types.HttpDirectResponse.

Static HTTP response object to be returned.

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[HttpRoute](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types)[HttpDirectResponse](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types.HttpDirectResponse), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[HttpRoute](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types)[HttpDirectResponse](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types.HttpDirectResponse), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[HttpRoute](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types)[HttpDirectResponse](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types.HttpDirectResponse), [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

### HttpDirectResponse()

    public HttpDirectResponse()

### HttpDirectResponse(HttpDirectResponse)

    public HttpDirectResponse(HttpRoute.Types.HttpDirectResponse other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoutehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types.HttpDirectResponse` |

## Properties

### BytesBody

    public ByteString BytesBody { get; set; }

Optional. Response body as bytes. Maximum body size is 4096B.

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

### HasBytesBody

    public bool HasBytesBody { get; }

Gets whether the "bytes_body" field is set

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

### HasStringBody

    public bool HasStringBody { get; }

Gets whether the "string_body" field is set

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

### HttpBodyCase

    public HttpRoute.Types.HttpDirectResponse.HttpBodyOneofCase HttpBodyCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoutehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types.HttpDirectResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types.HttpDirectResponse.HttpBodyOneofCase` |   |

### Status

    public int Status { get; set; }

Required. Status to return as part of HTTP Response. Must be a positive
integer.

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

### StringBody

    public string StringBody { get; set; }

Optional. Response body as a string. Maximum body length is 1024
characters.

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