UNPKG

azure-arm-scheduler

Version:

Microsoft Azure Scheduler Management Client Library for node

205 lines (199 loc) 8.76 kB
/* * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ 'use strict'; const models = require('./index'); /** * Class representing a JobProperties. */ class JobProperties { /** * Create a JobProperties. * @member {date} [startTime] Gets or sets the job start time. * @member {object} [action] Gets or sets the job action. * @member {string} [action.type] Gets or sets the job action type. Possible * values include: 'Http', 'Https', 'StorageQueue', 'ServiceBusQueue', * 'ServiceBusTopic' * @member {object} [action.request] Gets or sets the http requests. * @member {object} [action.request.authentication] Gets or sets the * authentication method of the request. * @member {string} [action.request.authentication.type] Polymorphic * Discriminator * @member {string} [action.request.uri] Gets or sets the URI of the request. * @member {string} [action.request.method] Gets or sets the method of the * request. * @member {string} [action.request.body] Gets or sets the request body. * @member {object} [action.request.headers] Gets or sets the headers. * @member {object} [action.queueMessage] Gets or sets the storage queue * message. * @member {string} [action.queueMessage.storageAccount] Gets or sets the * storage account name. * @member {string} [action.queueMessage.queueName] Gets or sets the queue * name. * @member {string} [action.queueMessage.sasToken] Gets or sets the SAS key. * @member {string} [action.queueMessage.message] Gets or sets the message. * @member {object} [action.serviceBusQueueMessage] Gets or sets the service * bus queue message. * @member {string} [action.serviceBusQueueMessage.queueName] Gets or sets * the queue name. * @member {object} [action.serviceBusTopicMessage] Gets or sets the service * bus topic message. * @member {string} [action.serviceBusTopicMessage.topicPath] Gets or sets * the topic path. * @member {object} [action.retryPolicy] Gets or sets the retry policy. * @member {string} [action.retryPolicy.retryType] Gets or sets the retry * strategy to be used. Possible values include: 'None', 'Fixed' * @member {moment.duration} [action.retryPolicy.retryInterval] Gets or sets * the retry interval between retries, specify duration in ISO 8601 format. * @member {number} [action.retryPolicy.retryCount] Gets or sets the number * of times a retry should be attempted. * @member {object} [action.errorAction] Gets or sets the error action. * @member {string} [action.errorAction.type] Gets or sets the job error * action type. Possible values include: 'Http', 'Https', 'StorageQueue', * 'ServiceBusQueue', 'ServiceBusTopic' * @member {object} [action.errorAction.request] Gets or sets the http * requests. * @member {object} [action.errorAction.request.authentication] Gets or sets * the authentication method of the request. * @member {string} [action.errorAction.request.authentication.type] * Polymorphic Discriminator * @member {string} [action.errorAction.request.uri] Gets or sets the URI of * the request. * @member {string} [action.errorAction.request.method] Gets or sets the * method of the request. * @member {string} [action.errorAction.request.body] Gets or sets the * request body. * @member {object} [action.errorAction.request.headers] Gets or sets the * headers. * @member {object} [action.errorAction.queueMessage] Gets or sets the * storage queue message. * @member {string} [action.errorAction.queueMessage.storageAccount] Gets or * sets the storage account name. * @member {string} [action.errorAction.queueMessage.queueName] Gets or sets * the queue name. * @member {string} [action.errorAction.queueMessage.sasToken] Gets or sets * the SAS key. * @member {string} [action.errorAction.queueMessage.message] Gets or sets * the message. * @member {object} [action.errorAction.serviceBusQueueMessage] Gets or sets * the service bus queue message. * @member {string} [action.errorAction.serviceBusQueueMessage.queueName] * Gets or sets the queue name. * @member {object} [action.errorAction.serviceBusTopicMessage] Gets or sets * the service bus topic message. * @member {string} [action.errorAction.serviceBusTopicMessage.topicPath] * Gets or sets the topic path. * @member {object} [action.errorAction.retryPolicy] Gets or sets the retry * policy. * @member {string} [action.errorAction.retryPolicy.retryType] Gets or sets * the retry strategy to be used. Possible values include: 'None', 'Fixed' * @member {moment.duration} [action.errorAction.retryPolicy.retryInterval] * Gets or sets the retry interval between retries, specify duration in ISO * 8601 format. * @member {number} [action.errorAction.retryPolicy.retryCount] Gets or sets * the number of times a retry should be attempted. * @member {object} [recurrence] Gets or sets the job recurrence. * @member {string} [recurrence.frequency] Gets or sets the frequency of * recurrence (second, minute, hour, day, week, month). Possible values * include: 'Minute', 'Hour', 'Day', 'Week', 'Month' * @member {number} [recurrence.interval] Gets or sets the interval between * retries. * @member {number} [recurrence.count] Gets or sets the maximum number of * times that the job should run. * @member {date} [recurrence.endTime] Gets or sets the time at which the job * will complete. * @member {object} [recurrence.schedule] * @member {array} [recurrence.schedule.weekDays] Gets or sets the days of * the week that the job should execute on. * @member {array} [recurrence.schedule.hours] Gets or sets the hours of the * day that the job should execute at. * @member {array} [recurrence.schedule.minutes] Gets or sets the minutes of * the hour that the job should execute at. * @member {array} [recurrence.schedule.monthDays] Gets or sets the days of * the month that the job should execute on. Must be between 1 and 31. * @member {array} [recurrence.schedule.monthlyOccurrences] Gets or sets the * occurrences of days within a month. * @member {string} [state] Gets or set the job state. Possible values * include: 'Enabled', 'Disabled', 'Faulted', 'Completed' * @member {object} [status] Gets the job status. * @member {number} [status.executionCount] Gets the number of times this job * has executed. * @member {number} [status.failureCount] Gets the number of times this job * has failed. * @member {number} [status.faultedCount] Gets the number of faulted * occurrences (occurrences that were retried and failed as many times as the * retry policy states). * @member {date} [status.lastExecutionTime] Gets the time the last * occurrence executed in ISO-8601 format. Could be empty if job has not run * yet. * @member {date} [status.nextExecutionTime] Gets the time of the next * occurrence in ISO-8601 format. Could be empty if the job is completed. */ constructor() { } /** * Defines the metadata of JobProperties * * @returns {object} metadata of JobProperties * */ mapper() { return { required: false, serializedName: 'JobProperties', type: { name: 'Composite', className: 'JobProperties', modelProperties: { startTime: { required: false, serializedName: 'startTime', type: { name: 'DateTime' } }, action: { required: false, serializedName: 'action', type: { name: 'Composite', className: 'JobAction' } }, recurrence: { required: false, serializedName: 'recurrence', type: { name: 'Composite', className: 'JobRecurrence' } }, state: { required: false, serializedName: 'state', type: { name: 'Enum', allowedValues: [ 'Enabled', 'Disabled', 'Faulted', 'Completed' ] } }, status: { required: false, readOnly: true, serializedName: 'status', type: { name: 'Composite', className: 'JobStatus' } } } } }; } } module.exports = JobProperties;