/*
 * 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 details of the policy triggered deployment that created or modified the
 * tracked resource.
 *
 */
class TrackedResourceModificationDetails {
  /**
   * Create a TrackedResourceModificationDetails.
   * @property {object} [policyDetails] The details of the policy that created
   * or modified 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 {string} [deploymentId] The ID of the deployment that created or
   * modified the tracked resource.
   * @property {date} [deploymentTime] Timestamp of the deployment that created
   * or modified the tracked resource.
   */
  constructor() {
  }

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

module.exports = TrackedResourceModificationDetails;
