0.10.0 (latest) 0.9.0 0.8.4 0.7.0 0.6.0 0.5.3 0.4.0 0.3.1 0.2.0 0.1.0

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Cloud Model Armor V1beta Client class TemplateMetadata.

Message describing TemplateMetadata

Generated from protobuf message `google.cloud.modelarmor.v1beta.Template.TemplateMetadata`

## Namespace

Google \\ Cloud \\ ModelArmor \\ V1beta \\ Template

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ ignore_partial_invocation_failures` | `bool` Optional. If true, partial detector failures should be ignored. |
| `↳ custom_prompt_safety_error_code` | `int` Optional. Indicates the custom error code set by the user to be returned to the end user by the service extension if the prompt trips Model Armor filters. |
| `↳ custom_prompt_safety_error_message` | `string` Optional. Indicates the custom error message set by the user to be returned to the end user if the prompt trips Model Armor filters. |
| `↳ custom_llm_response_safety_error_code` | `int` Optional. Indicates the custom error code set by the user to be returned to the end user if the LLM response trips Model Armor filters. |
| `↳ custom_llm_response_safety_error_message` | `string` Optional. Indicates the custom error message set by the user to be returned to the end user if the LLM response trips Model Armor filters. |
| `↳ log_template_operations` | `bool` Optional. If true, log template crud operations. |
| `↳ log_sanitize_operations` | `bool` Optional. If true, log sanitize operations. |
| `↳ enforcement_type` | `int` Optional. Enforcement type for Model Armor filters. |
| `↳ multi_language_detection` | `https://docs.cloud.google.com/php/docs/reference/cloud-modelarmor/latest/V1beta.Template.TemplateMetadata.MultiLanguageDetection` Optional. Metadata for multi language detection. |

### getIgnorePartialInvocationFailures

Optional. If true, partial detector failures should be ignored.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setIgnorePartialInvocationFailures

Optional. If true, partial detector failures should be ignored.

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

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

### getCustomPromptSafetyErrorCode

Optional. Indicates the custom error code set by the user to be returned
to the end user by the service extension if the prompt trips Model Armor
filters.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setCustomPromptSafetyErrorCode

Optional. Indicates the custom error code set by the user to be returned
to the end user by the service extension if the prompt trips Model Armor
filters.

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

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

### getCustomPromptSafetyErrorMessage

Optional. Indicates the custom error message set by the user to be
returned to the end user if the prompt trips Model Armor filters.

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

### setCustomPromptSafetyErrorMessage

Optional. Indicates the custom error message set by the user to be
returned to the end user if the prompt trips Model Armor filters.

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

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

### getCustomLlmResponseSafetyErrorCode

Optional. Indicates the custom error code set by the user to be returned
to the end user if the LLM response trips Model Armor filters.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setCustomLlmResponseSafetyErrorCode

Optional. Indicates the custom error code set by the user to be returned
to the end user if the LLM response trips Model Armor filters.

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

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

### getCustomLlmResponseSafetyErrorMessage

Optional. Indicates the custom error message set by the user to be
returned to the end user if the LLM response trips Model Armor filters.

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

### setCustomLlmResponseSafetyErrorMessage

Optional. Indicates the custom error message set by the user to be
returned to the end user if the LLM response trips Model Armor filters.

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

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

### getLogTemplateOperations

Optional. If true, log template crud operations.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setLogTemplateOperations

Optional. If true, log template crud operations.

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

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

### getLogSanitizeOperations

Optional. If true, log sanitize operations.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setLogSanitizeOperations

Optional. If true, log sanitize operations.

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

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

### getEnforcementType

Optional. Enforcement type for Model Armor filters.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [EnforcementType](https://docs.cloud.google.com/php/docs/reference/cloud-modelarmor/latest/V1beta.Template.TemplateMetadata.EnforcementType). |

### setEnforcementType

Optional. Enforcement type for Model Armor filters.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [EnforcementType](https://docs.cloud.google.com/php/docs/reference/cloud-modelarmor/latest/V1beta.Template.TemplateMetadata.EnforcementType). |

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

### getMultiLanguageDetection

Optional. Metadata for multi language detection.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-modelarmor/latest/V1beta.Template.TemplateMetadata.MultiLanguageDetection|null` |   |

### hasMultiLanguageDetection

### clearMultiLanguageDetection

### setMultiLanguageDetection

Optional. Metadata for multi language detection.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-modelarmor/latest/V1beta.Template.TemplateMetadata.MultiLanguageDetection` |

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