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

/**
 * Metadata for a Link's property mapping.
 *
 */
class TypePropertiesMapping {
  /**
   * Create a TypePropertiesMapping.
   * @member {string} sourcePropertyName Property name on the source Entity
   * Type.
   * @member {string} targetPropertyName Property name on the target Entity
   * Type.
   * @member {string} [linkType] Link type. Possible values include:
   * 'UpdateAlways', 'CopyIfNull'
   */
  constructor() {
  }

  /**
   * Defines the metadata of TypePropertiesMapping
   *
   * @returns {object} metadata of TypePropertiesMapping
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'TypePropertiesMapping',
      type: {
        name: 'Composite',
        className: 'TypePropertiesMapping',
        modelProperties: {
          sourcePropertyName: {
            required: true,
            serializedName: 'sourcePropertyName',
            type: {
              name: 'String'
            }
          },
          targetPropertyName: {
            required: true,
            serializedName: 'targetPropertyName',
            type: {
              name: 'String'
            }
          },
          linkType: {
            required: false,
            serializedName: 'linkType',
            type: {
              name: 'Enum',
              allowedValues: [ 'UpdateAlways', 'CopyIfNull' ]
            }
          }
        }
      }
    };
  }
}

module.exports = TypePropertiesMapping;
