kinetix-contracts 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kinetix_contracts-1.0.0/PKG-INFO +7 -0
- kinetix_contracts-1.0.0/common/v1/common_pb2.py +53 -0
- kinetix_contracts-1.0.0/common/v1/common_pb2_grpc.py +4 -0
- kinetix_contracts-1.0.0/fleet/v1/fleet_pb2.py +47 -0
- kinetix_contracts-1.0.0/fleet/v1/fleet_pb2_grpc.py +120 -0
- kinetix_contracts-1.0.0/fulfillment/v1/fulfillment_pb2.py +65 -0
- kinetix_contracts-1.0.0/fulfillment/v1/fulfillment_pb2_grpc.py +321 -0
- kinetix_contracts-1.0.0/geo/v1/geo_pb2.py +50 -0
- kinetix_contracts-1.0.0/geo/v1/geo_pb2_grpc.py +120 -0
- kinetix_contracts-1.0.0/identity/v1/identity_pb2.py +63 -0
- kinetix_contracts-1.0.0/identity/v1/identity_pb2_grpc.py +249 -0
- kinetix_contracts-1.0.0/kinetix_contracts.egg-info/PKG-INFO +7 -0
- kinetix_contracts-1.0.0/kinetix_contracts.egg-info/SOURCES.txt +26 -0
- kinetix_contracts-1.0.0/kinetix_contracts.egg-info/dependency_links.txt +1 -0
- kinetix_contracts-1.0.0/kinetix_contracts.egg-info/requires.txt +2 -0
- kinetix_contracts-1.0.0/kinetix_contracts.egg-info/top_level.txt +11 -0
- kinetix_contracts-1.0.0/order/v1/order_pb2.py +48 -0
- kinetix_contracts-1.0.0/order/v1/order_pb2_grpc.py +120 -0
- kinetix_contracts-1.0.0/payment/v1/payment_pb2.py +51 -0
- kinetix_contracts-1.0.0/payment/v1/payment_pb2_grpc.py +206 -0
- kinetix_contracts-1.0.0/pricing/v1/pricing_pb2.py +66 -0
- kinetix_contracts-1.0.0/pricing/v1/pricing_pb2_grpc.py +249 -0
- kinetix_contracts-1.0.0/pyproject.toml +13 -0
- kinetix_contracts-1.0.0/returns/v1/returns_pb2.py +47 -0
- kinetix_contracts-1.0.0/returns/v1/returns_pb2_grpc.py +120 -0
- kinetix_contracts-1.0.0/setup.cfg +4 -0
- kinetix_contracts-1.0.0/shipping/v1/shipping_pb2.py +44 -0
- kinetix_contracts-1.0.0/shipping/v1/shipping_pb2_grpc.py +77 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: common/v1/common.proto
|
|
5
|
+
# Protobuf Python Version: 5.29.3
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
5,
|
|
15
|
+
29,
|
|
16
|
+
3,
|
|
17
|
+
'',
|
|
18
|
+
'common/v1/common.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16\x63ommon/v1/common.proto\x12\tcommon.v1\"F\n\x05Money\x12!\n\x0c\x61mount_minor\x18\x01 \x01(\x03R\x0b\x61mountMinor\x12\x1a\n\x08\x63urrency\x18\x02 \x01(\tR\x08\x63urrency\"D\n\x08GeoPoint\x12\x1a\n\x08latitude\x18\x01 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\"\xe0\x01\n\x07\x41\x64\x64ress\x12%\n\x0erecipient_name\x18\x01 \x01(\tR\rrecipientName\x12!\n\x0cphone_number\x18\x02 \x01(\tR\x0bphoneNumber\x12%\n\x0estreet_address\x18\x03 \x01(\tR\rstreetAddress\x12\x12\n\x04\x63ity\x18\x04 \x01(\tR\x04\x63ity\x12\x1f\n\x0bpostal_code\x18\x05 \x01(\tR\npostalCode\x12/\n\x08location\x18\x06 \x01(\x0b\x32\x13.common.v1.GeoPointR\x08location\"\xb0\x01\n\tOrderItem\x12\x10\n\x03sku\x18\x01 \x01(\tR\x03sku\x12!\n\x0cproduct_name\x18\x02 \x01(\tR\x0bproductName\x12\x1a\n\x08quantity\x18\x03 \x01(\x05R\x08quantity\x12/\n\nunit_price\x18\x04 \x01(\x0b\x32\x10.common.v1.MoneyR\tunitPrice\x12!\n\x0c\x62in_location\x18\x05 \x01(\tR\x0b\x62inLocation\"q\n\x0b\x45rrorDetail\x12\x1d\n\nerror_code\x18\x01 \x01(\tR\terrorCode\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message\x12)\n\x10\x66ield_violations\x18\x03 \x03(\tR\x0f\x66ieldViolations\"\"\n\x0eIdempotencyKey\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key*\xf6\x02\n\x0bOrderStatus\x12\x1c\n\x18ORDER_STATUS_UNSPECIFIED\x10\x00\x12 \n\x1cORDER_STATUS_PENDING_PAYMENT\x10\x01\x12\x15\n\x11ORDER_STATUS_PAID\x10\x02\x12\x19\n\x15ORDER_STATUS_RECEIVED\x10\x03\x12\x18\n\x14ORDER_STATUS_PACKING\x10\x04\x12\x17\n\x13ORDER_STATUS_PACKED\x10\x05\x12\x19\n\x15ORDER_STATUS_ASSIGNED\x10\x06\x12\x1b\n\x17ORDER_STATUS_DISPATCHED\x10\x07\x12\x1b\n\x17ORDER_STATUS_IN_TRANSIT\x10\x08\x12\x1a\n\x16ORDER_STATUS_DELIVERED\x10\t\x12\x1a\n\x16ORDER_STATUS_COMPLETED\x10\n\x12\x1a\n\x16ORDER_STATUS_CANCELLED\x10\x0b\x12\x19\n\x15ORDER_STATUS_REFUNDED\x10\x0c*\xeb\x01\n\rCourierStatus\x12\x1e\n\x1a\x43OURIER_STATUS_UNSPECIFIED\x10\x00\x12\x17\n\x13\x43OURIER_STATUS_IDLE\x10\x01\x12\x1b\n\x17\x43OURIER_STATUS_ASSIGNED\x10\x02\x12\"\n\x1e\x43OURIER_STATUS_EN_ROUTE_PICKUP\x10\x03\x12\x1c\n\x18\x43OURIER_STATUS_PICKED_UP\x10\x04\x12$\n COURIER_STATUS_EN_ROUTE_DELIVERY\x10\x05\x12\x1c\n\x18\x43OURIER_STATUS_COMPLETED\x10\x06*\xf0\x01\n\x0cReturnStatus\x12\x1d\n\x19RETURN_STATUS_UNSPECIFIED\x10\x00\x12\x1b\n\x17RETURN_STATUS_REQUESTED\x10\x01\x12&\n\"RETURN_STATUS_PICKED_UP_FROM_BUYER\x10\x02\x12\'\n#RETURN_STATUS_RECEIVED_AT_WAREHOUSE\x10\x03\x12\x1b\n\x17RETURN_STATUS_INSPECTED\x10\x04\x12\x1a\n\x16RETURN_STATUS_RESOLVED\x10\x05\x12\x1a\n\x16RETURN_STATUS_REJECTED\x10\x06\x42\xcc\x01\n\x1f\x63om.kinetix.contracts.common.v1B\x0b\x43ommonProtoP\x01ZEgithub.com/WildanFrananda/kinetix-contracts/gen/go/common/v1;commonv1\xa2\x02\x03KNX\xaa\x02\x1bKinetix.Contracts.Common.V1\xca\x02\tCommon\\V1\xe2\x02\x15\x43ommon\\V1\\GPBMetadata\xea\x02\nCommon::V1b\x06proto3')
|
|
28
|
+
|
|
29
|
+
_globals = globals()
|
|
30
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'common.v1.common_pb2', _globals)
|
|
32
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
34
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n\037com.kinetix.contracts.common.v1B\013CommonProtoP\001ZEgithub.com/WildanFrananda/kinetix-contracts/gen/go/common/v1;commonv1\242\002\003KNX\252\002\033Kinetix.Contracts.Common.V1\312\002\tCommon\\V1\342\002\025Common\\V1\\GPBMetadata\352\002\nCommon::V1'
|
|
35
|
+
_globals['_ORDERSTATUS']._serialized_start=737
|
|
36
|
+
_globals['_ORDERSTATUS']._serialized_end=1111
|
|
37
|
+
_globals['_COURIERSTATUS']._serialized_start=1114
|
|
38
|
+
_globals['_COURIERSTATUS']._serialized_end=1349
|
|
39
|
+
_globals['_RETURNSTATUS']._serialized_start=1352
|
|
40
|
+
_globals['_RETURNSTATUS']._serialized_end=1592
|
|
41
|
+
_globals['_MONEY']._serialized_start=37
|
|
42
|
+
_globals['_MONEY']._serialized_end=107
|
|
43
|
+
_globals['_GEOPOINT']._serialized_start=109
|
|
44
|
+
_globals['_GEOPOINT']._serialized_end=177
|
|
45
|
+
_globals['_ADDRESS']._serialized_start=180
|
|
46
|
+
_globals['_ADDRESS']._serialized_end=404
|
|
47
|
+
_globals['_ORDERITEM']._serialized_start=407
|
|
48
|
+
_globals['_ORDERITEM']._serialized_end=583
|
|
49
|
+
_globals['_ERRORDETAIL']._serialized_start=585
|
|
50
|
+
_globals['_ERRORDETAIL']._serialized_end=698
|
|
51
|
+
_globals['_IDEMPOTENCYKEY']._serialized_start=700
|
|
52
|
+
_globals['_IDEMPOTENCYKEY']._serialized_end=734
|
|
53
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: fleet/v1/fleet.proto
|
|
5
|
+
# Protobuf Python Version: 5.29.3
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
5,
|
|
15
|
+
29,
|
|
16
|
+
3,
|
|
17
|
+
'',
|
|
18
|
+
'fleet/v1/fleet.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from common.v1 import common_pb2 as common_dot_v1_dot_common__pb2
|
|
26
|
+
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14\x66leet/v1/fleet.proto\x12\x08\x66leet.v1\x1a\x16\x63ommon/v1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x02\n\x16\x44ispatchCourierRequest\x12\x32\n\x15merchant_principal_id\x18\x01 \x01(\tR\x13merchantPrincipalId\x12\x19\n\x08order_id\x18\x02 \x01(\tR\x07orderId\x12!\n\x0corder_number\x18\x03 \x01(\tR\x0borderNumber\x12\x39\n\x0epickup_address\x18\x04 \x01(\x0b\x32\x12.common.v1.AddressR\rpickupAddress\x12=\n\x10\x64\x65livery_address\x18\x05 \x01(\x0b\x32\x12.common.v1.AddressR\x0f\x64\x65liveryAddress\x12\x42\n\x0fidempotency_key\x18\x06 \x01(\x0b\x32\x19.common.v1.IdempotencyKeyR\x0eidempotencyKey\"\xe6\x02\n\x17\x44ispatchCourierResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12!\n\x0c\x64ispatch_ref\x18\x02 \x01(\tR\x0b\x64ispatchRef\x12?\n\x1c\x61ssigned_driver_principal_id\x18\x03 \x01(\tR\x19\x61ssignedDriverPrincipalId\x12\x30\n\x14\x61ssigned_driver_name\x18\x04 \x01(\tR\x12\x61ssignedDriverName\x12\x32\n\x15\x61ssigned_driver_phone\x18\x05 \x01(\tR\x13\x61ssignedDriverPhone\x12\x18\n\x07vehicle\x18\x06 \x01(\tR\x07vehicle\x12\x1f\n\x0b\x65ta_minutes\x18\x07 \x01(\x05R\netaMinutes\x12,\n\x05\x65rror\x18\x08 \x01(\x0b\x32\x16.common.v1.ErrorDetailR\x05\x65rror\"\xa4\x02\n\x12\x44riverLocationPing\x12.\n\x13\x64river_principal_id\x18\x01 \x01(\tR\x11\x64riverPrincipalId\x12!\n\x0corder_number\x18\x02 \x01(\tR\x0borderNumber\x12/\n\x08location\x18\x03 \x01(\x0b\x32\x13.common.v1.GeoPointR\x08location\x12\x1b\n\tspeed_kmh\x18\x04 \x01(\x01R\x08speedKmh\x12\x30\n\x06status\x18\x05 \x01(\x0e\x32\x18.common.v1.CourierStatusR\x06status\x12;\n\x0bobserved_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\nobservedAt\"\x9c\x01\n\x11\x44riverLocationAck\x12.\n\x13\x64river_principal_id\x18\x01 \x01(\tR\x11\x64riverPrincipalId\x12\x1a\n\x08received\x18\x02 \x01(\x08R\x08received\x12;\n\x0bserver_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\nserverTime2\xc8\x01\n\x17\x43ourierTelemetryService\x12V\n\x0f\x44ispatchCourier\x12 .fleet.v1.DispatchCourierRequest\x1a!.fleet.v1.DispatchCourierResponse\x12U\n\x14StreamDriverLocation\x12\x1c.fleet.v1.DriverLocationPing\x1a\x1b.fleet.v1.DriverLocationAck(\x01\x30\x01\x42\xc4\x01\n\x1e\x63om.kinetix.contracts.fleet.v1B\nFleetProtoP\x01ZCgithub.com/WildanFrananda/kinetix-contracts/gen/go/fleet/v1;fleetv1\xa2\x02\x03KNX\xaa\x02\x1aKinetix.Contracts.Fleet.V1\xca\x02\x08\x46leet\\V1\xe2\x02\x14\x46leet\\V1\\GPBMetadata\xea\x02\tFleet::V1b\x06proto3')
|
|
30
|
+
|
|
31
|
+
_globals = globals()
|
|
32
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
33
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'fleet.v1.fleet_pb2', _globals)
|
|
34
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
35
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
36
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n\036com.kinetix.contracts.fleet.v1B\nFleetProtoP\001ZCgithub.com/WildanFrananda/kinetix-contracts/gen/go/fleet/v1;fleetv1\242\002\003KNX\252\002\032Kinetix.Contracts.Fleet.V1\312\002\010Fleet\\V1\342\002\024Fleet\\V1\\GPBMetadata\352\002\tFleet::V1'
|
|
37
|
+
_globals['_DISPATCHCOURIERREQUEST']._serialized_start=92
|
|
38
|
+
_globals['_DISPATCHCOURIERREQUEST']._serialized_end=420
|
|
39
|
+
_globals['_DISPATCHCOURIERRESPONSE']._serialized_start=423
|
|
40
|
+
_globals['_DISPATCHCOURIERRESPONSE']._serialized_end=781
|
|
41
|
+
_globals['_DRIVERLOCATIONPING']._serialized_start=784
|
|
42
|
+
_globals['_DRIVERLOCATIONPING']._serialized_end=1076
|
|
43
|
+
_globals['_DRIVERLOCATIONACK']._serialized_start=1079
|
|
44
|
+
_globals['_DRIVERLOCATIONACK']._serialized_end=1235
|
|
45
|
+
_globals['_COURIERTELEMETRYSERVICE']._serialized_start=1238
|
|
46
|
+
_globals['_COURIERTELEMETRYSERVICE']._serialized_end=1438
|
|
47
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
|
|
5
|
+
from fleet.v1 import fleet_pb2 as fleet_dot_v1_dot_fleet__pb2
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CourierTelemetryServiceStub(object):
|
|
9
|
+
"""Missing associated documentation comment in .proto file."""
|
|
10
|
+
|
|
11
|
+
def __init__(self, channel):
|
|
12
|
+
"""Constructor.
|
|
13
|
+
|
|
14
|
+
Args:
|
|
15
|
+
channel: A grpc.Channel.
|
|
16
|
+
"""
|
|
17
|
+
self.DispatchCourier = channel.unary_unary(
|
|
18
|
+
'/fleet.v1.CourierTelemetryService/DispatchCourier',
|
|
19
|
+
request_serializer=fleet_dot_v1_dot_fleet__pb2.DispatchCourierRequest.SerializeToString,
|
|
20
|
+
response_deserializer=fleet_dot_v1_dot_fleet__pb2.DispatchCourierResponse.FromString,
|
|
21
|
+
_registered_method=True)
|
|
22
|
+
self.StreamDriverLocation = channel.stream_stream(
|
|
23
|
+
'/fleet.v1.CourierTelemetryService/StreamDriverLocation',
|
|
24
|
+
request_serializer=fleet_dot_v1_dot_fleet__pb2.DriverLocationPing.SerializeToString,
|
|
25
|
+
response_deserializer=fleet_dot_v1_dot_fleet__pb2.DriverLocationAck.FromString,
|
|
26
|
+
_registered_method=True)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class CourierTelemetryServiceServicer(object):
|
|
30
|
+
"""Missing associated documentation comment in .proto file."""
|
|
31
|
+
|
|
32
|
+
def DispatchCourier(self, request, context):
|
|
33
|
+
"""Missing associated documentation comment in .proto file."""
|
|
34
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
35
|
+
context.set_details('Method not implemented!')
|
|
36
|
+
raise NotImplementedError('Method not implemented!')
|
|
37
|
+
|
|
38
|
+
def StreamDriverLocation(self, request_iterator, context):
|
|
39
|
+
"""Missing associated documentation comment in .proto file."""
|
|
40
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
41
|
+
context.set_details('Method not implemented!')
|
|
42
|
+
raise NotImplementedError('Method not implemented!')
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def add_CourierTelemetryServiceServicer_to_server(servicer, server):
|
|
46
|
+
rpc_method_handlers = {
|
|
47
|
+
'DispatchCourier': grpc.unary_unary_rpc_method_handler(
|
|
48
|
+
servicer.DispatchCourier,
|
|
49
|
+
request_deserializer=fleet_dot_v1_dot_fleet__pb2.DispatchCourierRequest.FromString,
|
|
50
|
+
response_serializer=fleet_dot_v1_dot_fleet__pb2.DispatchCourierResponse.SerializeToString,
|
|
51
|
+
),
|
|
52
|
+
'StreamDriverLocation': grpc.stream_stream_rpc_method_handler(
|
|
53
|
+
servicer.StreamDriverLocation,
|
|
54
|
+
request_deserializer=fleet_dot_v1_dot_fleet__pb2.DriverLocationPing.FromString,
|
|
55
|
+
response_serializer=fleet_dot_v1_dot_fleet__pb2.DriverLocationAck.SerializeToString,
|
|
56
|
+
),
|
|
57
|
+
}
|
|
58
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
59
|
+
'fleet.v1.CourierTelemetryService', rpc_method_handlers)
|
|
60
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
61
|
+
server.add_registered_method_handlers('fleet.v1.CourierTelemetryService', rpc_method_handlers)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
# This class is part of an EXPERIMENTAL API.
|
|
65
|
+
class CourierTelemetryService(object):
|
|
66
|
+
"""Missing associated documentation comment in .proto file."""
|
|
67
|
+
|
|
68
|
+
@staticmethod
|
|
69
|
+
def DispatchCourier(request,
|
|
70
|
+
target,
|
|
71
|
+
options=(),
|
|
72
|
+
channel_credentials=None,
|
|
73
|
+
call_credentials=None,
|
|
74
|
+
insecure=False,
|
|
75
|
+
compression=None,
|
|
76
|
+
wait_for_ready=None,
|
|
77
|
+
timeout=None,
|
|
78
|
+
metadata=None):
|
|
79
|
+
return grpc.experimental.unary_unary(
|
|
80
|
+
request,
|
|
81
|
+
target,
|
|
82
|
+
'/fleet.v1.CourierTelemetryService/DispatchCourier',
|
|
83
|
+
fleet_dot_v1_dot_fleet__pb2.DispatchCourierRequest.SerializeToString,
|
|
84
|
+
fleet_dot_v1_dot_fleet__pb2.DispatchCourierResponse.FromString,
|
|
85
|
+
options,
|
|
86
|
+
channel_credentials,
|
|
87
|
+
insecure,
|
|
88
|
+
call_credentials,
|
|
89
|
+
compression,
|
|
90
|
+
wait_for_ready,
|
|
91
|
+
timeout,
|
|
92
|
+
metadata,
|
|
93
|
+
_registered_method=True)
|
|
94
|
+
|
|
95
|
+
@staticmethod
|
|
96
|
+
def StreamDriverLocation(request_iterator,
|
|
97
|
+
target,
|
|
98
|
+
options=(),
|
|
99
|
+
channel_credentials=None,
|
|
100
|
+
call_credentials=None,
|
|
101
|
+
insecure=False,
|
|
102
|
+
compression=None,
|
|
103
|
+
wait_for_ready=None,
|
|
104
|
+
timeout=None,
|
|
105
|
+
metadata=None):
|
|
106
|
+
return grpc.experimental.stream_stream(
|
|
107
|
+
request_iterator,
|
|
108
|
+
target,
|
|
109
|
+
'/fleet.v1.CourierTelemetryService/StreamDriverLocation',
|
|
110
|
+
fleet_dot_v1_dot_fleet__pb2.DriverLocationPing.SerializeToString,
|
|
111
|
+
fleet_dot_v1_dot_fleet__pb2.DriverLocationAck.FromString,
|
|
112
|
+
options,
|
|
113
|
+
channel_credentials,
|
|
114
|
+
insecure,
|
|
115
|
+
call_credentials,
|
|
116
|
+
compression,
|
|
117
|
+
wait_for_ready,
|
|
118
|
+
timeout,
|
|
119
|
+
metadata,
|
|
120
|
+
_registered_method=True)
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: fulfillment/v1/fulfillment.proto
|
|
5
|
+
# Protobuf Python Version: 5.29.3
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
5,
|
|
15
|
+
29,
|
|
16
|
+
3,
|
|
17
|
+
'',
|
|
18
|
+
'fulfillment/v1/fulfillment.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from common.v1 import common_pb2 as common_dot_v1_dot_common__pb2
|
|
26
|
+
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n fulfillment/v1/fulfillment.proto\x12\x0e\x66ulfillment.v1\x1a\x16\x63ommon/v1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\\\n\x14\x43heckBinStockRequest\x12\x32\n\x15merchant_principal_id\x18\x01 \x01(\tR\x13merchantPrincipalId\x12\x10\n\x03sku\x18\x02 \x01(\tR\x03sku\"\xaa\x02\n\x15\x43heckBinStockResponse\x12\x14\n\x05\x66ound\x18\x01 \x01(\x08R\x05\x66ound\x12\x10\n\x03sku\x18\x02 \x01(\tR\x03sku\x12!\n\x0cproduct_name\x18\x03 \x01(\tR\x0bproductName\x12%\n\x0ephysical_stock\x18\x04 \x01(\x05R\rphysicalStock\x12\'\n\x0f\x61llocated_stock\x18\x05 \x01(\x05R\x0e\x61llocatedStock\x12\'\n\x0f\x61vailable_stock\x18\x06 \x01(\x05R\x0e\x61vailableStock\x12!\n\x0c\x62in_location\x18\x07 \x01(\tR\x0b\x62inLocation\x12*\n\x11low_stock_warning\x18\x08 \x01(\x08R\x0flowStockWarning\"\xde\x01\n\x13ReserveStockRequest\x12\x32\n\x15merchant_principal_id\x18\x01 \x01(\tR\x13merchantPrincipalId\x12\x10\n\x03sku\x18\x02 \x01(\tR\x03sku\x12\x1a\n\x08quantity\x18\x03 \x01(\x05R\x08quantity\x12!\n\x0corder_number\x18\x04 \x01(\tR\x0borderNumber\x12\x42\n\x0fidempotency_key\x18\x05 \x01(\x0b\x32\x19.common.v1.IdempotencyKeyR\x0eidempotencyKey\"\xb2\x01\n\x14ReserveStockResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12!\n\x0c\x62in_location\x18\x02 \x01(\tR\x0b\x62inLocation\x12/\n\x13remaining_available\x18\x03 \x01(\x05R\x12remainingAvailable\x12,\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x16.common.v1.ErrorDetailR\x05\x65rror\"\xde\x01\n\x13ReleaseStockRequest\x12\x32\n\x15merchant_principal_id\x18\x01 \x01(\tR\x13merchantPrincipalId\x12\x10\n\x03sku\x18\x02 \x01(\tR\x03sku\x12\x1a\n\x08quantity\x18\x03 \x01(\x05R\x08quantity\x12!\n\x0corder_number\x18\x04 \x01(\tR\x0borderNumber\x12\x42\n\x0fidempotency_key\x18\x05 \x01(\x0b\x32\x19.common.v1.IdempotencyKeyR\x0eidempotencyKey\"\xba\x01\n\x14ReleaseStockResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12)\n\x10\x61lready_released\x18\x02 \x01(\x08R\x0f\x61lreadyReleased\x12/\n\x13remaining_available\x18\x03 \x01(\x05R\x12remainingAvailable\x12,\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x16.common.v1.ErrorDetailR\x05\x65rror\"\x88\x04\n\x12\x43reateOrderRequest\x12\x32\n\x15merchant_principal_id\x18\x01 \x01(\tR\x13merchantPrincipalId\x12!\n\x0corder_number\x18\x02 \x01(\tR\x0borderNumber\x12\x39\n\x0epickup_address\x18\x03 \x01(\x0b\x32\x12.common.v1.AddressR\rpickupAddress\x12=\n\x10shipping_address\x18\x04 \x01(\x0b\x32\x12.common.v1.AddressR\x0fshippingAddress\x12\x33\n\x0ctotal_amount\x18\x05 \x01(\x0b\x32\x10.common.v1.MoneyR\x0btotalAmount\x12*\n\x05items\x18\x06 \x03(\x0b\x32\x14.common.v1.OrderItemR\x05items\x12\x42\n\x0fidempotency_key\x18\x07 \x01(\x0b\x32\x19.common.v1.IdempotencyKeyR\x0eidempotencyKey\x12<\n\x0fpickup_location\x18\x08 \x01(\x0b\x32\x13.common.v1.GeoPointR\x0epickupLocation\x12>\n\x10\x64ropoff_location\x18\t \x01(\x0b\x32\x13.common.v1.GeoPointR\x0f\x64ropoffLocation\"\xba\x02\n\x13\x43reateOrderResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12\x19\n\x08order_id\x18\x02 \x01(\tR\x07orderId\x12!\n\x0corder_number\x18\x03 \x01(\tR\x0borderNumber\x12.\n\x06status\x18\x04 \x01(\x0e\x32\x16.common.v1.OrderStatusR\x06status\x12\x32\n\x15merchant_principal_id\x18\x05 \x01(\tR\x13merchantPrincipalId\x12\x39\n\ncreated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12,\n\x05\x65rror\x18\x07 \x01(\x0b\x32\x16.common.v1.ErrorDetailR\x05\x65rror\"\x89\x01\n\x15GetOrderStatusRequest\x12\x32\n\x15merchant_principal_id\x18\x01 \x01(\tR\x13merchantPrincipalId\x12\x19\n\x08order_id\x18\x02 \x01(\tR\x07orderId\x12!\n\x0corder_number\x18\x03 \x01(\tR\x0borderNumber\"\xd8\x02\n\x16GetOrderStatusResponse\x12\x14\n\x05\x66ound\x18\x01 \x01(\x08R\x05\x66ound\x12\x19\n\x08order_id\x18\x02 \x01(\tR\x07orderId\x12!\n\x0corder_number\x18\x03 \x01(\tR\x0borderNumber\x12.\n\x06status\x18\x04 \x01(\x0e\x32\x16.common.v1.OrderStatusR\x06status\x12\x1d\n\nawb_number\x18\x05 \x01(\tR\tawbNumber\x12\"\n\rpod_photo_url\x18\x06 \x01(\tR\x0bpodPhotoUrl\x12<\n\x0f\x64river_location\x18\x07 \x01(\x0b\x32\x13.common.v1.GeoPointR\x0e\x64riverLocation\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xbf\x01\n\x12\x43\x61ncelOrderRequest\x12\x32\n\x15merchant_principal_id\x18\x01 \x01(\tR\x13merchantPrincipalId\x12\x19\n\x08order_id\x18\x02 \x01(\tR\x07orderId\x12\x16\n\x06reason\x18\x03 \x01(\tR\x06reason\x12\x42\n\x0fidempotency_key\x18\x04 \x01(\x0b\x32\x19.common.v1.IdempotencyKeyR\x0eidempotencyKey\"\x88\x01\n\x13\x43\x61ncelOrderResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message\x12=\n\x0e\x63urrent_status\x18\x03 \x01(\x0e\x32\x16.common.v1.OrderStatusR\rcurrentStatus2\xa5\x02\n\x0f\x42inStockService\x12\\\n\rCheckBinStock\x12$.fulfillment.v1.CheckBinStockRequest\x1a%.fulfillment.v1.CheckBinStockResponse\x12Y\n\x0cReserveStock\x12#.fulfillment.v1.ReserveStockRequest\x1a$.fulfillment.v1.ReserveStockResponse\x12Y\n\x0cReleaseStock\x12#.fulfillment.v1.ReleaseStockRequest\x1a$.fulfillment.v1.ReleaseStockResponse2\xa5\x02\n\x12\x46ulfillmentService\x12V\n\x0b\x43reateOrder\x12\".fulfillment.v1.CreateOrderRequest\x1a#.fulfillment.v1.CreateOrderResponse\x12_\n\x0eGetOrderStatus\x12%.fulfillment.v1.GetOrderStatusRequest\x1a&.fulfillment.v1.GetOrderStatusResponse\x12V\n\x0b\x43\x61ncelOrder\x12\".fulfillment.v1.CancelOrderRequest\x1a#.fulfillment.v1.CancelOrderResponseB\xf4\x01\n$com.kinetix.contracts.fulfillment.v1B\x10\x46ulfillmentProtoP\x01ZOgithub.com/WildanFrananda/kinetix-contracts/gen/go/fulfillment/v1;fulfillmentv1\xa2\x02\x03KNX\xaa\x02 Kinetix.Contracts.Fulfillment.V1\xca\x02\x0e\x46ulfillment\\V1\xe2\x02\x1a\x46ulfillment\\V1\\GPBMetadata\xea\x02\x0f\x46ulfillment::V1b\x06proto3')
|
|
30
|
+
|
|
31
|
+
_globals = globals()
|
|
32
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
33
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'fulfillment.v1.fulfillment_pb2', _globals)
|
|
34
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
35
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
36
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n$com.kinetix.contracts.fulfillment.v1B\020FulfillmentProtoP\001ZOgithub.com/WildanFrananda/kinetix-contracts/gen/go/fulfillment/v1;fulfillmentv1\242\002\003KNX\252\002 Kinetix.Contracts.Fulfillment.V1\312\002\016Fulfillment\\V1\342\002\032Fulfillment\\V1\\GPBMetadata\352\002\017Fulfillment::V1'
|
|
37
|
+
_globals['_CHECKBINSTOCKREQUEST']._serialized_start=109
|
|
38
|
+
_globals['_CHECKBINSTOCKREQUEST']._serialized_end=201
|
|
39
|
+
_globals['_CHECKBINSTOCKRESPONSE']._serialized_start=204
|
|
40
|
+
_globals['_CHECKBINSTOCKRESPONSE']._serialized_end=502
|
|
41
|
+
_globals['_RESERVESTOCKREQUEST']._serialized_start=505
|
|
42
|
+
_globals['_RESERVESTOCKREQUEST']._serialized_end=727
|
|
43
|
+
_globals['_RESERVESTOCKRESPONSE']._serialized_start=730
|
|
44
|
+
_globals['_RESERVESTOCKRESPONSE']._serialized_end=908
|
|
45
|
+
_globals['_RELEASESTOCKREQUEST']._serialized_start=911
|
|
46
|
+
_globals['_RELEASESTOCKREQUEST']._serialized_end=1133
|
|
47
|
+
_globals['_RELEASESTOCKRESPONSE']._serialized_start=1136
|
|
48
|
+
_globals['_RELEASESTOCKRESPONSE']._serialized_end=1322
|
|
49
|
+
_globals['_CREATEORDERREQUEST']._serialized_start=1325
|
|
50
|
+
_globals['_CREATEORDERREQUEST']._serialized_end=1845
|
|
51
|
+
_globals['_CREATEORDERRESPONSE']._serialized_start=1848
|
|
52
|
+
_globals['_CREATEORDERRESPONSE']._serialized_end=2162
|
|
53
|
+
_globals['_GETORDERSTATUSREQUEST']._serialized_start=2165
|
|
54
|
+
_globals['_GETORDERSTATUSREQUEST']._serialized_end=2302
|
|
55
|
+
_globals['_GETORDERSTATUSRESPONSE']._serialized_start=2305
|
|
56
|
+
_globals['_GETORDERSTATUSRESPONSE']._serialized_end=2649
|
|
57
|
+
_globals['_CANCELORDERREQUEST']._serialized_start=2652
|
|
58
|
+
_globals['_CANCELORDERREQUEST']._serialized_end=2843
|
|
59
|
+
_globals['_CANCELORDERRESPONSE']._serialized_start=2846
|
|
60
|
+
_globals['_CANCELORDERRESPONSE']._serialized_end=2982
|
|
61
|
+
_globals['_BINSTOCKSERVICE']._serialized_start=2985
|
|
62
|
+
_globals['_BINSTOCKSERVICE']._serialized_end=3278
|
|
63
|
+
_globals['_FULFILLMENTSERVICE']._serialized_start=3281
|
|
64
|
+
_globals['_FULFILLMENTSERVICE']._serialized_end=3574
|
|
65
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
|
|
5
|
+
from fulfillment.v1 import fulfillment_pb2 as fulfillment_dot_v1_dot_fulfillment__pb2
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class BinStockServiceStub(object):
|
|
9
|
+
"""Missing associated documentation comment in .proto file."""
|
|
10
|
+
|
|
11
|
+
def __init__(self, channel):
|
|
12
|
+
"""Constructor.
|
|
13
|
+
|
|
14
|
+
Args:
|
|
15
|
+
channel: A grpc.Channel.
|
|
16
|
+
"""
|
|
17
|
+
self.CheckBinStock = channel.unary_unary(
|
|
18
|
+
'/fulfillment.v1.BinStockService/CheckBinStock',
|
|
19
|
+
request_serializer=fulfillment_dot_v1_dot_fulfillment__pb2.CheckBinStockRequest.SerializeToString,
|
|
20
|
+
response_deserializer=fulfillment_dot_v1_dot_fulfillment__pb2.CheckBinStockResponse.FromString,
|
|
21
|
+
_registered_method=True)
|
|
22
|
+
self.ReserveStock = channel.unary_unary(
|
|
23
|
+
'/fulfillment.v1.BinStockService/ReserveStock',
|
|
24
|
+
request_serializer=fulfillment_dot_v1_dot_fulfillment__pb2.ReserveStockRequest.SerializeToString,
|
|
25
|
+
response_deserializer=fulfillment_dot_v1_dot_fulfillment__pb2.ReserveStockResponse.FromString,
|
|
26
|
+
_registered_method=True)
|
|
27
|
+
self.ReleaseStock = channel.unary_unary(
|
|
28
|
+
'/fulfillment.v1.BinStockService/ReleaseStock',
|
|
29
|
+
request_serializer=fulfillment_dot_v1_dot_fulfillment__pb2.ReleaseStockRequest.SerializeToString,
|
|
30
|
+
response_deserializer=fulfillment_dot_v1_dot_fulfillment__pb2.ReleaseStockResponse.FromString,
|
|
31
|
+
_registered_method=True)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class BinStockServiceServicer(object):
|
|
35
|
+
"""Missing associated documentation comment in .proto file."""
|
|
36
|
+
|
|
37
|
+
def CheckBinStock(self, request, context):
|
|
38
|
+
"""Missing associated documentation comment in .proto file."""
|
|
39
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
40
|
+
context.set_details('Method not implemented!')
|
|
41
|
+
raise NotImplementedError('Method not implemented!')
|
|
42
|
+
|
|
43
|
+
def ReserveStock(self, request, context):
|
|
44
|
+
"""Missing associated documentation comment in .proto file."""
|
|
45
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
46
|
+
context.set_details('Method not implemented!')
|
|
47
|
+
raise NotImplementedError('Method not implemented!')
|
|
48
|
+
|
|
49
|
+
def ReleaseStock(self, request, context):
|
|
50
|
+
"""Missing associated documentation comment in .proto file."""
|
|
51
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
52
|
+
context.set_details('Method not implemented!')
|
|
53
|
+
raise NotImplementedError('Method not implemented!')
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def add_BinStockServiceServicer_to_server(servicer, server):
|
|
57
|
+
rpc_method_handlers = {
|
|
58
|
+
'CheckBinStock': grpc.unary_unary_rpc_method_handler(
|
|
59
|
+
servicer.CheckBinStock,
|
|
60
|
+
request_deserializer=fulfillment_dot_v1_dot_fulfillment__pb2.CheckBinStockRequest.FromString,
|
|
61
|
+
response_serializer=fulfillment_dot_v1_dot_fulfillment__pb2.CheckBinStockResponse.SerializeToString,
|
|
62
|
+
),
|
|
63
|
+
'ReserveStock': grpc.unary_unary_rpc_method_handler(
|
|
64
|
+
servicer.ReserveStock,
|
|
65
|
+
request_deserializer=fulfillment_dot_v1_dot_fulfillment__pb2.ReserveStockRequest.FromString,
|
|
66
|
+
response_serializer=fulfillment_dot_v1_dot_fulfillment__pb2.ReserveStockResponse.SerializeToString,
|
|
67
|
+
),
|
|
68
|
+
'ReleaseStock': grpc.unary_unary_rpc_method_handler(
|
|
69
|
+
servicer.ReleaseStock,
|
|
70
|
+
request_deserializer=fulfillment_dot_v1_dot_fulfillment__pb2.ReleaseStockRequest.FromString,
|
|
71
|
+
response_serializer=fulfillment_dot_v1_dot_fulfillment__pb2.ReleaseStockResponse.SerializeToString,
|
|
72
|
+
),
|
|
73
|
+
}
|
|
74
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
75
|
+
'fulfillment.v1.BinStockService', rpc_method_handlers)
|
|
76
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
77
|
+
server.add_registered_method_handlers('fulfillment.v1.BinStockService', rpc_method_handlers)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
# This class is part of an EXPERIMENTAL API.
|
|
81
|
+
class BinStockService(object):
|
|
82
|
+
"""Missing associated documentation comment in .proto file."""
|
|
83
|
+
|
|
84
|
+
@staticmethod
|
|
85
|
+
def CheckBinStock(request,
|
|
86
|
+
target,
|
|
87
|
+
options=(),
|
|
88
|
+
channel_credentials=None,
|
|
89
|
+
call_credentials=None,
|
|
90
|
+
insecure=False,
|
|
91
|
+
compression=None,
|
|
92
|
+
wait_for_ready=None,
|
|
93
|
+
timeout=None,
|
|
94
|
+
metadata=None):
|
|
95
|
+
return grpc.experimental.unary_unary(
|
|
96
|
+
request,
|
|
97
|
+
target,
|
|
98
|
+
'/fulfillment.v1.BinStockService/CheckBinStock',
|
|
99
|
+
fulfillment_dot_v1_dot_fulfillment__pb2.CheckBinStockRequest.SerializeToString,
|
|
100
|
+
fulfillment_dot_v1_dot_fulfillment__pb2.CheckBinStockResponse.FromString,
|
|
101
|
+
options,
|
|
102
|
+
channel_credentials,
|
|
103
|
+
insecure,
|
|
104
|
+
call_credentials,
|
|
105
|
+
compression,
|
|
106
|
+
wait_for_ready,
|
|
107
|
+
timeout,
|
|
108
|
+
metadata,
|
|
109
|
+
_registered_method=True)
|
|
110
|
+
|
|
111
|
+
@staticmethod
|
|
112
|
+
def ReserveStock(request,
|
|
113
|
+
target,
|
|
114
|
+
options=(),
|
|
115
|
+
channel_credentials=None,
|
|
116
|
+
call_credentials=None,
|
|
117
|
+
insecure=False,
|
|
118
|
+
compression=None,
|
|
119
|
+
wait_for_ready=None,
|
|
120
|
+
timeout=None,
|
|
121
|
+
metadata=None):
|
|
122
|
+
return grpc.experimental.unary_unary(
|
|
123
|
+
request,
|
|
124
|
+
target,
|
|
125
|
+
'/fulfillment.v1.BinStockService/ReserveStock',
|
|
126
|
+
fulfillment_dot_v1_dot_fulfillment__pb2.ReserveStockRequest.SerializeToString,
|
|
127
|
+
fulfillment_dot_v1_dot_fulfillment__pb2.ReserveStockResponse.FromString,
|
|
128
|
+
options,
|
|
129
|
+
channel_credentials,
|
|
130
|
+
insecure,
|
|
131
|
+
call_credentials,
|
|
132
|
+
compression,
|
|
133
|
+
wait_for_ready,
|
|
134
|
+
timeout,
|
|
135
|
+
metadata,
|
|
136
|
+
_registered_method=True)
|
|
137
|
+
|
|
138
|
+
@staticmethod
|
|
139
|
+
def ReleaseStock(request,
|
|
140
|
+
target,
|
|
141
|
+
options=(),
|
|
142
|
+
channel_credentials=None,
|
|
143
|
+
call_credentials=None,
|
|
144
|
+
insecure=False,
|
|
145
|
+
compression=None,
|
|
146
|
+
wait_for_ready=None,
|
|
147
|
+
timeout=None,
|
|
148
|
+
metadata=None):
|
|
149
|
+
return grpc.experimental.unary_unary(
|
|
150
|
+
request,
|
|
151
|
+
target,
|
|
152
|
+
'/fulfillment.v1.BinStockService/ReleaseStock',
|
|
153
|
+
fulfillment_dot_v1_dot_fulfillment__pb2.ReleaseStockRequest.SerializeToString,
|
|
154
|
+
fulfillment_dot_v1_dot_fulfillment__pb2.ReleaseStockResponse.FromString,
|
|
155
|
+
options,
|
|
156
|
+
channel_credentials,
|
|
157
|
+
insecure,
|
|
158
|
+
call_credentials,
|
|
159
|
+
compression,
|
|
160
|
+
wait_for_ready,
|
|
161
|
+
timeout,
|
|
162
|
+
metadata,
|
|
163
|
+
_registered_method=True)
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
class FulfillmentServiceStub(object):
|
|
167
|
+
"""Missing associated documentation comment in .proto file."""
|
|
168
|
+
|
|
169
|
+
def __init__(self, channel):
|
|
170
|
+
"""Constructor.
|
|
171
|
+
|
|
172
|
+
Args:
|
|
173
|
+
channel: A grpc.Channel.
|
|
174
|
+
"""
|
|
175
|
+
self.CreateOrder = channel.unary_unary(
|
|
176
|
+
'/fulfillment.v1.FulfillmentService/CreateOrder',
|
|
177
|
+
request_serializer=fulfillment_dot_v1_dot_fulfillment__pb2.CreateOrderRequest.SerializeToString,
|
|
178
|
+
response_deserializer=fulfillment_dot_v1_dot_fulfillment__pb2.CreateOrderResponse.FromString,
|
|
179
|
+
_registered_method=True)
|
|
180
|
+
self.GetOrderStatus = channel.unary_unary(
|
|
181
|
+
'/fulfillment.v1.FulfillmentService/GetOrderStatus',
|
|
182
|
+
request_serializer=fulfillment_dot_v1_dot_fulfillment__pb2.GetOrderStatusRequest.SerializeToString,
|
|
183
|
+
response_deserializer=fulfillment_dot_v1_dot_fulfillment__pb2.GetOrderStatusResponse.FromString,
|
|
184
|
+
_registered_method=True)
|
|
185
|
+
self.CancelOrder = channel.unary_unary(
|
|
186
|
+
'/fulfillment.v1.FulfillmentService/CancelOrder',
|
|
187
|
+
request_serializer=fulfillment_dot_v1_dot_fulfillment__pb2.CancelOrderRequest.SerializeToString,
|
|
188
|
+
response_deserializer=fulfillment_dot_v1_dot_fulfillment__pb2.CancelOrderResponse.FromString,
|
|
189
|
+
_registered_method=True)
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
class FulfillmentServiceServicer(object):
|
|
193
|
+
"""Missing associated documentation comment in .proto file."""
|
|
194
|
+
|
|
195
|
+
def CreateOrder(self, request, context):
|
|
196
|
+
"""Missing associated documentation comment in .proto file."""
|
|
197
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
198
|
+
context.set_details('Method not implemented!')
|
|
199
|
+
raise NotImplementedError('Method not implemented!')
|
|
200
|
+
|
|
201
|
+
def GetOrderStatus(self, request, context):
|
|
202
|
+
"""Missing associated documentation comment in .proto file."""
|
|
203
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
204
|
+
context.set_details('Method not implemented!')
|
|
205
|
+
raise NotImplementedError('Method not implemented!')
|
|
206
|
+
|
|
207
|
+
def CancelOrder(self, request, context):
|
|
208
|
+
"""Missing associated documentation comment in .proto file."""
|
|
209
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
210
|
+
context.set_details('Method not implemented!')
|
|
211
|
+
raise NotImplementedError('Method not implemented!')
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
def add_FulfillmentServiceServicer_to_server(servicer, server):
|
|
215
|
+
rpc_method_handlers = {
|
|
216
|
+
'CreateOrder': grpc.unary_unary_rpc_method_handler(
|
|
217
|
+
servicer.CreateOrder,
|
|
218
|
+
request_deserializer=fulfillment_dot_v1_dot_fulfillment__pb2.CreateOrderRequest.FromString,
|
|
219
|
+
response_serializer=fulfillment_dot_v1_dot_fulfillment__pb2.CreateOrderResponse.SerializeToString,
|
|
220
|
+
),
|
|
221
|
+
'GetOrderStatus': grpc.unary_unary_rpc_method_handler(
|
|
222
|
+
servicer.GetOrderStatus,
|
|
223
|
+
request_deserializer=fulfillment_dot_v1_dot_fulfillment__pb2.GetOrderStatusRequest.FromString,
|
|
224
|
+
response_serializer=fulfillment_dot_v1_dot_fulfillment__pb2.GetOrderStatusResponse.SerializeToString,
|
|
225
|
+
),
|
|
226
|
+
'CancelOrder': grpc.unary_unary_rpc_method_handler(
|
|
227
|
+
servicer.CancelOrder,
|
|
228
|
+
request_deserializer=fulfillment_dot_v1_dot_fulfillment__pb2.CancelOrderRequest.FromString,
|
|
229
|
+
response_serializer=fulfillment_dot_v1_dot_fulfillment__pb2.CancelOrderResponse.SerializeToString,
|
|
230
|
+
),
|
|
231
|
+
}
|
|
232
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
233
|
+
'fulfillment.v1.FulfillmentService', rpc_method_handlers)
|
|
234
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
235
|
+
server.add_registered_method_handlers('fulfillment.v1.FulfillmentService', rpc_method_handlers)
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
# This class is part of an EXPERIMENTAL API.
|
|
239
|
+
class FulfillmentService(object):
|
|
240
|
+
"""Missing associated documentation comment in .proto file."""
|
|
241
|
+
|
|
242
|
+
@staticmethod
|
|
243
|
+
def CreateOrder(request,
|
|
244
|
+
target,
|
|
245
|
+
options=(),
|
|
246
|
+
channel_credentials=None,
|
|
247
|
+
call_credentials=None,
|
|
248
|
+
insecure=False,
|
|
249
|
+
compression=None,
|
|
250
|
+
wait_for_ready=None,
|
|
251
|
+
timeout=None,
|
|
252
|
+
metadata=None):
|
|
253
|
+
return grpc.experimental.unary_unary(
|
|
254
|
+
request,
|
|
255
|
+
target,
|
|
256
|
+
'/fulfillment.v1.FulfillmentService/CreateOrder',
|
|
257
|
+
fulfillment_dot_v1_dot_fulfillment__pb2.CreateOrderRequest.SerializeToString,
|
|
258
|
+
fulfillment_dot_v1_dot_fulfillment__pb2.CreateOrderResponse.FromString,
|
|
259
|
+
options,
|
|
260
|
+
channel_credentials,
|
|
261
|
+
insecure,
|
|
262
|
+
call_credentials,
|
|
263
|
+
compression,
|
|
264
|
+
wait_for_ready,
|
|
265
|
+
timeout,
|
|
266
|
+
metadata,
|
|
267
|
+
_registered_method=True)
|
|
268
|
+
|
|
269
|
+
@staticmethod
|
|
270
|
+
def GetOrderStatus(request,
|
|
271
|
+
target,
|
|
272
|
+
options=(),
|
|
273
|
+
channel_credentials=None,
|
|
274
|
+
call_credentials=None,
|
|
275
|
+
insecure=False,
|
|
276
|
+
compression=None,
|
|
277
|
+
wait_for_ready=None,
|
|
278
|
+
timeout=None,
|
|
279
|
+
metadata=None):
|
|
280
|
+
return grpc.experimental.unary_unary(
|
|
281
|
+
request,
|
|
282
|
+
target,
|
|
283
|
+
'/fulfillment.v1.FulfillmentService/GetOrderStatus',
|
|
284
|
+
fulfillment_dot_v1_dot_fulfillment__pb2.GetOrderStatusRequest.SerializeToString,
|
|
285
|
+
fulfillment_dot_v1_dot_fulfillment__pb2.GetOrderStatusResponse.FromString,
|
|
286
|
+
options,
|
|
287
|
+
channel_credentials,
|
|
288
|
+
insecure,
|
|
289
|
+
call_credentials,
|
|
290
|
+
compression,
|
|
291
|
+
wait_for_ready,
|
|
292
|
+
timeout,
|
|
293
|
+
metadata,
|
|
294
|
+
_registered_method=True)
|
|
295
|
+
|
|
296
|
+
@staticmethod
|
|
297
|
+
def CancelOrder(request,
|
|
298
|
+
target,
|
|
299
|
+
options=(),
|
|
300
|
+
channel_credentials=None,
|
|
301
|
+
call_credentials=None,
|
|
302
|
+
insecure=False,
|
|
303
|
+
compression=None,
|
|
304
|
+
wait_for_ready=None,
|
|
305
|
+
timeout=None,
|
|
306
|
+
metadata=None):
|
|
307
|
+
return grpc.experimental.unary_unary(
|
|
308
|
+
request,
|
|
309
|
+
target,
|
|
310
|
+
'/fulfillment.v1.FulfillmentService/CancelOrder',
|
|
311
|
+
fulfillment_dot_v1_dot_fulfillment__pb2.CancelOrderRequest.SerializeToString,
|
|
312
|
+
fulfillment_dot_v1_dot_fulfillment__pb2.CancelOrderResponse.FromString,
|
|
313
|
+
options,
|
|
314
|
+
channel_credentials,
|
|
315
|
+
insecure,
|
|
316
|
+
call_credentials,
|
|
317
|
+
compression,
|
|
318
|
+
wait_for_ready,
|
|
319
|
+
timeout,
|
|
320
|
+
metadata,
|
|
321
|
+
_registered_method=True)
|