# TypedValueMetadata

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Messages](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValueMetadata/

Property value metadata namespace.

Metadata stored with a property value by the `...WithPropertyMetadata` and
`...WithMetadata` methods. The server parses `confidence` as a number: when creating an object
with CreateNewObjectWithPropertyMetadata or AddObjectWithFilesWithPropertyMetadata, a value without
`value_metadata`, or with an empty `confidence`, fails with "Type mismatch." Metadata
whose fields are all empty, unset or zero is not stored.

- **Full name:** `MFiles.TypedValueMetadata`
- **Proto file:** [`mfiles/structs.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/structs.proto)

<a id="fields"></a>

## Fields

| Field | Type | Number | Description |
|---|---|---|---|
| <a id="f-set_by"></a>`set_by` | [`PropertySetByType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.PropertySetByType/index.md) | 1 | Who or what set the value. `PROPERTY_SET_BY_TYPE_UNDEFINED` stores nothing for this field. Values: `PROPERTY_SET_BY_TYPE_UNDEFINED` (0), `PROPERTY_SET_BY_TYPE_SYSTEM` (1), `PROPERTY_SET_BY_TYPE_USER` (2), `PROPERTY_SET_BY_TYPE_AI` (3). |
| <a id="f-reason"></a>`reason` | `string` | 2 | Why the value was set, as free text. Optional. |
| <a id="f-confidence"></a>`confidence` | `string` | 3 | The confidence of the value as a decimal number in a string, for example `"0.9"`. Must be a number; send `"0"` when there is none. Zero or less stores no confidence. |
| <a id="f-batch_id"></a>`batch_id` | `string` | 4 | The GUID of the batch process that set the value, in braces. Optional. |

<a id="used-in-fields"></a>

## Used in fields

- [`LookupWithMetadata.value_metadata`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.LookupWithMetadata/index.md#f-value_metadata): The metadata about the typed value.
- [`TypedValueWithMetadata.value_metadata`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValueWithMetadata/index.md#f-value_metadata): The metadata about the typed value. If the value is a Lookup or MSLookup, this data will be in that struct.
