function metadataSuccess(data, imageryProviderBuilder) {
  if (data.resourceSets.length !== 1) {
    throw new RuntimeError(
      "metadata does not specify one resource in resourceSets",
    );
  }

  const resource = data.resourceSets[0].resources[0];
  imageryProviderBuilder.tileWidth = resource.imageWidth;
  imageryProviderBuilder.tileHeight = resource.imageHeight;
  imageryProviderBuilder.maximumLevel = resource.zoomMax - 1;
  imageryProviderBuilder.imageUrlSubdomains = resource.imageUrlSubdomains;
  imageryProviderBuilder.imageUrlTemplate = resource.imageUrl;

  let validProviders = resource.imageryProviders;
  if (defined(resource.imageryProviders)) {
    // prevent issues with the imagery API from crashing the viewer when the expected properties are not there
    // See https://github.com/CesiumGS/cesium/issues/12088
    validProviders = resource.imageryProviders.filter((provider) =>
      provider.coverageAreas?.some((area) => defined(area.bbox)),
    );
  }
  imageryProviderBuilder.attributionList = validProviders;
}
Complete BingMapsImageryProvider creation based on builder values.

@private

@param {BingMapsImageryProvider} provider