1# Copyright 2016 Google Inc. All Rights Reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15"""Safe implementation of long-running operations with and without gRPC.
16
17Multiplexes between versions of long-running operations with and without gRPC.
18The former is preferred, but not possible in all environments (such as Google
19AppEngine Standard).
20"""
21
22try:
23 from google.longrunning.operations_grpc_pb2 import (
24 _CANCELOPERATIONREQUEST,
25 _DELETEOPERATIONREQUEST,
26 _GETOPERATIONREQUEST,
27 _LISTOPERATIONSREQUEST,
28 _LISTOPERATIONSRESPONSE,
29 _OPERATION,
30 _OPERATIONINFO,
31 _OPERATIONS,
32 )
33 from google.longrunning.operations_grpc_pb2 import *
34except ImportError:
35 from google.longrunning.operations_proto_pb2 import (
36 _CANCELOPERATIONREQUEST,
37 _DELETEOPERATIONREQUEST,
38 _GETOPERATIONREQUEST,
39 _LISTOPERATIONSREQUEST,
40 _LISTOPERATIONSRESPONSE,
41 _OPERATION,
42 _OPERATIONINFO,
43 _OPERATIONS,
44 )
45 from google.longrunning.operations_proto_pb2 import *