Esempio n. 1
0
 def __init__(self, config=None):
     super().__init__(config)
     if config:
         if "geographicalContext" in config:
             if isinstance(config["geographicalContext"],
                           log_geographical_context.LogGeographicalContext):
                 self.geographical_context = config["geographicalContext"]
             elif config["geographicalContext"] is not None:
                 self.geographical_context = log_geographical_context.LogGeographicalContext(
                     config["geographicalContext"])
             else:
                 self.geographical_context = None
         else:
             self.geographical_context = None
         self.ip = config["ip"]\
             if "ip" in config else None
         self.source = config["source"]\
             if "source" in config else None
         self.version = config["version"]\
             if "version" in config else None
     else:
         self.geographical_context = None
         self.ip = None
         self.source = None
         self.version = None
 def __init__(self, config=None):
     super().__init__(config)
     if config:
         self.device = config["device"]\
             if "device" in config else None
         if "geographicalContext" in config:
             if isinstance(config["geographicalContext"],
                           log_geographical_context.LogGeographicalContext):
                 self.geographical_context = config["geographicalContext"]
             elif config["geographicalContext"] is not None:
                 self.geographical_context = log_geographical_context.LogGeographicalContext(
                     config["geographicalContext"]
                 )
             else:
                 self.geographical_context = None
         else:
             self.geographical_context = None
         self.id = config["id"]\
             if "id" in config else None
         self.ip_address = config["ipAddress"]\
             if "ipAddress" in config else None
         if "userAgent" in config:
             if isinstance(config["userAgent"],
                           log_user_agent.LogUserAgent):
                 self.user_agent = config["userAgent"]
             elif config["userAgent"] is not None:
                 self.user_agent = log_user_agent.LogUserAgent(
                     config["userAgent"]
                 )
             else:
                 self.user_agent = None
         else:
             self.user_agent = None
         self.zone = config["zone"]\
             if "zone" in config else None
     else:
         self.device = None
         self.geographical_context = None
         self.id = None
         self.ip_address = None
         self.user_agent = None
         self.zone = None