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

/**
 * A Policy.
 *
 * @extends models['Resource']
 */
class Policy extends models['Resource'] {
  /**
   * Create a Policy.
   * @property {string} [description] The description of the policy.
   * @property {string} [status] The status of the policy. Possible values
   * include: 'Enabled', 'Disabled'
   * @property {string} [factName] The fact name of the policy (e.g.
   * LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc. Possible values include:
   * 'UserOwnedLabVmCount', 'UserOwnedLabPremiumVmCount', 'LabVmCount',
   * 'LabPremiumVmCount', 'LabVmSize', 'GalleryImage',
   * 'UserOwnedLabVmCountInSubnet', 'LabTargetCost', 'EnvironmentTemplate',
   * 'ScheduleEditPermission'
   * @property {string} [factData] The fact data of the policy.
   * @property {string} [threshold] The threshold of the policy (i.e. a number
   * for MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy).
   * @property {string} [evaluatorType] The evaluator type of the policy (i.e.
   * AllowedValuesPolicy, MaxValuePolicy). Possible values include:
   * 'AllowedValuesPolicy', 'MaxValuePolicy'
   * @property {date} [createdDate] The creation date of the policy.
   * @property {string} [provisioningState] The provisioning status of the
   * resource.
   * @property {string} [uniqueIdentifier] The unique immutable identifier of a
   * resource (Guid).
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of Policy
   *
   * @returns {object} metadata of Policy
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Policy',
      type: {
        name: 'Composite',
        className: 'Policy',
        modelProperties: {
          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'
            }
          },
          location: {
            required: false,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          description: {
            required: false,
            serializedName: 'properties.description',
            type: {
              name: 'String'
            }
          },
          status: {
            required: false,
            serializedName: 'properties.status',
            type: {
              name: 'String'
            }
          },
          factName: {
            required: false,
            serializedName: 'properties.factName',
            type: {
              name: 'String'
            }
          },
          factData: {
            required: false,
            serializedName: 'properties.factData',
            type: {
              name: 'String'
            }
          },
          threshold: {
            required: false,
            serializedName: 'properties.threshold',
            type: {
              name: 'String'
            }
          },
          evaluatorType: {
            required: false,
            serializedName: 'properties.evaluatorType',
            type: {
              name: 'String'
            }
          },
          createdDate: {
            required: false,
            readOnly: true,
            serializedName: 'properties.createdDate',
            type: {
              name: 'DateTime'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          uniqueIdentifier: {
            required: false,
            readOnly: true,
            serializedName: 'properties.uniqueIdentifier',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = Policy;
