Skip to content

Commit

Permalink
Add missing stubs
Browse files Browse the repository at this point in the history
Due to a misconfiguration of .gitignore,
these stubs weren't included in the previous update.
  • Loading branch information
henribru committed Oct 17, 2020
1 parent dbdbda0 commit 193b504
Show file tree
Hide file tree
Showing 9 changed files with 778 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*
!*/
!/.gitignore
!/google-stubs/**
!/pyproject.toml
Expand Down
1 change: 1 addition & 0 deletions google-stubs/longrunning/operations_grpc.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from google.longrunning.operations_grpc_pb2 import *
10 changes: 10 additions & 0 deletions google-stubs/longrunning/operations_grpc_pb2.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from typing import Any

from google.longrunning.operations_proto_pb2 import *

class OperationsStub:
GetOperation: Any = ...
ListOperations: Any = ...
CancelOperation: Any = ...
DeleteOperation: Any = ...
def __init__(self, channel: Any) -> None: ...
1 change: 1 addition & 0 deletions google-stubs/longrunning/operations_proto.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from google.longrunning.operations_proto_pb2 import *
200 changes: 200 additions & 0 deletions google-stubs/longrunning/operations_proto_pb2.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
# @generated by generate_proto_mypy_stubs.py. Do not edit!
import sys
from typing import (
Iterable as typing___Iterable,
Optional as typing___Optional,
Text as typing___Text,
)

from google.protobuf.any_pb2 import Any as google___protobuf___any_pb2___Any
from google.protobuf.descriptor import (
Descriptor as google___protobuf___descriptor___Descriptor,
FieldDescriptor as google___protobuf___descriptor___FieldDescriptor,
FileDescriptor as google___protobuf___descriptor___FileDescriptor,
)
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_extensions import Literal as typing_extensions___Literal

from google.rpc.status_pb2 import Status as google___rpc___status_pb2___Status

builtin___bool = bool
builtin___bytes = bytes
builtin___float = float
builtin___int = int

DESCRIPTOR: google___protobuf___descriptor___FileDescriptor = ...

class Operation(google___protobuf___message___Message):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
name: typing___Text = ...
done: builtin___bool = ...
@property
def metadata(self) -> google___protobuf___any_pb2___Any: ...
@property
def error(self) -> google___rpc___status_pb2___Status: ...
@property
def response(self) -> google___protobuf___any_pb2___Any: ...
def __init__(
self,
*,
name: typing___Optional[typing___Text] = None,
metadata: typing___Optional[google___protobuf___any_pb2___Any] = None,
done: typing___Optional[builtin___bool] = None,
error: typing___Optional[google___rpc___status_pb2___Status] = None,
response: typing___Optional[google___protobuf___any_pb2___Any] = None,
) -> None: ...
def HasField(
self,
field_name: typing_extensions___Literal[
"error",
b"error",
"metadata",
b"metadata",
"response",
b"response",
"result",
b"result",
],
) -> builtin___bool: ...
def ClearField(
self,
field_name: typing_extensions___Literal[
"done",
b"done",
"error",
b"error",
"metadata",
b"metadata",
"name",
b"name",
"response",
b"response",
"result",
b"result",
],
) -> None: ...
def WhichOneof(
self, oneof_group: typing_extensions___Literal["result", b"result"]
) -> typing_extensions___Literal["error", "response"]: ...

type___Operation = Operation

class GetOperationRequest(google___protobuf___message___Message):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
name: typing___Text = ...
def __init__(
self,
*,
name: typing___Optional[typing___Text] = None,
) -> None: ...
def ClearField(
self, field_name: typing_extensions___Literal["name", b"name"]
) -> None: ...

type___GetOperationRequest = GetOperationRequest

class ListOperationsRequest(google___protobuf___message___Message):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
name: typing___Text = ...
filter: typing___Text = ...
page_size: builtin___int = ...
page_token: typing___Text = ...
def __init__(
self,
*,
name: typing___Optional[typing___Text] = None,
filter: typing___Optional[typing___Text] = None,
page_size: typing___Optional[builtin___int] = None,
page_token: typing___Optional[typing___Text] = None,
) -> None: ...
def ClearField(
self,
field_name: typing_extensions___Literal[
"filter",
b"filter",
"name",
b"name",
"page_size",
b"page_size",
"page_token",
b"page_token",
],
) -> None: ...

type___ListOperationsRequest = ListOperationsRequest

class ListOperationsResponse(google___protobuf___message___Message):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
next_page_token: typing___Text = ...
@property
def operations(
self,
) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[
type___Operation
]: ...
def __init__(
self,
*,
operations: typing___Optional[typing___Iterable[type___Operation]] = None,
next_page_token: typing___Optional[typing___Text] = None,
) -> None: ...
def ClearField(
self,
field_name: typing_extensions___Literal[
"next_page_token", b"next_page_token", "operations", b"operations"
],
) -> None: ...

type___ListOperationsResponse = ListOperationsResponse

class CancelOperationRequest(google___protobuf___message___Message):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
name: typing___Text = ...
def __init__(
self,
*,
name: typing___Optional[typing___Text] = None,
) -> None: ...
def ClearField(
self, field_name: typing_extensions___Literal["name", b"name"]
) -> None: ...

type___CancelOperationRequest = CancelOperationRequest

class DeleteOperationRequest(google___protobuf___message___Message):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
name: typing___Text = ...
def __init__(
self,
*,
name: typing___Optional[typing___Text] = None,
) -> None: ...
def ClearField(
self, field_name: typing_extensions___Literal["name", b"name"]
) -> None: ...

type___DeleteOperationRequest = DeleteOperationRequest

class OperationInfo(google___protobuf___message___Message):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
response_type: typing___Text = ...
metadata_type: typing___Text = ...
def __init__(
self,
*,
response_type: typing___Optional[typing___Text] = None,
metadata_type: typing___Optional[typing___Text] = None,
) -> None: ...
def ClearField(
self,
field_name: typing_extensions___Literal[
"metadata_type", b"metadata_type", "response_type", b"response_type"
],
) -> None: ...

type___OperationInfo = OperationInfo

operation_info: google___protobuf___descriptor___FieldDescriptor = ...
Empty file.
Loading

0 comments on commit 193b504

Please sign in to comment.