"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MainpropertytypeController = void 0;
const tslib_1 = require("tslib");
const repository_1 = require("@loopback/repository");
const rest_1 = require("@loopback/rest");
const models_1 = require("../models");
const repositories_1 = require("../repositories");
let MainpropertytypeController = class MainpropertytypeController {
    constructor(mainProperttyTypeMasterRepository) {
        this.mainProperttyTypeMasterRepository = mainProperttyTypeMasterRepository;
    }
    async create(mainProperttyTypeMaster) {
        return this.mainProperttyTypeMasterRepository.create(mainProperttyTypeMaster);
    }
    async count(where) {
        return this.mainProperttyTypeMasterRepository.count(where);
    }
    async find(filter) {
        return this.mainProperttyTypeMasterRepository.find(filter);
    }
    async updateAll(mainProperttyTypeMaster, where) {
        return this.mainProperttyTypeMasterRepository.updateAll(mainProperttyTypeMaster, where);
    }
    async findById(id, filter) {
        return this.mainProperttyTypeMasterRepository.findById(id, filter);
    }
    async updateById(id, mainProperttyTypeMaster) {
        await this.mainProperttyTypeMasterRepository.updateById(id, mainProperttyTypeMaster);
    }
    async replaceById(id, mainProperttyTypeMaster) {
        await this.mainProperttyTypeMasterRepository.replaceById(id, mainProperttyTypeMaster);
    }
    async deleteById(id) {
        await this.mainProperttyTypeMasterRepository.deleteById(id);
    }
};
exports.MainpropertytypeController = MainpropertytypeController;
tslib_1.__decorate([
    (0, rest_1.post)('/main-propertty-type-masters'),
    (0, rest_1.response)(200, {
        description: 'MainProperttyTypeMaster model instance',
        content: { 'application/json': { schema: (0, rest_1.getModelSchemaRef)(models_1.MainProperttyTypeMaster) } },
    }),
    tslib_1.__param(0, (0, rest_1.requestBody)({
        content: {
            'application/json': {
                schema: (0, rest_1.getModelSchemaRef)(models_1.MainProperttyTypeMaster, {
                    title: 'NewMainProperttyTypeMaster',
                    exclude: ['mainpropertytypeId	'],
                }),
            },
        },
    })),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", [Object]),
    tslib_1.__metadata("design:returntype", Promise)
], MainpropertytypeController.prototype, "create", null);
tslib_1.__decorate([
    (0, rest_1.get)('/main-propertty-type-masters/count'),
    (0, rest_1.response)(200, {
        description: 'MainProperttyTypeMaster model count',
        content: { 'application/json': { schema: repository_1.CountSchema } },
    }),
    tslib_1.__param(0, rest_1.param.where(models_1.MainProperttyTypeMaster)),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", [Object]),
    tslib_1.__metadata("design:returntype", Promise)
], MainpropertytypeController.prototype, "count", null);
tslib_1.__decorate([
    (0, rest_1.get)('/main-propertty-type-masters'),
    (0, rest_1.response)(200, {
        description: 'Array of MainProperttyTypeMaster model instances',
        content: {
            'application/json': {
                schema: {
                    type: 'array',
                    items: (0, rest_1.getModelSchemaRef)(models_1.MainProperttyTypeMaster, { includeRelations: true }),
                },
            },
        },
    }),
    tslib_1.__param(0, rest_1.param.filter(models_1.MainProperttyTypeMaster)),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", [Object]),
    tslib_1.__metadata("design:returntype", Promise)
], MainpropertytypeController.prototype, "find", null);
tslib_1.__decorate([
    (0, rest_1.patch)('/main-propertty-type-masters'),
    (0, rest_1.response)(200, {
        description: 'MainProperttyTypeMaster PATCH success count',
        content: { 'application/json': { schema: repository_1.CountSchema } },
    }),
    tslib_1.__param(0, (0, rest_1.requestBody)({
        content: {
            'application/json': {
                schema: (0, rest_1.getModelSchemaRef)(models_1.MainProperttyTypeMaster, { partial: true }),
            },
        },
    })),
    tslib_1.__param(1, rest_1.param.where(models_1.MainProperttyTypeMaster)),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", [models_1.MainProperttyTypeMaster, Object]),
    tslib_1.__metadata("design:returntype", Promise)
], MainpropertytypeController.prototype, "updateAll", null);
tslib_1.__decorate([
    (0, rest_1.get)('/main-propertty-type-masters/{id}'),
    (0, rest_1.response)(200, {
        description: 'MainProperttyTypeMaster model instance',
        content: {
            'application/json': {
                schema: (0, rest_1.getModelSchemaRef)(models_1.MainProperttyTypeMaster, { includeRelations: true }),
            },
        },
    }),
    tslib_1.__param(0, rest_1.param.path.number('id')),
    tslib_1.__param(1, rest_1.param.filter(models_1.MainProperttyTypeMaster, { exclude: 'where' })),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", [Number, Object]),
    tslib_1.__metadata("design:returntype", Promise)
], MainpropertytypeController.prototype, "findById", null);
tslib_1.__decorate([
    (0, rest_1.patch)('/main-propertty-type-masters/{id}'),
    (0, rest_1.response)(204, {
        description: 'MainProperttyTypeMaster PATCH success',
    }),
    tslib_1.__param(0, rest_1.param.path.number('id')),
    tslib_1.__param(1, (0, rest_1.requestBody)({
        content: {
            'application/json': {
                schema: (0, rest_1.getModelSchemaRef)(models_1.MainProperttyTypeMaster, { partial: true }),
            },
        },
    })),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", [Number, models_1.MainProperttyTypeMaster]),
    tslib_1.__metadata("design:returntype", Promise)
], MainpropertytypeController.prototype, "updateById", null);
tslib_1.__decorate([
    (0, rest_1.put)('/main-propertty-type-masters/{id}'),
    (0, rest_1.response)(204, {
        description: 'MainProperttyTypeMaster PUT success',
    }),
    tslib_1.__param(0, rest_1.param.path.number('id')),
    tslib_1.__param(1, (0, rest_1.requestBody)()),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", [Number, models_1.MainProperttyTypeMaster]),
    tslib_1.__metadata("design:returntype", Promise)
], MainpropertytypeController.prototype, "replaceById", null);
tslib_1.__decorate([
    (0, rest_1.del)('/main-propertty-type-masters/{id}'),
    (0, rest_1.response)(204, {
        description: 'MainProperttyTypeMaster DELETE success',
    }),
    tslib_1.__param(0, rest_1.param.path.number('id')),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", [Number]),
    tslib_1.__metadata("design:returntype", Promise)
], MainpropertytypeController.prototype, "deleteById", null);
exports.MainpropertytypeController = MainpropertytypeController = tslib_1.__decorate([
    tslib_1.__param(0, (0, repository_1.repository)(repositories_1.MainProperttyTypeMasterRepository)),
    tslib_1.__metadata("design:paramtypes", [repositories_1.MainProperttyTypeMasterRepository])
], MainpropertytypeController);
//# sourceMappingURL=mainpropertytype.controller.js.map