Skip to content

Commit 4b40e1d

Browse files
committed
chore: auto-gen by protobufs
triggered by commit: instill-ai/protobufs@2a5847f
1 parent e358a0a commit 4b40e1d

File tree

5 files changed

+307
-26
lines changed

5 files changed

+307
-26
lines changed

model/model/v1alpha/model_pb2.py

Lines changed: 41 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

model/model/v1alpha/model_pb2.pyi

Lines changed: 128 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2582,7 +2582,7 @@ global___TriggerOrganizationModelBinaryFileUploadResponse = TriggerOrganizationM
25822582

25832583
@typing_extensions.final
25842584
class GetModelOperationRequest(google.protobuf.message.Message):
2585-
"""GerModelOperationRequest represents a request to fetch a long-running
2585+
"""GetModelOperationRequest represents a request to fetch a long-running
25862586
operation performed on a model.
25872587
"""
25882588

@@ -2630,6 +2630,133 @@ class GetModelOperationResponse(google.protobuf.message.Message):
26302630

26312631
global___GetModelOperationResponse = GetModelOperationResponse
26322632

2633+
@typing_extensions.final
2634+
class LatestOperation(google.protobuf.message.Message):
2635+
"""LatestOperation represents an internal message for GetLatestModelOperation Response"""
2636+
2637+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
2638+
2639+
REQUEST_FIELD_NUMBER: builtins.int
2640+
RESPONSE_FIELD_NUMBER: builtins.int
2641+
@property
2642+
def request(self) -> global___TriggerUserModelRequest:
2643+
"""Input request"""
2644+
@property
2645+
def response(self) -> global___TriggerUserModelResponse:
2646+
"""Output response"""
2647+
def __init__(
2648+
self,
2649+
*,
2650+
request: global___TriggerUserModelRequest | None = ...,
2651+
response: global___TriggerUserModelResponse | None = ...,
2652+
) -> None: ...
2653+
def HasField(self, field_name: typing_extensions.Literal["request", b"request", "response", b"response"]) -> builtins.bool: ...
2654+
def ClearField(self, field_name: typing_extensions.Literal["request", b"request", "response", b"response"]) -> None: ...
2655+
2656+
global___LatestOperation = LatestOperation
2657+
2658+
@typing_extensions.final
2659+
class GetUserLatestModelOperationRequest(google.protobuf.message.Message):
2660+
"""GetUserLatestModelOperationRequest represents a request to fetch the latest long-running
2661+
operation performed on a model for a user.
2662+
"""
2663+
2664+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
2665+
2666+
NAME_FIELD_NUMBER: builtins.int
2667+
VIEW_FIELD_NUMBER: builtins.int
2668+
name: builtins.str
2669+
"""The resource name of the model, which allows its access by parent user
2670+
and ID.
2671+
- Format: `users/{user.id}/models/{model.id}`.
2672+
"""
2673+
view: model.model.v1alpha.model_definition_pb2.View.ValueType
2674+
"""View allows clients to specify the desired operation result in the response."""
2675+
def __init__(
2676+
self,
2677+
*,
2678+
name: builtins.str = ...,
2679+
view: model.model.v1alpha.model_definition_pb2.View.ValueType | None = ...,
2680+
) -> None: ...
2681+
def HasField(self, field_name: typing_extensions.Literal["_view", b"_view", "view", b"view"]) -> builtins.bool: ...
2682+
def ClearField(self, field_name: typing_extensions.Literal["_view", b"_view", "name", b"name", "view", b"view"]) -> None: ...
2683+
def WhichOneof(self, oneof_group: typing_extensions.Literal["_view", b"_view"]) -> typing_extensions.Literal["view"] | None: ...
2684+
2685+
global___GetUserLatestModelOperationRequest = GetUserLatestModelOperationRequest
2686+
2687+
@typing_extensions.final
2688+
class GetUserLatestModelOperationResponse(google.protobuf.message.Message):
2689+
"""GetUserLatestModelOperationRequest represents a request to query a long-running
2690+
operation.
2691+
"""
2692+
2693+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
2694+
2695+
OPERATION_FIELD_NUMBER: builtins.int
2696+
@property
2697+
def operation(self) -> google.longrunning.operations_pb2.Operation:
2698+
"""The long-running operation."""
2699+
def __init__(
2700+
self,
2701+
*,
2702+
operation: google.longrunning.operations_pb2.Operation | None = ...,
2703+
) -> None: ...
2704+
def HasField(self, field_name: typing_extensions.Literal["operation", b"operation"]) -> builtins.bool: ...
2705+
def ClearField(self, field_name: typing_extensions.Literal["operation", b"operation"]) -> None: ...
2706+
2707+
global___GetUserLatestModelOperationResponse = GetUserLatestModelOperationResponse
2708+
2709+
@typing_extensions.final
2710+
class GetOrganizationLatestModelOperationRequest(google.protobuf.message.Message):
2711+
"""GetOrganizationLatestModelOperationRequest represents a request to fetch the latest long-running
2712+
operation performed on a model for a user.
2713+
"""
2714+
2715+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
2716+
2717+
NAME_FIELD_NUMBER: builtins.int
2718+
VIEW_FIELD_NUMBER: builtins.int
2719+
name: builtins.str
2720+
"""The resource name of the model, which allows its access by parent organization
2721+
and ID.
2722+
- Format: `organizations/{organization.id}/models/{model.id}`.
2723+
"""
2724+
view: model.model.v1alpha.model_definition_pb2.View.ValueType
2725+
"""View allows clients to specify the desired operation result in the response."""
2726+
def __init__(
2727+
self,
2728+
*,
2729+
name: builtins.str = ...,
2730+
view: model.model.v1alpha.model_definition_pb2.View.ValueType | None = ...,
2731+
) -> None: ...
2732+
def HasField(self, field_name: typing_extensions.Literal["_view", b"_view", "view", b"view"]) -> builtins.bool: ...
2733+
def ClearField(self, field_name: typing_extensions.Literal["_view", b"_view", "name", b"name", "view", b"view"]) -> None: ...
2734+
def WhichOneof(self, oneof_group: typing_extensions.Literal["_view", b"_view"]) -> typing_extensions.Literal["view"] | None: ...
2735+
2736+
global___GetOrganizationLatestModelOperationRequest = GetOrganizationLatestModelOperationRequest
2737+
2738+
@typing_extensions.final
2739+
class GetOrganizationLatestModelOperationResponse(google.protobuf.message.Message):
2740+
"""GetOrganizationLatestModelOperationRequest represents a request to query a long-running
2741+
operation.
2742+
"""
2743+
2744+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
2745+
2746+
OPERATION_FIELD_NUMBER: builtins.int
2747+
@property
2748+
def operation(self) -> google.longrunning.operations_pb2.Operation:
2749+
"""The long-running operation."""
2750+
def __init__(
2751+
self,
2752+
*,
2753+
operation: google.longrunning.operations_pb2.Operation | None = ...,
2754+
) -> None: ...
2755+
def HasField(self, field_name: typing_extensions.Literal["operation", b"operation"]) -> builtins.bool: ...
2756+
def ClearField(self, field_name: typing_extensions.Literal["operation", b"operation"]) -> None: ...
2757+
2758+
global___GetOrganizationLatestModelOperationResponse = GetOrganizationLatestModelOperationResponse
2759+
26332760
@typing_extensions.final
26342761
class ListAvailableRegionsRequest(google.protobuf.message.Message):
26352762
"""ListAvailableRegionsRequest represents a request to fetch a list

model/model/v1alpha/model_public_service_pb2.py

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

model/model/v1alpha/model_public_service_pb2_grpc.py

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,16 @@ def __init__(self, channel):
229229
request_serializer=model_dot_model_dot_v1alpha_dot_model__pb2.GetModelOperationRequest.SerializeToString,
230230
response_deserializer=model_dot_model_dot_v1alpha_dot_model__pb2.GetModelOperationResponse.FromString,
231231
)
232+
self.GetUserLatestModelOperation = channel.unary_unary(
233+
'/model.model.v1alpha.ModelPublicService/GetUserLatestModelOperation',
234+
request_serializer=model_dot_model_dot_v1alpha_dot_model__pb2.GetUserLatestModelOperationRequest.SerializeToString,
235+
response_deserializer=model_dot_model_dot_v1alpha_dot_model__pb2.GetUserLatestModelOperationResponse.FromString,
236+
)
237+
self.GetOrganizationLatestModelOperation = channel.unary_unary(
238+
'/model.model.v1alpha.ModelPublicService/GetOrganizationLatestModelOperation',
239+
request_serializer=model_dot_model_dot_v1alpha_dot_model__pb2.GetOrganizationLatestModelOperationRequest.SerializeToString,
240+
response_deserializer=model_dot_model_dot_v1alpha_dot_model__pb2.GetOrganizationLatestModelOperationResponse.FromString,
241+
)
232242

233243

234244
class ModelPublicServiceServicer(object):
@@ -671,6 +681,26 @@ def GetModelOperation(self, request, context):
671681
context.set_details('Method not implemented!')
672682
raise NotImplementedError('Method not implemented!')
673683

684+
def GetUserLatestModelOperation(self, request, context):
685+
"""Get the details of the latest long-running operation from a user model
686+
687+
This method allows requesters to request the status and outcome of
688+
long-running operations in a model, such as deployment.
689+
"""
690+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
691+
context.set_details('Method not implemented!')
692+
raise NotImplementedError('Method not implemented!')
693+
694+
def GetOrganizationLatestModelOperation(self, request, context):
695+
"""Get the details of the latest long-running operation from a organization model
696+
697+
This method allows requesters to request the status and outcome of
698+
long-running operations in a model, such as deployment.
699+
"""
700+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
701+
context.set_details('Method not implemented!')
702+
raise NotImplementedError('Method not implemented!')
703+
674704

675705
def add_ModelPublicServiceServicer_to_server(servicer, server):
676706
rpc_method_handlers = {
@@ -884,6 +914,16 @@ def add_ModelPublicServiceServicer_to_server(servicer, server):
884914
request_deserializer=model_dot_model_dot_v1alpha_dot_model__pb2.GetModelOperationRequest.FromString,
885915
response_serializer=model_dot_model_dot_v1alpha_dot_model__pb2.GetModelOperationResponse.SerializeToString,
886916
),
917+
'GetUserLatestModelOperation': grpc.unary_unary_rpc_method_handler(
918+
servicer.GetUserLatestModelOperation,
919+
request_deserializer=model_dot_model_dot_v1alpha_dot_model__pb2.GetUserLatestModelOperationRequest.FromString,
920+
response_serializer=model_dot_model_dot_v1alpha_dot_model__pb2.GetUserLatestModelOperationResponse.SerializeToString,
921+
),
922+
'GetOrganizationLatestModelOperation': grpc.unary_unary_rpc_method_handler(
923+
servicer.GetOrganizationLatestModelOperation,
924+
request_deserializer=model_dot_model_dot_v1alpha_dot_model__pb2.GetOrganizationLatestModelOperationRequest.FromString,
925+
response_serializer=model_dot_model_dot_v1alpha_dot_model__pb2.GetOrganizationLatestModelOperationResponse.SerializeToString,
926+
),
887927
}
888928
generic_handler = grpc.method_handlers_generic_handler(
889929
'model.model.v1alpha.ModelPublicService', rpc_method_handlers)
@@ -1611,3 +1651,37 @@ def GetModelOperation(request,
16111651
model_dot_model_dot_v1alpha_dot_model__pb2.GetModelOperationResponse.FromString,
16121652
options, channel_credentials,
16131653
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
1654+
1655+
@staticmethod
1656+
def GetUserLatestModelOperation(request,
1657+
target,
1658+
options=(),
1659+
channel_credentials=None,
1660+
call_credentials=None,
1661+
insecure=False,
1662+
compression=None,
1663+
wait_for_ready=None,
1664+
timeout=None,
1665+
metadata=None):
1666+
return grpc.experimental.unary_unary(request, target, '/model.model.v1alpha.ModelPublicService/GetUserLatestModelOperation',
1667+
model_dot_model_dot_v1alpha_dot_model__pb2.GetUserLatestModelOperationRequest.SerializeToString,
1668+
model_dot_model_dot_v1alpha_dot_model__pb2.GetUserLatestModelOperationResponse.FromString,
1669+
options, channel_credentials,
1670+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
1671+
1672+
@staticmethod
1673+
def GetOrganizationLatestModelOperation(request,
1674+
target,
1675+
options=(),
1676+
channel_credentials=None,
1677+
call_credentials=None,
1678+
insecure=False,
1679+
compression=None,
1680+
wait_for_ready=None,
1681+
timeout=None,
1682+
metadata=None):
1683+
return grpc.experimental.unary_unary(request, target, '/model.model.v1alpha.ModelPublicService/GetOrganizationLatestModelOperation',
1684+
model_dot_model_dot_v1alpha_dot_model__pb2.GetOrganizationLatestModelOperationRequest.SerializeToString,
1685+
model_dot_model_dot_v1alpha_dot_model__pb2.GetOrganizationLatestModelOperationResponse.FromString,
1686+
options, channel_credentials,
1687+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

model/model/v1alpha/model_public_service_pb2_grpc.pyi

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,24 @@ class ModelPublicServiceStub:
417417
This method allows requesters to request the status and outcome of
418418
long-running operations in a model, such as deployment.
419419
"""
420+
GetUserLatestModelOperation: grpc.UnaryUnaryMultiCallable[
421+
model.model.v1alpha.model_pb2.GetUserLatestModelOperationRequest,
422+
model.model.v1alpha.model_pb2.GetUserLatestModelOperationResponse,
423+
]
424+
"""Get the details of the latest long-running operation from a user model
425+
426+
This method allows requesters to request the status and outcome of
427+
long-running operations in a model, such as deployment.
428+
"""
429+
GetOrganizationLatestModelOperation: grpc.UnaryUnaryMultiCallable[
430+
model.model.v1alpha.model_pb2.GetOrganizationLatestModelOperationRequest,
431+
model.model.v1alpha.model_pb2.GetOrganizationLatestModelOperationResponse,
432+
]
433+
"""Get the details of the latest long-running operation from a organization model
434+
435+
This method allows requesters to request the status and outcome of
436+
long-running operations in a model, such as deployment.
437+
"""
420438

421439
class ModelPublicServiceAsyncStub:
422440
"""Model
@@ -816,6 +834,24 @@ class ModelPublicServiceAsyncStub:
816834
This method allows requesters to request the status and outcome of
817835
long-running operations in a model, such as deployment.
818836
"""
837+
GetUserLatestModelOperation: grpc.aio.UnaryUnaryMultiCallable[
838+
model.model.v1alpha.model_pb2.GetUserLatestModelOperationRequest,
839+
model.model.v1alpha.model_pb2.GetUserLatestModelOperationResponse,
840+
]
841+
"""Get the details of the latest long-running operation from a user model
842+
843+
This method allows requesters to request the status and outcome of
844+
long-running operations in a model, such as deployment.
845+
"""
846+
GetOrganizationLatestModelOperation: grpc.aio.UnaryUnaryMultiCallable[
847+
model.model.v1alpha.model_pb2.GetOrganizationLatestModelOperationRequest,
848+
model.model.v1alpha.model_pb2.GetOrganizationLatestModelOperationResponse,
849+
]
850+
"""Get the details of the latest long-running operation from a organization model
851+
852+
This method allows requesters to request the status and outcome of
853+
long-running operations in a model, such as deployment.
854+
"""
819855

820856
class ModelPublicServiceServicer(metaclass=abc.ABCMeta):
821857
"""Model
@@ -1296,6 +1332,28 @@ class ModelPublicServiceServicer(metaclass=abc.ABCMeta):
12961332
) -> typing.Union[model.model.v1alpha.model_pb2.GetModelOperationResponse, collections.abc.Awaitable[model.model.v1alpha.model_pb2.GetModelOperationResponse]]:
12971333
"""Get the details of a long-running operation
12981334
1335+
This method allows requesters to request the status and outcome of
1336+
long-running operations in a model, such as deployment.
1337+
"""
1338+
@abc.abstractmethod
1339+
def GetUserLatestModelOperation(
1340+
self,
1341+
request: model.model.v1alpha.model_pb2.GetUserLatestModelOperationRequest,
1342+
context: _ServicerContext,
1343+
) -> typing.Union[model.model.v1alpha.model_pb2.GetUserLatestModelOperationResponse, collections.abc.Awaitable[model.model.v1alpha.model_pb2.GetUserLatestModelOperationResponse]]:
1344+
"""Get the details of the latest long-running operation from a user model
1345+
1346+
This method allows requesters to request the status and outcome of
1347+
long-running operations in a model, such as deployment.
1348+
"""
1349+
@abc.abstractmethod
1350+
def GetOrganizationLatestModelOperation(
1351+
self,
1352+
request: model.model.v1alpha.model_pb2.GetOrganizationLatestModelOperationRequest,
1353+
context: _ServicerContext,
1354+
) -> typing.Union[model.model.v1alpha.model_pb2.GetOrganizationLatestModelOperationResponse, collections.abc.Awaitable[model.model.v1alpha.model_pb2.GetOrganizationLatestModelOperationResponse]]:
1355+
"""Get the details of the latest long-running operation from a organization model
1356+
12991357
This method allows requesters to request the status and outcome of
13001358
long-running operations in a model, such as deployment.
13011359
"""

0 commit comments

Comments
 (0)