Skip to content

Commit 6b10ed1

Browse files
authored
IAM: Added SystemRoleSubType to Role. (#174)
1 parent 80942a0 commit 6b10ed1

7 files changed

Lines changed: 323 additions & 124 deletions

File tree

gen/go/qdrant/cloud/iam/v1/iam.pb.go

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

gen/openapiv2/qdrant/cloud/iam/v1/iam.swagger.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,10 @@
576576
"type": "string"
577577
},
578578
"description": "The permissions associated with this role."
579+
},
580+
"subType": {
581+
"$ref": "#/definitions/v1SystemRoleSubType",
582+
"description": "The sub-type of the system role.\nThis field is set for system role only."
579583
}
580584
},
581585
"description": "The actual role.",
@@ -618,6 +622,10 @@
618622
"type": "string"
619623
},
620624
"description": "The permissions associated with this role."
625+
},
626+
"subType": {
627+
"$ref": "#/definitions/v1SystemRoleSubType",
628+
"description": "The sub-type of the system role.\nThis field is set for system role only."
621629
}
622630
},
623631
"description": "The actual role.",
@@ -865,6 +873,10 @@
865873
"type": "string"
866874
},
867875
"description": "The permissions associated with this role."
876+
},
877+
"subType": {
878+
"$ref": "#/definitions/v1SystemRoleSubType",
879+
"description": "The sub-type of the system role.\nThis field is set for system role only."
868880
}
869881
},
870882
"description": "A Role represents a role in the Qdrant cloud."
@@ -880,6 +892,18 @@
880892
"description": "- ROLE_TYPE_UNSPECIFIED: The role type is unspecified.\n - ROLE_TYPE_SYSTEM: The role type is system.\nNote: system roles cannot be changed (create/update/delete).\n - ROLE_TYPE_CUSTOM: The role type is custom defined.",
881893
"title": "RoleType specified the type of the role"
882894
},
895+
"v1SystemRoleSubType": {
896+
"type": "string",
897+
"enum": [
898+
"SYSTEM_ROLE_SUB_TYPE_UNSPECIFIED",
899+
"SYSTEM_ROLE_SUB_TYPE_OWNER",
900+
"SYSTEM_ROLE_SUB_TYPE_ADMIN",
901+
"SYSTEM_ROLE_SUB_TYPE_BASE"
902+
],
903+
"default": "SYSTEM_ROLE_SUB_TYPE_UNSPECIFIED",
904+
"description": "- SYSTEM_ROLE_SUB_TYPE_UNSPECIFIED: The system role sub-type is unspecified.\n - SYSTEM_ROLE_SUB_TYPE_OWNER: The system role sub-type is owner.\n - SYSTEM_ROLE_SUB_TYPE_ADMIN: The system role sub-type is admin.\n - SYSTEM_ROLE_SUB_TYPE_BASE: The system role sub-type is base.",
905+
"title": "SystemRoleSubType specified the sub-type of the system role"
906+
},
883907
"v1UpdateRoleResponse": {
884908
"type": "object",
885909
"properties": {

gen/python/qdrant/cloud/iam/v1/iam_pb2.py

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

gen/python/qdrant/cloud/iam/v1/iam_pb2.pyi

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ class RoleType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
2626
ROLE_TYPE_SYSTEM: _ClassVar[RoleType]
2727
ROLE_TYPE_CUSTOM: _ClassVar[RoleType]
2828

29+
class SystemRoleSubType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
30+
__slots__ = ()
31+
SYSTEM_ROLE_SUB_TYPE_UNSPECIFIED: _ClassVar[SystemRoleSubType]
32+
SYSTEM_ROLE_SUB_TYPE_OWNER: _ClassVar[SystemRoleSubType]
33+
SYSTEM_ROLE_SUB_TYPE_ADMIN: _ClassVar[SystemRoleSubType]
34+
SYSTEM_ROLE_SUB_TYPE_BASE: _ClassVar[SystemRoleSubType]
35+
2936
class LegalDocumentType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
3037
__slots__ = ()
3138
LEGAL_DOCUMENT_TYPE_UNSPECIFIED: _ClassVar[LegalDocumentType]
@@ -46,6 +53,10 @@ USER_STATUS_DELETED: UserStatus
4653
ROLE_TYPE_UNSPECIFIED: RoleType
4754
ROLE_TYPE_SYSTEM: RoleType
4855
ROLE_TYPE_CUSTOM: RoleType
56+
SYSTEM_ROLE_SUB_TYPE_UNSPECIFIED: SystemRoleSubType
57+
SYSTEM_ROLE_SUB_TYPE_OWNER: SystemRoleSubType
58+
SYSTEM_ROLE_SUB_TYPE_ADMIN: SystemRoleSubType
59+
SYSTEM_ROLE_SUB_TYPE_BASE: SystemRoleSubType
4960
LEGAL_DOCUMENT_TYPE_UNSPECIFIED: LegalDocumentType
5061
LEGAL_DOCUMENT_TYPE_TERMS_OF_SERVICE: LegalDocumentType
5162
LEGAL_DOCUMENT_TYPE_PRIVACY_POLICY: LegalDocumentType
@@ -234,7 +245,7 @@ class User(_message.Message):
234245
def __init__(self, id: _Optional[str] = ..., created_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., last_modified_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., email: _Optional[str] = ..., status: _Optional[_Union[UserStatus, str]] = ..., default_account_id: _Optional[str] = ...) -> None: ...
235246

236247
class Role(_message.Message):
237-
__slots__ = ("id", "created_at", "last_modified_at", "account_id", "name", "description", "role_type", "permissions")
248+
__slots__ = ("id", "created_at", "last_modified_at", "account_id", "name", "description", "role_type", "permissions", "sub_type")
238249
ID_FIELD_NUMBER: _ClassVar[int]
239250
CREATED_AT_FIELD_NUMBER: _ClassVar[int]
240251
LAST_MODIFIED_AT_FIELD_NUMBER: _ClassVar[int]
@@ -243,6 +254,7 @@ class Role(_message.Message):
243254
DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
244255
ROLE_TYPE_FIELD_NUMBER: _ClassVar[int]
245256
PERMISSIONS_FIELD_NUMBER: _ClassVar[int]
257+
SUB_TYPE_FIELD_NUMBER: _ClassVar[int]
246258
id: str
247259
created_at: _timestamp_pb2.Timestamp
248260
last_modified_at: _timestamp_pb2.Timestamp
@@ -251,7 +263,8 @@ class Role(_message.Message):
251263
description: str
252264
role_type: RoleType
253265
permissions: _containers.RepeatedScalarFieldContainer[str]
254-
def __init__(self, id: _Optional[str] = ..., created_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., last_modified_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., account_id: _Optional[str] = ..., name: _Optional[str] = ..., description: _Optional[str] = ..., role_type: _Optional[_Union[RoleType, str]] = ..., permissions: _Optional[_Iterable[str]] = ...) -> None: ...
266+
sub_type: SystemRoleSubType
267+
def __init__(self, id: _Optional[str] = ..., created_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., last_modified_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., account_id: _Optional[str] = ..., name: _Optional[str] = ..., description: _Optional[str] = ..., role_type: _Optional[_Union[RoleType, str]] = ..., permissions: _Optional[_Iterable[str]] = ..., sub_type: _Optional[_Union[SystemRoleSubType, str]] = ...) -> None: ...
255268

256269
class LogoutUserRequest(_message.Message):
257270
__slots__ = ()

gen/typescript/qdrant/cloud/iam/v1/iam_pb.d.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,14 @@ export declare type Role = Message<"qdrant.cloud.iam.v1.Role"> & {
872872
* @generated from field: repeated string permissions = 8;
873873
*/
874874
permissions: string[];
875+
876+
/**
877+
* The sub-type of the system role.
878+
* This field is set for system role only.
879+
*
880+
* @generated from field: optional qdrant.cloud.iam.v1.SystemRoleSubType sub_type = 9;
881+
*/
882+
subType?: SystemRoleSubType;
875883
};
876884

877885
export declare type RoleValid = Role;
@@ -1038,6 +1046,46 @@ export enum RoleType {
10381046
*/
10391047
export declare const RoleTypeSchema: GenEnum<RoleType>;
10401048

1049+
/**
1050+
* SystemRoleSubType specified the sub-type of the system role
1051+
*
1052+
* @generated from enum qdrant.cloud.iam.v1.SystemRoleSubType
1053+
*/
1054+
export enum SystemRoleSubType {
1055+
/**
1056+
* The system role sub-type is unspecified.
1057+
*
1058+
* @generated from enum value: SYSTEM_ROLE_SUB_TYPE_UNSPECIFIED = 0;
1059+
*/
1060+
UNSPECIFIED = 0,
1061+
1062+
/**
1063+
* The system role sub-type is owner.
1064+
*
1065+
* @generated from enum value: SYSTEM_ROLE_SUB_TYPE_OWNER = 1;
1066+
*/
1067+
OWNER = 1,
1068+
1069+
/**
1070+
* The system role sub-type is admin.
1071+
*
1072+
* @generated from enum value: SYSTEM_ROLE_SUB_TYPE_ADMIN = 2;
1073+
*/
1074+
ADMIN = 2,
1075+
1076+
/**
1077+
* The system role sub-type is base.
1078+
*
1079+
* @generated from enum value: SYSTEM_ROLE_SUB_TYPE_BASE = 3;
1080+
*/
1081+
BASE = 3,
1082+
}
1083+
1084+
/**
1085+
* Describes the enum qdrant.cloud.iam.v1.SystemRoleSubType.
1086+
*/
1087+
export declare const SystemRoleSubTypeSchema: GenEnum<SystemRoleSubType>;
1088+
10411089
/**
10421090
* LegalDocumentType specifies the type of a legal document.
10431091
*

gen/typescript/qdrant/cloud/iam/v1/iam_pb.js

Lines changed: 17 additions & 3 deletions
Large diffs are not rendered by default.

proto/qdrant/cloud/iam/v1/iam.proto

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,12 @@ message Role {
503503
string: {min_len: 1}
504504
}
505505
}];
506+
// The sub-type of the system role.
507+
// This field is set for system role only.
508+
optional SystemRoleSubType sub_type = 9 [(buf.validate.field).enum = {
509+
defined_only: true
510+
not_in: [0]
511+
}];
506512
}
507513

508514
// RoleType specified the type of the role
@@ -516,6 +522,18 @@ enum RoleType {
516522
ROLE_TYPE_CUSTOM = 2;
517523
}
518524

525+
// SystemRoleSubType specified the sub-type of the system role
526+
enum SystemRoleSubType {
527+
// The system role sub-type is unspecified.
528+
SYSTEM_ROLE_SUB_TYPE_UNSPECIFIED = 0;
529+
// The system role sub-type is owner.
530+
SYSTEM_ROLE_SUB_TYPE_OWNER = 1;
531+
// The system role sub-type is admin.
532+
SYSTEM_ROLE_SUB_TYPE_ADMIN = 2;
533+
// The system role sub-type is base.
534+
SYSTEM_ROLE_SUB_TYPE_BASE = 3;
535+
}
536+
519537
// buf:lint:ignore QDRANT_CLOUD_REQUIRED_REQUEST_FIELDS
520538
// LogoutUserRequest is the request for the Logout function
521539
message LogoutUserRequest {

0 commit comments

Comments
 (0)