"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Meters = void 0;
const codegen_1 = require("../codegen");
const base_1 = require("./base");
class Meters extends base_1.BaseResource {
    constructor(apiConfig) {
        super(apiConfig);
        this.api = new codegen_1.MetersApi(apiConfig);
    }
    /**
     * Create a new Meter.
     */
    create(createMeterArgs, overrides) {
        return this.api.metersPost({ createMeterArgs }, overrides);
    }
    /**
     * Fetch a meter by its unique name.
     */
    retrieve(meterName, overrides) {
        return this.api.metersMeterNameGet({ meterName }, overrides);
    }
    /**
     * Update a meter by its unique name.
     */
    update(meterName, updateMeterArgs, overrides) {
        return this.api.metersMeterNamePut({ updateMeterArgs, meterName }, overrides);
    }
    /**
     * Retrieve all meters for a given vendor.
     */
    list(overrides) {
        return this.api.metersGet(overrides);
    }
    /**
     * Delete a meter by its unique name.
     */
    delete(meterName, overrides) {
        // NOTE: there's no need to format the response from a delete endpoint
        return this.api.metersMeterNameDelete({ meterName }, overrides);
    }
}
exports.Meters = Meters;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWV0ZXJzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3Jlc291cmNlcy9tZXRlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsd0NBTW9CO0FBQ3BCLGlDQUFzQztBQUV0QyxNQUFNLE1BQU8sU0FBUSxtQkFBWTtJQUcvQixZQUFZLFNBQTJCO1FBQ3JDLEtBQUssQ0FBQyxTQUFTLENBQUMsQ0FBQztRQUNqQixJQUFJLENBQUMsR0FBRyxHQUFHLElBQUksbUJBQVMsQ0FBQyxTQUFTLENBQUMsQ0FBQztJQUN0QyxDQUFDO0lBRUQ7O09BRUc7SUFDSSxNQUFNLENBQ1gsZUFBZ0MsRUFDaEMsU0FBdUI7UUFFdkIsT0FBTyxJQUFJLENBQUMsR0FBRyxDQUFDLFVBQVUsQ0FBQyxFQUFFLGV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