# MetadataStructureSelector

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.MetadataStructureSelector/

Struct for a selecting out a metadata item or group of metadata itmes.

- **Full name:** `MFiles.MetadataStructureSelector`
- **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-name"></a>`name` | `string` | 1 | A friendly name for the selector. May be used to display the reasoning for the metadata structure item selection for a human (may be included in the preview xml). |
| <a id="f-id"></a>`id` | `string` | 2 | Optional identificator for the selector. May be used to indicate the reasoning for the metadata structure item selection for a computer (may be included in the preview xml). |
| <a id="f-item_type"></a>`item_type` | [`MetadataStructureItem`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.MetadataStructureItem/index.md) | 3 | Metadata structure item type to select. |
| <a id="f-item_guid"></a>`item_guid` | `string` | 4 | The GUID of item to select. The primary selector. Not used it the value is GUID_NULL. |
| <a id="f-item_alias"></a>`item_alias` | `string` | 5 | A semantic alias of the item to select. Applied if the guid is not used. Not used if the value is empty string. |
| <a id="f-item_id"></a>`item_id` | `int32` | 6 | Id of the item to select. Will be used if no guid nor alias are specified. |
| <a id="f-options"></a>`options` | [`METADATASTRUCTURESELECTORFLAGS`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.METADATASTRUCTURESELECTORFLAGS/index.md) | 7 | Bit flags that control the metadata structure selection. |

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

## Used in fields

- [`RestoreFromArchiveJob.restore_structure_items`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.RestoreFromArchiveJob/index.md#f-restore_structure_items): If not empty, specifies the metadata structure items to restore.
