<filename>plugins/chardet/icon_chardet/actions/detect_encoding/schema.py
# GENERATED BY KOMAND SDK - DO NOT EDIT
import komand
import json


class Component:
    DESCRIPTION = "Detect character encoding"


class Input:
    BYTES_TO_ANALYZE = "bytes_to_analyze"
    

class Output:
    RECOMMENDATION = "recommendation"
    

class DetectEncodingInput(komand.Input):
    schema = json.loads("""
   {
  "type": "object",
  "title": "Variables",
  "properties": {
    "bytes_to_analyze": {
      "type": "string",
      "title": "Bytes to Analyze",
      "displayType": "bytes",
      "description": "Bytes to analyze encoding",
      "format": "bytes",
      "order": 1
    }
  },
  "required": [
    "bytes_to_analyze"
  ]
}
    """)

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


class DetectEncodingOutput(komand.Output):
    schema = json.loads("""
   {
  "type": "object",
  "title": "Variables",
  "properties": {
    "recommendation": {
      "$ref": "#/definitions/recommendation",
      "title": "Recommendation",
      "description": "Detected character encoding recommendation",
      "order": 1
    }
  },
  "definitions": {
    "recommendation": {
      "type": "object",
      "title": "recommendation",
      "properties": {
        "confidence": {
          "type": "number",
          "title": "Confidence",
          "description": "Confidence",
          "order": 1
        },
        "encoding": {
          "type": "string",
          "title": "Encoding",
          "description": "Encoding",
          "order": 3
        },
        "language": {
          "type": "string",
          "title": "Language",
          "description": "Language",
          "order": 2
        }
      }
    }
  }
}
    """)

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