diff --git a/cirq/google/api/v2/batch_pb2.py b/cirq/google/api/v2/batch_pb2.py new file mode 100644 index 00000000000..719a6fd4cc1 --- /dev/null +++ b/cirq/google/api/v2/batch_pb2.py @@ -0,0 +1,156 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: cirq/google/api/v2/batch.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from cirq.google.api.v2 import program_pb2 as cirq_dot_google_dot_api_dot_v2_dot_program__pb2 +from cirq.google.api.v2 import result_pb2 as cirq_dot_google_dot_api_dot_v2_dot_result__pb2 +from cirq.google.api.v2 import run_context_pb2 as cirq_dot_google_dot_api_dot_v2_dot_run__context__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='cirq/google/api/v2/batch.proto', + package='cirq.google.api.v2', + syntax='proto3', + serialized_options=_b('\n\035com.google.cirq.google.api.v2B\nBatchProtoP\001'), + serialized_pb=_b('\n\x1e\x63irq/google/api/v2/batch.proto\x12\x12\x63irq.google.api.v2\x1a cirq/google/api/v2/program.proto\x1a\x1f\x63irq/google/api/v2/result.proto\x1a$cirq/google/api/v2/run_context.proto\"=\n\x0c\x42\x61tchProgram\x12-\n\x08programs\x18\x01 \x03(\x0b\x32\x1b.cirq.google.api.v2.Program\"G\n\x0f\x42\x61tchRunContext\x12\x34\n\x0crun_contexts\x18\x01 \x03(\x0b\x32\x1e.cirq.google.api.v2.RunContext\":\n\x0b\x42\x61tchResult\x12+\n\x07results\x18\x01 \x03(\x0b\x32\x1a.cirq.google.api.v2.ResultB-\n\x1d\x63om.google.cirq.google.api.v2B\nBatchProtoP\x01\x62\x06proto3') + , + dependencies=[cirq_dot_google_dot_api_dot_v2_dot_program__pb2.DESCRIPTOR,cirq_dot_google_dot_api_dot_v2_dot_result__pb2.DESCRIPTOR,cirq_dot_google_dot_api_dot_v2_dot_run__context__pb2.DESCRIPTOR,]) + + + + +_BATCHPROGRAM = _descriptor.Descriptor( + name='BatchProgram', + full_name='cirq.google.api.v2.BatchProgram', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='programs', full_name='cirq.google.api.v2.BatchProgram.programs', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=159, + serialized_end=220, +) + + +_BATCHRUNCONTEXT = _descriptor.Descriptor( + name='BatchRunContext', + full_name='cirq.google.api.v2.BatchRunContext', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='run_contexts', full_name='cirq.google.api.v2.BatchRunContext.run_contexts', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=222, + serialized_end=293, +) + + +_BATCHRESULT = _descriptor.Descriptor( + name='BatchResult', + full_name='cirq.google.api.v2.BatchResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='results', full_name='cirq.google.api.v2.BatchResult.results', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=295, + serialized_end=353, +) + +_BATCHPROGRAM.fields_by_name['programs'].message_type = cirq_dot_google_dot_api_dot_v2_dot_program__pb2._PROGRAM +_BATCHRUNCONTEXT.fields_by_name['run_contexts'].message_type = cirq_dot_google_dot_api_dot_v2_dot_run__context__pb2._RUNCONTEXT +_BATCHRESULT.fields_by_name['results'].message_type = cirq_dot_google_dot_api_dot_v2_dot_result__pb2._RESULT +DESCRIPTOR.message_types_by_name['BatchProgram'] = _BATCHPROGRAM +DESCRIPTOR.message_types_by_name['BatchRunContext'] = _BATCHRUNCONTEXT +DESCRIPTOR.message_types_by_name['BatchResult'] = _BATCHRESULT +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +BatchProgram = _reflection.GeneratedProtocolMessageType('BatchProgram', (_message.Message,), { + 'DESCRIPTOR' : _BATCHPROGRAM, + '__module__' : 'cirq.google.api.v2.batch_pb2' + # @@protoc_insertion_point(class_scope:cirq.google.api.v2.BatchProgram) + }) +_sym_db.RegisterMessage(BatchProgram) + +BatchRunContext = _reflection.GeneratedProtocolMessageType('BatchRunContext', (_message.Message,), { + 'DESCRIPTOR' : _BATCHRUNCONTEXT, + '__module__' : 'cirq.google.api.v2.batch_pb2' + # @@protoc_insertion_point(class_scope:cirq.google.api.v2.BatchRunContext) + }) +_sym_db.RegisterMessage(BatchRunContext) + +BatchResult = _reflection.GeneratedProtocolMessageType('BatchResult', (_message.Message,), { + 'DESCRIPTOR' : _BATCHRESULT, + '__module__' : 'cirq.google.api.v2.batch_pb2' + # @@protoc_insertion_point(class_scope:cirq.google.api.v2.BatchResult) + }) +_sym_db.RegisterMessage(BatchResult) + + +DESCRIPTOR._options = None +# @@protoc_insertion_point(module_scope) diff --git a/cirq/google/api/v2/batch_pb2.pyi b/cirq/google/api/v2/batch_pb2.pyi new file mode 100644 index 00000000000..12cd8c66fb3 --- /dev/null +++ b/cirq/google/api/v2/batch_pb2.pyi @@ -0,0 +1,82 @@ +# @generated by generate_proto_mypy_stubs.py. Do not edit! +import sys +from cirq.google.api.v2.program_pb2 import ( + Program as cirq___google___api___v2___program_pb2___Program, +) + +from cirq.google.api.v2.result_pb2 import ( + Result as cirq___google___api___v2___result_pb2___Result, +) + +from cirq.google.api.v2.run_context_pb2 import ( + RunContext as cirq___google___api___v2___run_context_pb2___RunContext, +) + +from google.protobuf.internal.containers import ( + RepeatedCompositeFieldContainer as google___protobuf___internal___containers___RepeatedCompositeFieldContainer, +) + +from google.protobuf.message import ( + Message as google___protobuf___message___Message, +) + +from typing import ( + Iterable as typing___Iterable, + Optional as typing___Optional, +) + +from typing_extensions import ( + Literal as typing_extensions___Literal, +) + + +class BatchProgram(google___protobuf___message___Message): + + @property + def programs(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[cirq___google___api___v2___program_pb2___Program]: ... + + def __init__(self, + programs : typing___Optional[typing___Iterable[cirq___google___api___v2___program_pb2___Program]] = None, + ) -> None: ... + @classmethod + def FromString(cls, s: bytes) -> BatchProgram: ... + def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + if sys.version_info >= (3,): + def ClearField(self, field_name: typing_extensions___Literal[u"programs"]) -> None: ... + else: + def ClearField(self, field_name: typing_extensions___Literal[b"programs"]) -> None: ... + +class BatchRunContext(google___protobuf___message___Message): + + @property + def run_contexts(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[cirq___google___api___v2___run_context_pb2___RunContext]: ... + + def __init__(self, + run_contexts : typing___Optional[typing___Iterable[cirq___google___api___v2___run_context_pb2___RunContext]] = None, + ) -> None: ... + @classmethod + def FromString(cls, s: bytes) -> BatchRunContext: ... + def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + if sys.version_info >= (3,): + def ClearField(self, field_name: typing_extensions___Literal[u"run_contexts"]) -> None: ... + else: + def ClearField(self, field_name: typing_extensions___Literal[b"run_contexts"]) -> None: ... + +class BatchResult(google___protobuf___message___Message): + + @property + def results(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[cirq___google___api___v2___result_pb2___Result]: ... + + def __init__(self, + results : typing___Optional[typing___Iterable[cirq___google___api___v2___result_pb2___Result]] = None, + ) -> None: ... + @classmethod + def FromString(cls, s: bytes) -> BatchResult: ... + def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + if sys.version_info >= (3,): + def ClearField(self, field_name: typing_extensions___Literal[u"results"]) -> None: ... + else: + def ClearField(self, field_name: typing_extensions___Literal[b"results"]) -> None: ...