# GENERATED BY KOMAND SDK - DO NOT EDIT
import komand
import json


class Component:
    DESCRIPTION = "Return users and groups that belonging to the specific group"


class Input:
    EXPAND_NESTED_GROUPS = "expand_nested_groups"
    GROUP_NAME = "group_name"
    INCLUDE_GROUPS = "include_groups"
    SEARCH_BASE = "search_base"
    

class Output:
    COUNT = "count"
    RESULTS = "results"
    

class QueryGroupMembershipInput(komand.Input):
    schema = json.loads("""
   {
  "type": "object",
  "title": "Variables",
  "properties": {
    "expand_nested_groups": {
      "type": "boolean",
      "title": "Expand Nested Groups",
      "description": "Expand nested groups in results",
      "order": 4
    },
    "group_name": {
      "type": "string",
      "title": "Group Name",
      "description": "Name of the group for which membership will be checked",
      "order": 1
    },
    "include_groups": {
      "type": "boolean",
      "title": "Include Groups",
      "description": "Include groups in results",
      "order": 3
    },
    "search_base": {
      "type": "string",
      "title": "Search Base",
      "description": "The base of the search request",
      "order": 2
    }
  },
  "required": [
    "group_name",
    "search_base"
  ]
}
    """)

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


class QueryGroupMembershipOutput(komand.Output):
    schema = json.loads("""
   {
  "type": "object",
  "title": "Variables",
  "properties": {
    "count": {
      "type": "integer",
      "title": "Count",
      "description": "Number of results",
      "order": 2
    },
    "results": {
      "type": "array",
      "title": "Results",
      "description": "Results returned",
      "items": {
        "$ref": "#/definitions/results"
      },
      "order": 1
    }
  },
  "definitions": {
    "attributes": {
      "type": "object",
      "title": "attributes",
      "properties": {
        "accountExpires": {
          "type": "string",
          "title": "Account Expires",
          "description": "Account expires",
          "order": 1
        },
        "adminCount": {
          "type": "integer",
          "title": "Admin Count",
          "description": "Admin count",
          "order": 2
        },
        "badPasswordTime": {
          "type": "string",
          "title": "Bad Password Time",
          "description": "Bad password time",
          "order": 3
        },
        "badPwdCount": {
          "type": "integer",
          "title": "Bad PWD Count",
          "description": "Bad PWD count",
          "order": 4
        },
        "cn": {
          "type": "string",
          "title": "CN",
          "description": "CN",
          "order": 5
        },
        "codePage": {
          "type": "integer",
          "title": "Code Page",
          "description": "Code page",
          "order": 6
        },
        "countryCode": {
          "type": "integer",
          "title": "Country Code",
          "description": "Country code",
          "order": 7
        },
        "dSCorePropagationData": {
          "type": "array",
          "title": "DS Core Propagation Data",
          "description": "DS core propagation data",
          "items": {
            "type": "string"
          },
          "order": 8
        },
        "description": {
          "type": "array",
          "title": "Description",
          "description": "Description",
          "items": {
            "type": "string"
          },
          "order": 9
        },
        "distinguishedName": {
          "type": "string",
          "title": "Distinguished Name",
          "description": "Distinguished name",
          "order": 10
        },
        "instanceType": {
          "type": "integer",
          "title": "Instance Type",
          "description": "Instance type",
          "order": 11
        },
        "isCriticalSystemObject": {
          "type": "boolean",
          "title": "Is Critical System Object",
          "description": "Is critical system object",
          "order": 12
        },
        "lastLogoff": {
          "type": "string",
          "title": "Last Log Off",
          "description": "Last log off",
          "order": 13
        },
        "lastLogon": {
          "type": "string",
          "title": "Last Log On",
          "description": "Last log on",
          "order": 14
        },
        "lastLogonTimestamp": {
          "type": "string",
          "title": "Last Log On Timestamp",
          "description": "Last log on timestamp",
          "order": 15
        },
        "logonCount": {
          "type": "integer",
          "title": "Log On Count",
          "description": "Log on count",
          "order": 16
        },
        "memberOf": {
          "type": "array",
          "title": "Member Of",
          "description": "Member of",
          "items": {
            "type": "string"
          },
          "order": 17
        },
        "name": {
          "type": "string",
          "title": "Name",
          "description": "Name",
          "order": 18
        },
        "objectCategory": {
          "type": "string",
          "title": "Object Category",
          "description": "Object category",
          "order": 19
        },
        "objectClass": {
          "type": "array",
          "title": "Object Class",
          "description": "Object class",
          "items": {
            "type": "string"
          },
          "order": 20
        },
        "objectGUID": {
          "type": "string",
          "title": "Object GUID",
          "description": "Object GUID",
          "order": 21
        },
        "objectSid": {
          "type": "string",
          "title": "Object SID",
          "description": "Object SID",
          "order": 22
        },
        "primaryGroupID": {
          "type": "integer",
          "title": "Primary Group ID",
          "description": "Primary group ID",
          "order": 23
        },
        "pwdLastSet": {
          "type": "string",
          "title": "PWD Last Set",
          "description": "PWD last set",
          "order": 24
        },
        "sAMAccountName": {
          "type": "string",
          "title": "SAM Account Name",
          "description": "SAM account name",
          "order": 25
        },
        "sAMAccountType": {
          "type": "integer",
          "title": "SAM Account Type",
          "description": "SAM account type",
          "order": 26
        },
        "uSNChanged": {
          "type": "integer",
          "title": "USN changed",
          "description": "USN changed",
          "order": 27
        },
        "uSNCreated": {
          "type": "integer",
          "title": "USN created",
          "description": "USN created",
          "order": 28
        },
        "userAccountControl": {
          "type": "integer",
          "title": "User Account Control",
          "description": "User account control",
          "order": 29
        },
        "whenChanged": {
          "type": "string",
          "title": "When Changed",
          "description": "When changed",
          "order": 30
        },
        "whenCreated": {
          "type": "string",
          "title": "When Created",
          "description": "When created",
          "order": 31
        }
      }
    },
    "results": {
      "type": "object",
      "title": "results",
      "properties": {
        "attributes": {
          "$ref": "#/definitions/attributes",
          "title": "Attributes",
          "description": "Attributes",
          "order": 1
        },
        "dn": {
          "type": "string",
          "title": "DN",
          "description": "DN",
          "order": 2
        }
      },
      "definitions": {
        "attributes": {
          "type": "object",
          "title": "attributes",
          "properties": {
            "accountExpires": {
              "type": "string",
              "title": "Account Expires",
              "description": "Account expires",
              "order": 1
            },
            "adminCount": {
              "type": "integer",
              "title": "Admin Count",
              "description": "Admin count",
              "order": 2
            },
            "badPasswordTime": {
              "type": "string",
              "title": "Bad Password Time",
              "description": "Bad password time",
              "order": 3
            },
            "badPwdCount": {
              "type": "integer",
              "title": "Bad PWD Count",
              "description": "Bad PWD count",
              "order": 4
            },
            "cn": {
              "type": "string",
              "title": "CN",
              "description": "CN",
              "order": 5
            },
            "codePage": {
              "type": "integer",
              "title": "Code Page",
              "description": "Code page",
              "order": 6
            },
            "countryCode": {
              "type": "integer",
              "title": "Country Code",
              "description": "Country code",
              "order": 7
            },
            "dSCorePropagationData": {
              "type": "array",
              "title": "DS Core Propagation Data",
              "description": "DS core propagation data",
              "items": {
                "type": "string"
              },
              "order": 8
            },
            "description": {
              "type": "array",
              "title": "Description",
              "description": "Description",
              "items": {
                "type": "string"
              },
              "order": 9
            },
            "distinguishedName": {
              "type": "string",
              "title": "Distinguished Name",
              "description": "Distinguished name",
              "order": 10
            },
            "instanceType": {
              "type": "integer",
              "title": "Instance Type",
              "description": "Instance type",
              "order": 11
            },
            "isCriticalSystemObject": {
              "type": "boolean",
              "title": "Is Critical System Object",
              "description": "Is critical system object",
              "order": 12
            },
            "lastLogoff": {
              "type": "string",
              "title": "Last Log Off",
              "description": "Last log off",
              "order": 13
            },
            "lastLogon": {
              "type": "string",
              "title": "Last Log On",
              "description": "Last log on",
              "order": 14
            },
            "lastLogonTimestamp": {
              "type": "string",
              "title": "Last Log On Timestamp",
              "description": "Last log on timestamp",
              "order": 15
            },
            "logonCount": {
              "type": "integer",
              "title": "Log On Count",
              "description": "Log on count",
              "order": 16
            },
            "memberOf": {
              "type": "array",
              "title": "Member Of",
              "description": "Member of",
              "items": {
                "type": "string"
              },
              "order": 17
            },
            "name": {
              "type": "string",
              "title": "Name",
              "description": "Name",
              "order": 18
            },
            "objectCategory": {
              "type": "string",
              "title": "Object Category",
              "description": "Object category",
              "order": 19
            },
            "objectClass": {
              "type": "array",
              "title": "Object Class",
              "description": "Object class",
              "items": {
                "type": "string"
              },
              "order": 20
            },
            "objectGUID": {
              "type": "string",
              "title": "Object GUID",
              "description": "Object GUID",
              "order": 21
            },
            "objectSid": {
              "type": "string",
              "title": "Object SID",
              "description": "Object SID",
              "order": 22
            },
            "primaryGroupID": {
              "type": "integer",
              "title": "Primary Group ID",
              "description": "Primary group ID",
              "order": 23
            },
            "pwdLastSet": {
              "type": "string",
              "title": "PWD Last Set",
              "description": "PWD last set",
              "order": 24
            },
            "sAMAccountName": {
              "type": "string",
              "title": "SAM Account Name",
              "description": "SAM account name",
              "order": 25
            },
            "sAMAccountType": {
              "type": "integer",
              "title": "SAM Account Type",
              "description": "SAM account type",
              "order": 26
            },
            "uSNChanged": {
              "type": "integer",
              "title": "USN changed",
              "description": "USN changed",
              "order": 27
            },
            "uSNCreated": {
              "type": "integer",
              "title": "USN created",
              "description": "USN created",
              "order": 28
            },
            "userAccountControl": {
              "type": "integer",
              "title": "User Account Control",
              "description": "User account control",
              "order": 29
            },
            "whenChanged": {
              "type": "string",
              "title": "When Changed",
              "description": "When changed",
              "order": 30
            },
            "whenCreated": {
              "type": "string",
              "title": "When Created",
              "description": "When created",
              "order": 31
            }
          }
        }
      }
    }
  }
}
    """)

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