import type { BasemapLayerJsonBase } from "./BasemapLayerJson";
import type { ExtentJson, PointJson } from "./GeometryJson";
import type { OperationalLayerJsonBase } from "./OperationalLayerJson";
import type { SpatialReferenceJson } from "./SpatialReferenceJson";
/**
 * A tile layer is a derived from a set of web-accessible tiles which reside on
 * a server. The tiles are accessed by a direct URL request from the web
 * browser. Because the tiles in a tile layer are not available as a service,
 * they must be in a specific format for a web app such as the ArcGIS.com map
 * viewer to display the layer on a map.
 *
 * See
 * {@link https://developers.arcgis.com/web-map-specification/objects/tiledLayer/}
 * {@link https://developers.arcgis.com/web-scene-specification/objects/tiledLayer/}.
 */
export interface WebTileLayerJson extends OperationalLayerJsonBase, BasemapLayerJsonBase {
    /**
     * Attribution to the Web Tile Layer provider. It is displayed in the
     * attribution on the web map. Input required by the user when the layer is
     * added to the web map.
     */
    copyright?: string | null;
    /**
     * An extent object representing the full extent envelope for the layer.
     */
    fullExtent?: ExtentJson | null;
    /**
     * Optional string containing the item ID of the service if it's registered
     * on ArcGIS Online or your organization's portal.
     */
    itemId?: string | null;
    /**
     * The type of layer.
     */
    layerType: "WebTiledLayer";
    /**
     * If sub-domains are detected, they must be specified. The map viewer
     * detects if the Web Tile Layer has sub-domains by parsing the templateURL
     * value for `{subDomain}`.
     */
    subDomains?: string[] | null;
    /**
     * URL to the Web Tile Layer. Input required by the user when the layer is
     * added to the web scene. The template URL contains a parameterized URL.
     * The URL can contain the following template parameters: `{level}`,
     * `{col}`, `{row}`, and `{subDomain}`.
     */
    templateUrl?: string | null;
    /**
     * An extent object representing the full extent envelope for the layer.
     */
    tileInfo?: TileInfoJson | null;
    /**
     * An object representing information about this layer if it is a WMTS
     * layer.
     */
    wmtsInfo?: WMTSInfoJson | null;
}
/**
 * Tile information, returned from the WMTS OGC Web Service. The tileInfo will
 * contain the spatial reference of the layer. TileInfo is the same json
 * representation as the ArcGIS Map/Image service tileInfo except that it may
 * contain a levelValue on the lod objects that should be used instead of the
 * level in the templateUrl.
 *
 * See
 * {@link https://developers.arcgis.com/web-map-specification/objects/tileInfo/}
 * {@link https://developers.arcgis.com/web-scene-specification/objects/tileInfo/}.
 */
export interface TileInfoJson {
    /**
     * Requested tile's column.
     */
    cols?: number | null;
    /**
     * Compression quality of the tile.
     */
    compressionQuality?: number | null;
    /**
     * The dpi of the tiling scheme.
     */
    dpi?: number | null;
    /**
     * Image format of the cached tiles.
     */
    format?: string | null;
    /**
     * An array of levels of detail that define the tiling scheme. See
     * {@link https://developers.arcgis.com/web-map-specification/objects/lod/}
     * {@link https://developers.arcgis.com/web-scene-specification/objects/lod/}.
     */
    lods?: {
        /**
         * ID for each level.
         */
        level?: number | null;
        /**
         * String to be used when constructing URL to access a tile from
         * this LOD.
         */
        levelValue?: string | null;
        /**
         * Resolution in map units of each pixel in a tile for each level.
         */
        resolution?: number | null;
        /**
         * Scale for each level.
         */
        scale?: number | null;
    }[] | null;
    /**
     * The tiling scheme origin.
     */
    origin?: PointJson | null;
    /**
     * Requested tile's row.
     */
    rows?: number | null;
    /**
     * The spatial reference of the tiling schema.
     */
    spatialReference?: SpatialReferenceJson | null;
}
/**
 * Object containing layerIdentifier, tileMatrixSet, and URL for WMTSLayer layer
 * types. See
 * {@link https://developers.arcgis.com/web-map-specification/objects/wmtsInfo/}.
 */
export interface WMTSInfoJson {
    /**
     * A sequence of parameters used to append different custom parameters to a
     * WMTS tile request. These parameters are applied to GetTile. The
     * customLayerParameters property takes precedence if customParameters is
     * also present.
     */
    customLayerParameters?: Record<string, unknown> | null;
    /**
     * A sequence of parameters used to append custom parameters to all WMTS
     * requests. These parameters are applied to GetCapabilities and GetTile. If
     * used with the customLayerParameters property, customParameters will not
     * take precedence.
     */
    customParameters?: Record<string, unknown> | null;
    /**
     * Identifier for the specific layer used in the WMTS service. Required
     * input by the user.
     */
    layerIdentifier?: string | null;
    /**
     * Tiling schema, set by the WMTS service.
     */
    tileMatrixSet?: string | null;
    /**
     * URL to the WMTS web service. Required input by the user.
     */
    url?: string | null;
}
