Exemple #1
0
 def to_runner_api(self, context):
   return beam_runner_api_pb2.Trigger(
       or_finally=beam_runner_api_pb2.Trigger.OrFinally(
           main=self.triggers[0].to_runner_api(context),
           # dict keyword argument is used as finally is a keyword in Python
           **{'finally': self.triggers[1].to_runner_api(context)}))
Exemple #2
0
 def to_runner_api(self, unused_context):
     return beam_runner_api_pb2.Trigger(
         default=beam_runner_api_pb2.Trigger.Default())
Exemple #3
0
 def to_runner_api(self, context):
   return beam_runner_api_pb2.Trigger(
       after_each=beam_runner_api_pb2.Trigger.AfterEach(
           subtriggers=[
               subtrigger.to_runner_api(context)
               for subtrigger in self.triggers]))
Exemple #4
0
 def to_runner_api(self, context):
   return beam_runner_api_pb2.Trigger(
       repeat=beam_runner_api_pb2.Trigger.Repeat(
           subtrigger=self.underlying.to_runner_api(context)))
Exemple #5
0
 def to_runner_api(self, unused_context):
   return beam_runner_api_pb2.Trigger(
       element_count=beam_runner_api_pb2.Trigger.ElementCount(
           element_count=self.count))
Exemple #6
0
 def to_runner_api(self, context):
   return beam_runner_api_pb2.Trigger(
       never=beam_runner_api_pb2.Trigger.Never())
Exemple #7
0
 def to_runner_api(self, context):
   return beam_runner_api_pb2.Trigger(
       always=beam_runner_api_pb2.Trigger.Always())