/*
 * 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 serviceName of an AvailableDelegation indicates a possible delegation
 * for a subnet.
 *
 */
class AvailableDelegation {
  /**
   * Create a AvailableDelegation.
   * @property {string} [name] The name of the AvailableDelegation resource.
   * @property {string} [id] A unique identifier of the AvailableDelegation
   * resource.
   * @property {string} [type] Resource type.
   * @property {string} [serviceName] The name of the service and resource
   * @property {array} [actions] Describes the actions permitted to the service
   * upon delegation
   */
  constructor() {
  }

  /**
   * Defines the metadata of AvailableDelegation
   *
   * @returns {object} metadata of AvailableDelegation
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AvailableDelegation',
      type: {
        name: 'Composite',
        className: 'AvailableDelegation',
        modelProperties: {
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          serviceName: {
            required: false,
            serializedName: 'serviceName',
            type: {
              name: 'String'
            }
          },
          actions: {
            required: false,
            serializedName: 'actions',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = AvailableDelegation;
