From 5190b2308dd8b9b565077ce52e283985dd048d73 Mon Sep 17 00:00:00 2001 From: Maxime Jublou Date: Tue, 1 Oct 2024 09:33:38 +0200 Subject: [PATCH] feat: Add IAM impersonation --- .../validate/validate.pb.go | 56 +-- .../naas-models/go/aimodel/aimodel.pb.go | 56 +-- .../naas-models/go/asset/asset.pb.go | 64 ++-- .../naas-models/go/chat/chat.pb.go | 144 +++---- .../naas-models/go/common/common.pb.go | 6 +- .../naas-models/go/credit/credit.pb.go | 12 +- .../naas-models/go/errors/errors.pb.go | 164 ++++++-- .../go/errors/errors.pb.validate.go | 108 ++++++ .../jupyter-naas/naas-models/go/iam/iam.pb.go | 303 ++++++++++++--- .../naas-models/go/iam/iam.pb.validate.go | 355 ++++++++++++++++++ .../naas-models/go/registry/registry.pb.go | 62 +-- .../naas-models/go/secrets/secret.pb.go | 48 +-- .../naas-models/go/space/space.pb.go | 62 +-- .../naas-models/go/storage/storage.pb.go | 106 +++--- .../naas-models/go/workspace/workspace.pb.go | 164 ++++---- protos/errors.proto | 6 + protos/iam.proto | 15 +- python/naas_models/errors_pb2.py | 8 +- python/naas_models/iam_pb2.py | 19 +- python/naas_models/pydantic/errors_p2p.py | 8 + python/naas_models/pydantic/iam_p2p.py | 15 + 21 files changed, 1284 insertions(+), 497 deletions(-) diff --git a/go/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go b/go/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go index db6964f..290518a 100644 --- a/go/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go +++ b/go/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.34.2 // protoc v5.26.1 // source: validate.proto @@ -3677,7 +3677,7 @@ func file_validate_proto_rawDescGZIP() []byte { var file_validate_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_validate_proto_msgTypes = make([]protoimpl.MessageInfo, 23) -var file_validate_proto_goTypes = []interface{}{ +var file_validate_proto_goTypes = []any{ (KnownRegex)(0), // 0: validate.KnownRegex (*FieldRules)(nil), // 1: validate.FieldRules (*FloatRules)(nil), // 2: validate.FloatRules @@ -3766,7 +3766,7 @@ func file_validate_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_validate_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_validate_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*FieldRules); i { case 0: return &v.state @@ -3778,7 +3778,7 @@ func file_validate_proto_init() { return nil } } - file_validate_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_validate_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*FloatRules); i { case 0: return &v.state @@ -3790,7 +3790,7 @@ func file_validate_proto_init() { return nil } } - file_validate_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_validate_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*DoubleRules); i { case 0: return &v.state @@ -3802,7 +3802,7 @@ func file_validate_proto_init() { return nil } } - file_validate_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_validate_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*Int32Rules); i { case 0: return &v.state @@ -3814,7 +3814,7 @@ func file_validate_proto_init() { return nil } } - file_validate_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_validate_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Int64Rules); i { case 0: return &v.state @@ -3826,7 +3826,7 @@ func file_validate_proto_init() { return nil } } - file_validate_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_validate_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*UInt32Rules); i { case 0: return &v.state @@ -3838,7 +3838,7 @@ func file_validate_proto_init() { return nil } } - file_validate_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_validate_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*UInt64Rules); i { case 0: return &v.state @@ -3850,7 +3850,7 @@ func file_validate_proto_init() { return nil } } - file_validate_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_validate_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*SInt32Rules); i { case 0: return &v.state @@ -3862,7 +3862,7 @@ func file_validate_proto_init() { return nil } } - file_validate_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_validate_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*SInt64Rules); i { case 0: return &v.state @@ -3874,7 +3874,7 @@ func file_validate_proto_init() { return nil } } - file_validate_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_validate_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*Fixed32Rules); i { case 0: return &v.state @@ -3886,7 +3886,7 @@ func file_validate_proto_init() { return nil } } - file_validate_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_validate_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*Fixed64Rules); i { case 0: return &v.state @@ -3898,7 +3898,7 @@ func file_validate_proto_init() { return nil } } - file_validate_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_validate_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*SFixed32Rules); i { case 0: return &v.state @@ -3910,7 +3910,7 @@ func file_validate_proto_init() { return nil } } - file_validate_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_validate_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*SFixed64Rules); i { case 0: return &v.state @@ -3922,7 +3922,7 @@ func file_validate_proto_init() { return nil } } - file_validate_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_validate_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*BoolRules); i { case 0: return &v.state @@ -3934,7 +3934,7 @@ func file_validate_proto_init() { return nil } } - file_validate_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_validate_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*StringRules); i { case 0: return &v.state @@ -3946,7 +3946,7 @@ func file_validate_proto_init() { return nil } } - file_validate_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_validate_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*BytesRules); i { case 0: return &v.state @@ -3958,7 +3958,7 @@ func file_validate_proto_init() { return nil } } - file_validate_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_validate_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*EnumRules); i { case 0: return &v.state @@ -3970,7 +3970,7 @@ func file_validate_proto_init() { return nil } } - file_validate_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_validate_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*MessageRules); i { case 0: return &v.state @@ -3982,7 +3982,7 @@ func file_validate_proto_init() { return nil } } - file_validate_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_validate_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*RepeatedRules); i { case 0: return &v.state @@ -3994,7 +3994,7 @@ func file_validate_proto_init() { return nil } } - file_validate_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_validate_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*MapRules); i { case 0: return &v.state @@ -4006,7 +4006,7 @@ func file_validate_proto_init() { return nil } } - file_validate_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_validate_proto_msgTypes[20].Exporter = func(v any, i int) any { switch v := v.(*AnyRules); i { case 0: return &v.state @@ -4018,7 +4018,7 @@ func file_validate_proto_init() { return nil } } - file_validate_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_validate_proto_msgTypes[21].Exporter = func(v any, i int) any { switch v := v.(*DurationRules); i { case 0: return &v.state @@ -4030,7 +4030,7 @@ func file_validate_proto_init() { return nil } } - file_validate_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_validate_proto_msgTypes[22].Exporter = func(v any, i int) any { switch v := v.(*TimestampRules); i { case 0: return &v.state @@ -4043,7 +4043,7 @@ func file_validate_proto_init() { } } } - file_validate_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_validate_proto_msgTypes[0].OneofWrappers = []any{ (*FieldRules_Float)(nil), (*FieldRules_Double)(nil), (*FieldRules_Int32)(nil), @@ -4066,7 +4066,7 @@ func file_validate_proto_init() { (*FieldRules_Duration)(nil), (*FieldRules_Timestamp)(nil), } - file_validate_proto_msgTypes[14].OneofWrappers = []interface{}{ + file_validate_proto_msgTypes[14].OneofWrappers = []any{ (*StringRules_Email)(nil), (*StringRules_Hostname)(nil), (*StringRules_Ip)(nil), @@ -4078,7 +4078,7 @@ func file_validate_proto_init() { (*StringRules_Uuid)(nil), (*StringRules_WellKnownRegex)(nil), } - file_validate_proto_msgTypes[15].OneofWrappers = []interface{}{ + file_validate_proto_msgTypes[15].OneofWrappers = []any{ (*BytesRules_Ip)(nil), (*BytesRules_Ipv4)(nil), (*BytesRules_Ipv6)(nil), diff --git a/go/github.com/jupyter-naas/naas-models/go/aimodel/aimodel.pb.go b/go/github.com/jupyter-naas/naas-models/go/aimodel/aimodel.pb.go index 5ab6d75..bbe31cf 100644 --- a/go/github.com/jupyter-naas/naas-models/go/aimodel/aimodel.pb.go +++ b/go/github.com/jupyter-naas/naas-models/go/aimodel/aimodel.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.34.2 // protoc v5.26.1 // source: aimodel.proto @@ -1113,7 +1113,7 @@ func file_aimodel_proto_rawDescGZIP() []byte { var file_aimodel_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_aimodel_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_aimodel_proto_goTypes = []interface{}{ +var file_aimodel_proto_goTypes = []any{ (AIModelError)(0), // 0: aimodel.AIModelError (*AIModel)(nil), // 1: aimodel.AIModel (*CompletionResponse)(nil), // 2: aimodel.CompletionResponse @@ -1153,7 +1153,7 @@ func file_aimodel_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aimodel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aimodel_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*AIModel); i { case 0: return &v.state @@ -1165,7 +1165,7 @@ func file_aimodel_proto_init() { return nil } } - file_aimodel_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aimodel_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*CompletionResponse); i { case 0: return &v.state @@ -1177,7 +1177,7 @@ func file_aimodel_proto_init() { return nil } } - file_aimodel_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aimodel_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*AIModelResponseError); i { case 0: return &v.state @@ -1189,7 +1189,7 @@ func file_aimodel_proto_init() { return nil } } - file_aimodel_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aimodel_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*AIModelListRequest); i { case 0: return &v.state @@ -1201,7 +1201,7 @@ func file_aimodel_proto_init() { return nil } } - file_aimodel_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aimodel_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*AIModelListResponse); i { case 0: return &v.state @@ -1213,7 +1213,7 @@ func file_aimodel_proto_init() { return nil } } - file_aimodel_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_aimodel_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*AIModelGetRequest); i { case 0: return &v.state @@ -1225,7 +1225,7 @@ func file_aimodel_proto_init() { return nil } } - file_aimodel_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_aimodel_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*AIModelGetResponse); i { case 0: return &v.state @@ -1237,7 +1237,7 @@ func file_aimodel_proto_init() { return nil } } - file_aimodel_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_aimodel_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*AIModelCompletionRequest); i { case 0: return &v.state @@ -1249,7 +1249,7 @@ func file_aimodel_proto_init() { return nil } } - file_aimodel_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_aimodel_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*AIModelCompletionResponse); i { case 0: return &v.state @@ -1261,7 +1261,7 @@ func file_aimodel_proto_init() { return nil } } - file_aimodel_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_aimodel_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*AIModelAdminCreationRequest); i { case 0: return &v.state @@ -1273,7 +1273,7 @@ func file_aimodel_proto_init() { return nil } } - file_aimodel_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_aimodel_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*AIModelAdminCreationResponse); i { case 0: return &v.state @@ -1285,7 +1285,7 @@ func file_aimodel_proto_init() { return nil } } - file_aimodel_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_aimodel_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*AIModelAdminDeleteRequest); i { case 0: return &v.state @@ -1297,7 +1297,7 @@ func file_aimodel_proto_init() { return nil } } - file_aimodel_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_aimodel_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*AIModelAdminDeleteResponse); i { case 0: return &v.state @@ -1310,19 +1310,19 @@ func file_aimodel_proto_init() { } } } - file_aimodel_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_aimodel_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_aimodel_proto_msgTypes[2].OneofWrappers = []interface{}{} - file_aimodel_proto_msgTypes[3].OneofWrappers = []interface{}{} - file_aimodel_proto_msgTypes[4].OneofWrappers = []interface{}{} - file_aimodel_proto_msgTypes[5].OneofWrappers = []interface{}{} - file_aimodel_proto_msgTypes[6].OneofWrappers = []interface{}{} - file_aimodel_proto_msgTypes[7].OneofWrappers = []interface{}{} - file_aimodel_proto_msgTypes[8].OneofWrappers = []interface{}{} - file_aimodel_proto_msgTypes[9].OneofWrappers = []interface{}{} - file_aimodel_proto_msgTypes[10].OneofWrappers = []interface{}{} - file_aimodel_proto_msgTypes[11].OneofWrappers = []interface{}{} - file_aimodel_proto_msgTypes[12].OneofWrappers = []interface{}{} + file_aimodel_proto_msgTypes[0].OneofWrappers = []any{} + file_aimodel_proto_msgTypes[1].OneofWrappers = []any{} + file_aimodel_proto_msgTypes[2].OneofWrappers = []any{} + file_aimodel_proto_msgTypes[3].OneofWrappers = []any{} + file_aimodel_proto_msgTypes[4].OneofWrappers = []any{} + file_aimodel_proto_msgTypes[5].OneofWrappers = []any{} + file_aimodel_proto_msgTypes[6].OneofWrappers = []any{} + file_aimodel_proto_msgTypes[7].OneofWrappers = []any{} + file_aimodel_proto_msgTypes[8].OneofWrappers = []any{} + file_aimodel_proto_msgTypes[9].OneofWrappers = []any{} + file_aimodel_proto_msgTypes[10].OneofWrappers = []any{} + file_aimodel_proto_msgTypes[11].OneofWrappers = []any{} + file_aimodel_proto_msgTypes[12].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/go/github.com/jupyter-naas/naas-models/go/asset/asset.pb.go b/go/github.com/jupyter-naas/naas-models/go/asset/asset.pb.go index 8b8598f..c35eded 100644 --- a/go/github.com/jupyter-naas/naas-models/go/asset/asset.pb.go +++ b/go/github.com/jupyter-naas/naas-models/go/asset/asset.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.34.2 // protoc v5.26.1 // source: asset.proto @@ -1393,7 +1393,7 @@ func file_asset_proto_rawDescGZIP() []byte { var file_asset_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_asset_proto_msgTypes = make([]protoimpl.MessageInfo, 15) -var file_asset_proto_goTypes = []interface{}{ +var file_asset_proto_goTypes = []any{ (AssetError)(0), // 0: asset.AssetError (*ObjectMetadata)(nil), // 1: asset.ObjectMetadata (*Asset)(nil), // 2: asset.Asset @@ -1440,7 +1440,7 @@ func file_asset_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_asset_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_asset_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ObjectMetadata); i { case 0: return &v.state @@ -1452,7 +1452,7 @@ func file_asset_proto_init() { return nil } } - file_asset_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_asset_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Asset); i { case 0: return &v.state @@ -1464,7 +1464,7 @@ func file_asset_proto_init() { return nil } } - file_asset_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_asset_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*AssetCreation); i { case 0: return &v.state @@ -1476,7 +1476,7 @@ func file_asset_proto_init() { return nil } } - file_asset_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_asset_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*AssetUpdate); i { case 0: return &v.state @@ -1488,7 +1488,7 @@ func file_asset_proto_init() { return nil } } - file_asset_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_asset_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*AssetResponseError); i { case 0: return &v.state @@ -1500,7 +1500,7 @@ func file_asset_proto_init() { return nil } } - file_asset_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_asset_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*AssetCreateRequest); i { case 0: return &v.state @@ -1512,7 +1512,7 @@ func file_asset_proto_init() { return nil } } - file_asset_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_asset_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*AssetCreateResponse); i { case 0: return &v.state @@ -1524,7 +1524,7 @@ func file_asset_proto_init() { return nil } } - file_asset_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_asset_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*AssetGetRequest); i { case 0: return &v.state @@ -1536,7 +1536,7 @@ func file_asset_proto_init() { return nil } } - file_asset_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_asset_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*AssetGetResponse); i { case 0: return &v.state @@ -1548,7 +1548,7 @@ func file_asset_proto_init() { return nil } } - file_asset_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_asset_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*AssetGetObjectRequest); i { case 0: return &v.state @@ -1560,7 +1560,7 @@ func file_asset_proto_init() { return nil } } - file_asset_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_asset_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*AssetGetObjectResponse); i { case 0: return &v.state @@ -1572,7 +1572,7 @@ func file_asset_proto_init() { return nil } } - file_asset_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_asset_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*AssetUpdateRequest); i { case 0: return &v.state @@ -1584,7 +1584,7 @@ func file_asset_proto_init() { return nil } } - file_asset_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_asset_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*AssetUpdateResponse); i { case 0: return &v.state @@ -1596,7 +1596,7 @@ func file_asset_proto_init() { return nil } } - file_asset_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_asset_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*AssetDeleteRequest); i { case 0: return &v.state @@ -1608,7 +1608,7 @@ func file_asset_proto_init() { return nil } } - file_asset_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_asset_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*AssetDeleteResponse); i { case 0: return &v.state @@ -1621,21 +1621,21 @@ func file_asset_proto_init() { } } } - file_asset_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_asset_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_asset_proto_msgTypes[2].OneofWrappers = []interface{}{} - file_asset_proto_msgTypes[3].OneofWrappers = []interface{}{} - file_asset_proto_msgTypes[4].OneofWrappers = []interface{}{} - file_asset_proto_msgTypes[5].OneofWrappers = []interface{}{} - file_asset_proto_msgTypes[6].OneofWrappers = []interface{}{} - file_asset_proto_msgTypes[7].OneofWrappers = []interface{}{} - file_asset_proto_msgTypes[8].OneofWrappers = []interface{}{} - file_asset_proto_msgTypes[9].OneofWrappers = []interface{}{} - file_asset_proto_msgTypes[10].OneofWrappers = []interface{}{} - file_asset_proto_msgTypes[11].OneofWrappers = []interface{}{} - file_asset_proto_msgTypes[12].OneofWrappers = []interface{}{} - file_asset_proto_msgTypes[13].OneofWrappers = []interface{}{} - file_asset_proto_msgTypes[14].OneofWrappers = []interface{}{} + file_asset_proto_msgTypes[0].OneofWrappers = []any{} + file_asset_proto_msgTypes[1].OneofWrappers = []any{} + file_asset_proto_msgTypes[2].OneofWrappers = []any{} + file_asset_proto_msgTypes[3].OneofWrappers = []any{} + file_asset_proto_msgTypes[4].OneofWrappers = []any{} + file_asset_proto_msgTypes[5].OneofWrappers = []any{} + file_asset_proto_msgTypes[6].OneofWrappers = []any{} + file_asset_proto_msgTypes[7].OneofWrappers = []any{} + file_asset_proto_msgTypes[8].OneofWrappers = []any{} + file_asset_proto_msgTypes[9].OneofWrappers = []any{} + file_asset_proto_msgTypes[10].OneofWrappers = []any{} + file_asset_proto_msgTypes[11].OneofWrappers = []any{} + file_asset_proto_msgTypes[12].OneofWrappers = []any{} + file_asset_proto_msgTypes[13].OneofWrappers = []any{} + file_asset_proto_msgTypes[14].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/go/github.com/jupyter-naas/naas-models/go/chat/chat.pb.go b/go/github.com/jupyter-naas/naas-models/go/chat/chat.pb.go index 1072a0c..16ee97d 100644 --- a/go/github.com/jupyter-naas/naas-models/go/chat/chat.pb.go +++ b/go/github.com/jupyter-naas/naas-models/go/chat/chat.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.34.2 // protoc v5.26.1 // source: chat.proto @@ -2963,7 +2963,7 @@ func file_chat_proto_rawDescGZIP() []byte { var file_chat_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 37) -var file_chat_proto_goTypes = []interface{}{ +var file_chat_proto_goTypes = []any{ (MessageType)(0), // 0: chat.MessageType (MessageError)(0), // 1: chat.MessageError (CompletionStatus)(0), // 2: chat.CompletionStatus @@ -3065,7 +3065,7 @@ func file_chat_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_chat_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*MessageResponseError); i { case 0: return &v.state @@ -3077,7 +3077,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Message); i { case 0: return &v.state @@ -3089,7 +3089,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*MessageUpdate); i { case 0: return &v.state @@ -3101,7 +3101,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*Messages); i { case 0: return &v.state @@ -3113,7 +3113,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*MessageDeletionRequest); i { case 0: return &v.state @@ -3125,7 +3125,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*MessageDeletionResponse); i { case 0: return &v.state @@ -3137,7 +3137,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*MessageRatinResponseError); i { case 0: return &v.state @@ -3149,7 +3149,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*MessageRating); i { case 0: return &v.state @@ -3161,7 +3161,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*MessageRatingCreationRequest); i { case 0: return &v.state @@ -3173,7 +3173,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*MessageRatingCreationResponse); i { case 0: return &v.state @@ -3185,7 +3185,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*Chat); i { case 0: return &v.state @@ -3197,7 +3197,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*ChatUpdate); i { case 0: return &v.state @@ -3209,7 +3209,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*ChatMessages); i { case 0: return &v.state @@ -3221,7 +3221,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*ChatResponseError); i { case 0: return &v.state @@ -3233,7 +3233,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*ChatCreationRequest); i { case 0: return &v.state @@ -3245,7 +3245,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*ChatCreationResponse); i { case 0: return &v.state @@ -3257,7 +3257,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*ChatGetRequest); i { case 0: return &v.state @@ -3269,7 +3269,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*ChatGetResponse); i { case 0: return &v.state @@ -3281,7 +3281,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*ChatMessageGetRequest); i { case 0: return &v.state @@ -3293,7 +3293,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*ChatMessageGetResponse); i { case 0: return &v.state @@ -3305,7 +3305,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[20].Exporter = func(v any, i int) any { switch v := v.(*ChatDeletionRequest); i { case 0: return &v.state @@ -3317,7 +3317,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[21].Exporter = func(v any, i int) any { switch v := v.(*ChatDeletionResponse); i { case 0: return &v.state @@ -3329,7 +3329,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[22].Exporter = func(v any, i int) any { switch v := v.(*ChatUpdateRequest); i { case 0: return &v.state @@ -3341,7 +3341,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[23].Exporter = func(v any, i int) any { switch v := v.(*ChatUpdateResponse); i { case 0: return &v.state @@ -3353,7 +3353,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[24].Exporter = func(v any, i int) any { switch v := v.(*ChatListRequest); i { case 0: return &v.state @@ -3365,7 +3365,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[25].Exporter = func(v any, i int) any { switch v := v.(*ChatListResponse); i { case 0: return &v.state @@ -3377,7 +3377,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[26].Exporter = func(v any, i int) any { switch v := v.(*ChatStarRequest); i { case 0: return &v.state @@ -3389,7 +3389,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[27].Exporter = func(v any, i int) any { switch v := v.(*ChatStarResponse); i { case 0: return &v.state @@ -3401,7 +3401,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[28].Exporter = func(v any, i int) any { switch v := v.(*ChatArchiveRequest); i { case 0: return &v.state @@ -3413,7 +3413,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[29].Exporter = func(v any, i int) any { switch v := v.(*ChatArchiveResponse); i { case 0: return &v.state @@ -3425,7 +3425,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[30].Exporter = func(v any, i int) any { switch v := v.(*CompletionResponse); i { case 0: return &v.state @@ -3437,7 +3437,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[31].Exporter = func(v any, i int) any { switch v := v.(*BasePayload); i { case 0: return &v.state @@ -3449,7 +3449,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[32].Exporter = func(v any, i int) any { switch v := v.(*ChatCompletionRequest); i { case 0: return &v.state @@ -3461,7 +3461,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[33].Exporter = func(v any, i int) any { switch v := v.(*ChatStopCompletionRequest); i { case 0: return &v.state @@ -3473,7 +3473,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[34].Exporter = func(v any, i int) any { switch v := v.(*ChatStopCompletionResponse); i { case 0: return &v.state @@ -3485,7 +3485,7 @@ func file_chat_proto_init() { return nil } } - file_chat_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + file_chat_proto_msgTypes[35].Exporter = func(v any, i int) any { switch v := v.(*ChatCompletionResponse); i { case 0: return &v.state @@ -3498,40 +3498,40 @@ func file_chat_proto_init() { } } } - file_chat_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[2].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[4].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[5].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[6].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[7].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[8].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[9].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[10].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[11].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[13].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[14].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[15].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[16].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[17].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[18].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[19].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[20].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[21].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[22].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[23].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[24].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[25].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[26].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[27].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[28].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[29].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[30].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[31].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[32].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[33].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[34].OneofWrappers = []interface{}{} - file_chat_proto_msgTypes[35].OneofWrappers = []interface{}{} + file_chat_proto_msgTypes[0].OneofWrappers = []any{} + file_chat_proto_msgTypes[1].OneofWrappers = []any{} + file_chat_proto_msgTypes[2].OneofWrappers = []any{} + file_chat_proto_msgTypes[4].OneofWrappers = []any{} + file_chat_proto_msgTypes[5].OneofWrappers = []any{} + file_chat_proto_msgTypes[6].OneofWrappers = []any{} + file_chat_proto_msgTypes[7].OneofWrappers = []any{} + file_chat_proto_msgTypes[8].OneofWrappers = []any{} + file_chat_proto_msgTypes[9].OneofWrappers = []any{} + file_chat_proto_msgTypes[10].OneofWrappers = []any{} + file_chat_proto_msgTypes[11].OneofWrappers = []any{} + file_chat_proto_msgTypes[13].OneofWrappers = []any{} + file_chat_proto_msgTypes[14].OneofWrappers = []any{} + file_chat_proto_msgTypes[15].OneofWrappers = []any{} + file_chat_proto_msgTypes[16].OneofWrappers = []any{} + file_chat_proto_msgTypes[17].OneofWrappers = []any{} + file_chat_proto_msgTypes[18].OneofWrappers = []any{} + file_chat_proto_msgTypes[19].OneofWrappers = []any{} + file_chat_proto_msgTypes[20].OneofWrappers = []any{} + file_chat_proto_msgTypes[21].OneofWrappers = []any{} + file_chat_proto_msgTypes[22].OneofWrappers = []any{} + file_chat_proto_msgTypes[23].OneofWrappers = []any{} + file_chat_proto_msgTypes[24].OneofWrappers = []any{} + file_chat_proto_msgTypes[25].OneofWrappers = []any{} + file_chat_proto_msgTypes[26].OneofWrappers = []any{} + file_chat_proto_msgTypes[27].OneofWrappers = []any{} + file_chat_proto_msgTypes[28].OneofWrappers = []any{} + file_chat_proto_msgTypes[29].OneofWrappers = []any{} + file_chat_proto_msgTypes[30].OneofWrappers = []any{} + file_chat_proto_msgTypes[31].OneofWrappers = []any{} + file_chat_proto_msgTypes[32].OneofWrappers = []any{} + file_chat_proto_msgTypes[33].OneofWrappers = []any{} + file_chat_proto_msgTypes[34].OneofWrappers = []any{} + file_chat_proto_msgTypes[35].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/go/github.com/jupyter-naas/naas-models/go/common/common.pb.go b/go/github.com/jupyter-naas/naas-models/go/common/common.pb.go index 2b5bb44..a2004a2 100644 --- a/go/github.com/jupyter-naas/naas-models/go/common/common.pb.go +++ b/go/github.com/jupyter-naas/naas-models/go/common/common.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.34.2 // protoc v5.26.1 // source: common.proto @@ -96,7 +96,7 @@ func file_common_proto_rawDescGZIP() []byte { } var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_common_proto_goTypes = []interface{}{ +var file_common_proto_goTypes = []any{ (*FieldMask)(nil), // 0: common.FieldMask } var file_common_proto_depIdxs = []int32{ @@ -113,7 +113,7 @@ func file_common_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*FieldMask); i { case 0: return &v.state diff --git a/go/github.com/jupyter-naas/naas-models/go/credit/credit.pb.go b/go/github.com/jupyter-naas/naas-models/go/credit/credit.pb.go index ce4a81e..bb44867 100644 --- a/go/github.com/jupyter-naas/naas-models/go/credit/credit.pb.go +++ b/go/github.com/jupyter-naas/naas-models/go/credit/credit.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.34.2 // protoc v5.26.1 // source: credit.proto @@ -321,7 +321,7 @@ func file_credit_proto_rawDescGZIP() []byte { } var file_credit_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_credit_proto_goTypes = []interface{}{ +var file_credit_proto_goTypes = []any{ (*CreditTransaction)(nil), // 0: credit.CreditTransaction (*Balance)(nil), // 1: credit.Balance } @@ -339,7 +339,7 @@ func file_credit_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_credit_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_credit_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*CreditTransaction); i { case 0: return &v.state @@ -351,7 +351,7 @@ func file_credit_proto_init() { return nil } } - file_credit_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_credit_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Balance); i { case 0: return &v.state @@ -364,8 +364,8 @@ func file_credit_proto_init() { } } } - file_credit_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_credit_proto_msgTypes[1].OneofWrappers = []interface{}{} + file_credit_proto_msgTypes[0].OneofWrappers = []any{} + file_credit_proto_msgTypes[1].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/go/github.com/jupyter-naas/naas-models/go/errors/errors.pb.go b/go/github.com/jupyter-naas/naas-models/go/errors/errors.pb.go index 3626950..4842cfa 100644 --- a/go/github.com/jupyter-naas/naas-models/go/errors/errors.pb.go +++ b/go/github.com/jupyter-naas/naas-models/go/errors/errors.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.34.2 // protoc v5.26.1 // source: errors.proto @@ -27,6 +27,7 @@ const ( Error_NO_ERROR Error = 0 Error_INTERNAL_SERVER_ERROR Error = 199 Error_IAM_USER_NOT_FOUND Error = 200 + Error_IAM_USER_NOT_AUTHORIZED Error = 201 Error_WORKSPACE_NOT_FOUND Error = 300 Error_WORKSPACE_USER_ALREADY_EXISTS Error = 302 Error_WORKSPACE_USER_NOT_FOUND Error = 303 @@ -44,6 +45,7 @@ var ( 0: "NO_ERROR", 199: "INTERNAL_SERVER_ERROR", 200: "IAM_USER_NOT_FOUND", + 201: "IAM_USER_NOT_AUTHORIZED", 300: "WORKSPACE_NOT_FOUND", 302: "WORKSPACE_USER_ALREADY_EXISTS", 303: "WORKSPACE_USER_NOT_FOUND", @@ -58,6 +60,7 @@ var ( "NO_ERROR": 0, "INTERNAL_SERVER_ERROR": 199, "IAM_USER_NOT_FOUND": 200, + "IAM_USER_NOT_AUTHORIZED": 201, "WORKSPACE_NOT_FOUND": 300, "WORKSPACE_USER_ALREADY_EXISTS": 302, "WORKSPACE_USER_NOT_FOUND": 303, @@ -97,41 +100,105 @@ func (Error) EnumDescriptor() ([]byte, []int) { return file_errors_proto_rawDescGZIP(), []int{0} } +type ErrorResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code *Error `protobuf:"varint,1,opt,name=code,proto3,enum=errors.Error,oneof" json:"code,omitempty"` + Message *string `protobuf:"bytes,2,opt,name=message,proto3,oneof" json:"message,omitempty"` +} + +func (x *ErrorResponse) Reset() { + *x = ErrorResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_errors_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ErrorResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ErrorResponse) ProtoMessage() {} + +func (x *ErrorResponse) ProtoReflect() protoreflect.Message { + mi := &file_errors_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ErrorResponse.ProtoReflect.Descriptor instead. +func (*ErrorResponse) Descriptor() ([]byte, []int) { + return file_errors_proto_rawDescGZIP(), []int{0} +} + +func (x *ErrorResponse) GetCode() Error { + if x != nil && x.Code != nil { + return *x.Code + } + return Error_NO_ERROR +} + +func (x *ErrorResponse) GetMessage() string { + if x != nil && x.Message != nil { + return *x.Message + } + return "" +} + var File_errors_proto protoreflect.FileDescriptor var file_errors_proto_rawDesc = []byte{ 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x1a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2a, 0x95, 0x03, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x4f, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x00, 0x12, 0x1a, - 0x0a, 0x15, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, - 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0xc7, 0x01, 0x12, 0x17, 0x0a, 0x12, 0x49, 0x41, - 0x4d, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, - 0x10, 0xc8, 0x01, 0x12, 0x18, 0x0a, 0x13, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, - 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0xac, 0x02, 0x12, 0x22, 0x0a, - 0x1d, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, - 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x10, 0xae, - 0x02, 0x12, 0x1d, 0x0a, 0x18, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x55, - 0x53, 0x45, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0xaf, 0x02, - 0x12, 0x22, 0x0a, 0x1d, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x55, 0x53, - 0x45, 0x52, 0x5f, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, - 0x45, 0x10, 0xb0, 0x02, 0x12, 0x33, 0x0a, 0x2e, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, - 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x48, - 0x41, 0x56, 0x45, 0x5f, 0x50, 0x45, 0x52, 0x53, 0x4f, 0x4e, 0x41, 0x4c, 0x5f, 0x57, 0x4f, 0x52, - 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x10, 0xb1, 0x02, 0x12, 0x1f, 0x0a, 0x1a, 0x57, 0x4f, 0x52, - 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x4e, 0x4f, - 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0xb2, 0x02, 0x12, 0x1d, 0x0a, 0x18, 0x57, 0x4f, - 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x49, 0x54, 0x45, 0x5f, 0x49, - 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0xb3, 0x02, 0x12, 0x32, 0x0a, 0x2d, 0x57, 0x4f, 0x52, - 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x49, 0x4e, - 0x56, 0x49, 0x54, 0x45, 0x5f, 0x54, 0x4f, 0x5f, 0x50, 0x45, 0x52, 0x53, 0x4f, 0x4e, 0x41, 0x4c, - 0x5f, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x10, 0xb4, 0x02, 0x12, 0x1f, 0x0a, - 0x1a, 0x43, 0x52, 0x45, 0x44, 0x49, 0x54, 0x53, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x48, 0x41, - 0x53, 0x5f, 0x4e, 0x4f, 0x5f, 0x50, 0x41, 0x52, 0x45, 0x4e, 0x54, 0x10, 0x90, 0x03, 0x42, 0x2f, - 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x70, - 0x79, 0x74, 0x65, 0x72, 0x2d, 0x6e, 0x61, 0x61, 0x73, 0x2f, 0x6e, 0x61, 0x61, 0x73, 0x2d, 0x6d, - 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6b, 0x0a, 0x0d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x1d, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x01, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x2a, 0xb3, 0x03, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x0c, 0x0a, + 0x08, 0x4e, 0x4f, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x15, 0x49, + 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x10, 0xc7, 0x01, 0x12, 0x17, 0x0a, 0x12, 0x49, 0x41, 0x4d, 0x5f, 0x55, + 0x53, 0x45, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0xc8, 0x01, + 0x12, 0x1c, 0x0a, 0x17, 0x49, 0x41, 0x4d, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x4e, 0x4f, 0x54, + 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x45, 0x44, 0x10, 0xc9, 0x01, 0x12, 0x18, + 0x0a, 0x13, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, + 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0xac, 0x02, 0x12, 0x22, 0x0a, 0x1d, 0x57, 0x4f, 0x52, 0x4b, + 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x41, 0x4c, 0x52, 0x45, 0x41, + 0x44, 0x59, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x10, 0xae, 0x02, 0x12, 0x1d, 0x0a, 0x18, + 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x4e, + 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0xaf, 0x02, 0x12, 0x22, 0x0a, 0x1d, 0x57, + 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x41, 0x4c, + 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0xb0, 0x02, 0x12, + 0x33, 0x0a, 0x2e, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x55, 0x53, 0x45, + 0x52, 0x5f, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x48, 0x41, 0x56, 0x45, 0x5f, 0x50, + 0x45, 0x52, 0x53, 0x4f, 0x4e, 0x41, 0x4c, 0x5f, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, + 0x45, 0x10, 0xb1, 0x02, 0x12, 0x1f, 0x0a, 0x1a, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, + 0x45, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, + 0x4e, 0x44, 0x10, 0xb2, 0x02, 0x12, 0x1d, 0x0a, 0x18, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, + 0x43, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x49, 0x54, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, + 0x44, 0x10, 0xb3, 0x02, 0x12, 0x32, 0x0a, 0x2d, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, + 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x49, 0x4e, 0x56, 0x49, 0x54, 0x45, 0x5f, + 0x54, 0x4f, 0x5f, 0x50, 0x45, 0x52, 0x53, 0x4f, 0x4e, 0x41, 0x4c, 0x5f, 0x57, 0x4f, 0x52, 0x4b, + 0x53, 0x50, 0x41, 0x43, 0x45, 0x10, 0xb4, 0x02, 0x12, 0x1f, 0x0a, 0x1a, 0x43, 0x52, 0x45, 0x44, + 0x49, 0x54, 0x53, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x48, 0x41, 0x53, 0x5f, 0x4e, 0x4f, 0x5f, + 0x50, 0x41, 0x52, 0x45, 0x4e, 0x54, 0x10, 0x90, 0x03, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x70, 0x79, 0x74, 0x65, 0x72, 0x2d, + 0x6e, 0x61, 0x61, 0x73, 0x2f, 0x6e, 0x61, 0x61, 0x73, 0x2d, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, + 0x2f, 0x67, 0x6f, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -147,15 +214,18 @@ func file_errors_proto_rawDescGZIP() []byte { } var file_errors_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_errors_proto_goTypes = []interface{}{ - (Error)(0), // 0: errors.Error +var file_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_errors_proto_goTypes = []any{ + (Error)(0), // 0: errors.Error + (*ErrorResponse)(nil), // 1: errors.ErrorResponse } var file_errors_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 0, // 0: errors.ErrorResponse.code:type_name -> errors.Error + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_errors_proto_init() } @@ -163,19 +233,35 @@ func file_errors_proto_init() { if File_errors_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_errors_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*ErrorResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_errors_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_errors_proto_rawDesc, NumEnums: 1, - NumMessages: 0, + NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_errors_proto_goTypes, DependencyIndexes: file_errors_proto_depIdxs, EnumInfos: file_errors_proto_enumTypes, + MessageInfos: file_errors_proto_msgTypes, }.Build() File_errors_proto = out.File file_errors_proto_rawDesc = nil diff --git a/go/github.com/jupyter-naas/naas-models/go/errors/errors.pb.validate.go b/go/github.com/jupyter-naas/naas-models/go/errors/errors.pb.validate.go index 79fbb65..567b527 100644 --- a/go/github.com/jupyter-naas/naas-models/go/errors/errors.pb.validate.go +++ b/go/github.com/jupyter-naas/naas-models/go/errors/errors.pb.validate.go @@ -34,3 +34,111 @@ var ( _ = anypb.Any{} _ = sort.Sort ) + +// Validate checks the field values on ErrorResponse with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *ErrorResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ErrorResponse with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ErrorResponseMultiError, or +// nil if none found. +func (m *ErrorResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ErrorResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.Code != nil { + // no validation rules for Code + } + + if m.Message != nil { + // no validation rules for Message + } + + if len(errors) > 0 { + return ErrorResponseMultiError(errors) + } + + return nil +} + +// ErrorResponseMultiError is an error wrapping multiple validation errors +// returned by ErrorResponse.ValidateAll() if the designated constraints +// aren't met. +type ErrorResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ErrorResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ErrorResponseMultiError) AllErrors() []error { return m } + +// ErrorResponseValidationError is the validation error returned by +// ErrorResponse.Validate if the designated constraints aren't met. +type ErrorResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ErrorResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ErrorResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ErrorResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ErrorResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ErrorResponseValidationError) ErrorName() string { return "ErrorResponseValidationError" } + +// Error satisfies the builtin error interface +func (e ErrorResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sErrorResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ErrorResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ErrorResponseValidationError{} diff --git a/go/github.com/jupyter-naas/naas-models/go/iam/iam.pb.go b/go/github.com/jupyter-naas/naas-models/go/iam/iam.pb.go index e66e47c..710da5a 100644 --- a/go/github.com/jupyter-naas/naas-models/go/iam/iam.pb.go +++ b/go/github.com/jupyter-naas/naas-models/go/iam/iam.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.34.2 // protoc v5.26.1 // source: iam.proto @@ -8,6 +8,7 @@ package iam import ( _ "github.com/envoyproxy/protoc-gen-validate/validate" + errors "github.com/jupyter-naas/naas-models/go/errors" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -203,56 +204,207 @@ func (x *Profile) GetPhone() string { return "" } +type ImpersonateUserRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to User: + // + // *ImpersonateUserRequest_UserId + // *ImpersonateUserRequest_Email + User isImpersonateUserRequest_User `protobuf_oneof:"user"` +} + +func (x *ImpersonateUserRequest) Reset() { + *x = ImpersonateUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_iam_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImpersonateUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImpersonateUserRequest) ProtoMessage() {} + +func (x *ImpersonateUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_iam_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImpersonateUserRequest.ProtoReflect.Descriptor instead. +func (*ImpersonateUserRequest) Descriptor() ([]byte, []int) { + return file_iam_proto_rawDescGZIP(), []int{2} +} + +func (m *ImpersonateUserRequest) GetUser() isImpersonateUserRequest_User { + if m != nil { + return m.User + } + return nil +} + +func (x *ImpersonateUserRequest) GetUserId() string { + if x, ok := x.GetUser().(*ImpersonateUserRequest_UserId); ok { + return x.UserId + } + return "" +} + +func (x *ImpersonateUserRequest) GetEmail() string { + if x, ok := x.GetUser().(*ImpersonateUserRequest_Email); ok { + return x.Email + } + return "" +} + +type isImpersonateUserRequest_User interface { + isImpersonateUserRequest_User() +} + +type ImpersonateUserRequest_UserId struct { + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3,oneof"` +} + +type ImpersonateUserRequest_Email struct { + Email string `protobuf:"bytes,2,opt,name=email,proto3,oneof"` +} + +func (*ImpersonateUserRequest_UserId) isImpersonateUserRequest_User() {} + +func (*ImpersonateUserRequest_Email) isImpersonateUserRequest_User() {} + +type ImpersonateUserResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Error *errors.ErrorResponse `protobuf:"bytes,1,opt,name=error,proto3,oneof" json:"error,omitempty"` + Token *string `protobuf:"bytes,2,opt,name=token,proto3,oneof" json:"token,omitempty"` +} + +func (x *ImpersonateUserResponse) Reset() { + *x = ImpersonateUserResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_iam_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImpersonateUserResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImpersonateUserResponse) ProtoMessage() {} + +func (x *ImpersonateUserResponse) ProtoReflect() protoreflect.Message { + mi := &file_iam_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImpersonateUserResponse.ProtoReflect.Descriptor instead. +func (*ImpersonateUserResponse) Descriptor() ([]byte, []int) { + return file_iam_proto_rawDescGZIP(), []int{3} +} + +func (x *ImpersonateUserResponse) GetError() *errors.ErrorResponse { + if x != nil { + return x.Error + } + return nil +} + +func (x *ImpersonateUserResponse) GetToken() string { + if x != nil && x.Token != nil { + return *x.Token + } + return "" +} + var File_iam_proto protoreflect.FileDescriptor var file_iam_proto_rawDesc = []byte{ 0x0a, 0x09, 0x69, 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x69, 0x61, 0x6d, 0x1a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x4d, 0x0a, 0x09, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, - 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x73, - 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x6f, - 0x70, 0x65, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x22, - 0xc6, 0x04, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x07, 0x75, + 0x1a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4d, + 0x0a, 0x09, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, - 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x66, 0x69, 0x72, - 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, - 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, - 0x09, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x02, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x1d, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x03, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x88, 0x01, 0x01, 0x12, 0x17, - 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x04, - 0x72, 0x6f, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, - 0x6f, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x08, 0x74, 0x69, 0x6d, - 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x70, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, - 0x11, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x07, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, - 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, - 0x26, 0x0a, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x08, 0x52, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x65, - 0x64, 0x55, 0x73, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x64, 0x75, - 0x63, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, - 0x48, 0x09, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x73, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x0a, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x88, 0x01, 0x01, - 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, - 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, - 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x6f, - 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x42, 0x0b, - 0x0a, 0x09, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x42, 0x16, 0x0a, 0x14, 0x5f, - 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x5f, - 0x75, 0x72, 0x6c, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x65, - 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x70, - 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x70, 0x79, 0x74, 0x65, 0x72, 0x2d, 0x6e, - 0x61, 0x61, 0x73, 0x2f, 0x6e, 0x61, 0x61, 0x73, 0x2d, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, - 0x67, 0x6f, 0x2f, 0x69, 0x61, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x6f, + 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, + 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x22, 0xc6, 0x04, + 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x07, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x75, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x66, 0x69, 0x72, 0x73, 0x74, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x09, 0x66, + 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x6c, + 0x61, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, + 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, + 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, + 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, + 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x04, 0x72, 0x6f, + 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, + 0x6f, 0x6e, 0x65, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x5f, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x69, + 0x63, 0x74, 0x75, 0x72, 0x65, 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x11, 0x75, + 0x73, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x07, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x50, 0x72, + 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, + 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x08, 0x52, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x65, 0x64, 0x55, + 0x73, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, + 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x48, 0x09, + 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, + 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x0a, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, + 0x0a, 0x08, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x66, + 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6c, 0x61, + 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x6f, 0x6d, 0x70, + 0x61, 0x6e, 0x79, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x42, 0x0b, 0x0a, 0x09, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x70, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x75, 0x72, + 0x6c, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, + 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x70, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x66, 0x0a, 0x16, 0x49, 0x6d, 0x70, 0x65, 0x72, 0x73, + 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x23, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x06, 0x75, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, 0x48, 0x00, 0x52, + 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x42, 0x06, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x7a, + 0x0a, 0x17, 0x49, 0x6d, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, + 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x70, 0x79, 0x74, 0x65, 0x72, + 0x2d, 0x6e, 0x61, 0x61, 0x73, 0x2f, 0x6e, 0x61, 0x61, 0x73, 0x2d, 0x6d, 0x6f, 0x64, 0x65, 0x6c, + 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x69, 0x61, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -267,17 +419,21 @@ func file_iam_proto_rawDescGZIP() []byte { return file_iam_proto_rawDescData } -var file_iam_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_iam_proto_goTypes = []interface{}{ - (*TokenData)(nil), // 0: iam.TokenData - (*Profile)(nil), // 1: iam.Profile +var file_iam_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_iam_proto_goTypes = []any{ + (*TokenData)(nil), // 0: iam.TokenData + (*Profile)(nil), // 1: iam.Profile + (*ImpersonateUserRequest)(nil), // 2: iam.ImpersonateUserRequest + (*ImpersonateUserResponse)(nil), // 3: iam.ImpersonateUserResponse + (*errors.ErrorResponse)(nil), // 4: errors.ErrorResponse } var file_iam_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 4, // 0: iam.ImpersonateUserResponse.error:type_name -> errors.ErrorResponse + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_iam_proto_init() } @@ -286,7 +442,7 @@ func file_iam_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_iam_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_iam_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*TokenData); i { case 0: return &v.state @@ -298,7 +454,7 @@ func file_iam_proto_init() { return nil } } - file_iam_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_iam_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Profile); i { case 0: return &v.state @@ -310,16 +466,45 @@ func file_iam_proto_init() { return nil } } + file_iam_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ImpersonateUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_iam_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ImpersonateUserResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_iam_proto_msgTypes[0].OneofWrappers = []any{} + file_iam_proto_msgTypes[1].OneofWrappers = []any{} + file_iam_proto_msgTypes[2].OneofWrappers = []any{ + (*ImpersonateUserRequest_UserId)(nil), + (*ImpersonateUserRequest_Email)(nil), } - file_iam_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_iam_proto_msgTypes[1].OneofWrappers = []interface{}{} + file_iam_proto_msgTypes[3].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_iam_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/go/github.com/jupyter-naas/naas-models/go/iam/iam.pb.validate.go b/go/github.com/jupyter-naas/naas-models/go/iam/iam.pb.validate.go index bd73bfb..759e5fa 100644 --- a/go/github.com/jupyter-naas/naas-models/go/iam/iam.pb.validate.go +++ b/go/github.com/jupyter-naas/naas-models/go/iam/iam.pb.validate.go @@ -35,6 +35,9 @@ var ( _ = sort.Sort ) +// define the regex for a UUID once up-front +var _iam_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on TokenData with the rules defined in the // proto definition for this message. If any rules are violated, the first // error encountered is returned, or nil if there are no violations. @@ -279,3 +282,355 @@ var _ interface { Cause() error ErrorName() string } = ProfileValidationError{} + +// Validate checks the field values on ImpersonateUserRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ImpersonateUserRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ImpersonateUserRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ImpersonateUserRequestMultiError, or nil if none found. +func (m *ImpersonateUserRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ImpersonateUserRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch v := m.User.(type) { + case *ImpersonateUserRequest_UserId: + if v == nil { + err := ImpersonateUserRequestValidationError{ + field: "User", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if err := m._validateUuid(m.GetUserId()); err != nil { + err = ImpersonateUserRequestValidationError{ + field: "UserId", + reason: "value must be a valid UUID", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } + + case *ImpersonateUserRequest_Email: + if v == nil { + err := ImpersonateUserRequestValidationError{ + field: "User", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if err := m._validateEmail(m.GetEmail()); err != nil { + err = ImpersonateUserRequestValidationError{ + field: "Email", + reason: "value must be a valid email address", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } + + default: + _ = v // ensures v is used + } + + if len(errors) > 0 { + return ImpersonateUserRequestMultiError(errors) + } + + return nil +} + +func (m *ImpersonateUserRequest) _validateHostname(host string) error { + s := strings.ToLower(strings.TrimSuffix(host, ".")) + + if len(host) > 253 { + return errors.New("hostname cannot exceed 253 characters") + } + + for _, part := range strings.Split(s, ".") { + if l := len(part); l == 0 || l > 63 { + return errors.New("hostname part must be non-empty and cannot exceed 63 characters") + } + + if part[0] == '-' { + return errors.New("hostname parts cannot begin with hyphens") + } + + if part[len(part)-1] == '-' { + return errors.New("hostname parts cannot end with hyphens") + } + + for _, r := range part { + if (r < 'a' || r > 'z') && (r < '0' || r > '9') && r != '-' { + return fmt.Errorf("hostname parts can only contain alphanumeric characters or hyphens, got %q", string(r)) + } + } + } + + return nil +} + +func (m *ImpersonateUserRequest) _validateEmail(addr string) error { + a, err := mail.ParseAddress(addr) + if err != nil { + return err + } + addr = a.Address + + if len(addr) > 254 { + return errors.New("email addresses cannot exceed 254 characters") + } + + parts := strings.SplitN(addr, "@", 2) + + if len(parts[0]) > 64 { + return errors.New("email address local phrase cannot exceed 64 characters") + } + + return m._validateHostname(parts[1]) +} + +func (m *ImpersonateUserRequest) _validateUuid(uuid string) error { + if matched := _iam_uuidPattern.MatchString(uuid); !matched { + return errors.New("invalid uuid format") + } + + return nil +} + +// ImpersonateUserRequestMultiError is an error wrapping multiple validation +// errors returned by ImpersonateUserRequest.ValidateAll() if the designated +// constraints aren't met. +type ImpersonateUserRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ImpersonateUserRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ImpersonateUserRequestMultiError) AllErrors() []error { return m } + +// ImpersonateUserRequestValidationError is the validation error returned by +// ImpersonateUserRequest.Validate if the designated constraints aren't met. +type ImpersonateUserRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ImpersonateUserRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ImpersonateUserRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ImpersonateUserRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ImpersonateUserRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ImpersonateUserRequestValidationError) ErrorName() string { + return "ImpersonateUserRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ImpersonateUserRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sImpersonateUserRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ImpersonateUserRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ImpersonateUserRequestValidationError{} + +// Validate checks the field values on ImpersonateUserResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ImpersonateUserResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ImpersonateUserResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ImpersonateUserResponseMultiError, or nil if none found. +func (m *ImpersonateUserResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ImpersonateUserResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.Error != nil { + + if all { + switch v := interface{}(m.GetError()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ImpersonateUserResponseValidationError{ + field: "Error", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ImpersonateUserResponseValidationError{ + field: "Error", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetError()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ImpersonateUserResponseValidationError{ + field: "Error", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if m.Token != nil { + // no validation rules for Token + } + + if len(errors) > 0 { + return ImpersonateUserResponseMultiError(errors) + } + + return nil +} + +// ImpersonateUserResponseMultiError is an error wrapping multiple validation +// errors returned by ImpersonateUserResponse.ValidateAll() if the designated +// constraints aren't met. +type ImpersonateUserResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ImpersonateUserResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ImpersonateUserResponseMultiError) AllErrors() []error { return m } + +// ImpersonateUserResponseValidationError is the validation error returned by +// ImpersonateUserResponse.Validate if the designated constraints aren't met. +type ImpersonateUserResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ImpersonateUserResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ImpersonateUserResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ImpersonateUserResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ImpersonateUserResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ImpersonateUserResponseValidationError) ErrorName() string { + return "ImpersonateUserResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ImpersonateUserResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sImpersonateUserResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ImpersonateUserResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ImpersonateUserResponseValidationError{} diff --git a/go/github.com/jupyter-naas/naas-models/go/registry/registry.pb.go b/go/github.com/jupyter-naas/naas-models/go/registry/registry.pb.go index cc0a025..fc53946 100644 --- a/go/github.com/jupyter-naas/naas-models/go/registry/registry.pb.go +++ b/go/github.com/jupyter-naas/naas-models/go/registry/registry.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.34.2 // protoc v5.26.1 // source: registry.proto @@ -994,7 +994,7 @@ func file_registry_proto_rawDescGZIP() []byte { var file_registry_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_registry_proto_msgTypes = make([]protoimpl.MessageInfo, 15) -var file_registry_proto_goTypes = []interface{}{ +var file_registry_proto_goTypes = []any{ (RegistryError)(0), // 0: registry.RegistryError (*Registry)(nil), // 1: registry.Registry (*RegistryCredentials)(nil), // 2: registry.RegistryCredentials @@ -1034,7 +1034,7 @@ func file_registry_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_registry_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_registry_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Registry); i { case 0: return &v.state @@ -1046,7 +1046,7 @@ func file_registry_proto_init() { return nil } } - file_registry_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_registry_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*RegistryCredentials); i { case 0: return &v.state @@ -1058,7 +1058,7 @@ func file_registry_proto_init() { return nil } } - file_registry_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_registry_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*RegistryCreationRequest); i { case 0: return &v.state @@ -1070,7 +1070,7 @@ func file_registry_proto_init() { return nil } } - file_registry_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_registry_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*RegistryCreationResponse); i { case 0: return &v.state @@ -1082,7 +1082,7 @@ func file_registry_proto_init() { return nil } } - file_registry_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_registry_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*RegistryCreationResponseError); i { case 0: return &v.state @@ -1094,7 +1094,7 @@ func file_registry_proto_init() { return nil } } - file_registry_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_registry_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*RegistryListRequest); i { case 0: return &v.state @@ -1106,7 +1106,7 @@ func file_registry_proto_init() { return nil } } - file_registry_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_registry_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*RegistryListResponse); i { case 0: return &v.state @@ -1118,7 +1118,7 @@ func file_registry_proto_init() { return nil } } - file_registry_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_registry_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*RegistryGetRequest); i { case 0: return &v.state @@ -1130,7 +1130,7 @@ func file_registry_proto_init() { return nil } } - file_registry_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_registry_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*RegistryGetResponse); i { case 0: return &v.state @@ -1142,7 +1142,7 @@ func file_registry_proto_init() { return nil } } - file_registry_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_registry_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*RegistryGetResponseError); i { case 0: return &v.state @@ -1154,7 +1154,7 @@ func file_registry_proto_init() { return nil } } - file_registry_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_registry_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*RegistryDeleteRequest); i { case 0: return &v.state @@ -1166,7 +1166,7 @@ func file_registry_proto_init() { return nil } } - file_registry_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_registry_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*RegistryDeleteResponseError); i { case 0: return &v.state @@ -1178,7 +1178,7 @@ func file_registry_proto_init() { return nil } } - file_registry_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_registry_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*RegistryCredentialsRequest); i { case 0: return &v.state @@ -1190,7 +1190,7 @@ func file_registry_proto_init() { return nil } } - file_registry_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_registry_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*RegistryCredentialsResponse); i { case 0: return &v.state @@ -1202,7 +1202,7 @@ func file_registry_proto_init() { return nil } } - file_registry_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_registry_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*RegistryCredentialsResponseError); i { case 0: return &v.state @@ -1215,20 +1215,20 @@ func file_registry_proto_init() { } } } - file_registry_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_registry_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_registry_proto_msgTypes[2].OneofWrappers = []interface{}{} - file_registry_proto_msgTypes[3].OneofWrappers = []interface{}{} - file_registry_proto_msgTypes[4].OneofWrappers = []interface{}{} - file_registry_proto_msgTypes[5].OneofWrappers = []interface{}{} - file_registry_proto_msgTypes[7].OneofWrappers = []interface{}{} - file_registry_proto_msgTypes[8].OneofWrappers = []interface{}{} - file_registry_proto_msgTypes[9].OneofWrappers = []interface{}{} - file_registry_proto_msgTypes[10].OneofWrappers = []interface{}{} - file_registry_proto_msgTypes[11].OneofWrappers = []interface{}{} - file_registry_proto_msgTypes[12].OneofWrappers = []interface{}{} - file_registry_proto_msgTypes[13].OneofWrappers = []interface{}{} - file_registry_proto_msgTypes[14].OneofWrappers = []interface{}{} + file_registry_proto_msgTypes[0].OneofWrappers = []any{} + file_registry_proto_msgTypes[1].OneofWrappers = []any{} + file_registry_proto_msgTypes[2].OneofWrappers = []any{} + file_registry_proto_msgTypes[3].OneofWrappers = []any{} + file_registry_proto_msgTypes[4].OneofWrappers = []any{} + file_registry_proto_msgTypes[5].OneofWrappers = []any{} + file_registry_proto_msgTypes[7].OneofWrappers = []any{} + file_registry_proto_msgTypes[8].OneofWrappers = []any{} + file_registry_proto_msgTypes[9].OneofWrappers = []any{} + file_registry_proto_msgTypes[10].OneofWrappers = []any{} + file_registry_proto_msgTypes[11].OneofWrappers = []any{} + file_registry_proto_msgTypes[12].OneofWrappers = []any{} + file_registry_proto_msgTypes[13].OneofWrappers = []any{} + file_registry_proto_msgTypes[14].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/go/github.com/jupyter-naas/naas-models/go/secrets/secret.pb.go b/go/github.com/jupyter-naas/naas-models/go/secrets/secret.pb.go index 3e3787f..514c220 100644 --- a/go/github.com/jupyter-naas/naas-models/go/secrets/secret.pb.go +++ b/go/github.com/jupyter-naas/naas-models/go/secrets/secret.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.34.2 // protoc v5.26.1 // source: secret.proto @@ -781,7 +781,7 @@ func file_secret_proto_rawDescGZIP() []byte { var file_secret_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_secret_proto_msgTypes = make([]protoimpl.MessageInfo, 12) -var file_secret_proto_goTypes = []interface{}{ +var file_secret_proto_goTypes = []any{ (SecretError)(0), // 0: secrets.SecretError (*Secret)(nil), // 1: secrets.Secret (*SecretResponseError)(nil), // 2: secrets.SecretResponseError @@ -820,7 +820,7 @@ func file_secret_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_secret_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_secret_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Secret); i { case 0: return &v.state @@ -832,7 +832,7 @@ func file_secret_proto_init() { return nil } } - file_secret_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_secret_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*SecretResponseError); i { case 0: return &v.state @@ -844,7 +844,7 @@ func file_secret_proto_init() { return nil } } - file_secret_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_secret_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*SecretCreateRequest); i { case 0: return &v.state @@ -856,7 +856,7 @@ func file_secret_proto_init() { return nil } } - file_secret_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_secret_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*SecretCreateResponse); i { case 0: return &v.state @@ -868,7 +868,7 @@ func file_secret_proto_init() { return nil } } - file_secret_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_secret_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*SecretGetRequest); i { case 0: return &v.state @@ -880,7 +880,7 @@ func file_secret_proto_init() { return nil } } - file_secret_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_secret_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*SecretGetResponse); i { case 0: return &v.state @@ -892,7 +892,7 @@ func file_secret_proto_init() { return nil } } - file_secret_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_secret_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*SecretDeleteRequest); i { case 0: return &v.state @@ -904,7 +904,7 @@ func file_secret_proto_init() { return nil } } - file_secret_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_secret_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*SecretDeleteResponse); i { case 0: return &v.state @@ -916,7 +916,7 @@ func file_secret_proto_init() { return nil } } - file_secret_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_secret_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*SecretListRequest); i { case 0: return &v.state @@ -928,7 +928,7 @@ func file_secret_proto_init() { return nil } } - file_secret_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_secret_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*SecretListResponse); i { case 0: return &v.state @@ -940,7 +940,7 @@ func file_secret_proto_init() { return nil } } - file_secret_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_secret_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*SecretBulkCreateRequest); i { case 0: return &v.state @@ -952,7 +952,7 @@ func file_secret_proto_init() { return nil } } - file_secret_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_secret_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*SecretBulkCreateResponse); i { case 0: return &v.state @@ -965,16 +965,16 @@ func file_secret_proto_init() { } } } - file_secret_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_secret_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_secret_proto_msgTypes[2].OneofWrappers = []interface{}{} - file_secret_proto_msgTypes[3].OneofWrappers = []interface{}{} - file_secret_proto_msgTypes[4].OneofWrappers = []interface{}{} - file_secret_proto_msgTypes[5].OneofWrappers = []interface{}{} - file_secret_proto_msgTypes[6].OneofWrappers = []interface{}{} - file_secret_proto_msgTypes[7].OneofWrappers = []interface{}{} - file_secret_proto_msgTypes[8].OneofWrappers = []interface{}{} - file_secret_proto_msgTypes[9].OneofWrappers = []interface{}{} + file_secret_proto_msgTypes[0].OneofWrappers = []any{} + file_secret_proto_msgTypes[1].OneofWrappers = []any{} + file_secret_proto_msgTypes[2].OneofWrappers = []any{} + file_secret_proto_msgTypes[3].OneofWrappers = []any{} + file_secret_proto_msgTypes[4].OneofWrappers = []any{} + file_secret_proto_msgTypes[5].OneofWrappers = []any{} + file_secret_proto_msgTypes[6].OneofWrappers = []any{} + file_secret_proto_msgTypes[7].OneofWrappers = []any{} + file_secret_proto_msgTypes[8].OneofWrappers = []any{} + file_secret_proto_msgTypes[9].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/go/github.com/jupyter-naas/naas-models/go/space/space.pb.go b/go/github.com/jupyter-naas/naas-models/go/space/space.pb.go index 80b6010..ed923a6 100644 --- a/go/github.com/jupyter-naas/naas-models/go/space/space.pb.go +++ b/go/github.com/jupyter-naas/naas-models/go/space/space.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.34.2 // protoc v5.26.1 // source: space.proto @@ -1184,7 +1184,7 @@ func file_space_proto_rawDescGZIP() []byte { var file_space_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_space_proto_msgTypes = make([]protoimpl.MessageInfo, 17) -var file_space_proto_goTypes = []interface{}{ +var file_space_proto_goTypes = []any{ (SpaceError)(0), // 0: space.SpaceError (*Container)(nil), // 1: space.Container (*ContainerUpdate)(nil), // 2: space.ContainerUpdate @@ -1229,7 +1229,7 @@ func file_space_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_space_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_space_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Container); i { case 0: return &v.state @@ -1241,7 +1241,7 @@ func file_space_proto_init() { return nil } } - file_space_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_space_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ContainerUpdate); i { case 0: return &v.state @@ -1253,7 +1253,7 @@ func file_space_proto_init() { return nil } } - file_space_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_space_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Space); i { case 0: return &v.state @@ -1265,7 +1265,7 @@ func file_space_proto_init() { return nil } } - file_space_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_space_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*SpaceUpdate); i { case 0: return &v.state @@ -1277,7 +1277,7 @@ func file_space_proto_init() { return nil } } - file_space_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_space_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*SpaceResponseError); i { case 0: return &v.state @@ -1289,7 +1289,7 @@ func file_space_proto_init() { return nil } } - file_space_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_space_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*SpaceCreationRequest); i { case 0: return &v.state @@ -1301,7 +1301,7 @@ func file_space_proto_init() { return nil } } - file_space_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_space_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*SpaceCreationResponse); i { case 0: return &v.state @@ -1313,7 +1313,7 @@ func file_space_proto_init() { return nil } } - file_space_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_space_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*SpaceGetRequest); i { case 0: return &v.state @@ -1325,7 +1325,7 @@ func file_space_proto_init() { return nil } } - file_space_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_space_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*SpaceGetResponse); i { case 0: return &v.state @@ -1337,7 +1337,7 @@ func file_space_proto_init() { return nil } } - file_space_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_space_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*SpaceDeletionRequest); i { case 0: return &v.state @@ -1349,7 +1349,7 @@ func file_space_proto_init() { return nil } } - file_space_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_space_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*SpaceDeletionResponse); i { case 0: return &v.state @@ -1361,7 +1361,7 @@ func file_space_proto_init() { return nil } } - file_space_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_space_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*SpaceListRequest); i { case 0: return &v.state @@ -1373,7 +1373,7 @@ func file_space_proto_init() { return nil } } - file_space_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_space_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*SpaceListResponse); i { case 0: return &v.state @@ -1385,7 +1385,7 @@ func file_space_proto_init() { return nil } } - file_space_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_space_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*SpaceUpdateRequest); i { case 0: return &v.state @@ -1397,7 +1397,7 @@ func file_space_proto_init() { return nil } } - file_space_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_space_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*SpaceUpdateResponse); i { case 0: return &v.state @@ -1410,20 +1410,20 @@ func file_space_proto_init() { } } } - file_space_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_space_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_space_proto_msgTypes[2].OneofWrappers = []interface{}{} - file_space_proto_msgTypes[3].OneofWrappers = []interface{}{} - file_space_proto_msgTypes[4].OneofWrappers = []interface{}{} - file_space_proto_msgTypes[5].OneofWrappers = []interface{}{} - file_space_proto_msgTypes[6].OneofWrappers = []interface{}{} - file_space_proto_msgTypes[7].OneofWrappers = []interface{}{} - file_space_proto_msgTypes[8].OneofWrappers = []interface{}{} - file_space_proto_msgTypes[9].OneofWrappers = []interface{}{} - file_space_proto_msgTypes[10].OneofWrappers = []interface{}{} - file_space_proto_msgTypes[11].OneofWrappers = []interface{}{} - file_space_proto_msgTypes[13].OneofWrappers = []interface{}{} - file_space_proto_msgTypes[14].OneofWrappers = []interface{}{} + file_space_proto_msgTypes[0].OneofWrappers = []any{} + file_space_proto_msgTypes[1].OneofWrappers = []any{} + file_space_proto_msgTypes[2].OneofWrappers = []any{} + file_space_proto_msgTypes[3].OneofWrappers = []any{} + file_space_proto_msgTypes[4].OneofWrappers = []any{} + file_space_proto_msgTypes[5].OneofWrappers = []any{} + file_space_proto_msgTypes[6].OneofWrappers = []any{} + file_space_proto_msgTypes[7].OneofWrappers = []any{} + file_space_proto_msgTypes[8].OneofWrappers = []any{} + file_space_proto_msgTypes[9].OneofWrappers = []any{} + file_space_proto_msgTypes[10].OneofWrappers = []any{} + file_space_proto_msgTypes[11].OneofWrappers = []any{} + file_space_proto_msgTypes[13].OneofWrappers = []any{} + file_space_proto_msgTypes[14].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/go/github.com/jupyter-naas/naas-models/go/storage/storage.pb.go b/go/github.com/jupyter-naas/naas-models/go/storage/storage.pb.go index 864c5da..8c9ca35 100644 --- a/go/github.com/jupyter-naas/naas-models/go/storage/storage.pb.go +++ b/go/github.com/jupyter-naas/naas-models/go/storage/storage.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.34.2 // protoc v5.26.1 // source: storage.proto @@ -1861,7 +1861,7 @@ func file_storage_proto_rawDescGZIP() []byte { var file_storage_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_storage_proto_msgTypes = make([]protoimpl.MessageInfo, 26) -var file_storage_proto_goTypes = []interface{}{ +var file_storage_proto_goTypes = []any{ (StorageError)(0), // 0: storage.StorageError (ObjectError)(0), // 1: storage.ObjectError (CredentialsError)(0), // 2: storage.CredentialsError @@ -1939,7 +1939,7 @@ func file_storage_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_storage_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Storage); i { case 0: return &v.state @@ -1951,7 +1951,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Object); i { case 0: return &v.state @@ -1963,7 +1963,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*StorageResponseError); i { case 0: return &v.state @@ -1975,7 +1975,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ObjectResponseError); i { case 0: return &v.state @@ -1987,7 +1987,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*ObjectStorageCredentialsResponseError); i { case 0: return &v.state @@ -1999,7 +1999,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*StorageListRequest); i { case 0: return &v.state @@ -2011,7 +2011,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*StorageListResponse); i { case 0: return &v.state @@ -2023,7 +2023,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*StorageCreateRequest); i { case 0: return &v.state @@ -2035,7 +2035,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*StorageCreateResponse); i { case 0: return &v.state @@ -2047,7 +2047,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*StorageDeleteRequest); i { case 0: return &v.state @@ -2059,7 +2059,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*StorageDeleteResponse); i { case 0: return &v.state @@ -2071,7 +2071,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*StorageListObjectRequest); i { case 0: return &v.state @@ -2083,7 +2083,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*StorageListObjectResponse); i { case 0: return &v.state @@ -2095,7 +2095,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*ObjectCreateRequest); i { case 0: return &v.state @@ -2107,7 +2107,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*ObjectCreateResponse); i { case 0: return &v.state @@ -2119,7 +2119,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*ObjectListRequest); i { case 0: return &v.state @@ -2131,7 +2131,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*ObjectListResponse); i { case 0: return &v.state @@ -2143,7 +2143,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*ObjectGetRequest); i { case 0: return &v.state @@ -2155,7 +2155,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*ObjectGetResponse); i { case 0: return &v.state @@ -2167,7 +2167,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*ObjectDeleteRequest); i { case 0: return &v.state @@ -2179,7 +2179,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[20].Exporter = func(v any, i int) any { switch v := v.(*ObjectDeleteResponse); i { case 0: return &v.state @@ -2191,7 +2191,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[21].Exporter = func(v any, i int) any { switch v := v.(*ObjectStorageS3Credentials); i { case 0: return &v.state @@ -2203,7 +2203,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[22].Exporter = func(v any, i int) any { switch v := v.(*ObjectStorageAzureCredentials); i { case 0: return &v.state @@ -2215,7 +2215,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[23].Exporter = func(v any, i int) any { switch v := v.(*ObjectStorageCredentials); i { case 0: return &v.state @@ -2227,7 +2227,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[24].Exporter = func(v any, i int) any { switch v := v.(*ObjectStorageCredentialsRequest); i { case 0: return &v.state @@ -2239,7 +2239,7 @@ func file_storage_proto_init() { return nil } } - file_storage_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_storage_proto_msgTypes[25].Exporter = func(v any, i int) any { switch v := v.(*ObjectStorageCredentialsResponse); i { case 0: return &v.state @@ -2252,31 +2252,31 @@ func file_storage_proto_init() { } } } - file_storage_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[2].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[3].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[4].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[5].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[6].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[7].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[8].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[9].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[10].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[11].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[12].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[13].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[14].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[15].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[16].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[17].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[18].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[19].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[20].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[21].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[22].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[24].OneofWrappers = []interface{}{} - file_storage_proto_msgTypes[25].OneofWrappers = []interface{}{} + file_storage_proto_msgTypes[0].OneofWrappers = []any{} + file_storage_proto_msgTypes[1].OneofWrappers = []any{} + file_storage_proto_msgTypes[2].OneofWrappers = []any{} + file_storage_proto_msgTypes[3].OneofWrappers = []any{} + file_storage_proto_msgTypes[4].OneofWrappers = []any{} + file_storage_proto_msgTypes[5].OneofWrappers = []any{} + file_storage_proto_msgTypes[6].OneofWrappers = []any{} + file_storage_proto_msgTypes[7].OneofWrappers = []any{} + file_storage_proto_msgTypes[8].OneofWrappers = []any{} + file_storage_proto_msgTypes[9].OneofWrappers = []any{} + file_storage_proto_msgTypes[10].OneofWrappers = []any{} + file_storage_proto_msgTypes[11].OneofWrappers = []any{} + file_storage_proto_msgTypes[12].OneofWrappers = []any{} + file_storage_proto_msgTypes[13].OneofWrappers = []any{} + file_storage_proto_msgTypes[14].OneofWrappers = []any{} + file_storage_proto_msgTypes[15].OneofWrappers = []any{} + file_storage_proto_msgTypes[16].OneofWrappers = []any{} + file_storage_proto_msgTypes[17].OneofWrappers = []any{} + file_storage_proto_msgTypes[18].OneofWrappers = []any{} + file_storage_proto_msgTypes[19].OneofWrappers = []any{} + file_storage_proto_msgTypes[20].OneofWrappers = []any{} + file_storage_proto_msgTypes[21].OneofWrappers = []any{} + file_storage_proto_msgTypes[22].OneofWrappers = []any{} + file_storage_proto_msgTypes[24].OneofWrappers = []any{} + file_storage_proto_msgTypes[25].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/go/github.com/jupyter-naas/naas-models/go/workspace/workspace.pb.go b/go/github.com/jupyter-naas/naas-models/go/workspace/workspace.pb.go index b7f6552..7cb1901 100644 --- a/go/github.com/jupyter-naas/naas-models/go/workspace/workspace.pb.go +++ b/go/github.com/jupyter-naas/naas-models/go/workspace/workspace.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.34.2 // protoc v5.26.1 // source: workspace.proto @@ -2982,7 +2982,7 @@ func file_workspace_proto_rawDescGZIP() []byte { } var file_workspace_proto_msgTypes = make([]protoimpl.MessageInfo, 40) -var file_workspace_proto_goTypes = []interface{}{ +var file_workspace_proto_goTypes = []any{ (*Workspace)(nil), // 0: workspace.Workspace (*WorkspaceCreation)(nil), // 1: workspace.WorkspaceCreation (*WorkspaceUpdate)(nil), // 2: workspace.WorkspaceUpdate @@ -3073,7 +3073,7 @@ func file_workspace_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_workspace_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Workspace); i { case 0: return &v.state @@ -3085,7 +3085,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceCreation); i { case 0: return &v.state @@ -3097,7 +3097,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceUpdate); i { case 0: return &v.state @@ -3109,7 +3109,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceUser); i { case 0: return &v.state @@ -3121,7 +3121,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceUserUpdate); i { case 0: return &v.state @@ -3133,7 +3133,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*WorkspacePlugin); i { case 0: return &v.state @@ -3145,7 +3145,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*WorkspacePluginUpdate); i { case 0: return &v.state @@ -3157,7 +3157,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceResponseError); i { case 0: return &v.state @@ -3169,7 +3169,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceListRequest); i { case 0: return &v.state @@ -3181,7 +3181,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceListResponse); i { case 0: return &v.state @@ -3193,7 +3193,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*InvitedWorkspaceListRequest); i { case 0: return &v.state @@ -3205,7 +3205,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*InvitedWorkspaceListResponse); i { case 0: return &v.state @@ -3217,7 +3217,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceCreateRequest); i { case 0: return &v.state @@ -3229,7 +3229,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceCreateResponse); i { case 0: return &v.state @@ -3241,7 +3241,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceGetRequest); i { case 0: return &v.state @@ -3253,7 +3253,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceGetResponse); i { case 0: return &v.state @@ -3265,7 +3265,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceUpdateRequest); i { case 0: return &v.state @@ -3277,7 +3277,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceUpdateResponse); i { case 0: return &v.state @@ -3289,7 +3289,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceDeleteRequest); i { case 0: return &v.state @@ -3301,7 +3301,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceDeleteResponse); i { case 0: return &v.state @@ -3313,7 +3313,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[20].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceInviteUserRequest); i { case 0: return &v.state @@ -3325,7 +3325,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[21].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceInviteUserResponse); i { case 0: return &v.state @@ -3337,7 +3337,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[22].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceUserListRequest); i { case 0: return &v.state @@ -3349,7 +3349,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[23].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceUserListResponse); i { case 0: return &v.state @@ -3361,7 +3361,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[24].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceUserGetRequest); i { case 0: return &v.state @@ -3373,7 +3373,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[25].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceUserGetResponse); i { case 0: return &v.state @@ -3385,7 +3385,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[26].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceUserUpdateRequest); i { case 0: return &v.state @@ -3397,7 +3397,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[27].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceUserUpdateResponse); i { case 0: return &v.state @@ -3409,7 +3409,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[28].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceUserDeleteRequest); i { case 0: return &v.state @@ -3421,7 +3421,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[29].Exporter = func(v any, i int) any { switch v := v.(*WorkspaceUserDeleteResponse); i { case 0: return &v.state @@ -3433,7 +3433,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[30].Exporter = func(v any, i int) any { switch v := v.(*WorkspacePluginCreateRequest); i { case 0: return &v.state @@ -3445,7 +3445,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[31].Exporter = func(v any, i int) any { switch v := v.(*WorkspacePluginCreateResponse); i { case 0: return &v.state @@ -3457,7 +3457,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[32].Exporter = func(v any, i int) any { switch v := v.(*WorkspacePluginGetRequest); i { case 0: return &v.state @@ -3469,7 +3469,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[33].Exporter = func(v any, i int) any { switch v := v.(*WorkspacePluginGetResponse); i { case 0: return &v.state @@ -3481,7 +3481,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[34].Exporter = func(v any, i int) any { switch v := v.(*WorkspacePluginListRequest); i { case 0: return &v.state @@ -3493,7 +3493,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[35].Exporter = func(v any, i int) any { switch v := v.(*WorkspacePluginListResponse); i { case 0: return &v.state @@ -3505,7 +3505,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[36].Exporter = func(v any, i int) any { switch v := v.(*WorkspacePluginUpdateRequest); i { case 0: return &v.state @@ -3517,7 +3517,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[37].Exporter = func(v any, i int) any { switch v := v.(*WorkspacePluginUpdateResponse); i { case 0: return &v.state @@ -3529,7 +3529,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[38].Exporter = func(v any, i int) any { switch v := v.(*WorkspacePluginDeleteRequest); i { case 0: return &v.state @@ -3541,7 +3541,7 @@ func file_workspace_proto_init() { return nil } } - file_workspace_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + file_workspace_proto_msgTypes[39].Exporter = func(v any, i int) any { switch v := v.(*WorkspacePluginDeleteResponse); i { case 0: return &v.state @@ -3554,49 +3554,49 @@ func file_workspace_proto_init() { } } } - file_workspace_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[2].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[3].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[4].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[5].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[6].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[7].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[8].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[9].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[10].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[11].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[12].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[13].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[14].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[15].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[16].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[17].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[18].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[19].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[20].OneofWrappers = []interface{}{ + file_workspace_proto_msgTypes[0].OneofWrappers = []any{} + file_workspace_proto_msgTypes[1].OneofWrappers = []any{} + file_workspace_proto_msgTypes[2].OneofWrappers = []any{} + file_workspace_proto_msgTypes[3].OneofWrappers = []any{} + file_workspace_proto_msgTypes[4].OneofWrappers = []any{} + file_workspace_proto_msgTypes[5].OneofWrappers = []any{} + file_workspace_proto_msgTypes[6].OneofWrappers = []any{} + file_workspace_proto_msgTypes[7].OneofWrappers = []any{} + file_workspace_proto_msgTypes[8].OneofWrappers = []any{} + file_workspace_proto_msgTypes[9].OneofWrappers = []any{} + file_workspace_proto_msgTypes[10].OneofWrappers = []any{} + file_workspace_proto_msgTypes[11].OneofWrappers = []any{} + file_workspace_proto_msgTypes[12].OneofWrappers = []any{} + file_workspace_proto_msgTypes[13].OneofWrappers = []any{} + file_workspace_proto_msgTypes[14].OneofWrappers = []any{} + file_workspace_proto_msgTypes[15].OneofWrappers = []any{} + file_workspace_proto_msgTypes[16].OneofWrappers = []any{} + file_workspace_proto_msgTypes[17].OneofWrappers = []any{} + file_workspace_proto_msgTypes[18].OneofWrappers = []any{} + file_workspace_proto_msgTypes[19].OneofWrappers = []any{} + file_workspace_proto_msgTypes[20].OneofWrappers = []any{ (*WorkspaceInviteUserRequest_UserId)(nil), (*WorkspaceInviteUserRequest_Email)(nil), } - file_workspace_proto_msgTypes[21].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[22].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[23].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[24].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[25].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[26].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[27].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[28].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[29].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[30].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[31].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[32].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[33].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[34].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[35].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[36].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[37].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[38].OneofWrappers = []interface{}{} - file_workspace_proto_msgTypes[39].OneofWrappers = []interface{}{} + file_workspace_proto_msgTypes[21].OneofWrappers = []any{} + file_workspace_proto_msgTypes[22].OneofWrappers = []any{} + file_workspace_proto_msgTypes[23].OneofWrappers = []any{} + file_workspace_proto_msgTypes[24].OneofWrappers = []any{} + file_workspace_proto_msgTypes[25].OneofWrappers = []any{} + file_workspace_proto_msgTypes[26].OneofWrappers = []any{} + file_workspace_proto_msgTypes[27].OneofWrappers = []any{} + file_workspace_proto_msgTypes[28].OneofWrappers = []any{} + file_workspace_proto_msgTypes[29].OneofWrappers = []any{} + file_workspace_proto_msgTypes[30].OneofWrappers = []any{} + file_workspace_proto_msgTypes[31].OneofWrappers = []any{} + file_workspace_proto_msgTypes[32].OneofWrappers = []any{} + file_workspace_proto_msgTypes[33].OneofWrappers = []any{} + file_workspace_proto_msgTypes[34].OneofWrappers = []any{} + file_workspace_proto_msgTypes[35].OneofWrappers = []any{} + file_workspace_proto_msgTypes[36].OneofWrappers = []any{} + file_workspace_proto_msgTypes[37].OneofWrappers = []any{} + file_workspace_proto_msgTypes[38].OneofWrappers = []any{} + file_workspace_proto_msgTypes[39].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/protos/errors.proto b/protos/errors.proto index 22ea36b..7eb632e 100644 --- a/protos/errors.proto +++ b/protos/errors.proto @@ -15,6 +15,7 @@ enum Error { // IAM errors 200 - 299 IAM_USER_NOT_FOUND = 200; + IAM_USER_NOT_AUTHORIZED = 201; // Workspace errors 300 - 399 @@ -30,4 +31,9 @@ enum Error { // Credits errors 400 - 499 CREDITS_USER_HAS_NO_PARENT = 400; +} + +message ErrorResponse { + optional Error code = 1; + optional string message = 2; } \ No newline at end of file diff --git a/protos/iam.proto b/protos/iam.proto index 284e04f..fdc9b6e 100644 --- a/protos/iam.proto +++ b/protos/iam.proto @@ -5,6 +5,7 @@ package iam; option go_package = "github.com/jupyter-naas/naas-models/go/iam"; import "validate.proto"; +import "errors.proto"; message TokenData { optional string user_id = 1; @@ -23,4 +24,16 @@ message Profile { optional string targeted_use = 9; optional bool product_updates = 10; optional string phone = 11; -} \ No newline at end of file +} + +message ImpersonateUserRequest { + oneof user { + string user_id = 1 [(validate.rules).string.uuid = true]; + string email = 2 [(validate.rules).string.email = true]; + } +} + +message ImpersonateUserResponse { + optional errors.ErrorResponse error = 1; + optional string token = 2; +} diff --git a/python/naas_models/errors_pb2.py b/python/naas_models/errors_pb2.py index 496c93b..3c6db64 100644 --- a/python/naas_models/errors_pb2.py +++ b/python/naas_models/errors_pb2.py @@ -15,7 +15,7 @@ import naas_models.validate_pb2 as validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x65rrors.proto\x12\x06\x65rrors\x1a\x0evalidate.proto*\x95\x03\n\x05\x45rror\x12\x0c\n\x08NO_ERROR\x10\x00\x12\x1a\n\x15INTERNAL_SERVER_ERROR\x10\xc7\x01\x12\x17\n\x12IAM_USER_NOT_FOUND\x10\xc8\x01\x12\x18\n\x13WORKSPACE_NOT_FOUND\x10\xac\x02\x12\"\n\x1dWORKSPACE_USER_ALREADY_EXISTS\x10\xae\x02\x12\x1d\n\x18WORKSPACE_USER_NOT_FOUND\x10\xaf\x02\x12\"\n\x1dWORKSPACE_USER_ALREADY_ACTIVE\x10\xb0\x02\x12\x33\n.WORKSPACE_USER_ALREADY_HAVE_PERSONAL_WORKSPACE\x10\xb1\x02\x12\x1f\n\x1aWORKSPACE_PLUGIN_NOT_FOUND\x10\xb2\x02\x12\x1d\n\x18WORKSPACE_INVITE_INVALID\x10\xb3\x02\x12\x32\n-WORKSPACE_CANNOT_INVITE_TO_PERSONAL_WORKSPACE\x10\xb4\x02\x12\x1f\n\x1a\x43REDITS_USER_HAS_NO_PARENT\x10\x90\x03\x42/Z-github.com/jupyter-naas/naas-models/go/errorsb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x65rrors.proto\x12\x06\x65rrors\x1a\x0evalidate.proto\"\\\n\rErrorResponse\x12 \n\x04\x63ode\x18\x01 \x01(\x0e\x32\r.errors.ErrorH\x00\x88\x01\x01\x12\x14\n\x07message\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_codeB\n\n\x08_message*\xb3\x03\n\x05\x45rror\x12\x0c\n\x08NO_ERROR\x10\x00\x12\x1a\n\x15INTERNAL_SERVER_ERROR\x10\xc7\x01\x12\x17\n\x12IAM_USER_NOT_FOUND\x10\xc8\x01\x12\x1c\n\x17IAM_USER_NOT_AUTHORIZED\x10\xc9\x01\x12\x18\n\x13WORKSPACE_NOT_FOUND\x10\xac\x02\x12\"\n\x1dWORKSPACE_USER_ALREADY_EXISTS\x10\xae\x02\x12\x1d\n\x18WORKSPACE_USER_NOT_FOUND\x10\xaf\x02\x12\"\n\x1dWORKSPACE_USER_ALREADY_ACTIVE\x10\xb0\x02\x12\x33\n.WORKSPACE_USER_ALREADY_HAVE_PERSONAL_WORKSPACE\x10\xb1\x02\x12\x1f\n\x1aWORKSPACE_PLUGIN_NOT_FOUND\x10\xb2\x02\x12\x1d\n\x18WORKSPACE_INVITE_INVALID\x10\xb3\x02\x12\x32\n-WORKSPACE_CANNOT_INVITE_TO_PERSONAL_WORKSPACE\x10\xb4\x02\x12\x1f\n\x1a\x43REDITS_USER_HAS_NO_PARENT\x10\x90\x03\x42/Z-github.com/jupyter-naas/naas-models/go/errorsb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,6 +23,8 @@ if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'Z-github.com/jupyter-naas/naas-models/go/errors' - _globals['_ERROR']._serialized_start=41 - _globals['_ERROR']._serialized_end=446 + _globals['_ERROR']._serialized_start=135 + _globals['_ERROR']._serialized_end=570 + _globals['_ERRORRESPONSE']._serialized_start=40 + _globals['_ERRORRESPONSE']._serialized_end=132 # @@protoc_insertion_point(module_scope) diff --git a/python/naas_models/iam_pb2.py b/python/naas_models/iam_pb2.py index eea94e9..44bbdb4 100644 --- a/python/naas_models/iam_pb2.py +++ b/python/naas_models/iam_pb2.py @@ -13,9 +13,10 @@ import naas_models.validate_pb2 as validate__pb2 +import errors_pb2 as errors__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tiam.proto\x12\x03iam\x1a\x0evalidate.proto\"=\n\tTokenData\x12\x14\n\x07user_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x0e\n\x06scopes\x18\x02 \x03(\tB\n\n\x08_user_id\"\xc7\x03\n\x07Profile\x12\x14\n\x07user_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nfirst_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x16\n\tlast_name\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x07\x63ompany\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x11\n\x04role\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x15\n\x08timezone\x18\x06 \x01(\tH\x05\x88\x01\x01\x12 \n\x13profile_picture_url\x18\x07 \x01(\tH\x06\x88\x01\x01\x12\x1e\n\x11user_presentation\x18\x08 \x01(\tH\x07\x88\x01\x01\x12\x19\n\x0ctargeted_use\x18\t \x01(\tH\x08\x88\x01\x01\x12\x1c\n\x0fproduct_updates\x18\n \x01(\x08H\t\x88\x01\x01\x12\x12\n\x05phone\x18\x0b \x01(\tH\n\x88\x01\x01\x42\n\n\x08_user_idB\r\n\x0b_first_nameB\x0c\n\n_last_nameB\n\n\x08_companyB\x07\n\x05_roleB\x0b\n\t_timezoneB\x16\n\x14_profile_picture_urlB\x14\n\x12_user_presentationB\x0f\n\r_targeted_useB\x12\n\x10_product_updatesB\x08\n\x06_phoneB,Z*github.com/jupyter-naas/naas-models/go/iamb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tiam.proto\x12\x03iam\x1a\x0evalidate.proto\x1a\x0c\x65rrors.proto\"=\n\tTokenData\x12\x14\n\x07user_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x0e\n\x06scopes\x18\x02 \x03(\tB\n\n\x08_user_id\"\xc7\x03\n\x07Profile\x12\x14\n\x07user_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nfirst_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x16\n\tlast_name\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x07\x63ompany\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x11\n\x04role\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x15\n\x08timezone\x18\x06 \x01(\tH\x05\x88\x01\x01\x12 \n\x13profile_picture_url\x18\x07 \x01(\tH\x06\x88\x01\x01\x12\x1e\n\x11user_presentation\x18\x08 \x01(\tH\x07\x88\x01\x01\x12\x19\n\x0ctargeted_use\x18\t \x01(\tH\x08\x88\x01\x01\x12\x1c\n\x0fproduct_updates\x18\n \x01(\x08H\t\x88\x01\x01\x12\x12\n\x05phone\x18\x0b \x01(\tH\n\x88\x01\x01\x42\n\n\x08_user_idB\r\n\x0b_first_nameB\x0c\n\n_last_nameB\n\n\x08_companyB\x07\n\x05_roleB\x0b\n\t_timezoneB\x16\n\x14_profile_picture_urlB\x14\n\x12_user_presentationB\x0f\n\r_targeted_useB\x12\n\x10_product_updatesB\x08\n\x06_phone\"W\n\x16ImpersonateUserRequest\x12\x1b\n\x07user_id\x18\x01 \x01(\tB\x08\xfa\x42\x05r\x03\xb0\x01\x01H\x00\x12\x18\n\x05\x65mail\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02`\x01H\x00\x42\x06\n\x04user\"l\n\x17ImpersonateUserResponse\x12)\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x15.errors.ErrorResponseH\x00\x88\x01\x01\x12\x12\n\x05token\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x08\n\x06_errorB\x08\n\x06_tokenB,Z*github.com/jupyter-naas/naas-models/go/iamb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,8 +24,16 @@ if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'Z*github.com/jupyter-naas/naas-models/go/iam' - _globals['_TOKENDATA']._serialized_start=34 - _globals['_TOKENDATA']._serialized_end=95 - _globals['_PROFILE']._serialized_start=98 - _globals['_PROFILE']._serialized_end=553 + _globals['_IMPERSONATEUSERREQUEST'].fields_by_name['user_id']._loaded_options = None + _globals['_IMPERSONATEUSERREQUEST'].fields_by_name['user_id']._serialized_options = b'\372B\005r\003\260\001\001' + _globals['_IMPERSONATEUSERREQUEST'].fields_by_name['email']._loaded_options = None + _globals['_IMPERSONATEUSERREQUEST'].fields_by_name['email']._serialized_options = b'\372B\004r\002`\001' + _globals['_TOKENDATA']._serialized_start=48 + _globals['_TOKENDATA']._serialized_end=109 + _globals['_PROFILE']._serialized_start=112 + _globals['_PROFILE']._serialized_end=567 + _globals['_IMPERSONATEUSERREQUEST']._serialized_start=569 + _globals['_IMPERSONATEUSERREQUEST']._serialized_end=656 + _globals['_IMPERSONATEUSERRESPONSE']._serialized_start=658 + _globals['_IMPERSONATEUSERRESPONSE']._serialized_end=766 # @@protoc_insertion_point(module_scope) diff --git a/python/naas_models/pydantic/errors_p2p.py b/python/naas_models/pydantic/errors_p2p.py index 3c943fa..60a1025 100644 --- a/python/naas_models/pydantic/errors_p2p.py +++ b/python/naas_models/pydantic/errors_p2p.py @@ -3,12 +3,16 @@ # Protobuf Version: 5.26.1 # Pydantic Version: 2.7.1 from enum import IntEnum +from google.protobuf.message import Message # type: ignore from pydantic import BaseModel +from pydantic import Field +import typing class Error(IntEnum): NO_ERROR = 0 INTERNAL_SERVER_ERROR = 199 IAM_USER_NOT_FOUND = 200 + IAM_USER_NOT_AUTHORIZED = 201 WORKSPACE_NOT_FOUND = 300 WORKSPACE_USER_ALREADY_EXISTS = 302 WORKSPACE_USER_NOT_FOUND = 303 @@ -18,3 +22,7 @@ class Error(IntEnum): WORKSPACE_INVITE_INVALID = 307 WORKSPACE_CANNOT_INVITE_TO_PERSONAL_WORKSPACE = 308 CREDITS_USER_HAS_NO_PARENT = 400 + +class ErrorResponse(BaseModel): + code: typing.Optional[Error] = Field(default=0) + message: typing.Optional[str] = Field(default="") diff --git a/python/naas_models/pydantic/iam_p2p.py b/python/naas_models/pydantic/iam_p2p.py index ac0ccea..e858169 100644 --- a/python/naas_models/pydantic/iam_p2p.py +++ b/python/naas_models/pydantic/iam_p2p.py @@ -2,9 +2,14 @@ # gen by protobuf_to_pydantic[v0.2.6.2](https://github.com/so1n/protobuf_to_pydantic) # Protobuf Version: 5.26.1 # Pydantic Version: 2.7.1 +from naas_models.pydantic.errors_p2p import ErrorResponse from google.protobuf.message import Message # type: ignore +from protobuf_to_pydantic.customer_validator import check_one_of from pydantic import BaseModel from pydantic import Field +from pydantic import model_validator +from pydantic.networks import EmailStr +from uuid import UUID import typing @@ -24,3 +29,13 @@ class Profile(BaseModel): targeted_use: typing.Optional[str] = Field(default="") product_updates: typing.Optional[bool] = Field(default=False) phone: typing.Optional[str] = Field(default="") + +class ImpersonateUserRequest(BaseModel): + _one_of_dict = {"ImpersonateUserRequest.user": {"fields": {"email", "user_id"}}} + one_of_validator = model_validator(mode="before")(check_one_of) + user_id: UUID = Field(default="") + email: EmailStr = Field(default="") + +class ImpersonateUserResponse(BaseModel): + error: typing.Optional[ErrorResponse] = Field(default=None) + token: typing.Optional[str] = Field(default="")