{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/safetyculture/json-schema/safetyculture-s12-assets-v1-fields-service-update-field-body-schema.json",
  "title": "UpdateField",
  "description": "The parameters for `UpdateField`",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/safetyculture-assets-api-openapi.yml#/components/schemas/s12.assets.v1.FieldsService.UpdateFieldBody",
  "type": "object",
  "properties": {
    "field": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the field."
        },
        "field_type": {
          "$ref": "#/$defs/s12.assets.v1.FieldType",
          "description": "Type of field.",
          "readOnly": true
        },
        "value_type": {
          "$ref": "#/$defs/s12.assets.v1.FieldValueType",
          "description": "Type of field value.",
          "readOnly": true
        },
        "select_options": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/$defs/s12.typefield.v1.FieldOption"
          },
          "description": "The options of a field select.\n100 limit enforced in typefield, but to lower the feedback loop, we enforce it here too."
        }
      },
      "description": "Field which replaces the one with matching identifier on the server.",
      "title": "Field which replaces the one with matching identifier on the server."
    },
    "update_mask": {
      "type": "string",
      "description": "REQUIRED. The attributes (such as name etc.) you want to update for the field,\nspecified in the parameters. For example, the update_mask=name parameter\nindicates that only the name will be updated in a request, any other\nattributes provided in your request body will be ignored."
    }
  },
  "required": [
    "update_mask"
  ],
  "$defs": {
    "s12.assets.v1.FieldType": {
      "type": "string",
      "enum": [
        "FIELD_TYPE_UNSPECIFIED",
        "FIELD_TYPE_PREDEFINED",
        "FIELD_TYPE_CUSTOM"
      ],
      "default": "FIELD_TYPE_UNSPECIFIED",
      "description": "Type of Field.\n\n - FIELD_TYPE_UNSPECIFIED: Field type Unspecified.\n - FIELD_TYPE_PREDEFINED: Field type pre-defined.\n - FIELD_TYPE_CUSTOM: Field type custom."
    },
    "s12.assets.v1.FieldValueType": {
      "type": "string",
      "enum": [
        "FIELD_VALUE_TYPE_UNSPECIFIED",
        "FIELD_VALUE_TYPE_STRING",
        "FIELD_VALUE_TYPE_MONEY",
        "FIELD_VALUE_TYPE_TIMESTAMP",
        "FIELD_VALUE_TYPE_SELECT"
      ],
      "default": "FIELD_VALUE_TYPE_UNSPECIFIED",
      "description": "Describes each type of asset field.\n\n - FIELD_VALUE_TYPE_UNSPECIFIED: Field value type unspecified.\n - FIELD_VALUE_TYPE_STRING: This type accepts plain text values.\n - FIELD_VALUE_TYPE_MONEY: This type accepts numerical values with currency codes. For example, \"99.99\" numerical value with \"AUD\" as the currency code.\n - FIELD_VALUE_TYPE_TIMESTAMP: This type accepts timestamp values in the Internet Date-Time format.\n - FIELD_VALUE_TYPE_SELECT: This type accepts select values."
    },
    "s12.typefield.v1.FieldOption": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The id of a field select option."
        },
        "label": {
          "type": "string",
          "description": "The label of a field select option."
        },
        "order": {
          "type": "integer",
          "format": "int32",
          "description": "The display order of this option, 0-indexed.\nOptions should be displayed in ascending order of this field,\nmatching the order they were defined in the field settings."
        }
      }
    }
  }
}