"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", { value: true });
const _$$$MsClient = require("cn.keytop.midend.microservice.Client");
/**
 * 使用示例：111
 * import * as orgAdminClient from 'stc.ms.OrgAdminClient'
 *
 * const orgAdminClient = new orgAdminClient.OrgAdminClient()
 *  orgAdminClient.fun1('aaa','bbb','ccc')
 * .catch(error => {console.log(error)})
 * .then(value => {console.log(value)})
 *
 *
 * @author 微服务平台自动生成
 * @desc [演示-组织机构基本信息管理]接口定义
 * @date 2020-03-31 17:29:34
 **/
class OrgAdminClient {
    constructor(serviceClientConfig = new _$$$MsClient.ServiceClientConfig()) {
        this.pid = 'stc.ms.OrgAdmin';
        this.version = '1.2';
        this.authType = _$$$MsClient.AuthType.BASE;
        this.serviceClient = new _$$$MsClient.ServiceClientImpl(serviceClientConfig);
    }
    add(addCmOrgDTO) {
        return __awaiter(this, void 0, void 0, function* () {
            let sid = `${this.pid}.add`;
            let tags = '';
            let header = { uri: 'org/add', pid: `${this.pid}` };
            let paramMap = {};
            let bodyObj = addCmOrgDTO;
            let response = yield this.serviceClient.call(_$$$MsClient.HttpMethodType.POST, sid, this.version, tags, header, paramMap, bodyObj, this.authType, _$$$MsClient.RequestBodyType.RAW_JSON);
            if (!response) {
                return response;
            }
            else {
                return new Add$Models.OpResult(response);
            }
        });
    }
    update(cmOrg) {
        return __awaiter(this, void 0, void 0, function* () {
            let sid = `${this.pid}.update`;
            let tags = '';
            let header = { uri: 'org/update', pid: `${this.pid}` };
            let paramMap = {};
            let bodyObj = cmOrg;
            let response = yield this.serviceClient.call(_$$$MsClient.HttpMethodType.POST, sid, this.version, tags, header, paramMap, bodyObj, this.authType, _$$$MsClient.RequestBodyType.RAW_JSON);
            if (!response) {
                return response;
            }
            else {
                return new Update$Models.OpResult(response);
            }
        });
    }
    delete(id) {
        return __awaiter(this, void 0, void 0, function* () {
            let sid = `${this.pid}.delete`;
            let tags = '';
            let header = { uri: 'org/delete', pid: `${this.pid}` };
            let paramMap = {};
            paramMap = { id: id };
            let response = yield this.serviceClient.call(_$$$MsClient.HttpMethodType.POST, sid, this.version, tags, header, paramMap, {}, this.authType, _$$$MsClient.RequestBodyType.WWW_FORM);
            if (!response) {
                return response;
            }
            else {
                return new Delete$Models.OpResult(response);
            }
        });
    }
    get(id) {
        return __awaiter(this, void 0, void 0, function* () {
            let sid = `${this.pid}.get`;
            let tags = '';
            let header = { uri: 'org/get', pid: `${this.pid}` };
            let paramMap = {};
            paramMap = { id: id };
            let response = yield this.serviceClient.get(sid, this.version, tags, header, paramMap, this.authType);
            if (!response) {
                return response;
            }
            else {
                return new Get$Models.OpResult(response);
            }
        });
    }
}
exports.OrgAdminClient = OrgAdminClient;
var Add$Models;
(function (Add$Models) {
    class AddCmOrgDTO {
    }
    Add$Models.AddCmOrgDTO = AddCmOrgDTO;
    class OpResult {
        constructor(value) {
            this._ms_response_data$$$ = value;
            if (value) {
                this._data = value.data;
            }
            if (value) {
                this._sUCCESS = new OpResult(value.SUCCESS);
            }
            if (value) {
                this._fAIL = new OpResult(value.FAIL);
            }
        }
        get code() {
            return this._ms_response_data$$$.code;
        }
        set code(value) {
            this._ms_response_data$$$.code = value;
        }
        get message() {
            return this._ms_response_data$$$.message;
        }
        set message(value) {
            this._ms_response_data$$$.message = value;
        }
        get data() {
            return this._data;
        }
        set data(value) {
            this._data = value;
        }
        get SUCCESS() {
            return this._sUCCESS;
        }
        set SUCCESS(value) {
            this._sUCCESS = value;
        }
        get FAIL() {
            return this._fAIL;
        }
        set FAIL(value) {
            this._fAIL = value;
        }
    }
    Add$Models.OpResult = OpResult;
})(Add$Models = exports.Add$Models || (exports.Add$Models = {}));
var Update$Models;
(function (Update$Models) {
    class CmOrg {
    }
    Update$Models.CmOrg = CmOrg;
    class OpResult {
        constructor(value) {
            this._ms_response_data$$$ = value;
            if (value) {
                this._data = value.data;
            }
            if (value) {
                this._sUCCESS = new OpResult(value.SUCCESS);
            }
            if (value) {
                this._fAIL = new OpResult(value.FAIL);
            }
        }
        get code() {
            return this._ms_response_data$$$.code;
        }
        set code(value) {
            this._ms_response_data$$$.code = value;
        }
        get message() {
            return this._ms_response_data$$$.message;
        }
        set message(value) {
            this._ms_response_data$$$.message = value;
        }
        get data() {
            return this._data;
        }
        set data(value) {
            this._data = value;
        }
        get SUCCESS() {
            return this._sUCCESS;
        }
        set SUCCESS(value) {
            this._sUCCESS = value;
        }
        get FAIL() {
            return this._fAIL;
        }
        set FAIL(value) {
            this._fAIL = value;
        }
    }
    Update$Models.OpResult = OpResult;
})(Update$Models = exports.Update$Models || (exports.Update$Models = {}));
var Delete$Models;
(function (Delete$Models) {
    class OpResult {
        constructor(value) {
            this._ms_response_data$$$ = value;
            if (value) {
                this._data = value.data;
            }
            if (value) {
                this._sUCCESS = new OpResult(value.SUCCESS);
            }
            if (value) {
                this._fAIL = new OpResult(value.FAIL);
            }
        }
        get code() {
            return this._ms_response_data$$$.code;
        }
        set code(value) {
            this._ms_response_data$$$.code = value;
        }
        get message() {
            return this._ms_response_data$$$.message;
        }
        set message(value) {
            this._ms_response_data$$$.message = value;
        }
        get data() {
            return this._data;
        }
        set data(value) {
            this._data = value;
        }
        get SUCCESS() {
            return this._sUCCESS;
        }
        set SUCCESS(value) {
            this._sUCCESS = value;
        }
        get FAIL() {
            return this._fAIL;
        }
        set FAIL(value) {
            this._fAIL = value;
        }
    }
    Delete$Models.OpResult = OpResult;
})(Delete$Models = exports.Delete$Models || (exports.Delete$Models = {}));
var Get$Models;
(function (Get$Models) {
    class OpResult {
        constructor(value) {
            this._ms_response_data$$$ = value;
            if (value) {
                this._data = value.data;
            }
            if (value) {
                this._sUCCESS = new OpResult(value.SUCCESS);
            }
            if (value) {
                this._fAIL = new OpResult(value.FAIL);
            }
        }
        get code() {
            return this._ms_response_data$$$.code;
        }
        set code(value) {
            this._ms_response_data$$$.code = value;
        }
        get message() {
            return this._ms_response_data$$$.message;
        }
        set message(value) {
            this._ms_response_data$$$.message = value;
        }
        get data() {
            return this._data;
        }
        set data(value) {
            this._data = value;
        }
        get SUCCESS() {
            return this._sUCCESS;
        }
        set SUCCESS(value) {
            this._sUCCESS = value;
        }
        get FAIL() {
            return this._fAIL;
        }
        set FAIL(value) {
            this._fAIL = value;
        }
    }
    Get$Models.OpResult = OpResult;
})(Get$Models = exports.Get$Models || (exports.Get$Models = {}));
//# sourceMappingURL=index.js.map