import { z } from 'zod';
import { globalOptionsZod } from '../../../../Command.js';
import request from '../../../../request.js';
import GraphCommand from '../../../base/GraphCommand.js';
import commands from '../../commands.js';
export const options = z.strictObject({
    ...globalOptionsZod.shape,
    id: z.string().alias('i')
});
class GraphSchemaExtensionGetCommand extends GraphCommand {
    get name() {
        return commands.SCHEMAEXTENSION_GET;
    }
    get description() {
        return 'Gets the properties of the specified schema extension definition';
    }
    get schema() {
        return options;
    }
    async commandAction(logger, args) {
        if (this.verbose) {
            await logger.logToStderr(`Gets the properties of the specified schema extension definition with id '${args.options.id}'...`);
        }
        const requestOptions = {
            url: `${this.resource}/v1.0/schemaExtensions/${args.options.id}`,
            headers: {
                accept: 'application/json;odata.metadata=none',
                'content-type': 'application/json'
            },
            responseType: 'json'
        };
        try {
            const res = await request.get(requestOptions);
            await logger.log(res);
        }
        catch (err) {
            this.handleRejectedODataJsonPromise(err);
        }
    }
}
export default new GraphSchemaExtensionGetCommand();
//# sourceMappingURL=schemaextension-get.js.map