class_docstr: Represents a concrete ACL for a specific ResourcePattern
  
  In kafka an ACL is a 4-tuple of (principal, host, operation, permission_type)
  that limits who can do what on a specific resource (or since KIP-290 a resource pattern)
  
  Terminology:
  Principal -> This is the identifier for the user. Depending on the authorization method used (SSL, SASL etc)
      the principal will look different. See http://kafka.apache.org/documentation/#security_authz for details.
      The principal must be on the format "User:<name>" or kafka will treat it as invalid. It's possible to use
      other principal types than "User" if using a custom authorizer for the cluster.
  Host -> This must currently be an IP address. It cannot be a range, and it cannot be a domain name.
      It can be set to "*", which is special cased in kafka to mean "any host"
  Operation -> Which client operation this ACL refers to. Has different meaning depending
      on the resource type the ACL refers to. See https://docs.confluent.io/current/kafka/authorization.html#acl-format
      for a list of which combinations of resource/operation that unlocks which kafka APIs
  Permission Type: Whether this ACL is allowing or denying access
  Resource Pattern -> This is a representation of the resource or resource pattern that the ACL
      refers to. See the ResourcePattern class for details.
class_docstr_tok: ["Represents","a","concrete","ACL","for","a","specific","ResourcePattern","In","kafka","an","ACL","is","a","4-tuple","of","(","principal",",","host",",","operation",",","permission_type",")","that","limits","who","can","do","what","on","a","specific","resource","(","or","since","KIP-290","a","resource","pattern",")","Terminology",":","Principal","-",">","This","is","the","identifier","for","the","user",".","Depending","on","the","authorization","method","used","(","SSL",",","SASL","etc",")","the","principal","will","look","different",".","See","http",":","\/\/kafka.apache.org\/documentation\/","#","security_authz","for","details",".","The","principal","must","be","on","the","format","``","User",":","<","name",">","''","or","kafka","will","treat","it","as","invalid",".","It","'s","possible","to","use","other","principal","types","than","``","User","''","if","using","a","custom","authorizer","for","the","cluster",".","Host","-",">","This","must","currently","be","an","IP","address",".","It","can","not","be","a","range",",","and","it","can","not","be","a","domain","name",".","It","can","be","set","to","``","*","''",",","which","is","special","cased","in","kafka","to","mean","``","any","host","''","Operation","-",">","Which","client","operation","this","ACL","refers","to",".","Has","different","meaning","depending","on","the","resource","type","the","ACL","refers","to",".","See","https",":","\/\/docs.confluent.io\/current\/kafka\/authorization.html","#","acl-format","for","a","list","of","which","combinations","of","resource\/operation","that","unlocks","which","kafka","APIs","Permission","Type",":","Whether","this","ACL","is","allowing","or","denying","access","Resource","Pattern","-",">","This","is","a","representation","of","the","resource","or","resource","pattern","that","the","ACL","refers","to",".","See","the","ResourcePattern","class","for","details","."]
code: def validate(self):
      if self.operation == ACLOperation.ANY:
          raise IllegalArgumentError("operation cannot be ANY")
      if self.permission_type == ACLPermissionType.ANY:
          raise IllegalArgumentError("permission_type cannot be ANY")
      if not isinstance(self.resource_pattern, ResourcePattern):
          raise IllegalArgumentError(
              "resource_pattern must be a ResourcePattern object"
          )
  
imports: from __future__ import absolute_import
  from kafka.errors import IllegalArgumentError
label_desc: Use image node_id 2 for calling the ACL obj's underlying member method code with example usage: obj.validate() without return types