Skip to content

Commit

Permalink
chore: auto-gen by protobufs
Browse files Browse the repository at this point in the history
triggered by commit: instill-ai/protobufs@0c59a20
  • Loading branch information
droplet-bot committed Oct 21, 2024
1 parent e7dd3e0 commit 41ebf00
Show file tree
Hide file tree
Showing 5 changed files with 208 additions and 53 deletions.
108 changes: 57 additions & 51 deletions artifact/artifact/v1alpha/artifact_pb2.py

Large diffs are not rendered by default.

98 changes: 98 additions & 0 deletions artifact/artifact/v1alpha/artifact_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,104 @@ class DeleteRepositoryTagResponse(google.protobuf.message.Message):

global___DeleteRepositoryTagResponse = DeleteRepositoryTagResponse

@typing_extensions.final
class ObjectURL(google.protobuf.message.Message):
"""ObjectUploadURL"""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

UID_FIELD_NUMBER: builtins.int
NAMESPACE_UID_FIELD_NUMBER: builtins.int
OBJECT_UID_FIELD_NUMBER: builtins.int
URL_EXPIRE_AT_FIELD_NUMBER: builtins.int
MINIO_URL_PATH_FIELD_NUMBER: builtins.int
ENCODED_URL_PATH_FIELD_NUMBER: builtins.int
TYPE_FIELD_NUMBER: builtins.int
CREATE_TIME_FIELD_NUMBER: builtins.int
UPDATE_TIME_FIELD_NUMBER: builtins.int
DELETE_TIME_FIELD_NUMBER: builtins.int
uid: builtins.str
"""The unique identifier of the ObjectURL"""
namespace_uid: builtins.str
"""The namespace UID associated with this ObjectURL"""
object_uid: builtins.str
"""The object UID associated with this ObjectURL"""
@property
def url_expire_at(self) -> google.protobuf.timestamp_pb2.Timestamp:
"""The expiration time of the URL"""
minio_url_path: builtins.str
"""The MinIO URL path"""
encoded_url_path: builtins.str
"""The encoded URL path"""
type: builtins.str
"""The type of URL (download or upload)"""
@property
def create_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
"""The creation time of the ObjectURL"""
@property
def update_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
"""The last update time of the ObjectURL"""
@property
def delete_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
"""The deletion time of the ObjectURL, if applicable"""
def __init__(
self,
*,
uid: builtins.str = ...,
namespace_uid: builtins.str = ...,
object_uid: builtins.str = ...,
url_expire_at: google.protobuf.timestamp_pb2.Timestamp | None = ...,
minio_url_path: builtins.str = ...,
encoded_url_path: builtins.str = ...,
type: builtins.str = ...,
create_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
update_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
delete_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["_delete_time", b"_delete_time", "create_time", b"create_time", "delete_time", b"delete_time", "update_time", b"update_time", "url_expire_at", b"url_expire_at"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["_delete_time", b"_delete_time", "create_time", b"create_time", "delete_time", b"delete_time", "encoded_url_path", b"encoded_url_path", "minio_url_path", b"minio_url_path", "namespace_uid", b"namespace_uid", "object_uid", b"object_uid", "type", b"type", "uid", b"uid", "update_time", b"update_time", "url_expire_at", b"url_expire_at"]) -> None: ...
def WhichOneof(self, oneof_group: typing_extensions.Literal["_delete_time", b"_delete_time"]) -> typing_extensions.Literal["delete_time"] | None: ...

global___ObjectURL = ObjectURL

@typing_extensions.final
class GetObjectURLRequest(google.protobuf.message.Message):
"""GetObjectURLRequest"""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

UID_FIELD_NUMBER: builtins.int
uid: builtins.str
"""object url uid"""
def __init__(
self,
*,
uid: builtins.str = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["uid", b"uid"]) -> None: ...

global___GetObjectURLRequest = GetObjectURLRequest

@typing_extensions.final
class GetObjectURLResponse(google.protobuf.message.Message):
"""GetObjectURLResponse"""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

OBJECT_URL_FIELD_NUMBER: builtins.int
@property
def object_url(self) -> global___ObjectURL:
"""object upload url"""
def __init__(
self,
*,
object_url: global___ObjectURL | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["object_url", b"object_url"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["object_url", b"object_url"]) -> None: ...

global___GetObjectURLResponse = GetObjectURLResponse

@typing_extensions.final
class Catalog(google.protobuf.message.Message):
"""Catalog represents a catalog."""
Expand Down
4 changes: 2 additions & 2 deletions artifact/artifact/v1alpha/artifact_private_service_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions artifact/artifact/v1alpha/artifact_private_service_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ def __init__(self, channel):
request_serializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.DeleteRepositoryTagRequest.SerializeToString,
response_deserializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.DeleteRepositoryTagResponse.FromString,
)
self.GetObjectURL = channel.unary_unary(
'/artifact.artifact.v1alpha.ArtifactPrivateService/GetObjectURL',
request_serializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.GetObjectURLRequest.SerializeToString,
response_deserializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.GetObjectURLResponse.FromString,
)


class ArtifactPrivateServiceServicer(object):
Expand Down Expand Up @@ -80,6 +85,13 @@ def DeleteRepositoryTag(self, request, context):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def GetObjectURL(self, request, context):
"""Get Object Upload URL
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')


def add_ArtifactPrivateServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
Expand All @@ -103,6 +115,11 @@ def add_ArtifactPrivateServiceServicer_to_server(servicer, server):
request_deserializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.DeleteRepositoryTagRequest.FromString,
response_serializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.DeleteRepositoryTagResponse.SerializeToString,
),
'GetObjectURL': grpc.unary_unary_rpc_method_handler(
servicer.GetObjectURL,
request_deserializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.GetObjectURLRequest.FromString,
response_serializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.GetObjectURLResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'artifact.artifact.v1alpha.ArtifactPrivateService', rpc_method_handlers)
Expand Down Expand Up @@ -182,3 +199,20 @@ def DeleteRepositoryTag(request,
artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.DeleteRepositoryTagResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def GetObjectURL(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/artifact.artifact.v1alpha.ArtifactPrivateService/GetObjectURL',
artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.GetObjectURLRequest.SerializeToString,
artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.GetObjectURLResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
17 changes: 17 additions & 0 deletions artifact/artifact/v1alpha/artifact_private_service_pb2_grpc.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ class ArtifactPrivateServiceStub:
artifact.artifact.v1alpha.artifact_pb2.DeleteRepositoryTagResponse,
]
"""Delete a repository tag."""
GetObjectURL: grpc.UnaryUnaryMultiCallable[
artifact.artifact.v1alpha.artifact_pb2.GetObjectURLRequest,
artifact.artifact.v1alpha.artifact_pb2.GetObjectURLResponse,
]
"""Get Object Upload URL"""

class ArtifactPrivateServiceAsyncStub:
"""ArtifactPrivateService exposes the private endpoints that allow clients to
Expand Down Expand Up @@ -91,6 +96,11 @@ class ArtifactPrivateServiceAsyncStub:
artifact.artifact.v1alpha.artifact_pb2.DeleteRepositoryTagResponse,
]
"""Delete a repository tag."""
GetObjectURL: grpc.aio.UnaryUnaryMultiCallable[
artifact.artifact.v1alpha.artifact_pb2.GetObjectURLRequest,
artifact.artifact.v1alpha.artifact_pb2.GetObjectURLResponse,
]
"""Get Object Upload URL"""

class ArtifactPrivateServiceServicer(metaclass=abc.ABCMeta):
"""ArtifactPrivateService exposes the private endpoints that allow clients to
Expand Down Expand Up @@ -136,5 +146,12 @@ class ArtifactPrivateServiceServicer(metaclass=abc.ABCMeta):
context: _ServicerContext,
) -> typing.Union[artifact.artifact.v1alpha.artifact_pb2.DeleteRepositoryTagResponse, collections.abc.Awaitable[artifact.artifact.v1alpha.artifact_pb2.DeleteRepositoryTagResponse]]:
"""Delete a repository tag."""
@abc.abstractmethod
def GetObjectURL(
self,
request: artifact.artifact.v1alpha.artifact_pb2.GetObjectURLRequest,
context: _ServicerContext,
) -> typing.Union[artifact.artifact.v1alpha.artifact_pb2.GetObjectURLResponse, collections.abc.Awaitable[artifact.artifact.v1alpha.artifact_pb2.GetObjectURLResponse]]:
"""Get Object Upload URL"""

def add_ArtifactPrivateServiceServicer_to_server(servicer: ArtifactPrivateServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...

0 comments on commit 41ebf00

Please sign in to comment.