/*
 * 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';

/**
 * Class representing a SetTriggerStateActionDefinition.
 */
class SetTriggerStateActionDefinition {
  /**
   * Create a SetTriggerStateActionDefinition.
   * @property {object} source
   * @property {string} [source.provisioningState] Gets the provisioning state.
   * Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready',
   * 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed',
   * 'Succeeded', 'Moving', 'Updating', 'Registering', 'Registered',
   * 'Unregistering', 'Unregistered', 'Completed'
   * @property {date} [source.createdTime] Gets the created time.
   * @property {date} [source.changedTime] Gets the changed time.
   * @property {string} [source.state] Gets the state. Possible values include:
   * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended'
   * @property {string} [source.status] Gets the status. Possible values
   * include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded',
   * 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut',
   * 'Aborted', 'Ignored'
   * @property {date} [source.lastExecutionTime] Gets the last execution time.
   * @property {date} [source.nextExecutionTime] Gets the next execution time.
   * @property {object} [source.recurrence] Gets the workflow trigger
   * recurrence.
   * @property {string} [source.recurrence.frequency] The frequency. Possible
   * values include: 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week',
   * 'Month', 'Year'
   * @property {number} [source.recurrence.interval] The interval.
   * @property {string} [source.recurrence.startTime] The start time.
   * @property {string} [source.recurrence.endTime] The end time.
   * @property {string} [source.recurrence.timeZone] The time zone.
   * @property {object} [source.recurrence.schedule] The recurrence schedule.
   * @property {array} [source.recurrence.schedule.minutes] The minutes.
   * @property {array} [source.recurrence.schedule.hours] The hours.
   * @property {array} [source.recurrence.schedule.weekDays] The days of the
   * week.
   * @property {array} [source.recurrence.schedule.monthDays] The month days.
   * @property {array} [source.recurrence.schedule.monthlyOccurrences] The
   * monthly occurrences.
   * @property {object} [source.workflow] Gets the reference to workflow.
   * @property {string} [source.workflow.id] The resource id.
   * @property {string} [source.workflow.name] Gets the resource name.
   * @property {string} [source.workflow.type] Gets the resource type.
   * @property {string} [source.name] Gets the workflow trigger name.
   * @property {string} [source.type] Gets the workflow trigger type.
   */
  constructor() {
  }

  /**
   * Defines the metadata of SetTriggerStateActionDefinition
   *
   * @returns {object} metadata of SetTriggerStateActionDefinition
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'SetTriggerStateActionDefinition',
      type: {
        name: 'Composite',
        className: 'SetTriggerStateActionDefinition',
        modelProperties: {
          source: {
            required: true,
            serializedName: 'source',
            type: {
              name: 'Composite',
              className: 'WorkflowTrigger'
            }
          }
        }
      }
    };
  }
}

module.exports = SetTriggerStateActionDefinition;
