{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pipeliner/json-schema/pipeliner-cloud-object-relation-schema.json",
  "title": "CloudObjectRelation",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pipeliner-document-api-openapi.yml#/components/schemas/CloudObjectRelation",
  "properties": {
    "is_delete_protected": {
      "type": "boolean",
      "description": "Tells if the entity instance is protected against delete (Entities that need to be present in the system at any time). Delete action still may fail if entity is deletable, due some other additional validations.",
      "readOnly": true
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Unique identifier of entity.",
      "readOnly": true
    },
    "is_deleted": {
      "type": "boolean",
      "description": "Specifies if the entity is considered deleted.",
      "readOnly": true
    },
    "modified": {
      "type": "string",
      "format": "date-time",
      "description": "Last modification time.",
      "readOnly": true
    },
    "created": {
      "type": "string",
      "format": "date-time",
      "description": "Creation time.",
      "readOnly": true
    },
    "account": {
      "type": "string",
      "format": "uri",
      "description": "Account the file is attached to, or empty when not attached to an account.\n\nRelation to Account. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'Account' object for properties."
    },
    "appointment": {
      "type": "string",
      "format": "uri",
      "description": "Appointment the file is attached to. Set when activity_id resolves to an Appointment.\n\nRelation to Appointment. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'Appointment' object for properties."
    },
    "task": {
      "type": "string",
      "format": "uri",
      "description": "Task the file is attached to. Set when activity_id resolves to a Task.\n\nRelation to Task. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'Task' object for properties."
    },
    "approval_process": {
      "type": "string",
      "format": "uri",
      "description": "Approval process the file is attached to.\n\nRelation to ApprovalProcess. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'ApprovalProcess' object for properties."
    },
    "call": {
      "type": "string",
      "format": "uri",
      "description": "Call the file is attached to (e.g. a call recording).\n\nRelation to Call. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'Call' object for properties."
    },
    "cloud_object_folder": {
      "type": "string",
      "format": "uri",
      "description": "Folder the file is filed under within the parent record, or empty when stored at the record root.\n\nRelation to CloudObjectFolder. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'CloudObjectFolder' object for properties."
    },
    "cloud_object": {
      "type": "string",
      "format": "uri",
      "description": "Cloud object (file) being linked.\n\nRelation to CloudObject. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'CloudObject' object for properties."
    },
    "contact": {
      "type": "string",
      "format": "uri",
      "description": "Contact the file is attached to, or empty when not attached to a contact.\n\nRelation to Contact. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'Contact' object for properties."
    },
    "custom_entity": {
      "type": "string",
      "format": "uri",
      "description": "Custom entity record the file is attached to.\n\nRelation to CustomEntity. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'CustomEntity' object for properties."
    },
    "email_sequence": {
      "type": "string",
      "format": "uri",
      "description": "Email sequence the file is attached to.\n\nRelation to EmailSequence. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'EmailSequence' object for properties."
    },
    "email_template": {
      "type": "string",
      "format": "uri",
      "description": "Email template the file is attached to as a template attachment.\n\nRelation to EmailTemplate. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'EmailTemplate' object for properties."
    },
    "field_mapping": {
      "type": "string",
      "format": "uri",
      "description": "Field mapping the file is attached to (e.g. an import file).\n\nRelation to FieldMapping. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'FieldMapping' object for properties."
    },
    "lead": {
      "type": "string",
      "format": "uri",
      "description": "Lead the file is attached to. Set when lead_oppty_id resolves to a Lead.\n\nRelation to Lead. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'Lead' object for properties."
    },
    "oppty": {
      "type": "string",
      "format": "uri",
      "description": "Opportunity the file is attached to. Set when lead_oppty_id resolves to an Opportunity.\n\nRelation to Opportunity. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'Opportunity' object for properties."
    },
    "media": {
      "type": "string",
      "format": "uri",
      "description": "Media record the file is attached to.\n\nRelation to Media. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'Media' object for properties."
    },
    "email": {
      "type": "string",
      "format": "uri",
      "description": "Email the file is attached to (e.g. an email attachment). Set when message_id resolves to an Email.\n\nRelation to Email. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'Email' object for properties."
    },
    "memo": {
      "type": "string",
      "format": "uri",
      "description": "Memo the file is attached to. Set when message_id resolves to a Memo.\n\nRelation to Memo. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'Memo' object for properties."
    },
    "online_form_field": {
      "type": "string",
      "format": "uri",
      "description": "Online form field the file was uploaded into.\n\nRelation to Field. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'Field' object for properties."
    },
    "online_form": {
      "type": "string",
      "format": "uri",
      "description": "Online form submission the file was uploaded with.\n\nRelation to OnlineForm. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'OnlineForm' object for properties."
    },
    "process": {
      "type": "string",
      "format": "uri",
      "description": "Sales process the file is attached to.\n\nRelation to Process. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'Process' object for properties."
    },
    "process_template": {
      "type": "string",
      "format": "uri",
      "description": "Sales process template the file is attached to.\n\nRelation to ProcessTemplate. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'ProcessTemplate' object for properties."
    },
    "project": {
      "type": "string",
      "format": "uri",
      "description": "Project the file is attached to.\n\nRelation to Project. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'Project' object for properties."
    },
    "quote": {
      "type": "string",
      "format": "uri",
      "description": "Quote the file is attached to.\n\nRelation to Quote. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'Quote' object for properties."
    },
    "report_schedule": {
      "type": "string",
      "format": "uri",
      "description": "Report schedule the file is attached to (e.g. an exported report).\n\nRelation to ReportSchedule. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'ReportSchedule' object for properties."
    },
    "text_message": {
      "type": "string",
      "format": "uri",
      "description": "Text message (SMS/MMS) the file is attached to.\n\nRelation to TextMessage. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'TextMessage' object for properties."
    },
    "account_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the linked account."
    },
    "activity_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the linked appointment or task, or empty when not linked."
    },
    "approval_process_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the linked approval process."
    },
    "call_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the linked call."
    },
    "cloud_object_folder_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the folder within the parent record, or empty when stored at the record root."
    },
    "cloud_object_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the linked file."
    },
    "contact_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the linked contact."
    },
    "custom_entity_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the linked custom entity record."
    },
    "email_sequence_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the linked email sequence."
    },
    "email_template_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the linked email template."
    },
    "field_mapping_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the linked field mapping."
    },
    "lead_oppty_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the linked lead or opportunity, or empty when not linked."
    },
    "media_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the linked media record."
    },
    "message_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the linked email or memo, or empty when not linked."
    },
    "online_form_field_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the online form field the file was uploaded into."
    },
    "online_form_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the linked online form submission."
    },
    "process_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the linked sales process."
    },
    "process_template_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the linked sales process template."
    },
    "project_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the linked project."
    },
    "quote_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the linked quote."
    },
    "report_schedule_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the linked report schedule."
    },
    "text_message_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the linked text message."
    },
    "revision": {
      "type": "integer",
      "format": "int32",
      "description": "Revision when entity was lastly changed."
    }
  },
  "required": [
    "is_delete_protected",
    "id"
  ]
}