UNPKG

@broadcom/ca7-for-zowe-cli

Version:

CA 7 Workload Automation Plug-in for Zowe CLI

68 lines 3.28 kB
"use strict"; /* * 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 PostSchedule_1 = require("../../../api/PostSchedule"); const CA7BaseHandler_1 = require("../../CA7BaseHandler"); const CA7ResponseUtil_1 = require("../../../util/CA7ResponseUtil"); /* Command handler for creating delete schedule for a job. * @export * @class PostScheduleHandler * @extends {CA7BaseHandler} */ class PostScheduleHandler extends CA7BaseHandler_1.CA7BaseHandler { /** * Process the Post command. * @param {IHandlerParameters} params * @param session * @returns {Promise<void>} * @memberof PostScheduleHandler */ 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 PostSchedule_1.PostSchedule.postSchedule(session, parms); CA7ResponseUtil_1.CA7ResponseUtil.responseWithMessage(params, ca7Response); }); } } exports.default = PostScheduleHandler; //# sourceMappingURL=PostSchedule.handler.js.map