diff --git a/artifact/artifact/v1alpha/object_pb2.py b/artifact/artifact/v1alpha/object_pb2.py index fa15aed..1266ce2 100644 --- a/artifact/artifact/v1alpha/object_pb2.py +++ b/artifact/artifact/v1alpha/object_pb2.py @@ -15,7 +15,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&artifact/artifact/v1alpha/object.proto\x12\x19\x61rtifact.artifact.v1alpha\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x93\x03\n\x06Object\x12\x10\n\x03uid\x18\x01 \x01(\tR\x03uid\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04size\x18\x03 \x01(\x03R\x04size\x12!\n\x0c\x63ontent_type\x18\x04 \x01(\tR\x0b\x63ontentType\x12#\n\rnamespace_uid\x18\x06 \x01(\tR\x0cnamespaceUid\x12\x18\n\x07\x63reator\x18\x07 \x01(\tR\x07\x63reator\x12\x1f\n\x0bis_uploaded\x18\x08 \x01(\x08R\nisUploaded\x12\x17\n\x04path\x18\t \x01(\tH\x00R\x04path\x88\x01\x01\x12,\n\x12object_expire_days\x18\n \x01(\x05R\x10objectExpireDays\x12=\n\x0c\x63reated_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0b\x63reatedTime\x12=\n\x0cupdated_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0bupdatedTimeB\x07\n\x05_path\"\x99\x02\n\x19GetObjectUploadURLRequest\x12&\n\x0cnamespace_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0bnamespaceId\x12$\n\x0bobject_name\x18\x02 \x01(\tB\x03\xe0\x41\x02R\nobjectName\x12,\n\x0f\x65xpiration_time\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01R\x0e\x65xpirationTime\x12M\n\x12last_modified_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01R\x10lastModifiedTime\x12\x31\n\x12object_expire_days\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01R\x10objectExpireDays\"\xb6\x01\n\x1aGetObjectUploadURLResponse\x12\x1d\n\nupload_url\x18\x01 \x01(\tR\tuploadUrl\x12>\n\rurl_expire_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0burlExpireAt\x12\x39\n\x06object\x18\x03 \x01(\x0b\x32!.artifact.artifact.v1alpha.ObjectR\x06object\"\xbd\x01\n\x1bGetObjectDownloadURLRequest\x12&\n\x0cnamespace_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0bnamespaceId\x12\"\n\nobject_uid\x18\x02 \x01(\tB\x03\xe0\x41\x01R\tobjectUid\x12$\n\x0bobject_name\x18\x03 \x01(\tB\x03\xe0\x41\x01R\nobjectName\x12,\n\x0f\x65xpiration_time\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01R\x0e\x65xpirationTime\"\xbc\x01\n\x1cGetObjectDownloadURLResponse\x12!\n\x0c\x64ownload_url\x18\x01 \x01(\tR\x0b\x64ownloadUrl\x12>\n\rurl_expire_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0burlExpireAt\x12\x39\n\x06object\x18\x04 \x01(\x0b\x32!.artifact.artifact.v1alpha.ObjectR\x06objectB\xff\x01\n\x1d\x63om.artifact.artifact.v1alphaB\x0bObjectProtoP\x01ZKgithub.com/instill-ai/protogen-go/artifact/artifact/v1alpha;artifactv1alpha\xa2\x02\x03\x41\x41X\xaa\x02\x19\x41rtifact.Artifact.V1alpha\xca\x02\x19\x41rtifact\\Artifact\\V1alpha\xe2\x02%Artifact\\Artifact\\V1alpha\\GPBMetadata\xea\x02\x1b\x41rtifact::Artifact::V1alphab\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&artifact/artifact/v1alpha/object.proto\x12\x19\x61rtifact.artifact.v1alpha\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf9\x03\n\x06Object\x12\x10\n\x03uid\x18\x01 \x01(\tR\x03uid\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04size\x18\x03 \x01(\x03R\x04size\x12!\n\x0c\x63ontent_type\x18\x04 \x01(\tR\x0b\x63ontentType\x12#\n\rnamespace_uid\x18\x06 \x01(\tR\x0cnamespaceUid\x12\x18\n\x07\x63reator\x18\x07 \x01(\tR\x07\x63reator\x12\x1f\n\x0bis_uploaded\x18\x08 \x01(\x08R\nisUploaded\x12\x17\n\x04path\x18\t \x01(\tH\x00R\x04path\x88\x01\x01\x12,\n\x12object_expire_days\x18\n \x01(\x05R\x10objectExpireDays\x12M\n\x12last_modified_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01R\x10lastModifiedTime\x88\x01\x01\x12=\n\x0c\x63reated_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0b\x63reatedTime\x12=\n\x0cupdated_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0bupdatedTimeB\x07\n\x05_pathB\x15\n\x13_last_modified_time\"\x98\x02\n\x19GetObjectUploadURLRequest\x12&\n\x0cnamespace_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0bnamespaceId\x12$\n\x0bobject_name\x18\x02 \x01(\tB\x03\xe0\x41\x02R\nobjectName\x12+\n\x0furl_expire_days\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01R\rurlExpireDays\x12M\n\x12last_modified_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01R\x10lastModifiedTime\x12\x31\n\x12object_expire_days\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01R\x10objectExpireDays\"\xb6\x01\n\x1aGetObjectUploadURLResponse\x12\x1d\n\nupload_url\x18\x01 \x01(\tR\tuploadUrl\x12>\n\rurl_expire_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0burlExpireAt\x12\x39\n\x06object\x18\x03 \x01(\x0b\x32!.artifact.artifact.v1alpha.ObjectR\x06object\"\xbc\x01\n\x1bGetObjectDownloadURLRequest\x12&\n\x0cnamespace_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0bnamespaceId\x12\"\n\nobject_uid\x18\x02 \x01(\tB\x03\xe0\x41\x01R\tobjectUid\x12$\n\x0bobject_name\x18\x03 \x01(\tB\x03\xe0\x41\x01R\nobjectName\x12+\n\x0furl_expire_days\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01R\rurlExpireDays\"\xbc\x01\n\x1cGetObjectDownloadURLResponse\x12!\n\x0c\x64ownload_url\x18\x01 \x01(\tR\x0b\x64ownloadUrl\x12>\n\rurl_expire_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0burlExpireAt\x12\x39\n\x06object\x18\x04 \x01(\x0b\x32!.artifact.artifact.v1alpha.ObjectR\x06objectB\xff\x01\n\x1d\x63om.artifact.artifact.v1alphaB\x0bObjectProtoP\x01ZKgithub.com/instill-ai/protogen-go/artifact/artifact/v1alpha;artifactv1alpha\xa2\x02\x03\x41\x41X\xaa\x02\x19\x41rtifact.Artifact.V1alpha\xca\x02\x19\x41rtifact\\Artifact\\V1alpha\xe2\x02%Artifact\\Artifact\\V1alpha\\GPBMetadata\xea\x02\x1b\x41rtifact::Artifact::V1alphab\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -28,8 +28,8 @@ _GETOBJECTUPLOADURLREQUEST.fields_by_name['namespace_id']._serialized_options = b'\340A\002' _GETOBJECTUPLOADURLREQUEST.fields_by_name['object_name']._options = None _GETOBJECTUPLOADURLREQUEST.fields_by_name['object_name']._serialized_options = b'\340A\002' - _GETOBJECTUPLOADURLREQUEST.fields_by_name['expiration_time']._options = None - _GETOBJECTUPLOADURLREQUEST.fields_by_name['expiration_time']._serialized_options = b'\340A\001' + _GETOBJECTUPLOADURLREQUEST.fields_by_name['url_expire_days']._options = None + _GETOBJECTUPLOADURLREQUEST.fields_by_name['url_expire_days']._serialized_options = b'\340A\001' _GETOBJECTUPLOADURLREQUEST.fields_by_name['last_modified_time']._options = None _GETOBJECTUPLOADURLREQUEST.fields_by_name['last_modified_time']._serialized_options = b'\340A\001' _GETOBJECTUPLOADURLREQUEST.fields_by_name['object_expire_days']._options = None @@ -40,16 +40,16 @@ _GETOBJECTDOWNLOADURLREQUEST.fields_by_name['object_uid']._serialized_options = b'\340A\001' _GETOBJECTDOWNLOADURLREQUEST.fields_by_name['object_name']._options = None _GETOBJECTDOWNLOADURLREQUEST.fields_by_name['object_name']._serialized_options = b'\340A\001' - _GETOBJECTDOWNLOADURLREQUEST.fields_by_name['expiration_time']._options = None - _GETOBJECTDOWNLOADURLREQUEST.fields_by_name['expiration_time']._serialized_options = b'\340A\001' + _GETOBJECTDOWNLOADURLREQUEST.fields_by_name['url_expire_days']._options = None + _GETOBJECTDOWNLOADURLREQUEST.fields_by_name['url_expire_days']._serialized_options = b'\340A\001' _globals['_OBJECT']._serialized_start=136 - _globals['_OBJECT']._serialized_end=539 - _globals['_GETOBJECTUPLOADURLREQUEST']._serialized_start=542 - _globals['_GETOBJECTUPLOADURLREQUEST']._serialized_end=823 - _globals['_GETOBJECTUPLOADURLRESPONSE']._serialized_start=826 - _globals['_GETOBJECTUPLOADURLRESPONSE']._serialized_end=1008 - _globals['_GETOBJECTDOWNLOADURLREQUEST']._serialized_start=1011 - _globals['_GETOBJECTDOWNLOADURLREQUEST']._serialized_end=1200 - _globals['_GETOBJECTDOWNLOADURLRESPONSE']._serialized_start=1203 - _globals['_GETOBJECTDOWNLOADURLRESPONSE']._serialized_end=1391 + _globals['_OBJECT']._serialized_end=641 + _globals['_GETOBJECTUPLOADURLREQUEST']._serialized_start=644 + _globals['_GETOBJECTUPLOADURLREQUEST']._serialized_end=924 + _globals['_GETOBJECTUPLOADURLRESPONSE']._serialized_start=927 + _globals['_GETOBJECTUPLOADURLRESPONSE']._serialized_end=1109 + _globals['_GETOBJECTDOWNLOADURLREQUEST']._serialized_start=1112 + _globals['_GETOBJECTDOWNLOADURLREQUEST']._serialized_end=1300 + _globals['_GETOBJECTDOWNLOADURLRESPONSE']._serialized_start=1303 + _globals['_GETOBJECTDOWNLOADURLRESPONSE']._serialized_end=1491 # @@protoc_insertion_point(module_scope) diff --git a/artifact/artifact/v1alpha/object_pb2.pyi b/artifact/artifact/v1alpha/object_pb2.pyi index f1241d4..f5a308e 100644 --- a/artifact/artifact/v1alpha/object_pb2.pyi +++ b/artifact/artifact/v1alpha/object_pb2.pyi @@ -7,6 +7,7 @@ import google.protobuf.descriptor import google.protobuf.message import google.protobuf.timestamp_pb2 import sys +import typing if sys.version_info >= (3, 8): import typing as typing_extensions @@ -30,6 +31,7 @@ class Object(google.protobuf.message.Message): IS_UPLOADED_FIELD_NUMBER: builtins.int PATH_FIELD_NUMBER: builtins.int OBJECT_EXPIRE_DAYS_FIELD_NUMBER: builtins.int + LAST_MODIFIED_TIME_FIELD_NUMBER: builtins.int CREATED_TIME_FIELD_NUMBER: builtins.int UPDATED_TIME_FIELD_NUMBER: builtins.int uid: builtins.str @@ -40,7 +42,7 @@ class Object(google.protobuf.message.Message): """size in bytes""" content_type: builtins.str """content type - this is from content-type header of http request + this is mime type from content-type header of http request or from file extension """ namespace_uid: builtins.str """namespace uid""" @@ -52,9 +54,12 @@ class Object(google.protobuf.message.Message): """object path(optional)""" object_expire_days: builtins.int """object live time in days - minimum is 1 day. if not set, the object will not be deleted automatically + if set to 0, the object will not be deleted automatically """ @property + def last_modified_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """last modified time""" + @property def created_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """created time""" @property @@ -72,11 +77,15 @@ class Object(google.protobuf.message.Message): is_uploaded: builtins.bool = ..., path: builtins.str | None = ..., object_expire_days: builtins.int = ..., + last_modified_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., created_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., updated_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_path", b"_path", "created_time", b"created_time", "path", b"path", "updated_time", b"updated_time"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_path", b"_path", "content_type", b"content_type", "created_time", b"created_time", "creator", b"creator", "is_uploaded", b"is_uploaded", "name", b"name", "namespace_uid", b"namespace_uid", "object_expire_days", b"object_expire_days", "path", b"path", "size", b"size", "uid", b"uid", "updated_time", b"updated_time"]) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["_last_modified_time", b"_last_modified_time", "_path", b"_path", "created_time", b"created_time", "last_modified_time", b"last_modified_time", "path", b"path", "updated_time", b"updated_time"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["_last_modified_time", b"_last_modified_time", "_path", b"_path", "content_type", b"content_type", "created_time", b"created_time", "creator", b"creator", "is_uploaded", b"is_uploaded", "last_modified_time", b"last_modified_time", "name", b"name", "namespace_uid", b"namespace_uid", "object_expire_days", b"object_expire_days", "path", b"path", "size", b"size", "uid", b"uid", "updated_time", b"updated_time"]) -> None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing_extensions.Literal["_last_modified_time", b"_last_modified_time"]) -> typing_extensions.Literal["last_modified_time"] | None: ... + @typing.overload def WhichOneof(self, oneof_group: typing_extensions.Literal["_path", b"_path"]) -> typing_extensions.Literal["path"] | None: ... global___Object = Object @@ -89,7 +98,7 @@ class GetObjectUploadURLRequest(google.protobuf.message.Message): NAMESPACE_ID_FIELD_NUMBER: builtins.int OBJECT_NAME_FIELD_NUMBER: builtins.int - EXPIRATION_TIME_FIELD_NUMBER: builtins.int + URL_EXPIRE_DAYS_FIELD_NUMBER: builtins.int LAST_MODIFIED_TIME_FIELD_NUMBER: builtins.int OBJECT_EXPIRE_DAYS_FIELD_NUMBER: builtins.int namespace_id: builtins.str @@ -98,28 +107,30 @@ class GetObjectUploadURLRequest(google.protobuf.message.Message): """name of the object with length limit to 1024 characters. this is the unique identifier of the object in the namespace """ - expiration_time: builtins.int - """expiration time in minutes for the URL with a default value of 1440 minutes (1 day). - minimum is 60 minutes (1 hour) and maximum is 20160 minutes (14 days) + url_expire_days: builtins.int + """Expiration time in days for the URL. + Minimum is 1 day and maximum is 7 days. If not set or set to 0, defaults to 1 day. """ @property def last_modified_time(self) -> google.protobuf.timestamp_pb2.Timestamp: - """last modified time this value is provided by the client when the object url is created""" + """last modified time this value is provided by the client when the object url is created + it must be in RFC3339 formatted date-time string + """ object_expire_days: builtins.int """object live time in days - minimum is 1 day. if not set, the object will not be deleted automatically + minimum is 1 day. if set to 0, the object will not be deleted automatically """ def __init__( self, *, namespace_id: builtins.str = ..., object_name: builtins.str = ..., - expiration_time: builtins.int = ..., + url_expire_days: builtins.int = ..., last_modified_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., object_expire_days: builtins.int = ..., ) -> None: ... def HasField(self, field_name: typing_extensions.Literal["last_modified_time", b"last_modified_time"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["expiration_time", b"expiration_time", "last_modified_time", b"last_modified_time", "namespace_id", b"namespace_id", "object_expire_days", b"object_expire_days", "object_name", b"object_name"]) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["last_modified_time", b"last_modified_time", "namespace_id", b"namespace_id", "object_expire_days", b"object_expire_days", "object_name", b"object_name", "url_expire_days", b"url_expire_days"]) -> None: ... global___GetObjectUploadURLRequest = GetObjectUploadURLRequest @@ -161,7 +172,7 @@ class GetObjectDownloadURLRequest(google.protobuf.message.Message): NAMESPACE_ID_FIELD_NUMBER: builtins.int OBJECT_UID_FIELD_NUMBER: builtins.int OBJECT_NAME_FIELD_NUMBER: builtins.int - EXPIRATION_TIME_FIELD_NUMBER: builtins.int + URL_EXPIRE_DAYS_FIELD_NUMBER: builtins.int namespace_id: builtins.str """id of the namespace""" object_uid: builtins.str @@ -173,9 +184,9 @@ class GetObjectDownloadURLRequest(google.protobuf.message.Message): """object name if provided, object uid is not required """ - expiration_time: builtins.int - """expiration time in minutes for url with default value to 1440 minutes (1 day). - minimum is 60 minutes (1 hour) and maximum is 20160 minutes (14 days) + url_expire_days: builtins.int + """Expiration time in days for the URL. + Minimum is 1 day and maximum is 7 days. If not set or set to 0, defaults to 1 day. """ def __init__( self, @@ -183,9 +194,9 @@ class GetObjectDownloadURLRequest(google.protobuf.message.Message): namespace_id: builtins.str = ..., object_uid: builtins.str = ..., object_name: builtins.str = ..., - expiration_time: builtins.int = ..., + url_expire_days: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["expiration_time", b"expiration_time", "namespace_id", b"namespace_id", "object_name", b"object_name", "object_uid", b"object_uid"]) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["namespace_id", b"namespace_id", "object_name", b"object_name", "object_uid", b"object_uid", "url_expire_days", b"url_expire_days"]) -> None: ... global___GetObjectDownloadURLRequest = GetObjectDownloadURLRequest