@broadcom/ca7-for-zowe-cli
Version:
CA 7 Workload Automation Plug-in for Zowe CLI
68 lines • 3.26 kB
JavaScript
;
/*
* Copyright © 202X Broadcom Inc. and/or its subsidiaries
* © 202X Broadcom Inc and/or its subsidiaries; All rights reserved
*/
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 PutSchedule_1 = require("../../../api/PutSchedule");
const CA7BaseHandler_1 = require("../../CA7BaseHandler");
const CA7ResponseUtil_1 = require("../../../util/CA7ResponseUtil");
/* Command handler for updating request predecessor
* @export
* @class PutReqPredHandler
* @extends {CA7BaseHandler}
*/
class PutScheduleHandler extends CA7BaseHandler_1.CA7BaseHandler {
/**
* Process the Put command.
* @param {IHandlerParameters} params
* @param session
* @returns {Promise<void>}
* @memberof PutScheduleHandler
*/
processWithSession(params, session) {
return __awaiter(this, void 0, void 0, function* () {
const parms = {
"job": params.arguments.job,
"schid": params.arguments.schid,
"scal": params.arguments.scal,
"default-scal": params.arguments["default-scal"],
"due-out-time": params.arguments["due-out-time"],
"lead-time": params.arguments["lead-time"],
"submit-time": params.arguments["submit-time"],
"daily": params.arguments.daily,
"roll": params.arguments.roll,
"index": params.arguments.index,
"interval": params.arguments.interval,
"type": params.arguments.type,
"count": params.arguments.count,
"weekly": params.arguments.weekly,
"days": params.arguments.days,
"monthly": params.arguments.monthly,
"months": params.arguments.months,
"week-of-months": params.arguments["week-of-months"],
"day-of-week": params.arguments["day-of-week"],
"relative-day": params.arguments["relative-day"],
"annual": params.arguments.annual,
"day-of-year": params.arguments["day-of-year"],
"symmetric": params.arguments.symmetric,
"start": params.arguments.start,
"span": params.arguments.span
};
let ca7Response;
ca7Response = yield PutSchedule_1.PutSchedule.putSchedule(session, parms);
CA7ResponseUtil_1.CA7ResponseUtil.responseWithMessage(params, ca7Response);
});
}
}
exports.default = PutScheduleHandler;
//# sourceMappingURL=PutSchedule.handler.js.map