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

/**
 * Parameter required for creating a linked server to redis cache.
 *
 */
class RedisLinkedServerCreateParameters {
  /**
   * Create a RedisLinkedServerCreateParameters.
   * @property {string} linkedRedisCacheId Fully qualified resourceId of the
   * linked redis cache.
   * @property {string} linkedRedisCacheLocation Location of the linked redis
   * cache.
   * @property {string} serverRole Role of the linked server. Possible values
   * include: 'Primary', 'Secondary'
   */
  constructor() {
  }

  /**
   * Defines the metadata of RedisLinkedServerCreateParameters
   *
   * @returns {object} metadata of RedisLinkedServerCreateParameters
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'RedisLinkedServerCreateParameters',
      type: {
        name: 'Composite',
        className: 'RedisLinkedServerCreateParameters',
        modelProperties: {
          linkedRedisCacheId: {
            required: true,
            serializedName: 'properties.linkedRedisCacheId',
            type: {
              name: 'String'
            }
          },
          linkedRedisCacheLocation: {
            required: true,
            serializedName: 'properties.linkedRedisCacheLocation',
            type: {
              name: 'String'
            }
          },
          serverRole: {
            required: true,
            serializedName: 'properties.serverRole',
            type: {
              name: 'Enum',
              allowedValues: [ 'Primary', 'Secondary' ]
            }
          }
        }
      }
    };
  }
}

module.exports = RedisLinkedServerCreateParameters;
