Skip to content

Commit 94cefa4

Browse files
committed
chore: auto-gen by protobufs
triggered by commit: instill-ai/protobufs@18387a3
1 parent 6c4b034 commit 94cefa4

File tree

5 files changed

+302
-155
lines changed

5 files changed

+302
-155
lines changed

core/mgmt/v1beta/mgmt_pb2.py

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

core/mgmt/v1beta/mgmt_pb2.pyi

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,6 +1145,77 @@ class CheckNamespaceResponse(google.protobuf.message.Message):
11451145

11461146
global___CheckNamespaceResponse = CheckNamespaceResponse
11471147

1148+
@typing_extensions.final
1149+
class CheckNamespaceAdminRequest(google.protobuf.message.Message):
1150+
"""CheckNamespaceAdminRequest represents a request to verify if a namespace is
1151+
available.
1152+
"""
1153+
1154+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
1155+
1156+
ID_FIELD_NUMBER: builtins.int
1157+
id: builtins.str
1158+
"""The namespace ID to be checked."""
1159+
def __init__(
1160+
self,
1161+
*,
1162+
id: builtins.str = ...,
1163+
) -> None: ...
1164+
def ClearField(self, field_name: typing_extensions.Literal["id", b"id"]) -> None: ...
1165+
1166+
global___CheckNamespaceAdminRequest = CheckNamespaceAdminRequest
1167+
1168+
@typing_extensions.final
1169+
class CheckNamespaceAdminResponse(google.protobuf.message.Message):
1170+
"""CheckNamespaceAdminResponse contains the availability of a namespace or the type
1171+
of resource that's using it.
1172+
"""
1173+
1174+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
1175+
1176+
class _Namespace:
1177+
ValueType = typing.NewType("ValueType", builtins.int)
1178+
V: typing_extensions.TypeAlias = ValueType
1179+
1180+
class _NamespaceEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[CheckNamespaceAdminResponse._Namespace.ValueType], builtins.type):
1181+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
1182+
NAMESPACE_UNSPECIFIED: CheckNamespaceAdminResponse._Namespace.ValueType # 0
1183+
"""Unspecified."""
1184+
NAMESPACE_AVAILABLE: CheckNamespaceAdminResponse._Namespace.ValueType # 1
1185+
"""Available."""
1186+
NAMESPACE_USER: CheckNamespaceAdminResponse._Namespace.ValueType # 2
1187+
"""Namespace belongs to a user."""
1188+
NAMESPACE_ORGANIZATION: CheckNamespaceAdminResponse._Namespace.ValueType # 3
1189+
"""Namespace belongs to an organization."""
1190+
NAMESPACE_RESERVED: CheckNamespaceAdminResponse._Namespace.ValueType # 4
1191+
"""Reserved."""
1192+
1193+
class Namespace(_Namespace, metaclass=_NamespaceEnumTypeWrapper):
1194+
"""Namespace contains information about the availability of a namespace."""
1195+
1196+
NAMESPACE_UNSPECIFIED: CheckNamespaceAdminResponse.Namespace.ValueType # 0
1197+
"""Unspecified."""
1198+
NAMESPACE_AVAILABLE: CheckNamespaceAdminResponse.Namespace.ValueType # 1
1199+
"""Available."""
1200+
NAMESPACE_USER: CheckNamespaceAdminResponse.Namespace.ValueType # 2
1201+
"""Namespace belongs to a user."""
1202+
NAMESPACE_ORGANIZATION: CheckNamespaceAdminResponse.Namespace.ValueType # 3
1203+
"""Namespace belongs to an organization."""
1204+
NAMESPACE_RESERVED: CheckNamespaceAdminResponse.Namespace.ValueType # 4
1205+
"""Reserved."""
1206+
1207+
TYPE_FIELD_NUMBER: builtins.int
1208+
type: global___CheckNamespaceAdminResponse.Namespace.ValueType
1209+
"""Namespace type."""
1210+
def __init__(
1211+
self,
1212+
*,
1213+
type: global___CheckNamespaceAdminResponse.Namespace.ValueType = ...,
1214+
) -> None: ...
1215+
def ClearField(self, field_name: typing_extensions.Literal["type", b"type"]) -> None: ...
1216+
1217+
global___CheckNamespaceAdminResponse = CheckNamespaceAdminResponse
1218+
11481219
@typing_extensions.final
11491220
class ApiToken(google.protobuf.message.Message):
11501221
"""API tokens allow users to make requests to the Instill AI API."""

core/mgmt/v1beta/mgmt_private_service_pb2.py

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

core/mgmt/v1beta/mgmt_private_service_pb2_grpc.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ def __init__(self, channel):
6565
request_serializer=core_dot_mgmt_dot_v1beta_dot_mgmt__pb2.GetRemainingCreditAdminRequest.SerializeToString,
6666
response_deserializer=core_dot_mgmt_dot_v1beta_dot_mgmt__pb2.GetRemainingCreditAdminResponse.FromString,
6767
)
68+
self.CheckNamespaceAdmin = channel.unary_unary(
69+
'/core.mgmt.v1beta.MgmtPrivateService/CheckNamespaceAdmin',
70+
request_serializer=core_dot_mgmt_dot_v1beta_dot_mgmt__pb2.CheckNamespaceAdminRequest.SerializeToString,
71+
response_deserializer=core_dot_mgmt_dot_v1beta_dot_mgmt__pb2.CheckNamespaceAdminResponse.FromString,
72+
)
6873

6974

7075
class MgmtPrivateServiceServicer(object):
@@ -161,6 +166,16 @@ def GetRemainingCreditAdmin(self, request, context):
161166
context.set_details('Method not implemented!')
162167
raise NotImplementedError('Method not implemented!')
163168

169+
def CheckNamespaceAdmin(self, request, context):
170+
"""Check if a namespace is in use
171+
172+
Returns the availability of a namespace or, alternatively, the type of
173+
resource that is using it.
174+
"""
175+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
176+
context.set_details('Method not implemented!')
177+
raise NotImplementedError('Method not implemented!')
178+
164179

165180
def add_MgmtPrivateServiceServicer_to_server(servicer, server):
166181
rpc_method_handlers = {
@@ -214,6 +229,11 @@ def add_MgmtPrivateServiceServicer_to_server(servicer, server):
214229
request_deserializer=core_dot_mgmt_dot_v1beta_dot_mgmt__pb2.GetRemainingCreditAdminRequest.FromString,
215230
response_serializer=core_dot_mgmt_dot_v1beta_dot_mgmt__pb2.GetRemainingCreditAdminResponse.SerializeToString,
216231
),
232+
'CheckNamespaceAdmin': grpc.unary_unary_rpc_method_handler(
233+
servicer.CheckNamespaceAdmin,
234+
request_deserializer=core_dot_mgmt_dot_v1beta_dot_mgmt__pb2.CheckNamespaceAdminRequest.FromString,
235+
response_serializer=core_dot_mgmt_dot_v1beta_dot_mgmt__pb2.CheckNamespaceAdminResponse.SerializeToString,
236+
),
217237
}
218238
generic_handler = grpc.method_handlers_generic_handler(
219239
'core.mgmt.v1beta.MgmtPrivateService', rpc_method_handlers)
@@ -394,3 +414,20 @@ def GetRemainingCreditAdmin(request,
394414
core_dot_mgmt_dot_v1beta_dot_mgmt__pb2.GetRemainingCreditAdminResponse.FromString,
395415
options, channel_credentials,
396416
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
417+
418+
@staticmethod
419+
def CheckNamespaceAdmin(request,
420+
target,
421+
options=(),
422+
channel_credentials=None,
423+
call_credentials=None,
424+
insecure=False,
425+
compression=None,
426+
wait_for_ready=None,
427+
timeout=None,
428+
metadata=None):
429+
return grpc.experimental.unary_unary(request, target, '/core.mgmt.v1beta.MgmtPrivateService/CheckNamespaceAdmin',
430+
core_dot_mgmt_dot_v1beta_dot_mgmt__pb2.CheckNamespaceAdminRequest.SerializeToString,
431+
core_dot_mgmt_dot_v1beta_dot_mgmt__pb2.CheckNamespaceAdminResponse.FromString,
432+
options, channel_credentials,
433+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

core/mgmt/v1beta/mgmt_private_service_pb2_grpc.pyi

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,15 @@ class MgmtPrivateServiceStub:
9999
100100
On Instill Core, this endpoint will return a 404 Not Found status.
101101
"""
102+
CheckNamespaceAdmin: grpc.UnaryUnaryMultiCallable[
103+
core.mgmt.v1beta.mgmt_pb2.CheckNamespaceAdminRequest,
104+
core.mgmt.v1beta.mgmt_pb2.CheckNamespaceAdminResponse,
105+
]
106+
"""Check if a namespace is in use
107+
108+
Returns the availability of a namespace or, alternatively, the type of
109+
resource that is using it.
110+
"""
102111

103112
class MgmtPrivateServiceAsyncStub:
104113
"""Mgmt service responds to internal access"""
@@ -181,6 +190,15 @@ class MgmtPrivateServiceAsyncStub:
181190
182191
On Instill Core, this endpoint will return a 404 Not Found status.
183192
"""
193+
CheckNamespaceAdmin: grpc.aio.UnaryUnaryMultiCallable[
194+
core.mgmt.v1beta.mgmt_pb2.CheckNamespaceAdminRequest,
195+
core.mgmt.v1beta.mgmt_pb2.CheckNamespaceAdminResponse,
196+
]
197+
"""Check if a namespace is in use
198+
199+
Returns the availability of a namespace or, alternatively, the type of
200+
resource that is using it.
201+
"""
184202

185203
class MgmtPrivateServiceServicer(metaclass=abc.ABCMeta):
186204
"""Mgmt service responds to internal access"""
@@ -283,5 +301,16 @@ class MgmtPrivateServiceServicer(metaclass=abc.ABCMeta):
283301
284302
On Instill Core, this endpoint will return a 404 Not Found status.
285303
"""
304+
@abc.abstractmethod
305+
def CheckNamespaceAdmin(
306+
self,
307+
request: core.mgmt.v1beta.mgmt_pb2.CheckNamespaceAdminRequest,
308+
context: _ServicerContext,
309+
) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.CheckNamespaceAdminResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.CheckNamespaceAdminResponse]]:
310+
"""Check if a namespace is in use
311+
312+
Returns the availability of a namespace or, alternatively, the type of
313+
resource that is using it.
314+
"""
286315

287316
def add_MgmtPrivateServiceServicer_to_server(servicer: MgmtPrivateServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...

0 commit comments

Comments
 (0)