code: def as_operation(self, timer=datetime.utcnow):
          
          now = timer()
          op = sc_messages.Operation(
              endTime=timestamp.to_rfc3339(now),
              startTime=timestamp.to_rfc3339(now),
              importance=sc_messages.Operation.ImportanceValueValuesEnum.LOW)
          if self.operation_id:
              op.operationId = self.operation_id
          if self.operation_name:
              op.operationName = self.operation_name
          if self.api_key and self.api_key_valid:
              op.consumerId = u'api_key:' + self.api_key
          elif self.consumer_project_id:
              op.consumerId = u'project:' + self.consumer_project_id
          return op
docs: Makes an ``Operation`` from this instance.
  
          Returns:
            an ``Operation``