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

/**
 * Policy tracked resource record.
 *
 */
class PolicyTrackedResource {
  /**
   * Create a PolicyTrackedResource.
   * @property {string} [trackedResourceId] The ID of the policy tracked
   * resource.
   * @property {object} [policyDetails] The details of the policy that require
   * the tracked resource.
   * @property {string} [policyDetails.policyDefinitionId] The ID of the policy
   * definition.
   * @property {string} [policyDetails.policyAssignmentId] The ID of the policy
   * assignment.
   * @property {string} [policyDetails.policyAssignmentDisplayName] The display
   * name of the policy assignment.
   * @property {string} [policyDetails.policyAssignmentScope] The scope of the
   * policy assignment.
   * @property {string} [policyDetails.policySetDefinitionId] The ID of the
   * policy set definition.
   * @property {string} [policyDetails.policyDefinitionReferenceId] The policy
   * definition reference ID within the policy set definition.
   * @property {object} [createdBy] The details of the policy triggered
   * deployment that created the tracked resource.
   * @property {object} [createdBy.policyDetails] The details of the policy
   * that created or modified the tracked resource.
   * @property {string} [createdBy.policyDetails.policyDefinitionId] The ID of
   * the policy definition.
   * @property {string} [createdBy.policyDetails.policyAssignmentId] The ID of
   * the policy assignment.
   * @property {string} [createdBy.policyDetails.policyAssignmentDisplayName]
   * The display name of the policy assignment.
   * @property {string} [createdBy.policyDetails.policyAssignmentScope] The
   * scope of the policy assignment.
   * @property {string} [createdBy.policyDetails.policySetDefinitionId] The ID
   * of the policy set definition.
   * @property {string} [createdBy.policyDetails.policyDefinitionReferenceId]
   * The policy definition reference ID within the policy set definition.
   * @property {string} [createdBy.deploymentId] The ID of the deployment that
   * created or modified the tracked resource.
   * @property {date} [createdBy.deploymentTime] Timestamp of the deployment
   * that created or modified the tracked resource.
   * @property {object} [lastModifiedBy] The details of the policy triggered
   * deployment that modified the tracked resource.
   * @property {object} [lastModifiedBy.policyDetails] The details of the
   * policy that created or modified the tracked resource.
   * @property {string} [lastModifiedBy.policyDetails.policyDefinitionId] The
   * ID of the policy definition.
   * @property {string} [lastModifiedBy.policyDetails.policyAssignmentId] The
   * ID of the policy assignment.
   * @property {string}
   * [lastModifiedBy.policyDetails.policyAssignmentDisplayName] The display
   * name of the policy assignment.
   * @property {string} [lastModifiedBy.policyDetails.policyAssignmentScope]
   * The scope of the policy assignment.
   * @property {string} [lastModifiedBy.policyDetails.policySetDefinitionId]
   * The ID of the policy set definition.
   * @property {string}
   * [lastModifiedBy.policyDetails.policyDefinitionReferenceId] The policy
   * definition reference ID within the policy set definition.
   * @property {string} [lastModifiedBy.deploymentId] The ID of the deployment
   * that created or modified the tracked resource.
   * @property {date} [lastModifiedBy.deploymentTime] Timestamp of the
   * deployment that created or modified the tracked resource.
   * @property {date} [lastUpdateUtc] Timestamp of the last update to the
   * tracked resource.
   */
  constructor() {
  }

  /**
   * Defines the metadata of PolicyTrackedResource
   *
   * @returns {object} metadata of PolicyTrackedResource
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'PolicyTrackedResource',
      type: {
        name: 'Composite',
        className: 'PolicyTrackedResource',
        modelProperties: {
          trackedResourceId: {
            required: false,
            readOnly: true,
            serializedName: 'trackedResourceId',
            type: {
              name: 'String'
            }
          },
          policyDetails: {
            required: false,
            readOnly: true,
            serializedName: 'policyDetails',
            type: {
              name: 'Composite',
              className: 'PolicyDetails'
            }
          },
          createdBy: {
            required: false,
            readOnly: true,
            serializedName: 'createdBy',
            type: {
              name: 'Composite',
              className: 'TrackedResourceModificationDetails'
            }
          },
          lastModifiedBy: {
            required: false,
            readOnly: true,
            serializedName: 'lastModifiedBy',
            type: {
              name: 'Composite',
              className: 'TrackedResourceModificationDetails'
            }
          },
          lastUpdateUtc: {
            required: false,
            readOnly: true,
            serializedName: 'lastUpdateUtc',
            type: {
              name: 'DateTime'
            }
          }
        }
      }
    };
  }
}

module.exports = PolicyTrackedResource;
