{
  "title": "Integrated Mesh Layer (IntegratedMeshLayer)",
  "type": "object",
  "$schema": "http://json-schema.org/draft-04/schema",
  "description": "An integrated mesh can represent built and natural 3D features, such as building walls, trees, valleys, and cliffs, with realistic textures and includes elevation information.",
  "properties": {
    "id": {
      "type": "string",
      "description": "A unique identifying string for the layer."
    },
    "itemId": {
      "type": "string",
      "description": "Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."
    },
    "layerDefinition": {
      "type": "object",
      "description": "A layerDefinition object defining the attribute schema and drawing information for the layer.",
      "allOf": [
        {
          "$ref": "layerDefinition_schema.json"
        },
        {
          "properties": {
            "elevationInfo": {},
            "minScale": {},
            "maxScale": {}
          },
          "additionalProperties": false
        }
      ]
    },
    "layerType": {
      "type": "string",
      "description": "String indicating the layer type.",
      "enum": [
        "IntegratedMeshLayer"
      ]
    },
    "listMode": {
      "type": "string",
      "enum": [
        "hide",
        "show"
      ]
    },
    "opacity": {
      "type": "number",
      "description": "The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency.",
      "minimum": 0,
      "maximum": 1,
      "default": 1
    },
    "path": {
      "type": "string",
      "description": "For offline data, a path to integrated mesh data in a scene layer package file. A URI format is used, starting with `file:` followed by a file system path with an extension of `.slpk`. A relative path must be from the file which defines the layer. For example `file:../p20/edinburgh.slpk`.",
      "pattern": "^file:.+\\.slpk$"
    },
    "title": {
      "type": "string",
      "description": "A user-friendly string title for the layer that can be used in a table of contents. If this is not included, a title is derived from the service."
    },
    "url": {
      "type": "string",
      "description": "The URL to the layer. If the layer is not from a web service but rather a feature collection, then the url property is omitted.",
      "format": "uri"
    },
    "visibility": {
      "type": "boolean",
      "description": "Boolean property determining whether the layer is initially visible in the web scene.",
      "default": true
    }
  },
  "anyOf": [
    {
      "required": [
        "id",
        "layerType",
        "title",
        "url"
      ]
    },
    {
      "required": [
        "id",
        "layerType",
        "path",
        "title"
      ]
    }
  ],
  "additionalProperties": false,
  "esriDocumentation": {
    "examples": [
      {
        "title": "",
        "description": "Data for example service was provided by Institute Cartografic i Geologic Catalunya (ICGC).",
        "code": {
          "operationalLayers": [
            {
              "id": "1589c525c4c-layer-0",
              "title": "Integrated Mesh Girona",
              "url": "http://tiles.arcgis.com/tiles/z2tnIkrLQ2BRzr6P/arcgis/rest/services/Girona_Spain/SceneServer",
              "visibility": true,
              "layerType": "IntegratedMeshLayer",
              "layerDefinition": {
                "elevationInfo": {
                  "mode": "absoluteHeight",
                  "offset": 100
                }
              }
            }
          ]
        }
      }
    ]
  }
}
