/*
 * 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 data source precedence is a way to know the precedence of each data
 * source.
 *
 */
class DataSourcePrecedence {
  /**
   * Create a DataSourcePrecedence.
   * @member {string} [name] The data source name
   * @member {string} [dataSourceType] The data source type. Possible values
   * include: 'Connector', 'LinkInteraction', 'SystemDefault'
   * @member {string} [status] The data source status. Possible values include:
   * 'None', 'Active', 'Deleted'
   * @member {number} [id] The data source ID.
   * @member {string} [dataSourceReferenceId] The data source reference id.
   * @member {number} [precedence] the precedence value.
   */
  constructor() {
  }

  /**
   * Defines the metadata of DataSourcePrecedence
   *
   * @returns {object} metadata of DataSourcePrecedence
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DataSourcePrecedence',
      type: {
        name: 'Composite',
        className: 'DataSourcePrecedence',
        modelProperties: {
          name: {
            required: false,
            readOnly: true,
            serializedName: 'dataSource.name',
            type: {
              name: 'String'
            }
          },
          dataSourceType: {
            required: false,
            readOnly: true,
            serializedName: 'dataSource.dataSourceType',
            type: {
              name: 'String'
            }
          },
          status: {
            required: false,
            readOnly: true,
            serializedName: 'dataSource.status',
            type: {
              name: 'String'
            }
          },
          id: {
            required: false,
            readOnly: true,
            serializedName: 'dataSource.id',
            type: {
              name: 'Number'
            }
          },
          dataSourceReferenceId: {
            required: false,
            readOnly: true,
            serializedName: 'dataSource.dataSourceReferenceId',
            type: {
              name: 'String'
            }
          },
          precedence: {
            required: false,
            serializedName: 'precedence',
            type: {
              name: 'Number'
            }
          }
        }
      }
    };
  }
}

module.exports = DataSourcePrecedence;
