text: /*
   * 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';
  
  /**
   * The properties for updating a source based trigger.
   *
   */
  class SourceTriggerUpdateParameters {
    /**
     * Create a SourceTriggerUpdateParameters.
     * @property {object} [sourceRepository] The properties that describes the
     * source(code) for the task.
     * @property {string} [sourceRepository.sourceControlType] The type of source
     * control service. Possible values include: 'Github',
     * 'VisualStudioTeamService'
     * @property {string} [sourceRepository.repositoryUrl] The full URL to the
     * source code repository
     * @property {string} [sourceRepository.branch] The branch name of the source
     * code.
     * @property {object} [sourceRepository.sourceControlAuthProperties] The
     * authorization properties for accessing the source code repository and to
     * set up
     * webhooks for notifications.
     * @property {string}
     * [sourceRepository.sourceControlAuthProperties.tokenType] The type of Auth
     * token. Possible values include: 'PAT', 'OAuth'
     * @property {string} [sourceRepository.sourceControlAuthProperties.token]
     * The access token used to access the source control provider.
     * @property {string}
     * [sourceRepository.sourceControlAuthProperties.refreshToken] The refresh
     * token used to refresh the access token.
     * @property {string} [sourceRepository.sourceControlAuthProperties.scope]
     * The scope of the access token.
     * @property {number}
     * [sourceRepository.sourceControlAuthProperties.expiresIn] Time in seconds
     * that the token remains valid
     * @property {array} [sourceTriggerEvents] The source event corresponding to
     * the trigger.
     * @property {string} [status] The current status of trigger. Possible values
     * include: 'Disabled', 'Enabled'. Default value: 'Enabled' .
     * @property {string} name The name of the trigger.
     */
    constructor() {
    }
  
    /**
     * Defines the metadata of SourceTriggerUpdateParameters
     *
     * @returns {object} metadata of SourceTriggerUpdateParameters
     *
     */
    mapper() {
      return {
        required: false,
        serializedName: 'SourceTriggerUpdateParameters',
        type: {
          name: 'Composite',
          className: 'SourceTriggerUpdateParameters',
          modelProperties: {
            sourceRepository: {
              required: false,
              serializedName: 'sourceRepository',
              type: {
                name: 'Composite',
                className: 'SourceUpdateParameters'
              }
            },
            sourceTriggerEvents: {
              required: false,
              serializedName: 'sourceTriggerEvents',
              type: {
                name: 'Sequence',
                element: {
                    required: false,
                    serializedName: 'SourceTriggerEventElementType',
                    type: {
                      name: 'String'
                    }
                }
              }
            },
            status: {
              required: false,
              serializedName: 'status',
              defaultValue: 'Enabled',
              type: {
                name: 'String'
              }
            },
            name: {
              required: true,
              serializedName: 'name',
              type: {
                name: 'String'
              }
            }
          }
        }
      };
    }
  }
  
  module.exports = SourceTriggerUpdateParameters;
  