/** * Metadata API v1 * The `metadata` service provides a way to get information (metadata) about layers and partitions stored in a catalog. * This service exposes the metadata for all the partitions or all the changed partitions. For a catalog with versioned layers, * you can retrieve metadata for a particular version or version range of the catalog. * You can perform the following operations for a catalog with versioned layers: * - List versions of the catalog - Get latest and minimum version of the catalog * - Get metadata of the specific layers For a volatile layer, you can get metadata for all or a subset of partitions of the layer. * * OpenAPI spec version: 1.0.0 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * * Do not edit the class manually. */ import { RequestBuilder } from "./RequestBuilder"; /** * Describes catalog layer version. */ export interface LayerVersion { /** * Layer ID */ layer: string; /** * Version of the layer when it was last updated */ version: number; /** * Timestamp that indicates when the version of the layer was created. * It is equal to 'timestamp' field corresponding to catalog version. */ timestamp: number; } /** * Describes the list of the layer versions for a given catalog version. */ export interface LayerVersions { /** * List of layer versions */ layerVersions: LayerVersion[]; /** * Catalog version */ version: number; } /** * Describes the partition object which is unique within a layer. */ export interface Partition { /** * The checksum field is optional. * The response includes the checksum only if you specify `checksum` in the `additionalFields` query parameter, * and if a checksum was specified in the partition metadata when it was published. * You need to use the SHA-1 checksum of the data content if you want data comparison to work for this catalog. * The maximum length of the checksum field is 128 characters. */ checksum?: string; /** * Optional value for the size of the compressed partition data in bytes. * The response only includes the compressed data size if you specify `compressedDataSize` in the `additionalFields` query parameter, * and if compression is enabled, and if `compressedDataSize` was specified in the partition metadata when it was published. */ compressedDataSize?: number; /** * You use the data handle when retrieving the data that relates to this partition. * The data handle identifies a specific blob so that you can request the blob's contents with the Blob API. * When requesting data from the Blob API, you must specify the catalog ID, layer ID and the dataHandle. */ dataHandle: string; /** * Optional value for the size of the partition data in bytes. * The response only includes the data size if you specify `dataSize` in the `additionalFields` query parameter, * and if `dataSize` was specified in the partition metadata when it was published. */ dataSize?: number; /** * The partition key. This is a unique key for a partition within a layer. * If the layer's partitioning scheme is set to `heretile`, the partition key is equivalent to the tile key. * The partition key cannot be empty. The maximum length of the partition key is 500 characters. */ partition: string; /** * For active versioned partitions, the version of the catalog when this partition was last changed. * For volatile partitions this will always be -1 */ version: number; /** * Optional value for the CRC of the partition data in bytes. * The response only includes the data size if crc was specified in the additionalFields query parameter, * and if crc was specified in the partition metadata when it was published. */ crc?: string; } /** * Describes a list of partitions for a given layer and layer version. */ export interface Partitions { partitions: Partition[]; /** * If the number of results exceeds the limit, then this uri will be present and will provide the path to the next batch of results. */ next?: string; } /** * Describes the properties of the version dependencies. */ export interface VersionDependency { /** * Indicates the type of data dependency. * If this value is set to false, this dependency is an indirect dependency. * This means that data from this catalog was not directly used by a data * processing pipeline to update the current version of the catalog. * Instead, the data was only used by upstream pipeline(s) to generate the input data. */ direct: boolean; /** * The HERE Resource Name (HRN) of the catalog that the batch commit depends on. */ hrn: string; /** * The version of the catalog metadata that the batch commit depends on. */ version: number; } /** * Describes properties for the catalog version. */ export interface VersionInfo { /** * A list of the catalog dependencies. */ dependencies: VersionDependency[]; /** * A map of the layers in the catalog and their partition counts. The map is expressed in key value pairs. */ partitionCounts?: { [key: string]: number; }; /** * Timestamp that indicates when the version was created. */ timestamp: number; /** * The version of the catalog metadata. * It is incremented every time you change catalog metadata e.g. by publishing new partitions to durable layers. */ version: number; } /** * Describes the list of version information for a catalog. */ export interface VersionInfos { versions: VersionInfo[]; } /** * The version of the catalog. */ export interface VersionResponse { /** * The version of the catalog metadata. * It is incremented every time you change catalog metadata e.g. by publishing new partitions to durable layers. */ version: number; } /** * Gets the latest partition metadata in a version range for a versioned layer or a time range for a volatile layer. * For versioned layers the range is expressed as a start and end version and might not return all changes for the partitions * which were added and removed in between the specified start and end versions. * * @summary Gets changes for the version range. * @param layerId Unique layer ID. Content of this parameter must refer to a valid layer ID. * @param startVersion Mandatory for versioned layers; the beginning of the range of versions you want to get (exclusive). * By convention -1 indicates the initial version before the first publication. After the first publication, the catalog version is 0. * @param endVersion Mandatory for versioned layers; the end of the range of versions you want to get (inclusive). * This must be a valid catalog version greater than the startVersion. * @param sinceTime Mandatory for volatile layers; will return partitions whose data has been modified since this time, * in milliseconds since epoch, inclusive. * @param additionalFields Additional fields - `dataSize`, `checksum`, `compressedDataSize` * @param range Use this parameter to resume download of a large response for versioned layers when there * is a connection issue between the client and server. Specify a single byte range offset like this: `Range: bytes=10-`. * This parameter is compliant with [RFC 7233](https://tools.ietf.org/html/rfc7233), * but note that this parameter only supports a single byte range. * The `range` parameter can also be specified as a query parameter, i.e. `range=bytes=10-`. * For volatile layers use the pagination links returned in the response body. * @param billingTag Billing Tag is an optional free-form tag which is used for grouping billing records together. * If supplied, it must be between 4 - 16 characters, contain only alpha/numeric ASCII characters [A-Za-z0-9]. * Grouping billing records by billing tag will be available in future releases. */ export declare function getChanges(builder: RequestBuilder, params: { layerId: string; startVersion?: number; endVersion?: number; sinceTime?: number; additionalFields?: string[]; range?: string; billingTag?: string; }): Promise; /** * Returns information about layer versions for the catalog version. * It will return an error if the catalog does not have any versions or if the version passed in the query parameter does not exist. * If a layer does not have any data for the requested version it is excluded from the response. * * @summary Gets layer versions for catalog version * @param version Catalog version * @param billingTag Billing Tag is an optional free-form tag which is used for grouping billing records together. * If supplied, it must be between 4 - 16 characters, contain only alphanumeric ASCII characters [A-Za-z0-9]. * Grouping billing records by billing tag will be available in future releases. */ export declare function getLayerVersions(builder: RequestBuilder, params: { version: number; billingTag?: string; }): Promise; /** * Gets the metadata for all partitions in a specific layer. * * @summary Gets partitions * @param layerId Unique layer ID. Content of this parameter must refer to a valid layer ID. * @param version If you are getting metadata from a versioned layer, specify the version of the layer you want. * This parameter is required for versioned layers. If you are getting metadata from another layer type, do not specify this parameter. * @param additionalFields Additional fields - `dataSize`, `checksum`, `compressedDataSize` * @param range Use this parameter to resume download of a large response for versioned layers when there is a connection * issue between the client and server. Specify a single byte range offset like this: `Range: bytes=10-`. * This parameter is compliant with [RFC 7233](https://tools.ietf.org/html/rfc7233), * but note that this parameter only supports a single byte range. * The `range` parameter can also be specified as a query parameter, i.e. `range=bytes=10-`. * For volatile layers use the pagination links returned in the response body. * @param billingTag Billing Tag is an optional free-form tag which is used for grouping billing records together. * If supplied, it must be between 4 - 16 characters, contain only alpha/numeric ASCII characters [A-Za-z0-9]. * Grouping billing records by billing tag will be available in future releases. */ export declare function getPartitions(builder: RequestBuilder, params: { layerId: string; version?: number; additionalFields?: string[]; range?: string; billingTag?: string; }): Promise; /** * Returns information about the latest version for the given catalog. If the catalog doesn't contain any versions a 404 will be returned. * * @summary Gets the latest available catalog version * @param startVersion The catalog version returned from a prior request to `/versions/latest`. * You should save the version from each request so that you can use it in the `startVersion` parameter of subsequent requests. * If you don't have the version from a prior request, set the parameter to -1. * @param billingTag Billing Tag is an optional free-form tag which is used for grouping billing records together. * If supplied, it must be between 4 - 16 characters, contain only alpha/numeric ASCII characters [A-Za-z0-9]. * Grouping billing records by billing tag will be available in future releases. */ export declare function latestVersion(builder: RequestBuilder, params: { startVersion: number; billingTag?: string; }): Promise; /** * Returns information about specific catalog version(s). * If the catalog doesn't contain any versions 404 will be returned. * Maximum number of versions to be returned per call is 1000 versions. * If requested range is bigger than 1000 versions 400 Bad Request will be returned * * @summary Gets catalog versions * @param startVersion The beginning of the range of versions you want to get (exclusive). * By convention -1 indicates the initial version before the first publication. After the first publication, the catalog version is 0. * @param endVersion The end of the range of versions you want to get (inclusive). * This must be a valid catalog version greater than the startVersion. * The maximum value for this parameter is returned from the `/versions/latest` endpoint. * If this version does not exist, 400 Bad Request is returned * @param billingTag Billing Tag is an optional free-form tag which is used for grouping billing records together. * If supplied, it must be between 4 - 16 characters, contain only alpha/numeric ASCII characters [A-Za-z0-9]. * Grouping billing records by billing tag will be available in future releases. */ export declare function listVersions(builder: RequestBuilder, params: { startVersion: number; endVersion: number; billingTag?: string; }): Promise; /** * Returns minimum version for the given catalog. If the catalog doesn't contain any versions 404 will be returned. * * @summary Gets the earliest available catalog version * @param billingTag Billing Tag is an optional free-form tag which is used for grouping billing records together. * If supplied, it must be between 4 - 16 characters, contain only alpha/numeric ASCII characters [A-Za-z0-9]. * Grouping billing records by billing tag will be available in future releases. */ export declare function minimumVersion(builder: RequestBuilder, params: { billingTag?: string; }): Promise;