text: # GENERATED BY KOMAND SDK - DO NOT EDIT
  import insightconnect_plugin_runtime
  import json
  
  
  class Component:
      DESCRIPTION = "Get events which contributed to an alert"
  
  
  class Input:
      ALERT_ID = "alert_id"
      
  
  class Output:
      COUNT = "count"
      EVENTS = "events"
      
  
  class GetEventsInput(insightconnect_plugin_runtime.Input):
      schema = json.loads("""
     {
    "type": "object",
    "title": "Variables",
    "properties": {
      "alert_id": {
        "type": "string",
        "title": "Alert ID",
        "description": "Alert ID",
        "order": 1
      }
    },
    "required": [
      "alert_id"
    ]
  }
      """)
  
      def __init__(self):
          super(self.__class__, self).__init__(self.schema)
  
  
  class GetEventsOutput(insightconnect_plugin_runtime.Output):
      schema = json.loads("""
     {
    "type": "object",
    "title": "Variables",
    "properties": {
      "count": {
        "type": "integer",
        "title": "Count",
        "description": "Number of events",
        "order": 2
      },
      "events": {
        "type": "array",
        "title": "Events",
        "description": "List of events",
        "items": {
          "$ref": "#/definitions/event"
        },
        "order": 1
      }
    },
    "required": [
      "count",
      "events"
    ],
    "definitions": {
      "event": {
        "type": "object",
        "title": "event",
        "properties": {
          "_id": {
            "type": "string",
            "title": "Event ID",
            "description": "Event ID",
            "order": 5
          },
          "agent_id": {
            "type": "string",
            "title": "Agent ID",
            "description": "Agent ID",
            "order": 4
          },
          "eventClass": {
            "type": "string",
            "title": "Event Class",
            "description": "Event class, e.g. CloudtrailEvent",
            "order": 2
          },
          "event_type": {
            "type": "string",
            "title": "Event Type",
            "description": "Event type, e.g. cloudtrail",
            "order": 1
          },
          "miscellaneous": {
            "type": "object",
            "title": "Miscellaneous",
            "description": "Miscellaneous event data not found across all event types",
            "order": 8
          },
          "organization_id": {
            "type": "string",
            "title": "Timestamp",
            "description": "Organization ID",
            "order": 7
          },
          "timestamp": {
            "type": "number",
            "title": "Timestamp",
            "description": "Timestamp",
            "order": 6
          },
          "user": {
            "type": "string",
            "title": "User",
            "description": "User",
            "order": 3
          }
        },
        "required": [
          "_id",
          "miscellaneous"
        ]
      }
    }
  }
      """)
  
      def __init__(self):
          super(self.__class__, self).__init__(self.schema)
  