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

const models = require('./index');

/**
 * The policy set definition.
 *
 * @extends models['BaseResource']
 */
class PolicySetDefinition extends models['BaseResource'] {
  /**
   * Create a PolicySetDefinition.
   * @property {string} [policyType] The type of policy definition. Possible
   * values are NotSpecified, BuiltIn, and Custom. Possible values include:
   * 'NotSpecified', 'BuiltIn', 'Custom'
   * @property {string} [displayName] The display name of the policy set
   * definition.
   * @property {string} [description] The policy set definition description.
   * @property {object} [metadata] The policy set definition metadata.
   * @property {object} [parameters] The policy set definition parameters that
   * can be used in policy definition references.
   * @property {array} policyDefinitions An array of policy definition
   * references.
   * @property {string} [id] The ID of the policy set definition.
   * @property {string} [name] The name of the policy set definition.
   * @property {string} [type] The type of the resource
   * (Microsoft.Authorization/policySetDefinitions).
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of PolicySetDefinition
   *
   * @returns {object} metadata of PolicySetDefinition
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'PolicySetDefinition',
      type: {
        name: 'Composite',
        className: 'PolicySetDefinition',
        modelProperties: {
          policyType: {
            required: false,
            serializedName: 'properties.policyType',
            type: {
              name: 'String'
            }
          },
          displayName: {
            required: false,
            serializedName: 'properties.displayName',
            type: {
              name: 'String'
            }
          },
          description: {
            required: false,
            serializedName: 'properties.description',
            type: {
              name: 'String'
            }
          },
          metadata: {
            required: false,
            serializedName: 'properties.metadata',
            type: {
              name: 'Object'
            }
          },
          parameters: {
            required: false,
            serializedName: 'properties.parameters',
            type: {
              name: 'Object'
            }
          },
          policyDefinitions: {
            required: true,
            serializedName: 'properties.policyDefinitions',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'PolicyDefinitionReferenceElementType',
                  type: {
                    name: 'Composite',
                    className: 'PolicyDefinitionReference'
                  }
              }
            }
          },
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = PolicySetDefinition;
