/*
 * 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 event record.
 *
 */
class PolicyEvent {
  /**
   * Create a PolicyEvent.
   * @property {string} [odataid] OData entity ID; always set to null since
   * policy event records do not have an entity ID.
   * @property {string} [odatacontext] OData context string; used by OData
   * clients to resolve type information based on metadata.
   * @property {date} [timestamp] Timestamp for the policy event record.
   * @property {string} [resourceId] Resource ID.
   * @property {string} [policyAssignmentId] Policy assignment ID.
   * @property {string} [policyDefinitionId] Policy definition ID.
   * @property {string} [effectiveParameters] Effective parameters for the
   * policy assignment.
   * @property {boolean} [isCompliant] Flag which states whether the resource
   * is compliant against the policy assignment it was evaluated against.
   * @property {string} [subscriptionId] Subscription ID.
   * @property {string} [resourceType] Resource type.
   * @property {string} [resourceLocation] Resource location.
   * @property {string} [resourceGroup] Resource group name.
   * @property {string} [resourceTags] List of resource tags.
   * @property {string} [policyAssignmentName] Policy assignment name.
   * @property {string} [policyAssignmentOwner] Policy assignment owner.
   * @property {string} [policyAssignmentParameters] Policy assignment
   * parameters.
   * @property {string} [policyAssignmentScope] Policy assignment scope.
   * @property {string} [policyDefinitionName] Policy definition name.
   * @property {string} [policyDefinitionAction] Policy definition action, i.e.
   * effect.
   * @property {string} [policyDefinitionCategory] Policy definition category.
   * @property {string} [policySetDefinitionId] Policy set definition ID, if
   * the policy assignment is for a policy set.
   * @property {string} [policySetDefinitionName] Policy set definition name,
   * if the policy assignment is for a policy set.
   * @property {string} [policySetDefinitionOwner] Policy set definition owner,
   * if the policy assignment is for a policy set.
   * @property {string} [policySetDefinitionCategory] Policy set definition
   * category, if the policy assignment is for a policy set.
   * @property {string} [policySetDefinitionParameters] Policy set definition
   * parameters, if the policy assignment is for a policy set.
   * @property {string} [managementGroupIds] Comma separated list of management
   * group IDs, which represent the hierarchy of the management groups the
   * resource is under.
   * @property {string} [policyDefinitionReferenceId] Reference ID for the
   * policy definition inside the policy set, if the policy assignment is for a
   * policy set.
   * @property {string} [tenantId] Tenant ID for the policy event record.
   * @property {string} [principalOid] Principal object ID for the user who
   * initiated the resource operation that triggered the policy event.
   */
  constructor() {
  }

  /**
   * Defines the metadata of PolicyEvent
   *
   * @returns {object} metadata of PolicyEvent
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'PolicyEvent',
      type: {
        name: 'Composite',
        additionalProperties: {
          type: {
            name: 'Dictionary',
            value: {
                required: false,
                serializedName: 'ObjectElementType',
                type: {
                  name: 'Object'
                }
            }
          }
        },
        className: 'PolicyEvent',
        modelProperties: {
          odataid: {
            required: false,
            serializedName: '@odata\\.id',
            type: {
              name: 'String'
            }
          },
          odatacontext: {
            required: false,
            serializedName: '@odata\\.context',
            type: {
              name: 'String'
            }
          },
          timestamp: {
            required: false,
            serializedName: 'timestamp',
            type: {
              name: 'DateTime'
            }
          },
          resourceId: {
            required: false,
            serializedName: 'resourceId',
            type: {
              name: 'String'
            }
          },
          policyAssignmentId: {
            required: false,
            serializedName: 'policyAssignmentId',
            type: {
              name: 'String'
            }
          },
          policyDefinitionId: {
            required: false,
            serializedName: 'policyDefinitionId',
            type: {
              name: 'String'
            }
          },
          effectiveParameters: {
            required: false,
            serializedName: 'effectiveParameters',
            type: {
              name: 'String'
            }
          },
          isCompliant: {
            required: false,
            serializedName: 'isCompliant',
            type: {
              name: 'Boolean'
            }
          },
          subscriptionId: {
            required: false,
            serializedName: 'subscriptionId',
            type: {
              name: 'String'
            }
          },
          resourceType: {
            required: false,
            serializedName: 'resourceType',
            type: {
              name: 'String'
            }
          },
          resourceLocation: {
            required: false,
            serializedName: 'resourceLocation',
            type: {
              name: 'String'
            }
          },
          resourceGroup: {
            required: false,
            serializedName: 'resourceGroup',
            type: {
              name: 'String'
            }
          },
          resourceTags: {
            required: false,
            serializedName: 'resourceTags',
            type: {
              name: 'String'
            }
          },
          policyAssignmentName: {
            required: false,
            serializedName: 'policyAssignmentName',
            type: {
              name: 'String'
            }
          },
          policyAssignmentOwner: {
            required: false,
            serializedName: 'policyAssignmentOwner',
            type: {
              name: 'String'
            }
          },
          policyAssignmentParameters: {
            required: false,
            serializedName: 'policyAssignmentParameters',
            type: {
              name: 'String'
            }
          },
          policyAssignmentScope: {
            required: false,
            serializedName: 'policyAssignmentScope',
            type: {
              name: 'String'
            }
          },
          policyDefinitionName: {
            required: false,
            serializedName: 'policyDefinitionName',
            type: {
              name: 'String'
            }
          },
          policyDefinitionAction: {
            required: false,
            serializedName: 'policyDefinitionAction',
            type: {
              name: 'String'
            }
          },
          policyDefinitionCategory: {
            required: false,
            serializedName: 'policyDefinitionCategory',
            type: {
              name: 'String'
            }
          },
          policySetDefinitionId: {
            required: false,
            serializedName: 'policySetDefinitionId',
            type: {
              name: 'String'
            }
          },
          policySetDefinitionName: {
            required: false,
            serializedName: 'policySetDefinitionName',
            type: {
              name: 'String'
            }
          },
          policySetDefinitionOwner: {
            required: false,
            serializedName: 'policySetDefinitionOwner',
            type: {
              name: 'String'
            }
          },
          policySetDefinitionCategory: {
            required: false,
            serializedName: 'policySetDefinitionCategory',
            type: {
              name: 'String'
            }
          },
          policySetDefinitionParameters: {
            required: false,
            serializedName: 'policySetDefinitionParameters',
            type: {
              name: 'String'
            }
          },
          managementGroupIds: {
            required: false,
            serializedName: 'managementGroupIds',
            type: {
              name: 'String'
            }
          },
          policyDefinitionReferenceId: {
            required: false,
            serializedName: 'policyDefinitionReferenceId',
            type: {
              name: 'String'
            }
          },
          tenantId: {
            required: false,
            serializedName: 'tenantId',
            type: {
              name: 'String'
            }
          },
          principalOid: {
            required: false,
            serializedName: 'principalOid',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = PolicyEvent;
