{"version":3,"file":"Resource.js","sourceRoot":"","sources":["../../src/Resource.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Attributes } from '@opentelemetry/api';\nimport type { RawResourceAttribute } from './types';\n\n/**\n * An interface that represents a resource. A Resource describes the entity for which signals (metrics or trace) are\n * collected.\n *\n * This interface is NOT user-implementable. Valid ways to obtain a {@link Resource} are by using either of these functions\n *  - {@link resourceFromAttributes}\n *  - {@link emptyResource}\n *  - {@link defaultResource}\n *  - {@link detectResources}\n */\nexport interface Resource {\n  /**\n   * Check if async attributes have resolved. This is useful to avoid awaiting\n   * waitForAsyncAttributes (which will introduce asynchronous behavior) when not necessary.\n   *\n   * @returns true if the resource \"attributes\" property is not yet settled to its final value\n   */\n  readonly asyncAttributesPending?: boolean;\n\n  /**\n   * @returns the Resource's attributes.\n   */\n  readonly attributes: Attributes;\n\n  /**\n   * @returns the Resource's schema URL or undefined if not set.\n   */\n  readonly schemaUrl?: string;\n\n  /**\n   * Returns a promise that will never be rejected. Resolves when all async attributes have finished being added to\n   * this Resource's attributes. This is useful in exporters to block until resource detection\n   * has finished.\n   */\n  waitForAsyncAttributes?(): Promise<void>;\n\n  /**\n   * Returns a new, merged {@link Resource} by merging the current Resource\n   * with the other Resource. In case of a collision, other Resource takes\n   * precedence.\n   *\n   * @param other the Resource that will be merged with this.\n   * @returns the newly merged Resource.\n   */\n  merge(other: Resource | null): Resource;\n\n  getRawAttributes(): RawResourceAttribute[];\n}\n"]}