# Google Cloud Translation v3 API - Class DetectLanguageRequest (3.11.0)

3.11.0 (latest) 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.4.0 2.3.0 2.2.0

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

Reference documentation and code samples for the Google Cloud Translation v3 API class DetectLanguageRequest.

The request message for language detection.

## Inheritance

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

## Implements

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

## Assembly

Google.Cloud.Translate.V3.dll

## Constructors

### DetectLanguageRequest()

    public DetectLanguageRequest()

### DetectLanguageRequest(DetectLanguageRequest)

    public DetectLanguageRequest(DetectLanguageRequest other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Translate.V3/latest/Google.Cloud.Translate.V3.DetectLanguageRequest` |

## Properties

### Content

    public string Content { get; set; }

The content of the input stored as a string.

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

### HasContent

    public bool HasContent { get; }

Gets whether the "content" field is set

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

### Labels

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

Optional. The labels with user-defined metadata for the request.

Label keys and values can be no longer than 63 characters
(Unicode codepoints), can only contain lowercase letters, numeric
characters, underscores and dashes. International characters are allowed.
Label values are optional. Label keys must start with a letter.

See <https://cloud.google.com/translate/docs/advanced/labels> for more
information.

| **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` |   |

### MimeType

    public string MimeType { get; set; }

Optional. The format of the source text, for example, "text/html",
"text/plain". If left blank, the MIME type defaults to "text/html".

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

### Model

    public string Model { get; set; }

Optional. The language detection model to be used.

Format:
`projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}`

Only one language detection model is currently supported:
`projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`.

If not specified, the default model is used.

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

### Parent

    public string Parent { get; set; }

Required. Project or location to make a call. Must refer to a caller's
project.

Format: `projects/{project-number-or-id}/locations/{location-id}` or
`projects/{project-number-or-id}`.

For global calls, use `projects/{project-number-or-id}/locations/global` or
`projects/{project-number-or-id}`.

Only models within the same region (has same location-id) can be used.
Otherwise an INVALID_ARGUMENT (400) error is returned.

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

### ParentAsLocationName

    public LocationName ParentAsLocationName { get; set; }

[LocationName](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html)-typed view over the [Parent](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Translate.V3/latest/Google.Cloud.Translate.V3.DetectLanguageRequest#Google_Cloud_Translate_V3_DetectLanguageRequest_Parent) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` |   |

### SourceCase

    public DetectLanguageRequest.SourceOneofCase SourceCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Translate.V3/latest/Google.Cloud.Translate.V3.DetectLanguageRequesthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Translate.V3/latest/Google.Cloud.Translate.V3.DetectLanguageRequest.SourceOneofCase` |   |