code: def to_api_repr(self):
          
          info = {}
          if self.log_name is not None:
              info["logName"] = self.log_name
          if self.resource is not None:
              info["resource"] = self.resource._to_dict()
          if self.labels is not None:
              info["labels"] = self.labels
          if self.insert_id is not None:
              info["insertId"] = self.insert_id
          if self.severity is not None:
              info["severity"] = self.severity
          if self.http_request is not None:
              info["httpRequest"] = self.http_request
          if self.timestamp is not None:
              info["timestamp"] = _datetime_to_rfc3339(self.timestamp)
          if self.trace is not None:
              info["trace"] = self.trace
          if self.span_id is not None:
              info["spanId"] = self.span_id
          if self.trace_sampled is not None:
              info["traceSampled"] = self.trace_sampled
          if self.source_location is not None:
              source_location = self.source_location.copy()
              source_location["line"] = str(source_location.pop("line", 0))
              info["sourceLocation"] = source_location
          if self.operation is not None:
              info["operation"] = self.operation
          return info
docs: API repr (JSON format) for entry.