import type { __FeatureLayerSansType } from "./FeatureLayer.js";
import type SpatialReference from "../geometry/SpatialReference.js";
import type FeatureLayer from "./FeatureLayer.js";
import type Field from "./support/Field.js";
import type PortalItem from "../portal/PortalItem.js";
import type FeatureSet from "../rest/support/FeatureSet.js";
import type { LayerSaveAsOptions, LayerSaveOptions } from "./types.js";
import type { ConstantElevation as IConstantElevation, ElevationSource as IElevationSource, Accuracy, OrientedImageryType, TimeIntervalUnit } from "./orientedImagery/types.js";
import type { PortalItemProperties } from "../portal/PortalItem.js";
import type { RequestOptions } from "../request/types.js";
import type { QueryProperties } from "../rest/support/Query.js";
import type { ObjectId } from "../views/types.js";
import type { FieldProperties } from "./support/Field.js";
import type { SpatialReferenceProperties } from "../geometry/SpatialReference.js";
import type { FeatureLayerProperties } from "./FeatureLayer.js";

export interface OrientedImageryLayerProperties extends FeatureLayerProperties, Partial<Pick<OrientedImageryLayer, "cameraHeading" | "cameraHeight" | "cameraPitch" | "cameraRoll" | "coveragePercent" | "demPathPrefix" | "demPathSuffix" | "depthImagePathPrefix" | "depthImagePathSuffix" | "elevationSource" | "farDistance" | "horizontalFieldOfView" | "horizontalMeasurementUnit" | "imagePathPrefix" | "imagePathSuffix" | "imageRotation" | "maximumDistance" | "nearDistance" | "orientationAccuracy" | "orientedImageryType" | "timeIntervalUnit" | "verticalFieldOfView" | "verticalMeasurementUnit" | "videoPathPrefix" | "videoPathSuffix">> {
  /**
   * Copyright information for the layer.
   *
   * @since 4.29
   */
  copyright?: string | null;
  /**
   * The SQL where clause used to filter features on the client. Only the features that satisfy the definition
   * expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Setting a definition expression is useful
   * when the dataset is large and you don't want to bring all features to the client for analysis.
   * Definition expressions may be set when a layer is constructed prior to it loading in the view or
   * after it has been added to the map. If the definition expression is set after the layer has been added to the map, the view will
   * automatically refresh itself to display the features that satisfy the new definition expression.
   *
   * @since 4.29
   * @example
   * // Set definition expression in constructor to only display trees with scientific name Ulmus pumila
   * const layer = new FeatureLayer({
   *   url: "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Landscape_Trees/FeatureServer/0",
   *   definitionExpression: "Sci_Name = 'Ulmus pumila'"
   * });
   * @example
   * // Set the definition expression directly on layer instance to only display trees taller than 50ft
   * layer.definitionExpression = "HEIGHT > 50";
   */
  definitionExpression?: string | null;
  /**
   * The name of the layer's primary display field. The value of this property matches the name of one of the fields of the layer.
   *
   * @since 4.29
   */
  displayField?: string | null;
  /**
   * An array of fields in the layer. Each field represents an attribute
   * that may contain a value for each feature in the layer. For example,
   * a field named `POP_2015`, stores information about total population as a
   * numeric value for each feature; this value represents the total number
   * of people living within the geographic bounds of the feature.
   *
   * @since 4.29
   * @see [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#source)
   * @see [objectIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#objectIdField)
   * @see [Add an array of client-side features](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#client-side)
   * @see [FeatureLayer#source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source)
   * @see [FeatureLayer#objectIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#objectIdField)
   * @see [Add an array of client-side features](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#client-side)
   * @example
   * // define each field's schema
   * const fields = [
   *  new Field({
   *    name: "ObjectID",
   *    alias: "ObjectID",
   *    type: "oid"
   *  }), new Field({
   *    name: "description",
   *    alias: "Description",
   *    type: "string"
   *  }), new Field ({
   *    name: "title",
   *    alias: "Title",
   *    type: "string"
   *  })
   * ];
   *
   * // See the sample snippet for the source and renderer properties
   * const layer = new FeatureLayer({
   *   // geometryType and spatialReference are inferred
   *   // from the input source features
   *   source: features,
   *   // Object ID field is inferred from the fields array
   *   fields: fields,
   *   renderer: renderer
   * });
   */
  fields?: FieldProperties[];
  /**
   * Indicates whether to display labels for this layer. If `true`, labels will
   * appear as defined in the [labelingInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#labelingInfo) property.
   *
   * @default true
   * @since 4.29
   * @see [labelingInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#labelingInfo)
   */
  labelsVisible?: boolean;
  /**
   * Indicates whether the layer will be included in the legend.
   *
   * @default true
   * @since 4.31
   */
  legendEnabled?: boolean;
  /**
   * The name of an `oid` [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#fields) containing
   * a unique value or identifier for each feature in the layer.
   *
   * @since 4.29
   * @see [fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#fields)
   * @see [Add an array of client-side features](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-FeatureLayerBase.html#client-side)
   * @example
   * // See the sample snippet for the source and fields properties
   * const layer = new FeatureLayer({
   *   source: features,
   *   fields: fields,
   *   objectIdField: "ObjectID",  // field name of the Object IDs
   *   geometryType: "point",
   *   renderer: <renderer>
   * });
   */
  objectIdField?: string;
  /**
   * An array of field names to include in the OrientedImageryLayer. If not specified, the layer will include all fields.
   *
   * @since 4.29
   * @see [FeatureLayerView#availableFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#availableFields)
   * @see [fieldUtils](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-fieldUtils.html)
   * @example
   * // Includes all fields from the service in the layer
   * fl.outFields = ["*"];
   * @example
   * // Get the specified fields from the service in the layer
   * // These fields will be added to FeatureLayerView.availableFields
   * // along with rendering and labeling fields. Use these fields
   * // for client-side filtering and querying.
   * fl.outFields = ["NAME", "POP_2010", "FIPS", "AREA"];
   * @example
   * // set the outFields for the layer coming from webmap
   * webmap.when(function () {
   *   layer = webmap.layers.at(1);
   *   layer.outFields = ["*"];
   * });
   */
  outFields?: string[] | null;
  /**
   * Indicates whether to display popups when features in the layer are clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#popupTemplate) to define what
   * information should be displayed in the popup. Alternatively, a default popup template may be automatically used if
   * [Popup#defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`.
   *
   * @default true
   * @since 4.29
   * @see [SceneView#popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#popup)
   * @see [View2D#popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#popup)
   * @see [FeatureLayer#createPopupTemplate()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#createPopupTemplate)
   * @see [SceneView#popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#popup)
   * @see [View2D#popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#popup)
   */
  popupEnabled?: boolean;
  /**
   * The portal item referencing the Oriented Imagery layer item from which the OrientedImageryLayer is loaded.
   *
   * @since 4.29
   * @example
   * // While this example uses FeatureLayer, this same pattern can be
   * // used for other layers that may be loaded from portalItem ids.
   * const layer = new FeatureLayer({
   *   portalItem: {  // autocasts as new PortalItem()
   *     id: "caa9bd9da1f4487cb4989824053bb847"
   *   }  // the first layer in the service is returned
   * });
   * @example
   * // Set hostname when using an on-premise portal (default is ArcGIS Online)
   * // esriConfig.portalUrl = "http://myHostName.esri.com/arcgis";
   *
   * // While this example uses FeatureLayer, this same pattern can be
   * // used for SceneLayers.
   * const layer = new FeatureLayer({
   *   portalItem: {  // autocasts as new PortalItem()
   *     id: "8d26f04f31f642b6828b7023b84c2188"
   *   },
   *   // loads the third item in the given feature service
   *   layerId: 2
   * });
   * @example
   * // Initialize GeoJSONLayer by referencing a portalItem id pointing to geojson file.
   * const layer = new GeoJSONLayer({
   *   portalItem: new PortalItem({
   *     id: "81e769cd7031482797e1b0768f23c7e1",
   *     // optionally define the portal, of the item.
   *     // if not specified, the default portal defined is used.
   *     // see https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#portalUrl
   *     portal: new Portal({
   *       url: "https://jsapi.maps.arcgis.com/"
   *     })
   *   }
   * });
   * @example
   * // This snippet loads a table hosted in ArcGIS Online.
   * const table = new FeatureLayer({
   *   portalItem: { // autocasts as esri/portal/PortalItem
   *     id: "123f4410054b43d7a0bacc1533ceb8dc"
   *   }
   * });
   *
   * // Before adding the table to the map, it must first be loaded and confirm it is the right type.
   * table.load().then(() => {
   *   if (table.isTable) {
   *     map.tables.add(table);
   *   }
   * });
   * @example
   * // While this example uses FeatureLayer, this same pattern can be
   * // used for other layers that may be loaded from portalItem ids.
   * const layer = new FeatureLayer({
   *   portalItem: { // autocasts as esri/portal/PortalItem
   *     id: "caa9bd9da1f4487cb4989824053bb847",
   *     // Set an API key to access a secure portal item configured with API key authentication.
   *     apiKey: "APIKEY"
   *   }
   * });
   */
  portalItem?: PortalItemProperties | null;
  /**
   * The spatial reference of the layer. The default value is WGS84.
   * This property can be set explicitly to project the longitude and latitude
   * coordinates when the OrientedImageryLayer is loaded. While not required, explicitly setting
   * the spatial reference of the layer will improve the performance
   * when projecting to a spatial reference other than the one used by the
   * coordinates in the raw data.
   *
   * @default SpatialReference.WGS84
   * @since 4.29
   * @see [SpatialReference#WGS84](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#WGS84)
   */
  spatialReference?: SpatialReferenceProperties;
  /**
   * The URL of the Oriented Imagery layer service.
   *
   * @since 4.29
   * @example
   * // Pass the service url to create an Oriented Imagery layer.
   *
   *   const layer = new OrientedImageryLayer({
   *     url: "url-to-oriented-imagery-service"
   *   });
   *   map.add(layer);  // adds the layer to the map
   * });
   * @example
   * // Hosted Feature Service on ArcGIS Online
   * layer.url = "http://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/origins/FeatureServer/0";
   * @example
   * // Layer from Map Service on ArcGIS Server
   * layer.url = "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/2";
   * @example
   * // Can also be used if URL points to service and not layer
   * const layer = new FeatureLayer({
   *   // Notice that the url doesn't end with /2
   *   url: "http://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/MonterreyBayCanyon_WFL/FeatureServer",
   *   layerId: 2
   * });
   * @example
   * // Non-spatial table in San Francisco incidents service.
   * const table = new FeatureLayer({
   *   url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/SF311/FeatureServer/1"
   * });
   * // table must be loaded so it can be used in the app.
   * table.load().then(function() {
   *   // table is loaded. ready to be queried.
   * });
   */
  url?: string | null;
}

/**
 * * [Overview](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#overview)
 * * [Creating an OrientedImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#creating-an-orientedimagerylayer)
 *
 * <span id="overview"></span>
 * ## Overview
 *
 * An Oriented Imagery Layer is a single spatial layer that can be created from a
 * [Feature Service](https://enterprise.arcgis.com/en/server/latest/publish-services/windows/what-is-a-feature-service-.htm); or
 * ArcGIS Online or ArcGIS Enterprise portal items.
 *
 * Oriented Imagery layers are composed of discrete features (or camera locations), each of which has a [Geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html)
 * that allows it to be rendered in either a 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or
 * 3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) as a
 * [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) with spatial context. These features also contain data
 * [Graphic#attributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#attributes) that provide additional information about
 * the real-world feature it represents; attributes may be viewed in [popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#popupTemplate) windows
 * and used for [rendering](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) the layer.
 *
 * The layer fetches the imagery data once you select a point on the map. It uses a custom BestImage logic to determine the most accurate image for a selected point and display it in the viewer widget.
 *
 * OrientedImageryLayers may be [queried](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#queryFeatures), [analyzed](https://developers.arcgis.com/javascript/latest/spatial-analysis/intro-geometry-operators/),
 * and [rendered](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#renderer) to visualize data in a spatial context.
 *
 *
 * <span id="creating-an-orientedimagerylayer"></span>
 * ## Creating an OrientedImageryLayer
 *
 * OrientedImageryLayers may be created in one of two ways: from a [service URL](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#url) or an ArcGIS portal [item ID](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#portalItem).
 *
 * <details>
 * <summary>Read More</summary>
 *
 * ### Reference a service URL
 *
 * To create an OrientedImageryLayer instance from a service, you must set the [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#url) property
 * to the REST endpoint of a layer in a Feature Service.
 * For a layer to be visible in a view, it must be added to the [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html)
 * referenced by the view. See [Map#add()](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#add) for information about adding layers to a map.
 *
 * ```js
 * const OrientedImageryLayer = await $arcgis.import("@arcgis/core/layers/OrientedImageryLayer.js");
 * const layer = new OrientedImageryLayer({
 *   url: "url-to-oriented-imagery-service"
 * });
 * map.add(layer);  // adds the layer to the map
 * ```
 *
 * ### Reference an ArcGIS portal Item ID
 *
 * You can also create an OrientedImageryLayer from its ID if it exists as an item in ArcGIS Online or ArcGIS Enterprise.
 * For example, the following snippet shows how to add a new OrientedImageryLayer instance to a map using the
 * [portalItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#portalItem) property.
 *
 * ```js
 * // points to a hosted Feature Layer with Oriented Imagery Layer as a sub layer in ArcGIS Online
 * const layer = new OrientedImageryLayer({
 *   portalItem: {  // autocasts as esri/portal/PortalItem
 *     id: "2c65c47b75654a078038abae52c58f70"
 *   }
 * });
 * map.add(layer);  // adds the layer to the map
 * ```
 *
 * </details>
 *
 * > [!WARNING]
 * >
 * > **Known Limitations**
 * >
 * > Locations with a very high density of features may not display all available features at small scales.
 * > Very large datasets may require potentially long initial load times, particularly at small scales.
 * > Server-side and client-side feature tile caching allow features to load much faster after the initial data download.
 * > We are continuously improving our feature fetching strategy and load time efficiency in each release.
 *
 * @since 4.28
 * @see [OrientedImageryViewer](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-OrientedImageryViewer.html)
 * @see [Sample - Intro to OrientedImageryLayer](https://developers.arcgis.com/javascript/latest/sample-code/layers-orientedimagerylayer/)
 * @see [Sample - OrientedImageryLayer in SceneView](https://developers.arcgis.com/javascript/latest/sample-code/layers-orientedimagerylayer-sceneview/)
 */
export default class OrientedImageryLayer extends __FeatureLayerSansType {
  /**
   * @example
   * const layer = new OrientedImageryLayer({
   *    url: "url-to-image-service"
   * });
   * map.add(layer);  // adds the layer to the map
   * @see [Client-side FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#client-side)
   * @example
   * // Typical usage
   * // Create featurelayer from feature service
   * const layer = new FeatureLayer({
   *   // URL to the service
   *   url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0"
   * });
   *
   * // Typical usage
   * // Create featurelayer from client-side graphics
   * const layer = new FeatureLayer({
   *   source: graphics,
   *   fields: [{
   *     name: "ObjectID",
   *     alias: "ObjectID",
   *     type: "oid"
   *   }, {
   *     name: "place",
   *     alias: "Place",
   *     type: "string"
   *   }],
   *   objectIdField: "ObjectID",
   *   geometryType: "point"
   * });
   */
  constructor(properties?: OrientedImageryLayerProperties);
  /**
   * Camera orientation defining the first rotation around z-axis of the camera. Defined in degrees. Heading values are measured in the positive clockwise direction where north is defined as 0 degrees.
   * -999 is used when the orientation is unknown.
   *
   * @example
   * // point images without cameraHeading to north using camera heading
   * layer.cameraHeading = 90;
   */
  accessor cameraHeading: number | null | undefined;
  /**
   * The height of camera above the ground when the imagery was captured. The units are in meters. Camera height is used to determine the visible extent of the image, large values will result in a greater
   * view extent. Values should not be less than 0.
   *
   * @example
   * // Adds value to images without a cameraHeight
   * layer.cameraHeight = 100;
   */
  accessor cameraHeight: number | null | undefined;
  /**
   * Camera orientation defining the second rotation around x-axis of the camera in the positive counterclockwise direction. Defined in degrees. The pitch is 0 degrees when the camera is
   * facing straight down to ground. The valid range of pitch value is from 0 to 180 degrees, with 180 degrees for a camera facing straight up and 90 degrees for a camera facing horizon.
   *
   * @example
   * // Adds pitch value to images without a cameraPitch
   * layer.cameraPitch = 90;
   */
  accessor cameraPitch: number | null | undefined;
  /**
   * Camera orientation defining the final rotation around z-axis of the camera in the positive clockwise direction. The camera housing rotation is defined in degrees. Valid values range from -90 to +90.
   *
   * @example
   * // Adds roll value to images without a cameraRoll
   * layer.cameraRoll = 0;
   */
  accessor cameraRoll: number | null | undefined;
  /**
   * Copyright information for the layer.
   *
   * @since 4.29
   */
  accessor copyright: string | null | undefined;
  /**
   * Modifies the extent of the image's ground footprint. The ground footprint of each image is computed to search for images that contain the selected location, which is identified
   * as the red cross on the map. Valid values are from -50 to 50. Negative percentage values shrink the size of the ground footprint and positive values increase the size of the ground footprint.
   *
   * @example
   * // Adds a coveragePercent value to image footprint
   * layer.coveragePercent = 40;
   */
  accessor coveragePercent: number | null | undefined;
  /**
   * The SQL where clause used to filter features on the client. Only the features that satisfy the definition
   * expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Setting a definition expression is useful
   * when the dataset is large and you don't want to bring all features to the client for analysis.
   * Definition expressions may be set when a layer is constructed prior to it loading in the view or
   * after it has been added to the map. If the definition expression is set after the layer has been added to the map, the view will
   * automatically refresh itself to display the features that satisfy the new definition expression.
   *
   * @since 4.29
   * @example
   * // Set definition expression in constructor to only display trees with scientific name Ulmus pumila
   * const layer = new FeatureLayer({
   *   url: "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Landscape_Trees/FeatureServer/0",
   *   definitionExpression: "Sci_Name = 'Ulmus pumila'"
   * });
   * @example
   * // Set the definition expression directly on layer instance to only display trees taller than 50ft
   * layer.definitionExpression = "HEIGHT > 50";
   */
  accessor definitionExpression: string | null | undefined;
  /** Prefix used to build the DEM url path in conjunction with the [elevationSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#elevationSource) attribute. */
  accessor demPathPrefix: string | null | undefined;
  /** Suffix used to build the DEM url path in conjunction with the [elevationSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#elevationSource) attribute. */
  accessor demPathSuffix: string | null | undefined;
  /** Prefix used to build the depth image url path in conjunction with the depth image attribute. */
  accessor depthImagePathPrefix: string | null | undefined;
  /** Suffix used to build the depth image url path in conjunction with the depth image attribute. */
  accessor depthImagePathSuffix: string | null | undefined;
  /**
   * The name of the layer's primary display field. The value of this property matches the name of one of the fields of the layer.
   *
   * @since 4.29
   */
  accessor displayField: string | null | undefined;
  /**
   * The source of elevation, that will be used to compute ground to image transformations. The elevation source can be a digital elevation model (DEM) or a constant value.
   * A tile image service can be used as the digital elevation model. The unit of constant elevation value should be in meters.
   */
  accessor elevationSource: IConstantElevation | IElevationSource | null | undefined;
  /**
   * The farthest usable distance of the imagery from the camera position. FarDistance is used to determine the extent of the image footprint, which is used to determine if an image
   * is returned when you click on the map, and for creating optional footprint features. The units are in meters. Far distance should be always greater than 0.
   *
   * @example
   * // Adds farDistance value to features without it
   * layer.farDistance = 60;
   */
  accessor farDistance: number | null | undefined;
  /**
   * An array of fields in the layer. Each field represents an attribute
   * that may contain a value for each feature in the layer. For example,
   * a field named `POP_2015`, stores information about total population as a
   * numeric value for each feature; this value represents the total number
   * of people living within the geographic bounds of the feature.
   *
   * @since 4.29
   * @see [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#source)
   * @see [objectIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#objectIdField)
   * @see [Add an array of client-side features](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#client-side)
   * @see [FeatureLayer#source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source)
   * @see [FeatureLayer#objectIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#objectIdField)
   * @see [Add an array of client-side features](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#client-side)
   * @example
   * // define each field's schema
   * const fields = [
   *  new Field({
   *    name: "ObjectID",
   *    alias: "ObjectID",
   *    type: "oid"
   *  }), new Field({
   *    name: "description",
   *    alias: "Description",
   *    type: "string"
   *  }), new Field ({
   *    name: "title",
   *    alias: "Title",
   *    type: "string"
   *  })
   * ];
   *
   * // See the sample snippet for the source and renderer properties
   * const layer = new FeatureLayer({
   *   // geometryType and spatialReference are inferred
   *   // from the input source features
   *   source: features,
   *   // Object ID field is inferred from the fields array
   *   fields: fields,
   *   renderer: renderer
   * });
   */
  get fields(): Field[];
  set fields(value: FieldProperties[]);
  /**
   * The geometry type of features in the OrientedImageryLayer. OrientedImageryLayer only supports [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry type.
   *
   * @see [Add an array of client-side features](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-FeatureLayerBase.html#client-side)
   */
  get geometryType(): "point";
  /**
   * The camera's scope in horizontal direction. The units are in degrees and valid values range from 0 to 360.
   *
   * @example layer.horizontalFieldOfView = 40;
   */
  accessor horizontalFieldOfView: number | null | undefined;
  /**
   * Defines the unit that will be used for all horizontal measurements. The unit will be obtained from the layer coordinate system and will be used for display purposes only.
   *
   * @example layer.horizontalMeasurementUnit = "Meter";
   */
  accessor horizontalMeasurementUnit: string | null | undefined;
  /** Prefix used to build the image url path in conjunction with the image attribute. */
  accessor imagePathPrefix: string | null | undefined;
  /** Suffix used to build the image url path in conjunction with the image attribute. */
  accessor imagePathSuffix: string | null | undefined;
  /** The orientation of the camera in degrees relative to the scene when the image was captured. The rotation is added in addition to the camera roll. The value can range from -360 to +360. */
  accessor imageRotation: number | null | undefined;
  /**
   * Indicates whether to display labels for this layer. If `true`, labels will
   * appear as defined in the [labelingInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#labelingInfo) property.
   *
   * @default true
   * @since 4.29
   * @see [labelingInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#labelingInfo)
   */
  accessor labelsVisible: boolean;
  /**
   * A unique id that identifies an operational layer in a map.
   *
   * @since 4.29
   * @example
   * // loads the third layer in the given Portal Item
   * const layer = new FeatureLayer({
   *   portalItem: {
   *     id: "8d26f04f31f642b6828b7023b84c2188"
   *   },
   *   layerId: 2
   * });
   * @example
   * // If not specified, the first layer (layerId: 0) will be returned
   * const layer = new FeatureLayer({
   *   portalItem: {
   *     id: "8d26f04f31f642b6828b7023b84c2188"
   *   }
   * });
   * @example
   * // Can also be used if URL points to service and not layer
   * const layer = new FeatureLayer({
   *   // Notice that the url doesn't end with /2
   *   url: "http://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/MonterreyBayCanyon_WFL/FeatureServer",
   *   layerId: 2
   * });
   * @example
   * // This code returns the same layer as the previous snippet
   * const layer = new FeatureLayer({
   *   // The layer id is specified in the URL
   *   url: "http://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/MonterreyBayCanyon_WFL/FeatureServer/2",
   * });
   */
  get layerId(): number;
  /**
   * Indicates whether the layer will be included in the legend.
   *
   * @default true
   * @since 4.31
   */
  accessor legendEnabled: boolean;
  /**
   * Maximum search distance to be used while querying the feature service specified in the Oriented Imagery Layer. The maximum distance can never be less than zero.
   *
   * @example layer.maximumDistance = 100;
   */
  accessor maximumDistance: number | null | undefined;
  /** The nearest usable distance of the imagery from the camera position. The units are in meters. Near distance can never be less than 0. */
  accessor nearDistance: number | null | undefined;
  /**
   * The name of an `oid` [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#fields) containing
   * a unique value or identifier for each feature in the layer.
   *
   * @since 4.29
   * @see [fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#fields)
   * @see [Add an array of client-side features](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-FeatureLayerBase.html#client-side)
   * @example
   * // See the sample snippet for the source and fields properties
   * const layer = new FeatureLayer({
   *   source: features,
   *   fields: fields,
   *   objectIdField: "ObjectID",  // field name of the Object IDs
   *   geometryType: "point",
   *   renderer: <renderer>
   * });
   */
  accessor objectIdField: string;
  /**
   * Semicolon-delimited string used to store standard deviation values. The standard deviation values are in the following order and format: Camera location in XY direction;
   * camera height; camera heading; camera pitch; camera roll; near distance; far distance; elevation (all in meters).
   */
  accessor orientationAccuracy: Accuracy;
  /**
   * String that defines the imagery type used in the particular Oriented Imagery Layer. Valid values: 360, horizontal, inspection, nadir, oblique.
   *
   * @example layer.orientedImageryType = "oblique";
   */
  accessor orientedImageryType: OrientedImageryType | null | undefined;
  /**
   * An array of field names to include in the OrientedImageryLayer. If not specified, the layer will include all fields.
   *
   * @since 4.29
   * @see [FeatureLayerView#availableFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#availableFields)
   * @see [fieldUtils](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-fieldUtils.html)
   * @example
   * // Includes all fields from the service in the layer
   * fl.outFields = ["*"];
   * @example
   * // Get the specified fields from the service in the layer
   * // These fields will be added to FeatureLayerView.availableFields
   * // along with rendering and labeling fields. Use these fields
   * // for client-side filtering and querying.
   * fl.outFields = ["NAME", "POP_2010", "FIPS", "AREA"];
   * @example
   * // set the outFields for the layer coming from webmap
   * webmap.when(function () {
   *   layer = webmap.layers.at(1);
   *   layer.outFields = ["*"];
   * });
   */
  accessor outFields: string[] | null | undefined;
  /**
   * Indicates whether to display popups when features in the layer are clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#popupTemplate) to define what
   * information should be displayed in the popup. Alternatively, a default popup template may be automatically used if
   * [Popup#defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`.
   *
   * @default true
   * @since 4.29
   * @see [SceneView#popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#popup)
   * @see [View2D#popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#popup)
   * @see [FeatureLayer#createPopupTemplate()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#createPopupTemplate)
   * @see [SceneView#popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#popup)
   * @see [View2D#popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#popup)
   */
  accessor popupEnabled: boolean;
  /**
   * The portal item referencing the Oriented Imagery layer item from which the OrientedImageryLayer is loaded.
   *
   * @since 4.29
   * @example
   * // While this example uses FeatureLayer, this same pattern can be
   * // used for other layers that may be loaded from portalItem ids.
   * const layer = new FeatureLayer({
   *   portalItem: {  // autocasts as new PortalItem()
   *     id: "caa9bd9da1f4487cb4989824053bb847"
   *   }  // the first layer in the service is returned
   * });
   * @example
   * // Set hostname when using an on-premise portal (default is ArcGIS Online)
   * // esriConfig.portalUrl = "http://myHostName.esri.com/arcgis";
   *
   * // While this example uses FeatureLayer, this same pattern can be
   * // used for SceneLayers.
   * const layer = new FeatureLayer({
   *   portalItem: {  // autocasts as new PortalItem()
   *     id: "8d26f04f31f642b6828b7023b84c2188"
   *   },
   *   // loads the third item in the given feature service
   *   layerId: 2
   * });
   * @example
   * // Initialize GeoJSONLayer by referencing a portalItem id pointing to geojson file.
   * const layer = new GeoJSONLayer({
   *   portalItem: new PortalItem({
   *     id: "81e769cd7031482797e1b0768f23c7e1",
   *     // optionally define the portal, of the item.
   *     // if not specified, the default portal defined is used.
   *     // see https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#portalUrl
   *     portal: new Portal({
   *       url: "https://jsapi.maps.arcgis.com/"
   *     })
   *   }
   * });
   * @example
   * // This snippet loads a table hosted in ArcGIS Online.
   * const table = new FeatureLayer({
   *   portalItem: { // autocasts as esri/portal/PortalItem
   *     id: "123f4410054b43d7a0bacc1533ceb8dc"
   *   }
   * });
   *
   * // Before adding the table to the map, it must first be loaded and confirm it is the right type.
   * table.load().then(() => {
   *   if (table.isTable) {
   *     map.tables.add(table);
   *   }
   * });
   * @example
   * // While this example uses FeatureLayer, this same pattern can be
   * // used for other layers that may be loaded from portalItem ids.
   * const layer = new FeatureLayer({
   *   portalItem: { // autocasts as esri/portal/PortalItem
   *     id: "caa9bd9da1f4487cb4989824053bb847",
   *     // Set an API key to access a secure portal item configured with API key authentication.
   *     apiKey: "APIKEY"
   *   }
   * });
   */
  get portalItem(): PortalItem | null | undefined;
  set portalItem(value: PortalItemProperties | null | undefined);
  /**
   * The spatial reference of the layer. The default value is WGS84.
   * This property can be set explicitly to project the longitude and latitude
   * coordinates when the OrientedImageryLayer is loaded. While not required, explicitly setting
   * the spatial reference of the layer will improve the performance
   * when projecting to a spatial reference other than the one used by the
   * coordinates in the raw data.
   *
   * @default SpatialReference.WGS84
   * @since 4.29
   * @see [SpatialReference#WGS84](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#WGS84)
   */
  get spatialReference(): SpatialReference;
  set spatialReference(value: SpatialReferenceProperties);
  /**
   * Defines the unit of time used in the viewer's time selector tool. Images will be filtered in the viewer based on the Time Unit value defined here.
   * Valid values: days, hours, minutes, months, weeks, years
   *
   * @default "days"
   * @example layer.verticalFieldOfView = 20;
   */
  accessor timeIntervalUnit: TimeIntervalUnit;
  /**
   * The layer type provides a convenient way to check the type of the layer
   * without the need to import specific layer modules.
   */
  get type(): "oriented-imagery";
  /**
   * The URL of the Oriented Imagery layer service.
   *
   * @since 4.29
   * @example
   * // Pass the service url to create an Oriented Imagery layer.
   *
   *   const layer = new OrientedImageryLayer({
   *     url: "url-to-oriented-imagery-service"
   *   });
   *   map.add(layer);  // adds the layer to the map
   * });
   * @example
   * // Hosted Feature Service on ArcGIS Online
   * layer.url = "http://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/origins/FeatureServer/0";
   * @example
   * // Layer from Map Service on ArcGIS Server
   * layer.url = "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/2";
   * @example
   * // Can also be used if URL points to service and not layer
   * const layer = new FeatureLayer({
   *   // Notice that the url doesn't end with /2
   *   url: "http://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/MonterreyBayCanyon_WFL/FeatureServer",
   *   layerId: 2
   * });
   * @example
   * // Non-spatial table in San Francisco incidents service.
   * const table = new FeatureLayer({
   *   url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/SF311/FeatureServer/1"
   * });
   * // table must be loaded so it can be used in the app.
   * table.load().then(function() {
   *   // table is loaded. ready to be queried.
   * });
   */
  accessor url: string | null | undefined;
  /**
   * The camera's scope in the vertical direction. The units are in degrees and valid values range from 0 to 180.
   *
   * @example layer.verticalFieldOfView = 20;
   */
  accessor verticalFieldOfView: number | null | undefined;
  /**
   * Defines the primary unit to be used for all vertical measurements. Valid values: feet, meter.
   *
   * @example layer.verticalMeasurementUnit = "meter";
   */
  accessor verticalMeasurementUnit: "feet" | "meter" | null | undefined;
  /** Prefix used to build the video url path in conjunction with the image attribute. */
  accessor videoPathPrefix: string | null | undefined;
  /** Suffix used to build the video url path in conjunction with the image attribute. */
  accessor videoPathSuffix: string | null | undefined;
  /**
   * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html) against the feature service and
   * returns the number of features that satisfy the query. If no parameters are specified,
   * the total number of features satisfying the layer's configuration/filters is returned.
   *
   * @param query - Specifies the attributes and
   * spatial filter of the query. If no parameters are specified, the total number of features
   * satisfying the layer's configuration/filters is returned.
   * @param options - An object with the following properties.
   * @returns When resolved, returns the number of features that satisfy the query.
   * @since 4.30
   * @example
   * // Queries for the count of all features matching the layer's configurations
   * // e.g. definitionExpression
   * layer.queryFeatureCount().then(function(numFeatures){
   *   // prints the total count to the console
   *   console.log(numFeatures);
   * });
   * @example
   * const layer = new OrientedImageryLayer({
   *   url: fsUrl  // points to an Oriented Imagery layer url
   * });
   *
   * const query = new Query();
   * query.where = "orientedImageryType = 'oblique'";
   *
   * layer.queryFeatureCount(query).then(function(numResults){
   *   console.log(numResults);  // prints the number of results satisfying the query
   * });
   * @see [Sample - Query features from a FeatureLayer](https://developers.arcgis.com/javascript/latest/sample-code/featurelayer-query/)
   * @example
   * // Queries for the count of all features matching the layer's configurations
   * // e.g. definitionExpression
   * layer.queryFeatureCount().then((numFeatures) => {
   *   // prints the total count to the console
   *   console.log(numFeatures);
   * });
   * @example
   * const layer = new FeatureLayer({
   *   url: fsUrl  // points to a Feature Service layer url
   * });
   *
   * const query = new Query();
   * query.where = "region = 'Southern California'";
   *
   * const featureCount = await layer.queryFeatureCount(query);
   * console.log(featureCount);  // prints the number of results satisfying the query
   */
  queryFeatureCount(query?: QueryProperties | null | undefined, options?: RequestOptions): Promise<number>;
  /**
   * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html) against the Oriented Imagery features and returns a
   * [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html) once the promise resolves.
   * A [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html) contains an array of [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html)
   * features, which can be added to the [view's graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#graphics).
   * This array will not be populated if zero results are found.
   *
   * > [!WARNING]
   * >
   * > **Known Limitations**
   * >
   * > Attribute values used in attribute queries executed against layer views are case sensitive.
   * > Spatial queries have the same limitations as those listed in the [projectOperator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html)
   * >   documentation.
   * > Spatial queries are not currently supported if the layer view has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html):
   * >   - GDM 2000 (4742) – Malaysia
   * >   - Gusterberg (Ferro) (8042) – Austria/Czech Republic
   * >   - ISN2016 (8086) - Iceland
   * >   - SVY21 (4757) - Singapore
   *
   * @param query - Specifies the attributes and spatial filter of the query.
   * When no parameters are passed to this method, all features in the client are returned. To only return features
   * visible in the view, set the `geometry` parameter in the query object to the view's extent.
   * @param options - An object with the following properties.
   * @returns When resolved, a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html) containing
   * an array of graphic features is returned.
   * @since 4.29
   * @see [Sample - Select features by rectangle](https://developers.arcgis.com/javascript/latest/sample-code/highlight-features-by-geometry/)
   * @see [Query and filter guide](https://developers.arcgis.com/javascript/latest/query-filter/)
   * @see [Sample - Query features from a FeatureLayer](https://developers.arcgis.com/javascript/latest/sample-code/featurelayer-query/)
   * @see [Query and filter guide](https://developers.arcgis.com/javascript/latest/query-filter/)
   * @example
   * // Queries for all the features matching the layer's configurations
   * // e.g. definitionExpression
   * layer.queryFeatures().then((results) => {
   *   // prints the array of result graphics to the console
   *   console.log(results.features);
   * });
   * @example
   * const layer = new FeatureLayer({
   *   url: fsUrl  // points to a Feature Service layer url
   * });
   *
   * const query = new Query();
   * query.where = "STATE_NAME = 'Washington'";
   * query.outSpatialReference = { wkid: 102100 };
   * query.returnGeometry = true;
   * query.outFields = [ "CITY_NAME" ];
   *
   * layer.queryFeatures(query).then((results) => {
   *   console.log(results.features);  // prints the array of features to the console
   * });
   * @example
   * // Get a query object for the layer's current configuration
   * const queryParams = layer.createQuery();
   * // set a geometry for filtering features by a region of interest
   * queryParams.geometry = extentForRegionOfInterest;
   * // Add to the layer's current definitionExpression
   * queryParams.where = queryParams.where + " AND TYPE = 'Extreme'";
   *
   * // query the layer with the modified params object
   * layer.queryFeatures(queryParams).then((results) => {
   *   // prints the array of result graphics to the console
   *   console.log(results.features);
   * });
   * @example
   * const layer = new FeatureLayer({
   *   url: fsUrl  // points to a Feature Service layer url
   * });
   *
   * // query all features from the layer and only return
   * // attributes specified in outFields.
   * const query = { // autocasts as Query
   *   where: "1=1", // select all features
   *   returnGeometry: false,
   *   outFields: ["State_Name", "City_Name", "pop2010"]
   * };
   *
   * const results = await layer.queryFeatures(query);
   * console.log(results.features);  // prints the array of features to the console
   */
  queryFeatures(query?: QueryProperties | null | undefined, options?: RequestOptions): Promise<FeatureSet>;
  /**
   * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html) against the feature service and returns an
   * array of Object IDs for features that satisfy the input query. If no parameters are specified,
   * then the Object IDs of all features satisfying the layer's configuration/filters are returned.
   *
   * @param query - Specifies the attributes and spatial
   * filter of the query. If no parameters are specified, then the Object IDs of all features
   * satisfying the layer's configuration/filters are returned.
   * @param options - An object with the following properties.
   * @returns When resolved, returns an array of numbers representing the object IDs of the features satisfying the query.
   * @since 4.30
   * @example
   * // Queries for all the Object IDs of features matching the layer's configurations
   * // e.g. definitionExpression
   * layer.queryObjectIds().then(function(results){
   *   // prints the array of Object IDs to the console
   *   console.log(results);
   * });
   * @example
   * const layer = new OrientedImageryLayer({
   *   url: fsUrl  // points to an Oriented Imagery layer url
   * });
   *
   * const query = new Query();
   * query.where = "orientedImageryType = 'oblique'";
   *
   * layer.queryObjectIds(query).then(function(ids){
   *   console.log(ids);  // an array of object IDs
   * });
   * @see [Sample - Query Related Features](https://developers.arcgis.com/javascript/latest/sample-code/query-related-features/)
   * @example
   * // Queries for all the Object IDs of features matching the layer's configurations
   * // e.g. definitionExpression
   * layer.queryObjectIds().then((results) => {
   *   // prints the array of Object IDs to the console
   *   console.log(results);
   * });
   * @example
   * const layer = new FeatureLayer({
   *   url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3"
   * });
   *
   * const query = new Query({
   *   where: "SUB_REGION = 'Pacific'"
   * });
   *
   * const ids = await layer.queryObjectIds(query);
   * console.log(ids);  // an array of object IDs
   */
  queryObjectIds(query?: QueryProperties | null | undefined, options?: RequestOptions): Promise<ObjectId[]>;
  /**
   * Saves the layer to its existing portal item in the [Portal](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html)
   * authenticated within the user's current session. If the layer is not saved to a
   * [PortalItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html), then you should use [saveAs()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#saveAs).
   *
   * @param options - Various options for saving the layer.
   * @returns When resolved, returns the portal item to which the layer is saved.
   * @since 4.31
   * @example const portalItem = await layer.save();
   * @example const portalItem = await layer.save();
   */
  save(options?: LayerSaveOptions): Promise<PortalItem>;
  /**
   * Saves the layer to a new portal item in the [Portal](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html)
   * authenticated within the user's current session.
   *
   * @param portalItem - The portal item to which the layer will be saved.
   * @param options - Various options for saving the layer.
   * @returns When resolved, returns the portal item to which the layer is saved.
   * @since 4.31
   * @example
   * const portalItem = new PortalItem();
   * await layer.saveAs(portalItem);
   * @example
   * const portalItem = new PortalItem();
   * await layer.saveAs(portalItem);
   */
  saveAs(portalItem: PortalItemProperties, options?: LayerSaveAsOptions): Promise<PortalItem>;
}