# Google Cloud Text-to-Speech v1 API - Class AdvancedVoiceOptions.Types.SafetySetting (3.18.0)

3.18.0 (latest) 3.17.0 3.16.0 3.15.0 3.14.0 3.13.0 3.12.0 3.11.0 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.5.0 2.4.0 2.3.0 2.2.0

    public sealed class AdvancedVoiceOptions.Types.SafetySetting : IMessage<AdvancedVoiceOptions.Types.SafetySetting>, IEquatable<AdvancedVoiceOptions.Types.SafetySetting>, IDeepCloneable<AdvancedVoiceOptions.Types.SafetySetting>, IBufferMessage, IMessage

Reference documentation and code samples for the Google Cloud Text-to-Speech v1 API class AdvancedVoiceOptions.Types.SafetySetting.

Safety setting for a single harm category.

## Inheritance

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

## Implements

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

## Assembly

Google.Cloud.TextToSpeech.V1.dll

## Constructors

### SafetySetting()

    public SafetySetting()

### SafetySetting(SafetySetting)

    public SafetySetting(AdvancedVoiceOptions.Types.SafetySetting other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.AdvancedVoiceOptionshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.AdvancedVoiceOptions.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.AdvancedVoiceOptions.Types.SafetySetting` |

## Properties

### Category

    public AdvancedVoiceOptions.Types.HarmCategory Category { get; set; }

The harm category to apply the safety setting to.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.AdvancedVoiceOptionshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.AdvancedVoiceOptions.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.AdvancedVoiceOptions.Types.HarmCategory` |   |

### Threshold

    public AdvancedVoiceOptions.Types.HarmBlockThreshold Threshold { get; set; }

The harm block threshold for the safety setting.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.AdvancedVoiceOptionshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.AdvancedVoiceOptions.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.TextToSpeech.V1/latest/Google.Cloud.TextToSpeech.V1.AdvancedVoiceOptions.Types.HarmBlockThreshold` |   |