{
  "title": "Building Scene Layer (BuildingSceneLayer)",
  "type": "object",
  "$schema": "http://json-schema.org/draft-04/schema",
  "description": "The BuildingSceneLayer is a layer type designed for on-demand streaming and displaying building data.",
  "properties": {
    "activeFilterId": {
      "type": "string",
      "description": "specifies the id of the currently active filter"
    },
    "filters": {
      "type": "array",
      "description": "A list of filters available for this layer. Overrides filters defined on the service.",
      "items": {
        "type": "object",
        "$ref": "buildingSceneLayer_filter_schema.json"
      },
      "uniqueItems": true
    },
    "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": "Additional properties that can define an elevation offset for the layer.",
      "allOf": [
        {
          "$ref": "layerDefinition_schema.json"
        },
        {
          "properties": {
            "elevationInfo": {},
            "minScale": {},
            "maxScale": {}
          },
          "additionalProperties": false
        }
      ]
    },
    "layerType": {
      "type": "string",
      "description": "String indicating the layer type.",
      "enum": [
        "BuildingSceneLayer"
      ]
    },
    "listMode": {
      "type": "string",
      "description": "To show or hide the sublayer in the layer list. If the layer has sublayers, selecting `hide-children` will hide them in the layer list.",
      "enum": [
        "hide",
        "hide-children",
        "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
    },
    "sublayers": {
      "type": "array",
      "description": "An array of objects specifying overrides for building scene layer sublayers",
      "items": {
        "type": "object",
        "$ref": "buildingSceneLayer_sublayer_schema.json"
      },
      "uniqueItems": true
    },
    "title": {
      "type": "string",
      "description": "A user-friendly string title for the layer that can be used in a table of contents."
    },
    "url": {
      "type": "string",
      "description": "The URL to the service.",
      "format": "uri"
    },
    "visibility": {
      "type": "boolean",
      "description": "Boolean property determining whether the layer is initially visible in the web scene",
      "default": true
    }
  },
  "required": [
    "id",
    "layerType",
    "title",
    "url"
  ],
  "additionalProperties": false,
  "esriDocumentation": {
    "examples": [
      {
        "title": "operationalLayer",
        "description": "Sample web scene showing the Building Scene Layer as an operationalLayer",
        "code": {
          "operationalLayers": [
            {
              "id": "14c4ab705ea-layer24",
              "opacity": 1,
              "title": "Building",
              "url": "https://peach.esri.com/server/rest/services/Hosted/NashvilleAirport_ESMerged/SceneServer/layers/0",
              "visibility": true,
              "layerType": "BuildingSceneLayer",
              "layerDefinition": {
                "elevationInfo": {
                  "mode": "absoluteHeight",
                  "offset": 100
                }
              },
              "sublayers": [
                {
                  "id": 1,
                  "title": "Overview",
                  "visibility": true,
                  "disablePopup": false,
                  "layerDefinition": {
                    "drawingInfo": {
                      "renderer": {
                        "type": "simple",
                        "symbol": {
                          "type": "MeshSymbol3D",
                          "symbolLayers": [
                            {
                              "material": {
                                "color": [
                                  192,
                                  192,
                                  255
                                ]
                              },
                              "type": "Fill"
                            }
                          ]
                        }
                      }
                    }
                  }
                },
                {
                  "id": 3,
                  "title": "Walls",
                  "visibility": false
                }
              ]
            }
          ]
        }
      }
    ]
  }
}
