<reponame>lukaszlaszuk/insightconnect-plugins
# GENERATED BY KOMAND SDK - DO NOT EDIT
import insightconnect_plugin_runtime
import json


class Component:
    DESCRIPTION = "Retrieve Automox policies"


class Input:
    ORG_ID = "org_id"
    

class Output:
    POLICIES = "policies"
    

class ListPoliciesInput(insightconnect_plugin_runtime.Input):
    schema = json.loads("""
   {
  "type": "object",
  "title": "Variables",
  "properties": {
    "org_id": {
      "type": "integer",
      "title": "Organization ID",
      "description": "Identifier of organization to restrict results",
      "order": 1
    }
  }
}
    """)

    def __init__(self):
        super(self.__class__, self).__init__(self.schema)


class ListPoliciesOutput(insightconnect_plugin_runtime.Output):
    schema = json.loads("""
   {
  "type": "object",
  "title": "Variables",
  "properties": {
    "policies": {
      "type": "array",
      "title": "Policies",
      "description": "List of Automox policies",
      "items": {
        "$ref": "#/definitions/policy"
      },
      "order": 1
    }
  },
  "definitions": {
    "policy": {
      "type": "object",
      "title": "policy",
      "properties": {
        "configuration": {
          "type": "object",
          "title": "Policy Configuration",
          "description": "The configuration of the policy",
          "order": 5
        },
        "id": {
          "type": "integer",
          "title": "Policy ID",
          "description": "The policy identifier",
          "order": 1
        },
        "name": {
          "type": "string",
          "title": "Policy Name",
          "description": "The name of the policy",
          "order": 3
        },
        "organization_id": {
          "type": "integer",
          "title": "Organization ID",
          "description": "The organization identifier of the policy",
          "order": 2
        },
        "policy_type_name": {
          "type": "string",
          "title": "Policy Type Name",
          "description": "The type of policy",
          "order": 4
        },
        "server_groups": {
          "type": "array",
          "title": "Device Group IDs",
          "description": "List of identifiers for device groups assigned to the policy",
          "items": {
            "type": "integer"
          },
          "order": 6
        }
      },
      "required": [
        "id",
        "organization_id"
      ]
    }
  }
}
    """)

    def __init__(self):
        super(self.__class__, self).__init__(self.schema)
