"use strict";
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.Uuid = void 0;
const codegen_1 = require("@azure-tools/codegen");
const string_1 = require("./string");
class Uuid extends string_1.String {
    constructor(schema, isRequired) {
        super(schema, isRequired);
    }
    get declaration() {
        return 'string';
    }
    validatePresence(eventListener, property) {
        return this.isRequired ? `await ${eventListener}.AssertNotNull(${(0, codegen_1.nameof)(property.value)},${property});`.trim() : '';
    }
    validateValue(eventListener, property) {
        return `await ${eventListener}.AssertRegEx(${(0, codegen_1.nameof)(property.value)},${property},@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$");`;
    }
}
exports.Uuid = Uuid;
//# sourceMappingURL=Uuid.js.map