-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* blacken all gen'd libs
- Loading branch information
Showing
40 changed files
with
25,358 additions
and
16,033 deletions.
There are no files selected for viewing
480 changes: 293 additions & 187 deletions
480
packages/google-cloud-vision/google/cloud/vision_v1/proto/geometry_pb2.py
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
packages/google-cloud-vision/google/cloud/vision_v1/proto/geometry_pb2_grpc.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! | ||
import grpc | ||
|
5,374 changes: 3,301 additions & 2,073 deletions
5,374
packages/google-cloud-vision/google/cloud/vision_v1/proto/image_annotator_pb2.py
Large diffs are not rendered by default.
Oops, something went wrong.
83 changes: 44 additions & 39 deletions
83
packages/google-cloud-vision/google/cloud/vision_v1/proto/image_annotator_pb2_grpc.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,78 @@ | ||
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! | ||
import grpc | ||
|
||
from google.cloud.vision_v1.proto import image_annotator_pb2 as google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2 | ||
from google.longrunning import operations_pb2 as google_dot_longrunning_dot_operations__pb2 | ||
from google.cloud.vision_v1.proto import ( | ||
image_annotator_pb2 as google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2, | ||
) | ||
from google.longrunning import ( | ||
operations_pb2 as google_dot_longrunning_dot_operations__pb2, | ||
) | ||
|
||
|
||
class ImageAnnotatorStub(object): | ||
"""Service that performs Google Cloud Vision API detection tasks over client | ||
"""Service that performs Google Cloud Vision API detection tasks over client | ||
images, such as face, landmark, logo, label, and text detection. The | ||
ImageAnnotator service returns detected entities from the images. | ||
""" | ||
|
||
def __init__(self, channel): | ||
"""Constructor. | ||
def __init__(self, channel): | ||
"""Constructor. | ||
Args: | ||
channel: A grpc.Channel. | ||
""" | ||
self.BatchAnnotateImages = channel.unary_unary( | ||
'/google.cloud.vision.v1.ImageAnnotator/BatchAnnotateImages', | ||
request_serializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesRequest.SerializeToString, | ||
response_deserializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesResponse.FromString, | ||
self.BatchAnnotateImages = channel.unary_unary( | ||
"/google.cloud.vision.v1.ImageAnnotator/BatchAnnotateImages", | ||
request_serializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesRequest.SerializeToString, | ||
response_deserializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesResponse.FromString, | ||
) | ||
self.AsyncBatchAnnotateFiles = channel.unary_unary( | ||
'/google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateFiles', | ||
request_serializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.AsyncBatchAnnotateFilesRequest.SerializeToString, | ||
response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, | ||
self.AsyncBatchAnnotateFiles = channel.unary_unary( | ||
"/google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateFiles", | ||
request_serializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.AsyncBatchAnnotateFilesRequest.SerializeToString, | ||
response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, | ||
) | ||
|
||
|
||
class ImageAnnotatorServicer(object): | ||
"""Service that performs Google Cloud Vision API detection tasks over client | ||
"""Service that performs Google Cloud Vision API detection tasks over client | ||
images, such as face, landmark, logo, label, and text detection. The | ||
ImageAnnotator service returns detected entities from the images. | ||
""" | ||
|
||
def BatchAnnotateImages(self, request, context): | ||
"""Run image detection and annotation for a batch of images. | ||
def BatchAnnotateImages(self, request, context): | ||
"""Run image detection and annotation for a batch of images. | ||
""" | ||
context.set_code(grpc.StatusCode.UNIMPLEMENTED) | ||
context.set_details('Method not implemented!') | ||
raise NotImplementedError('Method not implemented!') | ||
context.set_code(grpc.StatusCode.UNIMPLEMENTED) | ||
context.set_details("Method not implemented!") | ||
raise NotImplementedError("Method not implemented!") | ||
|
||
def AsyncBatchAnnotateFiles(self, request, context): | ||
"""Run asynchronous image detection and annotation for a list of generic | ||
def AsyncBatchAnnotateFiles(self, request, context): | ||
"""Run asynchronous image detection and annotation for a list of generic | ||
files, such as PDF files, which may contain multiple pages and multiple | ||
images per page. Progress and results can be retrieved through the | ||
`google.longrunning.Operations` interface. | ||
`Operation.metadata` contains `OperationMetadata` (metadata). | ||
`Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). | ||
""" | ||
context.set_code(grpc.StatusCode.UNIMPLEMENTED) | ||
context.set_details('Method not implemented!') | ||
raise NotImplementedError('Method not implemented!') | ||
context.set_code(grpc.StatusCode.UNIMPLEMENTED) | ||
context.set_details("Method not implemented!") | ||
raise NotImplementedError("Method not implemented!") | ||
|
||
|
||
def add_ImageAnnotatorServicer_to_server(servicer, server): | ||
rpc_method_handlers = { | ||
'BatchAnnotateImages': grpc.unary_unary_rpc_method_handler( | ||
servicer.BatchAnnotateImages, | ||
request_deserializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesRequest.FromString, | ||
response_serializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesResponse.SerializeToString, | ||
), | ||
'AsyncBatchAnnotateFiles': grpc.unary_unary_rpc_method_handler( | ||
servicer.AsyncBatchAnnotateFiles, | ||
request_deserializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.AsyncBatchAnnotateFilesRequest.FromString, | ||
response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, | ||
), | ||
} | ||
generic_handler = grpc.method_handlers_generic_handler( | ||
'google.cloud.vision.v1.ImageAnnotator', rpc_method_handlers) | ||
server.add_generic_rpc_handlers((generic_handler,)) | ||
rpc_method_handlers = { | ||
"BatchAnnotateImages": grpc.unary_unary_rpc_method_handler( | ||
servicer.BatchAnnotateImages, | ||
request_deserializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesRequest.FromString, | ||
response_serializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesResponse.SerializeToString, | ||
), | ||
"AsyncBatchAnnotateFiles": grpc.unary_unary_rpc_method_handler( | ||
servicer.AsyncBatchAnnotateFiles, | ||
request_deserializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.AsyncBatchAnnotateFilesRequest.FromString, | ||
response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, | ||
), | ||
} | ||
generic_handler = grpc.method_handlers_generic_handler( | ||
"google.cloud.vision.v1.ImageAnnotator", rpc_method_handlers | ||
) | ||
server.add_generic_rpc_handlers((generic_handler,)) |
Oops, something went wrong.