From 509b7ff2abc0786cac6beb27a29b258352b06163 Mon Sep 17 00:00:00 2001 From: Pavel Avilov Date: Wed, 12 Jan 2022 14:32:35 +0300 Subject: [PATCH 01/36] Implement method to get a default example for each SDKs --- playground/api/v1/api.proto | 15 +- playground/backend/cmd/server/controller.go | 27 +- .../backend/configs/DEFAULT_EXAMPLES.json | 5 + playground/backend/internal/api/v1/api.pb.go | 571 +++++---- .../backend/internal/api/v1/api_grpc.pb.go | 38 + .../cloud_bucket/precompiled_objects.go | 66 +- .../cloud_bucket/precompiled_objects_test.go | 80 +- playground/frontend/lib/api/v1/api.pb.dart | 1041 ++++++----------- .../frontend/lib/api/v1/api.pbgrpc.dart | 53 +- .../frontend/lib/api/v1/api.pbjson.dart | 113 +- 10 files changed, 1007 insertions(+), 1002 deletions(-) create mode 100644 playground/backend/configs/DEFAULT_EXAMPLES.json diff --git a/playground/api/v1/api.proto b/playground/api/v1/api.proto index 877fa0b18008..4a90f05ba9d8 100644 --- a/playground/api/v1/api.proto +++ b/playground/api/v1/api.proto @@ -184,7 +184,12 @@ message GetPrecompiledObjectLogsRequest{ string cloud_path = 1; } -// GetListOfPrecompiledObjectsResponse represent the map between sdk and categories for the sdk. +// GetDefaultPrecompiledObjectRequest contains information of the needed PrecompiledObject sdk. +message GetDefaultPrecompiledObjectRequest { + Sdk sdk = 1; +} + +// GetPrecompiledObjectsResponse represent the map between sdk and categories for the sdk. message GetPrecompiledObjectsResponse{ repeated Categories sdk_categories = 1; } @@ -204,6 +209,11 @@ message GetPrecompiledObjectLogsResponse { string output = 1; } +// GetDefaultPrecompiledObjectResponse represents the default PrecompiledObject and his category for the sdk. +message GetDefaultPrecompiledObjectResponse { + PrecompiledObject precompiled_object = 1; +} + service PlaygroundService { // Submit the job for an execution and get the pipeline uuid. @@ -244,4 +254,7 @@ service PlaygroundService { // Get the logs of an PrecompiledObject. rpc GetPrecompiledObjectLogs(GetPrecompiledObjectLogsRequest) returns (GetPrecompiledObjectLogsResponse); + + // Get the default precompile object for the sdk. + rpc GetDefaultPrecompiledObject(GetDefaultPrecompiledObjectRequest) returns (GetDefaultPrecompiledObjectResponse); } diff --git a/playground/backend/cmd/server/controller.go b/playground/backend/cmd/server/controller.go index 1d9a3345a6c6..0cdb1765c100 100644 --- a/playground/backend/cmd/server/controller.go +++ b/playground/backend/cmd/server/controller.go @@ -262,7 +262,7 @@ func (controller *playgroundController) GetPrecompiledObjects(ctx context.Contex // GetPrecompiledObjectCode returns the code of the specific example func (controller *playgroundController) GetPrecompiledObjectCode(ctx context.Context, info *pb.GetPrecompiledObjectCodeRequest) (*pb.GetPrecompiledObjectCodeResponse, error) { cd := cloud_bucket.New() - codeString, err := cd.GetPrecompiledObject(ctx, info.GetCloudPath()) + codeString, err := cd.GetPrecompiledObjectCode(ctx, info.GetCloudPath()) if err != nil { logger.Errorf("GetPrecompiledObjectCode(): cloud storage error: %s", err.Error()) return nil, errors.InternalError("Error during getting Precompiled Object's code", "Error with cloud connection") @@ -294,3 +294,28 @@ func (controller *playgroundController) GetPrecompiledObjectLogs(ctx context.Con response := pb.GetPrecompiledObjectLogsResponse{Output: logs} return &response, nil } + +// GetDefaultPrecompiledObject returns the default precompile object for sdk. +func (controller *playgroundController) GetDefaultPrecompiledObject(ctx context.Context, info *pb.GetDefaultPrecompiledObjectRequest) (*pb.GetDefaultPrecompiledObjectResponse, error) { + switch info.Sdk { + case pb.Sdk_SDK_UNSPECIFIED, pb.Sdk_SDK_SCIO: + logger.Errorf("GetDefaultPrecompiledObject(): unimplemented sdk: %s\n", info.Sdk) + return nil, errors.InvalidArgumentError("Error during preparing", "Sdk is not implemented yet: %s", info.Sdk.String()) + } + + bucket := cloud_bucket.New() + precompiledObject, err := bucket.GetDefaultPrecompileObject(ctx, info.Sdk, controller.env.ApplicationEnvs.WorkingDir()) + if err != nil { + logger.Errorf("GetDefaultPrecompileObject(): cloud storage error: %s", err.Error()) + return nil, errors.InternalError("Error during getting default Precompiled Object", "Error with cloud connection") + } + + response := pb.GetDefaultPrecompiledObjectResponse{PrecompiledObject: &pb.PrecompiledObject{ + CloudPath: precompiledObject.CloudPath, + Name: precompiledObject.Name, + Description: precompiledObject.Description, + Type: precompiledObject.Type, + PipelineOptions: precompiledObject.PipelineOptions, + }} + return &response, nil +} diff --git a/playground/backend/configs/DEFAULT_EXAMPLES.json b/playground/backend/configs/DEFAULT_EXAMPLES.json new file mode 100644 index 000000000000..4b1ec7032a67 --- /dev/null +++ b/playground/backend/configs/DEFAULT_EXAMPLES.json @@ -0,0 +1,5 @@ +{ + "SDK_JAVA": "SDK_JAVA/MinimalWordCount", + "SDK_GO": "SDK_GO/MinimalWordCount", + "SDK_PYTHON": "SDK_PYTHON/WordCountWithMetrics" +} \ No newline at end of file diff --git a/playground/backend/internal/api/v1/api.pb.go b/playground/backend/internal/api/v1/api.pb.go index cadd4e1c06a7..e5556a690a47 100644 --- a/playground/backend/internal/api/v1/api.pb.go +++ b/playground/backend/internal/api/v1/api.pb.go @@ -1431,7 +1431,55 @@ func (x *GetPrecompiledObjectLogsRequest) GetCloudPath() string { return "" } -// GetListOfPrecompiledObjectsResponse represent the map between sdk and categories for the sdk. +// GetDefaultPrecompiledObjectRequest contains information of the needed PrecompiledObject sdk. +type GetDefaultPrecompiledObjectRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sdk Sdk `protobuf:"varint,1,opt,name=sdk,proto3,enum=api.v1.Sdk" json:"sdk,omitempty"` +} + +func (x *GetDefaultPrecompiledObjectRequest) Reset() { + *x = GetDefaultPrecompiledObjectRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_api_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDefaultPrecompiledObjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDefaultPrecompiledObjectRequest) ProtoMessage() {} + +func (x *GetDefaultPrecompiledObjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_api_proto_msgTypes[24] + 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 GetDefaultPrecompiledObjectRequest.ProtoReflect.Descriptor instead. +func (*GetDefaultPrecompiledObjectRequest) Descriptor() ([]byte, []int) { + return file_api_v1_api_proto_rawDescGZIP(), []int{24} +} + +func (x *GetDefaultPrecompiledObjectRequest) GetSdk() Sdk { + if x != nil { + return x.Sdk + } + return Sdk_SDK_UNSPECIFIED +} + +// GetPrecompiledObjectsResponse represent the map between sdk and categories for the sdk. type GetPrecompiledObjectsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1443,7 +1491,7 @@ type GetPrecompiledObjectsResponse struct { func (x *GetPrecompiledObjectsResponse) Reset() { *x = GetPrecompiledObjectsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[24] + mi := &file_api_v1_api_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1456,7 +1504,7 @@ func (x *GetPrecompiledObjectsResponse) String() string { func (*GetPrecompiledObjectsResponse) ProtoMessage() {} func (x *GetPrecompiledObjectsResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[24] + mi := &file_api_v1_api_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1469,7 +1517,7 @@ func (x *GetPrecompiledObjectsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPrecompiledObjectsResponse.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectsResponse) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{24} + return file_api_v1_api_proto_rawDescGZIP(), []int{25} } func (x *GetPrecompiledObjectsResponse) GetSdkCategories() []*Categories { @@ -1491,7 +1539,7 @@ type GetPrecompiledObjectCodeResponse struct { func (x *GetPrecompiledObjectCodeResponse) Reset() { *x = GetPrecompiledObjectCodeResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[25] + mi := &file_api_v1_api_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1504,7 +1552,7 @@ func (x *GetPrecompiledObjectCodeResponse) String() string { func (*GetPrecompiledObjectCodeResponse) ProtoMessage() {} func (x *GetPrecompiledObjectCodeResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[25] + mi := &file_api_v1_api_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1517,7 +1565,7 @@ func (x *GetPrecompiledObjectCodeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPrecompiledObjectCodeResponse.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectCodeResponse) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{25} + return file_api_v1_api_proto_rawDescGZIP(), []int{26} } func (x *GetPrecompiledObjectCodeResponse) GetCode() string { @@ -1539,7 +1587,7 @@ type GetPrecompiledObjectOutputResponse struct { func (x *GetPrecompiledObjectOutputResponse) Reset() { *x = GetPrecompiledObjectOutputResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[26] + mi := &file_api_v1_api_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1552,7 +1600,7 @@ func (x *GetPrecompiledObjectOutputResponse) String() string { func (*GetPrecompiledObjectOutputResponse) ProtoMessage() {} func (x *GetPrecompiledObjectOutputResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[26] + mi := &file_api_v1_api_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1565,7 +1613,7 @@ func (x *GetPrecompiledObjectOutputResponse) ProtoReflect() protoreflect.Message // Deprecated: Use GetPrecompiledObjectOutputResponse.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectOutputResponse) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{26} + return file_api_v1_api_proto_rawDescGZIP(), []int{27} } func (x *GetPrecompiledObjectOutputResponse) GetOutput() string { @@ -1587,7 +1635,7 @@ type GetPrecompiledObjectLogsResponse struct { func (x *GetPrecompiledObjectLogsResponse) Reset() { *x = GetPrecompiledObjectLogsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[27] + mi := &file_api_v1_api_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1600,7 +1648,7 @@ func (x *GetPrecompiledObjectLogsResponse) String() string { func (*GetPrecompiledObjectLogsResponse) ProtoMessage() {} func (x *GetPrecompiledObjectLogsResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[27] + mi := &file_api_v1_api_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1613,7 +1661,7 @@ func (x *GetPrecompiledObjectLogsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPrecompiledObjectLogsResponse.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectLogsResponse) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{27} + return file_api_v1_api_proto_rawDescGZIP(), []int{28} } func (x *GetPrecompiledObjectLogsResponse) GetOutput() string { @@ -1623,6 +1671,54 @@ func (x *GetPrecompiledObjectLogsResponse) GetOutput() string { return "" } +// GetDefaultPrecompiledObjectResponse represents the default PrecompiledObject and his category for the sdk. +type GetDefaultPrecompiledObjectResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PrecompiledObject *PrecompiledObject `protobuf:"bytes,1,opt,name=precompiled_object,json=precompiledObject,proto3" json:"precompiled_object,omitempty"` +} + +func (x *GetDefaultPrecompiledObjectResponse) Reset() { + *x = GetDefaultPrecompiledObjectResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_api_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDefaultPrecompiledObjectResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDefaultPrecompiledObjectResponse) ProtoMessage() {} + +func (x *GetDefaultPrecompiledObjectResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_api_proto_msgTypes[29] + 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 GetDefaultPrecompiledObjectResponse.ProtoReflect.Descriptor instead. +func (*GetDefaultPrecompiledObjectResponse) Descriptor() ([]byte, []int) { + return file_api_v1_api_proto_rawDescGZIP(), []int{29} +} + +func (x *GetDefaultPrecompiledObjectResponse) GetPrecompiledObject() *PrecompiledObject { + if x != nil { + return x.PrecompiledObject + } + return nil +} + type Categories_Category struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1635,7 +1731,7 @@ type Categories_Category struct { func (x *Categories_Category) Reset() { *x = Categories_Category{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[28] + mi := &file_api_v1_api_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1648,7 +1744,7 @@ func (x *Categories_Category) String() string { func (*Categories_Category) ProtoMessage() {} func (x *Categories_Category) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[28] + mi := &file_api_v1_api_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1792,135 +1888,154 @@ var file_api_v1_api_proto_rawDesc = []byte{ 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x5a, 0x0a, 0x1d, 0x47, 0x65, + 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x43, 0x0a, 0x22, 0x47, 0x65, + 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1d, 0x0a, 0x03, 0x73, 0x64, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x64, 0x6b, 0x52, 0x03, 0x73, 0x64, 0x6b, 0x22, + 0x5a, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x39, 0x0a, 0x0e, 0x73, 0x64, 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x0d, 0x73, 0x64, + 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0x36, 0x0a, 0x20, 0x47, + 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x22, 0x3c, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x22, 0x3a, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x6f, 0x0a, + 0x23, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x11, 0x70, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2a, 0x52, + 0x0a, 0x03, 0x53, 0x64, 0x6b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x44, 0x4b, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, + 0x4b, 0x5f, 0x4a, 0x41, 0x56, 0x41, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x44, 0x4b, 0x5f, + 0x47, 0x4f, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x44, 0x4b, 0x5f, 0x50, 0x59, 0x54, 0x48, + 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, 0x53, 0x43, 0x49, 0x4f, + 0x10, 0x04, 0x2a, 0xb8, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, + 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, + 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x14, 0x0a, + 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x49, 0x4e, + 0x47, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, + 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x06, 0x12, 0x14, 0x0a, + 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4e, + 0x47, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, + 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x09, 0x12, 0x10, + 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x0a, + 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x54, + 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x0c, 0x2a, 0xae, 0x01, + 0x0a, 0x15, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x23, 0x50, 0x52, 0x45, 0x43, 0x4f, + 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, + 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x41, 0x4d, + 0x50, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, + 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x4b, 0x41, 0x54, 0x41, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x50, 0x52, 0x45, 0x43, 0x4f, + 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x03, 0x32, 0xea, + 0x09, 0x0a, 0x11, 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, + 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x16, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x46, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x22, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, + 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, + 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x37, 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x15, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0e, 0x73, - 0x64, 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x74, - 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x0d, 0x73, 0x64, 0x6b, 0x43, 0x61, 0x74, 0x65, - 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0x36, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, - 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x3c, - 0x0a, 0x22, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x3a, 0x0a, 0x20, - 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2a, 0x52, 0x0a, 0x03, 0x53, 0x64, 0x6b, 0x12, - 0x13, 0x0a, 0x0f, 0x53, 0x44, 0x4b, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, 0x4a, 0x41, 0x56, 0x41, - 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x44, 0x4b, 0x5f, 0x47, 0x4f, 0x10, 0x02, 0x12, 0x0e, - 0x0a, 0x0a, 0x53, 0x44, 0x4b, 0x5f, 0x50, 0x59, 0x54, 0x48, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x0c, - 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, 0x53, 0x43, 0x49, 0x4f, 0x10, 0x04, 0x2a, 0xb8, 0x02, 0x0a, - 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, - 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, - 0x52, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, - 0x45, 0x50, 0x41, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x18, 0x0a, - 0x14, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x5f, - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x12, 0x13, 0x0a, - 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, - 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, - 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x09, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x0a, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, - 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, - 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x0c, 0x2a, 0xae, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x65, 0x63, - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x27, 0x0a, 0x23, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, - 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x52, - 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x41, 0x4d, 0x50, 0x4c, 0x45, 0x10, 0x01, 0x12, - 0x20, 0x0a, 0x1c, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, - 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4b, 0x41, 0x54, 0x41, 0x10, - 0x02, 0x12, 0x25, 0x0a, 0x21, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, - 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, - 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x03, 0x32, 0xf2, 0x08, 0x0a, 0x11, 0x50, 0x6c, 0x61, - 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3a, - 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, - 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, - 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x47, 0x65, 0x74, - 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x5e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x61, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, - 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x43, - 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, - 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x24, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, - 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x63, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x73, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x29, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, + 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, + 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x1a, 0x47, 0x65, 0x74, - 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, - 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, - 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, - 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x38, 0x5a, - 0x36, 0x62, 0x65, 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x6f, 0x72, 0x67, - 0x2f, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x3b, 0x70, 0x6c, 0x61, - 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x74, 0x12, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x38, 0x5a, 0x36, 0x62, + 0x65, 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, + 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x3b, 0x70, 0x6c, 0x61, 0x79, 0x67, + 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1936,81 +2051,87 @@ func file_api_v1_api_proto_rawDescGZIP() []byte { } var file_api_v1_api_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_api_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 29) +var file_api_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 31) var file_api_v1_api_proto_goTypes = []interface{}{ - (Sdk)(0), // 0: api.v1.Sdk - (Status)(0), // 1: api.v1.Status - (PrecompiledObjectType)(0), // 2: api.v1.PrecompiledObjectType - (*RunCodeRequest)(nil), // 3: api.v1.RunCodeRequest - (*RunCodeResponse)(nil), // 4: api.v1.RunCodeResponse - (*CheckStatusRequest)(nil), // 5: api.v1.CheckStatusRequest - (*CheckStatusResponse)(nil), // 6: api.v1.CheckStatusResponse - (*GetValidationOutputRequest)(nil), // 7: api.v1.GetValidationOutputRequest - (*GetValidationOutputResponse)(nil), // 8: api.v1.GetValidationOutputResponse - (*GetPreparationOutputRequest)(nil), // 9: api.v1.GetPreparationOutputRequest - (*GetPreparationOutputResponse)(nil), // 10: api.v1.GetPreparationOutputResponse - (*GetCompileOutputRequest)(nil), // 11: api.v1.GetCompileOutputRequest - (*GetCompileOutputResponse)(nil), // 12: api.v1.GetCompileOutputResponse - (*GetRunOutputRequest)(nil), // 13: api.v1.GetRunOutputRequest - (*GetRunOutputResponse)(nil), // 14: api.v1.GetRunOutputResponse - (*GetRunErrorRequest)(nil), // 15: api.v1.GetRunErrorRequest - (*GetRunErrorResponse)(nil), // 16: api.v1.GetRunErrorResponse - (*GetLogsRequest)(nil), // 17: api.v1.GetLogsRequest - (*GetLogsResponse)(nil), // 18: api.v1.GetLogsResponse - (*CancelRequest)(nil), // 19: api.v1.CancelRequest - (*CancelResponse)(nil), // 20: api.v1.CancelResponse - (*PrecompiledObject)(nil), // 21: api.v1.PrecompiledObject - (*Categories)(nil), // 22: api.v1.Categories - (*GetPrecompiledObjectsRequest)(nil), // 23: api.v1.GetPrecompiledObjectsRequest - (*GetPrecompiledObjectCodeRequest)(nil), // 24: api.v1.GetPrecompiledObjectCodeRequest - (*GetPrecompiledObjectOutputRequest)(nil), // 25: api.v1.GetPrecompiledObjectOutputRequest - (*GetPrecompiledObjectLogsRequest)(nil), // 26: api.v1.GetPrecompiledObjectLogsRequest - (*GetPrecompiledObjectsResponse)(nil), // 27: api.v1.GetPrecompiledObjectsResponse - (*GetPrecompiledObjectCodeResponse)(nil), // 28: api.v1.GetPrecompiledObjectCodeResponse - (*GetPrecompiledObjectOutputResponse)(nil), // 29: api.v1.GetPrecompiledObjectOutputResponse - (*GetPrecompiledObjectLogsResponse)(nil), // 30: api.v1.GetPrecompiledObjectLogsResponse - (*Categories_Category)(nil), // 31: api.v1.Categories.Category + (Sdk)(0), // 0: api.v1.Sdk + (Status)(0), // 1: api.v1.Status + (PrecompiledObjectType)(0), // 2: api.v1.PrecompiledObjectType + (*RunCodeRequest)(nil), // 3: api.v1.RunCodeRequest + (*RunCodeResponse)(nil), // 4: api.v1.RunCodeResponse + (*CheckStatusRequest)(nil), // 5: api.v1.CheckStatusRequest + (*CheckStatusResponse)(nil), // 6: api.v1.CheckStatusResponse + (*GetValidationOutputRequest)(nil), // 7: api.v1.GetValidationOutputRequest + (*GetValidationOutputResponse)(nil), // 8: api.v1.GetValidationOutputResponse + (*GetPreparationOutputRequest)(nil), // 9: api.v1.GetPreparationOutputRequest + (*GetPreparationOutputResponse)(nil), // 10: api.v1.GetPreparationOutputResponse + (*GetCompileOutputRequest)(nil), // 11: api.v1.GetCompileOutputRequest + (*GetCompileOutputResponse)(nil), // 12: api.v1.GetCompileOutputResponse + (*GetRunOutputRequest)(nil), // 13: api.v1.GetRunOutputRequest + (*GetRunOutputResponse)(nil), // 14: api.v1.GetRunOutputResponse + (*GetRunErrorRequest)(nil), // 15: api.v1.GetRunErrorRequest + (*GetRunErrorResponse)(nil), // 16: api.v1.GetRunErrorResponse + (*GetLogsRequest)(nil), // 17: api.v1.GetLogsRequest + (*GetLogsResponse)(nil), // 18: api.v1.GetLogsResponse + (*CancelRequest)(nil), // 19: api.v1.CancelRequest + (*CancelResponse)(nil), // 20: api.v1.CancelResponse + (*PrecompiledObject)(nil), // 21: api.v1.PrecompiledObject + (*Categories)(nil), // 22: api.v1.Categories + (*GetPrecompiledObjectsRequest)(nil), // 23: api.v1.GetPrecompiledObjectsRequest + (*GetPrecompiledObjectCodeRequest)(nil), // 24: api.v1.GetPrecompiledObjectCodeRequest + (*GetPrecompiledObjectOutputRequest)(nil), // 25: api.v1.GetPrecompiledObjectOutputRequest + (*GetPrecompiledObjectLogsRequest)(nil), // 26: api.v1.GetPrecompiledObjectLogsRequest + (*GetDefaultPrecompiledObjectRequest)(nil), // 27: api.v1.GetDefaultPrecompiledObjectRequest + (*GetPrecompiledObjectsResponse)(nil), // 28: api.v1.GetPrecompiledObjectsResponse + (*GetPrecompiledObjectCodeResponse)(nil), // 29: api.v1.GetPrecompiledObjectCodeResponse + (*GetPrecompiledObjectOutputResponse)(nil), // 30: api.v1.GetPrecompiledObjectOutputResponse + (*GetPrecompiledObjectLogsResponse)(nil), // 31: api.v1.GetPrecompiledObjectLogsResponse + (*GetDefaultPrecompiledObjectResponse)(nil), // 32: api.v1.GetDefaultPrecompiledObjectResponse + (*Categories_Category)(nil), // 33: api.v1.Categories.Category } var file_api_v1_api_proto_depIdxs = []int32{ 0, // 0: api.v1.RunCodeRequest.sdk:type_name -> api.v1.Sdk 1, // 1: api.v1.CheckStatusResponse.status:type_name -> api.v1.Status 2, // 2: api.v1.PrecompiledObject.type:type_name -> api.v1.PrecompiledObjectType 0, // 3: api.v1.Categories.sdk:type_name -> api.v1.Sdk - 31, // 4: api.v1.Categories.categories:type_name -> api.v1.Categories.Category + 33, // 4: api.v1.Categories.categories:type_name -> api.v1.Categories.Category 0, // 5: api.v1.GetPrecompiledObjectsRequest.sdk:type_name -> api.v1.Sdk - 22, // 6: api.v1.GetPrecompiledObjectsResponse.sdk_categories:type_name -> api.v1.Categories - 21, // 7: api.v1.Categories.Category.precompiled_objects:type_name -> api.v1.PrecompiledObject - 3, // 8: api.v1.PlaygroundService.RunCode:input_type -> api.v1.RunCodeRequest - 5, // 9: api.v1.PlaygroundService.CheckStatus:input_type -> api.v1.CheckStatusRequest - 13, // 10: api.v1.PlaygroundService.GetRunOutput:input_type -> api.v1.GetRunOutputRequest - 17, // 11: api.v1.PlaygroundService.GetLogs:input_type -> api.v1.GetLogsRequest - 15, // 12: api.v1.PlaygroundService.GetRunError:input_type -> api.v1.GetRunErrorRequest - 7, // 13: api.v1.PlaygroundService.GetValidationOutput:input_type -> api.v1.GetValidationOutputRequest - 9, // 14: api.v1.PlaygroundService.GetPreparationOutput:input_type -> api.v1.GetPreparationOutputRequest - 11, // 15: api.v1.PlaygroundService.GetCompileOutput:input_type -> api.v1.GetCompileOutputRequest - 19, // 16: api.v1.PlaygroundService.Cancel:input_type -> api.v1.CancelRequest - 23, // 17: api.v1.PlaygroundService.GetPrecompiledObjects:input_type -> api.v1.GetPrecompiledObjectsRequest - 24, // 18: api.v1.PlaygroundService.GetPrecompiledObjectCode:input_type -> api.v1.GetPrecompiledObjectCodeRequest - 25, // 19: api.v1.PlaygroundService.GetPrecompiledObjectOutput:input_type -> api.v1.GetPrecompiledObjectOutputRequest - 26, // 20: api.v1.PlaygroundService.GetPrecompiledObjectLogs:input_type -> api.v1.GetPrecompiledObjectLogsRequest - 4, // 21: api.v1.PlaygroundService.RunCode:output_type -> api.v1.RunCodeResponse - 6, // 22: api.v1.PlaygroundService.CheckStatus:output_type -> api.v1.CheckStatusResponse - 14, // 23: api.v1.PlaygroundService.GetRunOutput:output_type -> api.v1.GetRunOutputResponse - 18, // 24: api.v1.PlaygroundService.GetLogs:output_type -> api.v1.GetLogsResponse - 16, // 25: api.v1.PlaygroundService.GetRunError:output_type -> api.v1.GetRunErrorResponse - 8, // 26: api.v1.PlaygroundService.GetValidationOutput:output_type -> api.v1.GetValidationOutputResponse - 10, // 27: api.v1.PlaygroundService.GetPreparationOutput:output_type -> api.v1.GetPreparationOutputResponse - 12, // 28: api.v1.PlaygroundService.GetCompileOutput:output_type -> api.v1.GetCompileOutputResponse - 20, // 29: api.v1.PlaygroundService.Cancel:output_type -> api.v1.CancelResponse - 27, // 30: api.v1.PlaygroundService.GetPrecompiledObjects:output_type -> api.v1.GetPrecompiledObjectsResponse - 28, // 31: api.v1.PlaygroundService.GetPrecompiledObjectCode:output_type -> api.v1.GetPrecompiledObjectCodeResponse - 29, // 32: api.v1.PlaygroundService.GetPrecompiledObjectOutput:output_type -> api.v1.GetPrecompiledObjectOutputResponse - 30, // 33: api.v1.PlaygroundService.GetPrecompiledObjectLogs:output_type -> api.v1.GetPrecompiledObjectLogsResponse - 21, // [21:34] is the sub-list for method output_type - 8, // [8:21] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 0, // 6: api.v1.GetDefaultPrecompiledObjectRequest.sdk:type_name -> api.v1.Sdk + 22, // 7: api.v1.GetPrecompiledObjectsResponse.sdk_categories:type_name -> api.v1.Categories + 21, // 8: api.v1.GetDefaultPrecompiledObjectResponse.precompiled_object:type_name -> api.v1.PrecompiledObject + 21, // 9: api.v1.Categories.Category.precompiled_objects:type_name -> api.v1.PrecompiledObject + 3, // 10: api.v1.PlaygroundService.RunCode:input_type -> api.v1.RunCodeRequest + 5, // 11: api.v1.PlaygroundService.CheckStatus:input_type -> api.v1.CheckStatusRequest + 13, // 12: api.v1.PlaygroundService.GetRunOutput:input_type -> api.v1.GetRunOutputRequest + 17, // 13: api.v1.PlaygroundService.GetLogs:input_type -> api.v1.GetLogsRequest + 15, // 14: api.v1.PlaygroundService.GetRunError:input_type -> api.v1.GetRunErrorRequest + 7, // 15: api.v1.PlaygroundService.GetValidationOutput:input_type -> api.v1.GetValidationOutputRequest + 9, // 16: api.v1.PlaygroundService.GetPreparationOutput:input_type -> api.v1.GetPreparationOutputRequest + 11, // 17: api.v1.PlaygroundService.GetCompileOutput:input_type -> api.v1.GetCompileOutputRequest + 19, // 18: api.v1.PlaygroundService.Cancel:input_type -> api.v1.CancelRequest + 23, // 19: api.v1.PlaygroundService.GetPrecompiledObjects:input_type -> api.v1.GetPrecompiledObjectsRequest + 24, // 20: api.v1.PlaygroundService.GetPrecompiledObjectCode:input_type -> api.v1.GetPrecompiledObjectCodeRequest + 25, // 21: api.v1.PlaygroundService.GetPrecompiledObjectOutput:input_type -> api.v1.GetPrecompiledObjectOutputRequest + 26, // 22: api.v1.PlaygroundService.GetPrecompiledObjectLogs:input_type -> api.v1.GetPrecompiledObjectLogsRequest + 27, // 23: api.v1.PlaygroundService.GetDefaultPrecompiledObject:input_type -> api.v1.GetDefaultPrecompiledObjectRequest + 4, // 24: api.v1.PlaygroundService.RunCode:output_type -> api.v1.RunCodeResponse + 6, // 25: api.v1.PlaygroundService.CheckStatus:output_type -> api.v1.CheckStatusResponse + 14, // 26: api.v1.PlaygroundService.GetRunOutput:output_type -> api.v1.GetRunOutputResponse + 18, // 27: api.v1.PlaygroundService.GetLogs:output_type -> api.v1.GetLogsResponse + 16, // 28: api.v1.PlaygroundService.GetRunError:output_type -> api.v1.GetRunErrorResponse + 8, // 29: api.v1.PlaygroundService.GetValidationOutput:output_type -> api.v1.GetValidationOutputResponse + 10, // 30: api.v1.PlaygroundService.GetPreparationOutput:output_type -> api.v1.GetPreparationOutputResponse + 12, // 31: api.v1.PlaygroundService.GetCompileOutput:output_type -> api.v1.GetCompileOutputResponse + 20, // 32: api.v1.PlaygroundService.Cancel:output_type -> api.v1.CancelResponse + 28, // 33: api.v1.PlaygroundService.GetPrecompiledObjects:output_type -> api.v1.GetPrecompiledObjectsResponse + 29, // 34: api.v1.PlaygroundService.GetPrecompiledObjectCode:output_type -> api.v1.GetPrecompiledObjectCodeResponse + 30, // 35: api.v1.PlaygroundService.GetPrecompiledObjectOutput:output_type -> api.v1.GetPrecompiledObjectOutputResponse + 31, // 36: api.v1.PlaygroundService.GetPrecompiledObjectLogs:output_type -> api.v1.GetPrecompiledObjectLogsResponse + 32, // 37: api.v1.PlaygroundService.GetDefaultPrecompiledObject:output_type -> api.v1.GetDefaultPrecompiledObjectResponse + 24, // [24:38] is the sub-list for method output_type + 10, // [10:24] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_api_v1_api_proto_init() } @@ -2308,7 +2429,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectsResponse); i { + switch v := v.(*GetDefaultPrecompiledObjectRequest); i { case 0: return &v.state case 1: @@ -2320,7 +2441,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectCodeResponse); i { + switch v := v.(*GetPrecompiledObjectsResponse); i { case 0: return &v.state case 1: @@ -2332,7 +2453,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectOutputResponse); i { + switch v := v.(*GetPrecompiledObjectCodeResponse); i { case 0: return &v.state case 1: @@ -2344,7 +2465,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectLogsResponse); i { + switch v := v.(*GetPrecompiledObjectOutputResponse); i { case 0: return &v.state case 1: @@ -2356,6 +2477,30 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPrecompiledObjectLogsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_api_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDefaultPrecompiledObjectResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_api_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Categories_Category); i { case 0: return &v.state @@ -2374,7 +2519,7 @@ func file_api_v1_api_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_v1_api_proto_rawDesc, NumEnums: 3, - NumMessages: 29, + NumMessages: 31, NumExtensions: 0, NumServices: 1, }, diff --git a/playground/backend/internal/api/v1/api_grpc.pb.go b/playground/backend/internal/api/v1/api_grpc.pb.go index aa1736c2397f..e01f9461b38f 100644 --- a/playground/backend/internal/api/v1/api_grpc.pb.go +++ b/playground/backend/internal/api/v1/api_grpc.pb.go @@ -61,6 +61,8 @@ type PlaygroundServiceClient interface { GetPrecompiledObjectOutput(ctx context.Context, in *GetPrecompiledObjectOutputRequest, opts ...grpc.CallOption) (*GetPrecompiledObjectOutputResponse, error) // Get the logs of an PrecompiledObject. GetPrecompiledObjectLogs(ctx context.Context, in *GetPrecompiledObjectLogsRequest, opts ...grpc.CallOption) (*GetPrecompiledObjectLogsResponse, error) + // Get the default precompile object for the sdk. + GetDefaultPrecompiledObject(ctx context.Context, in *GetDefaultPrecompiledObjectRequest, opts ...grpc.CallOption) (*GetDefaultPrecompiledObjectResponse, error) } type playgroundServiceClient struct { @@ -188,6 +190,15 @@ func (c *playgroundServiceClient) GetPrecompiledObjectLogs(ctx context.Context, return out, nil } +func (c *playgroundServiceClient) GetDefaultPrecompiledObject(ctx context.Context, in *GetDefaultPrecompiledObjectRequest, opts ...grpc.CallOption) (*GetDefaultPrecompiledObjectResponse, error) { + out := new(GetDefaultPrecompiledObjectResponse) + err := c.cc.Invoke(ctx, "/api.v1.PlaygroundService/GetDefaultPrecompiledObject", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // PlaygroundServiceServer is the server API for PlaygroundService service. // All implementations should embed UnimplementedPlaygroundServiceServer // for forward compatibility @@ -218,6 +229,8 @@ type PlaygroundServiceServer interface { GetPrecompiledObjectOutput(context.Context, *GetPrecompiledObjectOutputRequest) (*GetPrecompiledObjectOutputResponse, error) // Get the logs of an PrecompiledObject. GetPrecompiledObjectLogs(context.Context, *GetPrecompiledObjectLogsRequest) (*GetPrecompiledObjectLogsResponse, error) + // Get the default precompile object for the sdk. + GetDefaultPrecompiledObject(context.Context, *GetDefaultPrecompiledObjectRequest) (*GetDefaultPrecompiledObjectResponse, error) } // UnimplementedPlaygroundServiceServer should be embedded to have forward compatible implementations. @@ -263,6 +276,9 @@ func (UnimplementedPlaygroundServiceServer) GetPrecompiledObjectOutput(context.C func (UnimplementedPlaygroundServiceServer) GetPrecompiledObjectLogs(context.Context, *GetPrecompiledObjectLogsRequest) (*GetPrecompiledObjectLogsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPrecompiledObjectLogs not implemented") } +func (UnimplementedPlaygroundServiceServer) GetDefaultPrecompiledObject(context.Context, *GetDefaultPrecompiledObjectRequest) (*GetDefaultPrecompiledObjectResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDefaultPrecompiledObject not implemented") +} // UnsafePlaygroundServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PlaygroundServiceServer will @@ -509,6 +525,24 @@ func _PlaygroundService_GetPrecompiledObjectLogs_Handler(srv interface{}, ctx co return interceptor(ctx, in, info, handler) } +func _PlaygroundService_GetDefaultPrecompiledObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDefaultPrecompiledObjectRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PlaygroundServiceServer).GetDefaultPrecompiledObject(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.PlaygroundService/GetDefaultPrecompiledObject", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PlaygroundServiceServer).GetDefaultPrecompiledObject(ctx, req.(*GetDefaultPrecompiledObjectRequest)) + } + return interceptor(ctx, in, info, handler) +} + // PlaygroundService_ServiceDesc is the grpc.ServiceDesc for PlaygroundService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -568,6 +602,10 @@ var PlaygroundService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetPrecompiledObjectLogs", Handler: _PlaygroundService_GetPrecompiledObjectLogs_Handler, }, + { + MethodName: "GetDefaultPrecompiledObject", + Handler: _PlaygroundService_GetDefaultPrecompiledObject_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/api.proto", diff --git a/playground/backend/internal/cloud_bucket/precompiled_objects.go b/playground/backend/internal/cloud_bucket/precompiled_objects.go index 07215e0333d4..0baf54e65554 100644 --- a/playground/backend/internal/cloud_bucket/precompiled_objects.go +++ b/playground/backend/internal/cloud_bucket/precompiled_objects.go @@ -32,16 +32,18 @@ import ( ) const ( - BucketName = "playground-precompiled-objects" - OutputExtension = "output" - LogsExtension = "log" - MetaInfoName = "meta.info" - Timeout = time.Second * 10 - javaExtension = "java" - goExtension = "go" - pyExtension = "py" - scioExtension = "scala" - separatorsNumber = 2 + BucketName = "playground-precompiled-objects" + OutputExtension = "output" + LogsExtension = "log" + MetaInfoName = "meta.info" + Timeout = time.Second * 10 + javaExtension = "java" + goExtension = "go" + pyExtension = "py" + scioExtension = "scala" + separatorsNumber = 2 + defaultExamplesConfigName = "DEFAULT_EXAMPLES.json" + configFolderName = "configs" ) type ObjectInfo struct { @@ -93,8 +95,8 @@ func New() *CloudStorage { return &CloudStorage{} } -// GetPrecompiledObject returns the source code of the example -func (cd *CloudStorage) GetPrecompiledObject(ctx context.Context, precompiledObjectPath string) (string, error) { +// GetPrecompiledObjectCode returns the source code of the example +func (cd *CloudStorage) GetPrecompiledObjectCode(ctx context.Context, precompiledObjectPath string) (string, error) { extension, err := getFileExtensionBySdk(precompiledObjectPath) if err != nil { return "", err @@ -173,6 +175,28 @@ func (cd *CloudStorage) GetPrecompiledObjects(ctx context.Context, targetSdk pb. return &precompiledObjects, nil } +// GetDefaultPrecompileObject returns the default precompiled object for the sdk +func (cd *CloudStorage) GetDefaultPrecompileObject(ctx context.Context, targetSdk pb.Sdk, workingDir string) (*ObjectInfo, error) { + defaultExampleToSdk, err := getDefaultExamplesFromJson(workingDir) + + infoPath := filepath.Join(defaultExampleToSdk[targetSdk.String()], MetaInfoName) + metaInfo, err := cd.getFileFromBucket(ctx, infoPath, "") + if err != nil { + return nil, err + } + + precompiledObject := ObjectInfo{} + err = json.Unmarshal(metaInfo, &precompiledObject) + if err != nil { + logger.Errorf("json.Unmarshal: %v", err.Error()) + return nil, err + } + + precompiledObject.CloudPath = filepath.Dir(infoPath) + + return &precompiledObject, nil +} + // getPrecompiledObjectsDirs finds directories with precompiled objects // Since there is no notion of directory at cloud storage, then // to avoid duplicates of a base path (directory) need to store it in a set/map. @@ -267,6 +291,9 @@ func getFileExtensionBySdk(precompiledObjectPath string) (string, error) { // getFullFilePath get full path to the precompiled object file func getFullFilePath(objectDir string, extension string) string { + if extension == "" { + return objectDir + } precompiledObjectName := filepath.Base(objectDir) //the base of the object's directory matches the name of the file fileName := strings.Join([]string{precompiledObjectName, extension}, ".") filePath := filepath.Join(objectDir, fileName) @@ -288,3 +315,18 @@ func getSdkName(path string) string { sdkName := strings.Split(path, string(os.PathSeparator))[0] // the path of the form "sdkName/example/", where the first part is sdkName return sdkName } + +// getDefaultExamplesFromJson reads a json file that contains information about default examples for sdk and converts him to map +func getDefaultExamplesFromJson(workingDir string) (map[string]string, error) { + defaultExampleToSdk := map[string]string{} + configPath := filepath.Join(workingDir, configFolderName, defaultExamplesConfigName) + file, err := ioutil.ReadFile(configPath) + if err != nil { + return nil, err + } + err = json.Unmarshal(file, &defaultExampleToSdk) + if err != nil { + return nil, err + } + return defaultExampleToSdk, nil +} diff --git a/playground/backend/internal/cloud_bucket/precompiled_objects_test.go b/playground/backend/internal/cloud_bucket/precompiled_objects_test.go index a7114cdb2ad0..c3bf69fa79d2 100644 --- a/playground/backend/internal/cloud_bucket/precompiled_objects_test.go +++ b/playground/backend/internal/cloud_bucket/precompiled_objects_test.go @@ -18,6 +18,10 @@ package cloud_bucket import ( pb "beam.apache.org/playground/backend/internal/api/v1" "context" + "fmt" + "io/fs" + "os" + "path/filepath" "reflect" "testing" ) @@ -25,6 +29,7 @@ import ( const ( precompiledObjectPath = "SDK_JAVA/MinimalWordCount" targetSdk = pb.Sdk_SDK_UNSPECIFIED + defaultExamplesConfig = "{\n \"SDK_JAVA\": \"1\",\n \"SDK_GO\": \"2\",\n \"SDK_PYTHON\": \"3\"\n}" ) var bucket *CloudStorage @@ -35,6 +40,35 @@ func init() { ctx = context.Background() } +func TestMain(m *testing.M) { + err := setup() + if err != nil { + panic(fmt.Errorf("error during test setup: %s", err.Error())) + } + defer teardown() + m.Run() +} + +func setup() error { + err := os.Mkdir(configFolderName, fs.ModePerm) + if err != nil { + return err + } + filePath := filepath.Join(configFolderName, defaultExamplesConfigName) + err = os.WriteFile(filePath, []byte(defaultExamplesConfig), 0600) + if err != nil { + return err + } + return nil +} + +func teardown() { + err := os.RemoveAll(configFolderName) + if err != nil { + panic(fmt.Errorf("error during test setup: %s", err.Error())) + } +} + func Test_getFullFilePath(t *testing.T) { type args struct { examplePath string @@ -250,6 +284,50 @@ func Benchmark_GetPrecompiledObjectOutput(b *testing.B) { func Benchmark_GetPrecompiledObject(b *testing.B) { for i := 0; i < b.N; i++ { - _, _ = bucket.GetPrecompiledObject(ctx, precompiledObjectPath) + _, _ = bucket.GetPrecompiledObjectCode(ctx, precompiledObjectPath) + } +} + +func Benchmark_GetDefaultPrecompileObject(b *testing.B) { + for i := 0; i < b.N; i++ { + _, _ = bucket.GetDefaultPrecompileObject(ctx, targetSdk, "") + } +} + +func Test_getDefaultExamplesFromJson(t *testing.T) { + expectedMap := map[string]string{"SDK_JAVA": "1", "SDK_GO": "2", "SDK_PYTHON": "3"} + type args struct { + workingDir string + } + tests := []struct { + name string + args args + want map[string]string + wantErr bool + }{ + { + name: "get object from json", + args: args{workingDir: ""}, + want: expectedMap, + wantErr: false, + }, + { + name: "error if wrong json path", + args: args{workingDir: "Wrong_path"}, + want: nil, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := getDefaultExamplesFromJson(tt.args.workingDir) + if (err != nil) != tt.wantErr { + t.Errorf("getDefaultExamplesFromJson() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("getDefaultExamplesFromJson() got = %v, want %v", got, tt.want) + } + }) } } diff --git a/playground/frontend/lib/api/v1/api.pb.dart b/playground/frontend/lib/api/v1/api.pb.dart index ecd6ca10cd8d..fd169ef51bd9 100644 --- a/playground/frontend/lib/api/v1/api.pb.dart +++ b/playground/frontend/lib/api/v1/api.pb.dart @@ -17,6 +17,12 @@ */ /// +// Generated code. Do not modify. +// source: api/v1/api.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields + import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; @@ -234,10 +240,7 @@ class CheckStatusResponse extends $pb.GeneratedMessage { @$pb.TagNumber(1) Status get status => $_getN(0); @$pb.TagNumber(1) - set status(Status v) { - setField(1, v); - } - + set status(Status v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasStatus() => $_has(0); @$pb.TagNumber(1) @@ -245,24 +248,12 @@ class CheckStatusResponse extends $pb.GeneratedMessage { } class GetValidationOutputRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'GetValidationOutputRequest', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'api.v1'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'pipelineUuid') - ..hasRequiredFields = false; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetValidationOutputRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pipelineUuid') + ..hasRequiredFields = false + ; GetValidationOutputRequest._() : super(); - factory GetValidationOutputRequest({ $core.String? pipelineUuid, }) { @@ -272,52 +263,31 @@ class GetValidationOutputRequest extends $pb.GeneratedMessage { } return _result; } - - factory GetValidationOutputRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - - factory GetValidationOutputRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetValidationOutputRequest clone() => - GetValidationOutputRequest()..mergeFromMessage(this); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetValidationOutputRequest copyWith( - void Function(GetValidationOutputRequest) updates) => - super.copyWith( - (message) => updates(message as GetValidationOutputRequest)) - as GetValidationOutputRequest; // ignore: deprecated_member_use + factory GetValidationOutputRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetValidationOutputRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetValidationOutputRequest clone() => GetValidationOutputRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetValidationOutputRequest copyWith(void Function(GetValidationOutputRequest) updates) => super.copyWith((message) => updates(message as GetValidationOutputRequest)) as GetValidationOutputRequest; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') static GetValidationOutputRequest create() => GetValidationOutputRequest._(); - GetValidationOutputRequest createEmptyInstance() => create(); - - static $pb.PbList createRepeated() => - $pb.PbList(); - + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetValidationOutputRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static GetValidationOutputRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GetValidationOutputRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get pipelineUuid => $_getSZ(0); - @$pb.TagNumber(1) - set pipelineUuid($core.String v) { - $_setString(0, v); - } - + set pipelineUuid($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasPipelineUuid() => $_has(0); @$pb.TagNumber(1) @@ -325,24 +295,12 @@ class GetValidationOutputRequest extends $pb.GeneratedMessage { } class GetValidationOutputResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'GetValidationOutputResponse', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'api.v1'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'output') - ..hasRequiredFields = false; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetValidationOutputResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'output') + ..hasRequiredFields = false + ; GetValidationOutputResponse._() : super(); - factory GetValidationOutputResponse({ $core.String? output, }) { @@ -352,53 +310,31 @@ class GetValidationOutputResponse extends $pb.GeneratedMessage { } return _result; } - - factory GetValidationOutputResponse.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - - factory GetValidationOutputResponse.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetValidationOutputResponse clone() => - GetValidationOutputResponse()..mergeFromMessage(this); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetValidationOutputResponse copyWith( - void Function(GetValidationOutputResponse) updates) => - super.copyWith( - (message) => updates(message as GetValidationOutputResponse)) - as GetValidationOutputResponse; // ignore: deprecated_member_use + factory GetValidationOutputResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetValidationOutputResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetValidationOutputResponse clone() => GetValidationOutputResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetValidationOutputResponse copyWith(void Function(GetValidationOutputResponse) updates) => super.copyWith((message) => updates(message as GetValidationOutputResponse)) as GetValidationOutputResponse; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetValidationOutputResponse create() => - GetValidationOutputResponse._(); - + static GetValidationOutputResponse create() => GetValidationOutputResponse._(); GetValidationOutputResponse createEmptyInstance() => create(); - - static $pb.PbList createRepeated() => - $pb.PbList(); - + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetValidationOutputResponse getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static GetValidationOutputResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GetValidationOutputResponse? _defaultInstance; @$pb.TagNumber(1) $core.String get output => $_getSZ(0); - @$pb.TagNumber(1) - set output($core.String v) { - $_setString(0, v); - } - + set output($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasOutput() => $_has(0); @$pb.TagNumber(1) @@ -406,24 +342,12 @@ class GetValidationOutputResponse extends $pb.GeneratedMessage { } class GetPreparationOutputRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'GetPreparationOutputRequest', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'api.v1'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'pipelineUuid') - ..hasRequiredFields = false; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPreparationOutputRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pipelineUuid') + ..hasRequiredFields = false + ; GetPreparationOutputRequest._() : super(); - factory GetPreparationOutputRequest({ $core.String? pipelineUuid, }) { @@ -433,53 +357,31 @@ class GetPreparationOutputRequest extends $pb.GeneratedMessage { } return _result; } - - factory GetPreparationOutputRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - - factory GetPreparationOutputRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetPreparationOutputRequest clone() => - GetPreparationOutputRequest()..mergeFromMessage(this); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetPreparationOutputRequest copyWith( - void Function(GetPreparationOutputRequest) updates) => - super.copyWith( - (message) => updates(message as GetPreparationOutputRequest)) - as GetPreparationOutputRequest; // ignore: deprecated_member_use + factory GetPreparationOutputRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPreparationOutputRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPreparationOutputRequest clone() => GetPreparationOutputRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPreparationOutputRequest copyWith(void Function(GetPreparationOutputRequest) updates) => super.copyWith((message) => updates(message as GetPreparationOutputRequest)) as GetPreparationOutputRequest; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetPreparationOutputRequest create() => - GetPreparationOutputRequest._(); - + static GetPreparationOutputRequest create() => GetPreparationOutputRequest._(); GetPreparationOutputRequest createEmptyInstance() => create(); - - static $pb.PbList createRepeated() => - $pb.PbList(); - + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetPreparationOutputRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static GetPreparationOutputRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GetPreparationOutputRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get pipelineUuid => $_getSZ(0); - @$pb.TagNumber(1) - set pipelineUuid($core.String v) { - $_setString(0, v); - } - + set pipelineUuid($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasPipelineUuid() => $_has(0); @$pb.TagNumber(1) @@ -487,24 +389,12 @@ class GetPreparationOutputRequest extends $pb.GeneratedMessage { } class GetPreparationOutputResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'GetPreparationOutputResponse', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'api.v1'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'output') - ..hasRequiredFields = false; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPreparationOutputResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'output') + ..hasRequiredFields = false + ; GetPreparationOutputResponse._() : super(); - factory GetPreparationOutputResponse({ $core.String? output, }) { @@ -514,53 +404,31 @@ class GetPreparationOutputResponse extends $pb.GeneratedMessage { } return _result; } - - factory GetPreparationOutputResponse.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - - factory GetPreparationOutputResponse.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetPreparationOutputResponse clone() => - GetPreparationOutputResponse()..mergeFromMessage(this); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetPreparationOutputResponse copyWith( - void Function(GetPreparationOutputResponse) updates) => - super.copyWith( - (message) => updates(message as GetPreparationOutputResponse)) - as GetPreparationOutputResponse; // ignore: deprecated_member_use + factory GetPreparationOutputResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPreparationOutputResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPreparationOutputResponse clone() => GetPreparationOutputResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPreparationOutputResponse copyWith(void Function(GetPreparationOutputResponse) updates) => super.copyWith((message) => updates(message as GetPreparationOutputResponse)) as GetPreparationOutputResponse; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetPreparationOutputResponse create() => - GetPreparationOutputResponse._(); - + static GetPreparationOutputResponse create() => GetPreparationOutputResponse._(); GetPreparationOutputResponse createEmptyInstance() => create(); - - static $pb.PbList createRepeated() => - $pb.PbList(); - + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetPreparationOutputResponse getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static GetPreparationOutputResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GetPreparationOutputResponse? _defaultInstance; @$pb.TagNumber(1) $core.String get output => $_getSZ(0); - @$pb.TagNumber(1) - set output($core.String v) { - $_setString(0, v); - } - + set output($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasOutput() => $_has(0); @$pb.TagNumber(1) @@ -568,24 +436,12 @@ class GetPreparationOutputResponse extends $pb.GeneratedMessage { } class GetCompileOutputRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'GetCompileOutputRequest', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'api.v1'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'pipelineUuid') - ..hasRequiredFields = false; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetCompileOutputRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pipelineUuid') + ..hasRequiredFields = false + ; GetCompileOutputRequest._() : super(); - factory GetCompileOutputRequest({ $core.String? pipelineUuid, }) { @@ -1226,22 +1082,15 @@ class Categories extends $pb.GeneratedMessage { @$core.pragma('dart2js:noInline') static Categories create() => Categories._(); Categories createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static Categories getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static Categories getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Categories? _defaultInstance; @$pb.TagNumber(1) Sdk get sdk => $_getN(0); - @$pb.TagNumber(1) - set sdk(Sdk v) { - setField(1, v); - } - + set sdk(Sdk v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasSdk() => $_has(0); @$pb.TagNumber(1) @@ -1252,33 +1101,13 @@ class Categories extends $pb.GeneratedMessage { } class GetPrecompiledObjectsRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'GetPrecompiledObjectsRequest', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'api.v1'), - createEmptyInstance: create) - ..e( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'sdk', - $pb.PbFieldType.OE, - defaultOrMaker: Sdk.SDK_UNSPECIFIED, - valueOf: Sdk.valueOf, - enumValues: Sdk.values) - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'category') - ..hasRequiredFields = false; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPrecompiledObjectsRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..e(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sdk', $pb.PbFieldType.OE, defaultOrMaker: Sdk.SDK_UNSPECIFIED, valueOf: Sdk.valueOf, enumValues: Sdk.values) + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'category') + ..hasRequiredFields = false + ; GetPrecompiledObjectsRequest._() : super(); - factory GetPrecompiledObjectsRequest({ Sdk? sdk, $core.String? category, @@ -1292,53 +1121,31 @@ class GetPrecompiledObjectsRequest extends $pb.GeneratedMessage { } return _result; } - - factory GetPrecompiledObjectsRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - - factory GetPrecompiledObjectsRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetPrecompiledObjectsRequest clone() => - GetPrecompiledObjectsRequest()..mergeFromMessage(this); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetPrecompiledObjectsRequest copyWith( - void Function(GetPrecompiledObjectsRequest) updates) => - super.copyWith( - (message) => updates(message as GetPrecompiledObjectsRequest)) - as GetPrecompiledObjectsRequest; // ignore: deprecated_member_use + factory GetPrecompiledObjectsRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPrecompiledObjectsRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectsRequest clone() => GetPrecompiledObjectsRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectsRequest copyWith(void Function(GetPrecompiledObjectsRequest) updates) => super.copyWith((message) => updates(message as GetPrecompiledObjectsRequest)) as GetPrecompiledObjectsRequest; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetPrecompiledObjectsRequest create() => - GetPrecompiledObjectsRequest._(); - + static GetPrecompiledObjectsRequest create() => GetPrecompiledObjectsRequest._(); GetPrecompiledObjectsRequest createEmptyInstance() => create(); - - static $pb.PbList createRepeated() => - $pb.PbList(); - + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetPrecompiledObjectsRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static GetPrecompiledObjectsRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GetPrecompiledObjectsRequest? _defaultInstance; @$pb.TagNumber(1) Sdk get sdk => $_getN(0); - @$pb.TagNumber(1) - set sdk(Sdk v) { - setField(1, v); - } - + set sdk(Sdk v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasSdk() => $_has(0); @$pb.TagNumber(1) @@ -1346,12 +1153,8 @@ class GetPrecompiledObjectsRequest extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get category => $_getSZ(1); - @$pb.TagNumber(2) - set category($core.String v) { - $_setString(1, v); - } - + set category($core.String v) { $_setString(1, v); } @$pb.TagNumber(2) $core.bool hasCategory() => $_has(1); @$pb.TagNumber(2) @@ -1359,24 +1162,12 @@ class GetPrecompiledObjectsRequest extends $pb.GeneratedMessage { } class GetPrecompiledObjectCodeRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'GetPrecompiledObjectCodeRequest', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'api.v1'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'cloudPath') - ..hasRequiredFields = false; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPrecompiledObjectCodeRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cloudPath') + ..hasRequiredFields = false + ; GetPrecompiledObjectCodeRequest._() : super(); - factory GetPrecompiledObjectCodeRequest({ $core.String? cloudPath, }) { @@ -1386,54 +1177,31 @@ class GetPrecompiledObjectCodeRequest extends $pb.GeneratedMessage { } return _result; } - - factory GetPrecompiledObjectCodeRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - - factory GetPrecompiledObjectCodeRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetPrecompiledObjectCodeRequest clone() => - GetPrecompiledObjectCodeRequest()..mergeFromMessage(this); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetPrecompiledObjectCodeRequest copyWith( - void Function(GetPrecompiledObjectCodeRequest) updates) => - super.copyWith( - (message) => updates(message as GetPrecompiledObjectCodeRequest)) - as GetPrecompiledObjectCodeRequest; // ignore: deprecated_member_use + factory GetPrecompiledObjectCodeRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPrecompiledObjectCodeRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectCodeRequest clone() => GetPrecompiledObjectCodeRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectCodeRequest copyWith(void Function(GetPrecompiledObjectCodeRequest) updates) => super.copyWith((message) => updates(message as GetPrecompiledObjectCodeRequest)) as GetPrecompiledObjectCodeRequest; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetPrecompiledObjectCodeRequest create() => - GetPrecompiledObjectCodeRequest._(); - + static GetPrecompiledObjectCodeRequest create() => GetPrecompiledObjectCodeRequest._(); GetPrecompiledObjectCodeRequest createEmptyInstance() => create(); - - static $pb.PbList createRepeated() => - $pb.PbList(); - + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetPrecompiledObjectCodeRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor( - create); + static GetPrecompiledObjectCodeRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GetPrecompiledObjectCodeRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get cloudPath => $_getSZ(0); - @$pb.TagNumber(1) - set cloudPath($core.String v) { - $_setString(0, v); - } - + set cloudPath($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasCloudPath() => $_has(0); @$pb.TagNumber(1) @@ -1441,24 +1209,12 @@ class GetPrecompiledObjectCodeRequest extends $pb.GeneratedMessage { } class GetPrecompiledObjectOutputRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'GetPrecompiledObjectOutputRequest', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'api.v1'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'cloudPath') - ..hasRequiredFields = false; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPrecompiledObjectOutputRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cloudPath') + ..hasRequiredFields = false + ; GetPrecompiledObjectOutputRequest._() : super(); - factory GetPrecompiledObjectOutputRequest({ $core.String? cloudPath, }) { @@ -1468,54 +1224,31 @@ class GetPrecompiledObjectOutputRequest extends $pb.GeneratedMessage { } return _result; } - - factory GetPrecompiledObjectOutputRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - - factory GetPrecompiledObjectOutputRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetPrecompiledObjectOutputRequest clone() => - GetPrecompiledObjectOutputRequest()..mergeFromMessage(this); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetPrecompiledObjectOutputRequest copyWith( - void Function(GetPrecompiledObjectOutputRequest) updates) => - super.copyWith((message) => - updates(message as GetPrecompiledObjectOutputRequest)) - as GetPrecompiledObjectOutputRequest; // ignore: deprecated_member_use + factory GetPrecompiledObjectOutputRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPrecompiledObjectOutputRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectOutputRequest clone() => GetPrecompiledObjectOutputRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectOutputRequest copyWith(void Function(GetPrecompiledObjectOutputRequest) updates) => super.copyWith((message) => updates(message as GetPrecompiledObjectOutputRequest)) as GetPrecompiledObjectOutputRequest; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetPrecompiledObjectOutputRequest create() => - GetPrecompiledObjectOutputRequest._(); - + static GetPrecompiledObjectOutputRequest create() => GetPrecompiledObjectOutputRequest._(); GetPrecompiledObjectOutputRequest createEmptyInstance() => create(); - - static $pb.PbList createRepeated() => - $pb.PbList(); - + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetPrecompiledObjectOutputRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor( - create); + static GetPrecompiledObjectOutputRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GetPrecompiledObjectOutputRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get cloudPath => $_getSZ(0); - @$pb.TagNumber(1) - set cloudPath($core.String v) { - $_setString(0, v); - } - + set cloudPath($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasCloudPath() => $_has(0); @$pb.TagNumber(1) @@ -1523,24 +1256,12 @@ class GetPrecompiledObjectOutputRequest extends $pb.GeneratedMessage { } class GetPrecompiledObjectLogsRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'GetPrecompiledObjectLogsRequest', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'api.v1'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'cloudPath') - ..hasRequiredFields = false; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPrecompiledObjectLogsRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cloudPath') + ..hasRequiredFields = false + ; GetPrecompiledObjectLogsRequest._() : super(); - factory GetPrecompiledObjectLogsRequest({ $core.String? cloudPath, }) { @@ -1550,81 +1271,91 @@ class GetPrecompiledObjectLogsRequest extends $pb.GeneratedMessage { } return _result; } - - factory GetPrecompiledObjectLogsRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - - factory GetPrecompiledObjectLogsRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetPrecompiledObjectLogsRequest clone() => - GetPrecompiledObjectLogsRequest()..mergeFromMessage(this); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetPrecompiledObjectLogsRequest copyWith( - void Function(GetPrecompiledObjectLogsRequest) updates) => - super.copyWith( - (message) => updates(message as GetPrecompiledObjectLogsRequest)) - as GetPrecompiledObjectLogsRequest; // ignore: deprecated_member_use + factory GetPrecompiledObjectLogsRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPrecompiledObjectLogsRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectLogsRequest clone() => GetPrecompiledObjectLogsRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectLogsRequest copyWith(void Function(GetPrecompiledObjectLogsRequest) updates) => super.copyWith((message) => updates(message as GetPrecompiledObjectLogsRequest)) as GetPrecompiledObjectLogsRequest; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetPrecompiledObjectLogsRequest create() => - GetPrecompiledObjectLogsRequest._(); - + static GetPrecompiledObjectLogsRequest create() => GetPrecompiledObjectLogsRequest._(); GetPrecompiledObjectLogsRequest createEmptyInstance() => create(); - - static $pb.PbList createRepeated() => - $pb.PbList(); - + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetPrecompiledObjectLogsRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor( - create); + static GetPrecompiledObjectLogsRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GetPrecompiledObjectLogsRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get cloudPath => $_getSZ(0); - @$pb.TagNumber(1) - set cloudPath($core.String v) { - $_setString(0, v); - } - + set cloudPath($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasCloudPath() => $_has(0); @$pb.TagNumber(1) void clearCloudPath() => clearField(1); } +class GetDefaultPrecompiledObjectRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetDefaultPrecompiledObjectRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..e(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sdk', $pb.PbFieldType.OE, defaultOrMaker: Sdk.SDK_UNSPECIFIED, valueOf: Sdk.valueOf, enumValues: Sdk.values) + ..hasRequiredFields = false + ; + + GetDefaultPrecompiledObjectRequest._() : super(); + factory GetDefaultPrecompiledObjectRequest({ + Sdk? sdk, + }) { + final _result = create(); + if (sdk != null) { + _result.sdk = sdk; + } + return _result; + } + factory GetDefaultPrecompiledObjectRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetDefaultPrecompiledObjectRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetDefaultPrecompiledObjectRequest clone() => GetDefaultPrecompiledObjectRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetDefaultPrecompiledObjectRequest copyWith(void Function(GetDefaultPrecompiledObjectRequest) updates) => super.copyWith((message) => updates(message as GetDefaultPrecompiledObjectRequest)) as GetDefaultPrecompiledObjectRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetDefaultPrecompiledObjectRequest create() => GetDefaultPrecompiledObjectRequest._(); + GetDefaultPrecompiledObjectRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetDefaultPrecompiledObjectRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetDefaultPrecompiledObjectRequest? _defaultInstance; + + @$pb.TagNumber(1) + Sdk get sdk => $_getN(0); + @$pb.TagNumber(1) + set sdk(Sdk v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasSdk() => $_has(0); + @$pb.TagNumber(1) + void clearSdk() => clearField(1); +} + class GetPrecompiledObjectsResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'GetPrecompiledObjectsResponse', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'api.v1'), - createEmptyInstance: create) - ..pc( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'sdkCategories', - $pb.PbFieldType.PM, - subBuilder: Categories.create) - ..hasRequiredFields = false; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPrecompiledObjectsResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..pc(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sdkCategories', $pb.PbFieldType.PM, subBuilder: Categories.create) + ..hasRequiredFields = false + ; GetPrecompiledObjectsResponse._() : super(); - factory GetPrecompiledObjectsResponse({ $core.Iterable? sdkCategories, }) { @@ -1634,43 +1365,25 @@ class GetPrecompiledObjectsResponse extends $pb.GeneratedMessage { } return _result; } - - factory GetPrecompiledObjectsResponse.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - - factory GetPrecompiledObjectsResponse.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetPrecompiledObjectsResponse clone() => - GetPrecompiledObjectsResponse()..mergeFromMessage(this); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetPrecompiledObjectsResponse copyWith( - void Function(GetPrecompiledObjectsResponse) updates) => - super.copyWith( - (message) => updates(message as GetPrecompiledObjectsResponse)) - as GetPrecompiledObjectsResponse; // ignore: deprecated_member_use + factory GetPrecompiledObjectsResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPrecompiledObjectsResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectsResponse clone() => GetPrecompiledObjectsResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectsResponse copyWith(void Function(GetPrecompiledObjectsResponse) updates) => super.copyWith((message) => updates(message as GetPrecompiledObjectsResponse)) as GetPrecompiledObjectsResponse; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetPrecompiledObjectsResponse create() => - GetPrecompiledObjectsResponse._(); - + static GetPrecompiledObjectsResponse create() => GetPrecompiledObjectsResponse._(); GetPrecompiledObjectsResponse createEmptyInstance() => create(); - - static $pb.PbList createRepeated() => - $pb.PbList(); - + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetPrecompiledObjectsResponse getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static GetPrecompiledObjectsResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GetPrecompiledObjectsResponse? _defaultInstance; @$pb.TagNumber(1) @@ -1678,24 +1391,12 @@ class GetPrecompiledObjectsResponse extends $pb.GeneratedMessage { } class GetPrecompiledObjectCodeResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'GetPrecompiledObjectCodeResponse', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'api.v1'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'code') - ..hasRequiredFields = false; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPrecompiledObjectCodeResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'code') + ..hasRequiredFields = false + ; GetPrecompiledObjectCodeResponse._() : super(); - factory GetPrecompiledObjectCodeResponse({ $core.String? code, }) { @@ -1705,54 +1406,31 @@ class GetPrecompiledObjectCodeResponse extends $pb.GeneratedMessage { } return _result; } - - factory GetPrecompiledObjectCodeResponse.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - - factory GetPrecompiledObjectCodeResponse.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetPrecompiledObjectCodeResponse clone() => - GetPrecompiledObjectCodeResponse()..mergeFromMessage(this); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetPrecompiledObjectCodeResponse copyWith( - void Function(GetPrecompiledObjectCodeResponse) updates) => - super.copyWith( - (message) => updates(message as GetPrecompiledObjectCodeResponse)) - as GetPrecompiledObjectCodeResponse; // ignore: deprecated_member_use + factory GetPrecompiledObjectCodeResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPrecompiledObjectCodeResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectCodeResponse clone() => GetPrecompiledObjectCodeResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectCodeResponse copyWith(void Function(GetPrecompiledObjectCodeResponse) updates) => super.copyWith((message) => updates(message as GetPrecompiledObjectCodeResponse)) as GetPrecompiledObjectCodeResponse; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetPrecompiledObjectCodeResponse create() => - GetPrecompiledObjectCodeResponse._(); - + static GetPrecompiledObjectCodeResponse create() => GetPrecompiledObjectCodeResponse._(); GetPrecompiledObjectCodeResponse createEmptyInstance() => create(); - - static $pb.PbList createRepeated() => - $pb.PbList(); - + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetPrecompiledObjectCodeResponse getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor( - create); + static GetPrecompiledObjectCodeResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GetPrecompiledObjectCodeResponse? _defaultInstance; @$pb.TagNumber(1) $core.String get code => $_getSZ(0); - @$pb.TagNumber(1) - set code($core.String v) { - $_setString(0, v); - } - + set code($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasCode() => $_has(0); @$pb.TagNumber(1) @@ -1760,24 +1438,12 @@ class GetPrecompiledObjectCodeResponse extends $pb.GeneratedMessage { } class GetPrecompiledObjectOutputResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'GetPrecompiledObjectOutputResponse', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'api.v1'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'output') - ..hasRequiredFields = false; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPrecompiledObjectOutputResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'output') + ..hasRequiredFields = false + ; GetPrecompiledObjectOutputResponse._() : super(); - factory GetPrecompiledObjectOutputResponse({ $core.String? output, }) { @@ -1787,54 +1453,31 @@ class GetPrecompiledObjectOutputResponse extends $pb.GeneratedMessage { } return _result; } - - factory GetPrecompiledObjectOutputResponse.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - - factory GetPrecompiledObjectOutputResponse.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetPrecompiledObjectOutputResponse clone() => - GetPrecompiledObjectOutputResponse()..mergeFromMessage(this); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetPrecompiledObjectOutputResponse copyWith( - void Function(GetPrecompiledObjectOutputResponse) updates) => - super.copyWith((message) => - updates(message as GetPrecompiledObjectOutputResponse)) - as GetPrecompiledObjectOutputResponse; // ignore: deprecated_member_use + factory GetPrecompiledObjectOutputResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPrecompiledObjectOutputResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectOutputResponse clone() => GetPrecompiledObjectOutputResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectOutputResponse copyWith(void Function(GetPrecompiledObjectOutputResponse) updates) => super.copyWith((message) => updates(message as GetPrecompiledObjectOutputResponse)) as GetPrecompiledObjectOutputResponse; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetPrecompiledObjectOutputResponse create() => - GetPrecompiledObjectOutputResponse._(); - + static GetPrecompiledObjectOutputResponse create() => GetPrecompiledObjectOutputResponse._(); GetPrecompiledObjectOutputResponse createEmptyInstance() => create(); - - static $pb.PbList createRepeated() => - $pb.PbList(); - + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetPrecompiledObjectOutputResponse getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor( - create); + static GetPrecompiledObjectOutputResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GetPrecompiledObjectOutputResponse? _defaultInstance; @$pb.TagNumber(1) $core.String get output => $_getSZ(0); - @$pb.TagNumber(1) - set output($core.String v) { - $_setString(0, v); - } - + set output($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasOutput() => $_has(0); @$pb.TagNumber(1) @@ -1842,24 +1485,12 @@ class GetPrecompiledObjectOutputResponse extends $pb.GeneratedMessage { } class GetPrecompiledObjectLogsResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'GetPrecompiledObjectLogsResponse', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'api.v1'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'output') - ..hasRequiredFields = false; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPrecompiledObjectLogsResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'output') + ..hasRequiredFields = false + ; GetPrecompiledObjectLogsResponse._() : super(); - factory GetPrecompiledObjectLogsResponse({ $core.String? output, }) { @@ -1869,57 +1500,83 @@ class GetPrecompiledObjectLogsResponse extends $pb.GeneratedMessage { } return _result; } - - factory GetPrecompiledObjectLogsResponse.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - - factory GetPrecompiledObjectLogsResponse.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetPrecompiledObjectLogsResponse clone() => - GetPrecompiledObjectLogsResponse()..mergeFromMessage(this); - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetPrecompiledObjectLogsResponse copyWith( - void Function(GetPrecompiledObjectLogsResponse) updates) => - super.copyWith( - (message) => updates(message as GetPrecompiledObjectLogsResponse)) - as GetPrecompiledObjectLogsResponse; // ignore: deprecated_member_use + factory GetPrecompiledObjectLogsResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPrecompiledObjectLogsResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectLogsResponse clone() => GetPrecompiledObjectLogsResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectLogsResponse copyWith(void Function(GetPrecompiledObjectLogsResponse) updates) => super.copyWith((message) => updates(message as GetPrecompiledObjectLogsResponse)) as GetPrecompiledObjectLogsResponse; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetPrecompiledObjectLogsResponse create() => - GetPrecompiledObjectLogsResponse._(); - + static GetPrecompiledObjectLogsResponse create() => GetPrecompiledObjectLogsResponse._(); GetPrecompiledObjectLogsResponse createEmptyInstance() => create(); - - static $pb.PbList createRepeated() => - $pb.PbList(); - + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetPrecompiledObjectLogsResponse getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor( - create); + static GetPrecompiledObjectLogsResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GetPrecompiledObjectLogsResponse? _defaultInstance; @$pb.TagNumber(1) $core.String get output => $_getSZ(0); - @$pb.TagNumber(1) - set output($core.String v) { - $_setString(0, v); - } - + set output($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasOutput() => $_has(0); @$pb.TagNumber(1) void clearOutput() => clearField(1); } +class GetDefaultPrecompiledObjectResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetDefaultPrecompiledObjectResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOM(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'precompiledObject', subBuilder: PrecompiledObject.create) + ..hasRequiredFields = false + ; + + GetDefaultPrecompiledObjectResponse._() : super(); + factory GetDefaultPrecompiledObjectResponse({ + PrecompiledObject? precompiledObject, + }) { + final _result = create(); + if (precompiledObject != null) { + _result.precompiledObject = precompiledObject; + } + return _result; + } + factory GetDefaultPrecompiledObjectResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetDefaultPrecompiledObjectResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetDefaultPrecompiledObjectResponse clone() => GetDefaultPrecompiledObjectResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetDefaultPrecompiledObjectResponse copyWith(void Function(GetDefaultPrecompiledObjectResponse) updates) => super.copyWith((message) => updates(message as GetDefaultPrecompiledObjectResponse)) as GetDefaultPrecompiledObjectResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetDefaultPrecompiledObjectResponse create() => GetDefaultPrecompiledObjectResponse._(); + GetDefaultPrecompiledObjectResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetDefaultPrecompiledObjectResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetDefaultPrecompiledObjectResponse? _defaultInstance; + + @$pb.TagNumber(1) + PrecompiledObject get precompiledObject => $_getN(0); + @$pb.TagNumber(1) + set precompiledObject(PrecompiledObject v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasPrecompiledObject() => $_has(0); + @$pb.TagNumber(1) + void clearPrecompiledObject() => clearField(1); + @$pb.TagNumber(1) + PrecompiledObject ensurePrecompiledObject() => $_ensure(0); +} + diff --git a/playground/frontend/lib/api/v1/api.pbgrpc.dart b/playground/frontend/lib/api/v1/api.pbgrpc.dart index a2d2b5616331..418568a3dc5a 100644 --- a/playground/frontend/lib/api/v1/api.pbgrpc.dart +++ b/playground/frontend/lib/api/v1/api.pbgrpc.dart @@ -17,13 +17,18 @@ */ /// +// Generated code. Do not modify. +// source: api/v1/api.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields + import 'dart:async' as $async; + import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; - import 'api.pb.dart' as $0; - export 'api.pb.dart'; class PlaygroundServiceClient extends $grpc.Client { @@ -107,6 +112,13 @@ class PlaygroundServiceClient extends $grpc.Client { ($0.GetPrecompiledObjectLogsRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $0.GetPrecompiledObjectLogsResponse.fromBuffer(value)); + static final _$getDefaultPrecompiledObject = $grpc.ClientMethod< + $0.GetDefaultPrecompiledObjectRequest, + $0.GetDefaultPrecompiledObjectResponse>( + '/api.v1.PlaygroundService/GetDefaultPrecompiledObject', + ($0.GetDefaultPrecompiledObjectRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.GetDefaultPrecompiledObjectResponse.fromBuffer(value)); PlaygroundServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -190,6 +202,13 @@ class PlaygroundServiceClient extends $grpc.Client { return $createUnaryCall(_$getPrecompiledObjectLogs, request, options: options); } + + $grpc.ResponseFuture<$0.GetDefaultPrecompiledObjectResponse> + getDefaultPrecompiledObject($0.GetDefaultPrecompiledObjectRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getDefaultPrecompiledObject, request, + options: options); + } } abstract class PlaygroundServiceBase extends $grpc.Service { @@ -308,6 +327,16 @@ abstract class PlaygroundServiceBase extends $grpc.Service { ($core.List<$core.int> value) => $0.GetPrecompiledObjectLogsRequest.fromBuffer(value), ($0.GetPrecompiledObjectLogsResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.GetDefaultPrecompiledObjectRequest, + $0.GetDefaultPrecompiledObjectResponse>( + 'GetDefaultPrecompiledObject', + getDefaultPrecompiledObject_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.GetDefaultPrecompiledObjectRequest.fromBuffer(value), + ($0.GetDefaultPrecompiledObjectResponse value) => + value.writeToBuffer())); } $async.Future<$0.RunCodeResponse> runCode_Pre( @@ -383,42 +412,40 @@ abstract class PlaygroundServiceBase extends $grpc.Service { return getPrecompiledObjectLogs(call, await request); } + $async.Future<$0.GetDefaultPrecompiledObjectResponse> + getDefaultPrecompiledObject_Pre($grpc.ServiceCall call, + $async.Future<$0.GetDefaultPrecompiledObjectRequest> request) async { + return getDefaultPrecompiledObject(call, await request); + } + $async.Future<$0.RunCodeResponse> runCode( $grpc.ServiceCall call, $0.RunCodeRequest request); - $async.Future<$0.CheckStatusResponse> checkStatus( $grpc.ServiceCall call, $0.CheckStatusRequest request); - $async.Future<$0.GetRunOutputResponse> getRunOutput( $grpc.ServiceCall call, $0.GetRunOutputRequest request); - $async.Future<$0.GetLogsResponse> getLogs( $grpc.ServiceCall call, $0.GetLogsRequest request); - $async.Future<$0.GetRunErrorResponse> getRunError( $grpc.ServiceCall call, $0.GetRunErrorRequest request); - $async.Future<$0.GetValidationOutputResponse> getValidationOutput( $grpc.ServiceCall call, $0.GetValidationOutputRequest request); - $async.Future<$0.GetPreparationOutputResponse> getPreparationOutput( $grpc.ServiceCall call, $0.GetPreparationOutputRequest request); - $async.Future<$0.GetCompileOutputResponse> getCompileOutput( $grpc.ServiceCall call, $0.GetCompileOutputRequest request); - $async.Future<$0.CancelResponse> cancel( $grpc.ServiceCall call, $0.CancelRequest request); - $async.Future<$0.GetPrecompiledObjectsResponse> getPrecompiledObjects( $grpc.ServiceCall call, $0.GetPrecompiledObjectsRequest request); - $async.Future<$0.GetPrecompiledObjectCodeResponse> getPrecompiledObjectCode( $grpc.ServiceCall call, $0.GetPrecompiledObjectCodeRequest request); - $async.Future<$0.GetPrecompiledObjectOutputResponse> getPrecompiledObjectOutput( $grpc.ServiceCall call, $0.GetPrecompiledObjectOutputRequest request); $async.Future<$0.GetPrecompiledObjectLogsResponse> getPrecompiledObjectLogs( $grpc.ServiceCall call, $0.GetPrecompiledObjectLogsRequest request); + $async.Future<$0.GetDefaultPrecompiledObjectResponse> + getDefaultPrecompiledObject($grpc.ServiceCall call, + $0.GetDefaultPrecompiledObjectRequest request); } diff --git a/playground/frontend/lib/api/v1/api.pbjson.dart b/playground/frontend/lib/api/v1/api.pbjson.dart index 36f3f0dccfc4..94edab5b1da3 100644 --- a/playground/frontend/lib/api/v1/api.pbjson.dart +++ b/playground/frontend/lib/api/v1/api.pbjson.dart @@ -17,8 +17,14 @@ */ /// -import 'dart:convert' as $convert; +// Generated code. Do not modify. +// source: api/v1/api.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package + import 'dart:core' as $core; +import 'dart:convert' as $convert; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use sdkDescriptor instead') const Sdk$json = const { @@ -100,26 +106,17 @@ const CheckStatusRequest$json = const { }; /// Descriptor for `CheckStatusRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List checkStatusRequestDescriptor = $convert.base64Decode( - 'ChJDaGVja1N0YXR1c1JlcXVlc3QSIwoNcGlwZWxpbmVfdXVpZBgBIAEoCVIMcGlwZWxpbmVVdWlk'); +final $typed_data.Uint8List checkStatusRequestDescriptor = $convert.base64Decode('ChJDaGVja1N0YXR1c1JlcXVlc3QSIwoNcGlwZWxpbmVfdXVpZBgBIAEoCVIMcGlwZWxpbmVVdWlk'); @$core.Deprecated('Use checkStatusResponseDescriptor instead') const CheckStatusResponse$json = const { '1': 'CheckStatusResponse', '2': const [ - const { - '1': 'status', - '3': 1, - '4': 1, - '5': 14, - '6': '.api.v1.Status', - '10': 'status' - }, + const {'1': 'status', '3': 1, '4': 1, '5': 14, '6': '.api.v1.Status', '10': 'status'}, ], }; /// Descriptor for `CheckStatusResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List checkStatusResponseDescriptor = $convert.base64Decode( - 'ChNDaGVja1N0YXR1c1Jlc3BvbnNlEiYKBnN0YXR1cxgBIAEoDjIOLmFwaS52MS5TdGF0dXNSBnN0YXR1cw=='); +final $typed_data.Uint8List checkStatusResponseDescriptor = $convert.base64Decode('ChNDaGVja1N0YXR1c1Jlc3BvbnNlEiYKBnN0YXR1cxgBIAEoDjIOLmFwaS52MS5TdGF0dXNSBnN0YXR1cw=='); @$core.Deprecated('Use getValidationOutputRequestDescriptor instead') const GetValidationOutputRequest$json = const { '1': 'GetValidationOutputRequest', @@ -129,9 +126,7 @@ const GetValidationOutputRequest$json = const { }; /// Descriptor for `GetValidationOutputRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getValidationOutputRequestDescriptor = - $convert.base64Decode( - 'ChpHZXRWYWxpZGF0aW9uT3V0cHV0UmVxdWVzdBIjCg1waXBlbGluZV91dWlkGAEgASgJUgxwaXBlbGluZVV1aWQ='); +final $typed_data.Uint8List getValidationOutputRequestDescriptor = $convert.base64Decode('ChpHZXRWYWxpZGF0aW9uT3V0cHV0UmVxdWVzdBIjCg1waXBlbGluZV91dWlkGAEgASgJUgxwaXBlbGluZVV1aWQ='); @$core.Deprecated('Use getValidationOutputResponseDescriptor instead') const GetValidationOutputResponse$json = const { '1': 'GetValidationOutputResponse', @@ -141,9 +136,7 @@ const GetValidationOutputResponse$json = const { }; /// Descriptor for `GetValidationOutputResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getValidationOutputResponseDescriptor = - $convert.base64Decode( - 'ChtHZXRWYWxpZGF0aW9uT3V0cHV0UmVzcG9uc2USFgoGb3V0cHV0GAEgASgJUgZvdXRwdXQ='); +final $typed_data.Uint8List getValidationOutputResponseDescriptor = $convert.base64Decode('ChtHZXRWYWxpZGF0aW9uT3V0cHV0UmVzcG9uc2USFgoGb3V0cHV0GAEgASgJUgZvdXRwdXQ='); @$core.Deprecated('Use getPreparationOutputRequestDescriptor instead') const GetPreparationOutputRequest$json = const { '1': 'GetPreparationOutputRequest', @@ -153,9 +146,7 @@ const GetPreparationOutputRequest$json = const { }; /// Descriptor for `GetPreparationOutputRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getPreparationOutputRequestDescriptor = - $convert.base64Decode( - 'ChtHZXRQcmVwYXJhdGlvbk91dHB1dFJlcXVlc3QSIwoNcGlwZWxpbmVfdXVpZBgBIAEoCVIMcGlwZWxpbmVVdWlk'); +final $typed_data.Uint8List getPreparationOutputRequestDescriptor = $convert.base64Decode('ChtHZXRQcmVwYXJhdGlvbk91dHB1dFJlcXVlc3QSIwoNcGlwZWxpbmVfdXVpZBgBIAEoCVIMcGlwZWxpbmVVdWlk'); @$core.Deprecated('Use getPreparationOutputResponseDescriptor instead') const GetPreparationOutputResponse$json = const { '1': 'GetPreparationOutputResponse', @@ -165,9 +156,7 @@ const GetPreparationOutputResponse$json = const { }; /// Descriptor for `GetPreparationOutputResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getPreparationOutputResponseDescriptor = - $convert.base64Decode( - 'ChxHZXRQcmVwYXJhdGlvbk91dHB1dFJlc3BvbnNlEhYKBm91dHB1dBgBIAEoCVIGb3V0cHV0'); +final $typed_data.Uint8List getPreparationOutputResponseDescriptor = $convert.base64Decode('ChxHZXRQcmVwYXJhdGlvbk91dHB1dFJlc3BvbnNlEhYKBm91dHB1dBgBIAEoCVIGb3V0cHV0'); @$core.Deprecated('Use getCompileOutputRequestDescriptor instead') const GetCompileOutputRequest$json = const { '1': 'GetCompileOutputRequest', @@ -177,9 +166,7 @@ const GetCompileOutputRequest$json = const { }; /// Descriptor for `GetCompileOutputRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getCompileOutputRequestDescriptor = - $convert.base64Decode( - 'ChdHZXRDb21waWxlT3V0cHV0UmVxdWVzdBIjCg1waXBlbGluZV91dWlkGAEgASgJUgxwaXBlbGluZVV1aWQ='); +final $typed_data.Uint8List getCompileOutputRequestDescriptor = $convert.base64Decode('ChdHZXRDb21waWxlT3V0cHV0UmVxdWVzdBIjCg1waXBlbGluZV91dWlkGAEgASgJUgxwaXBlbGluZVV1aWQ='); @$core.Deprecated('Use getCompileOutputResponseDescriptor instead') const GetCompileOutputResponse$json = const { '1': 'GetCompileOutputResponse', @@ -189,9 +176,7 @@ const GetCompileOutputResponse$json = const { }; /// Descriptor for `GetCompileOutputResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getCompileOutputResponseDescriptor = - $convert.base64Decode( - 'ChhHZXRDb21waWxlT3V0cHV0UmVzcG9uc2USFgoGb3V0cHV0GAEgASgJUgZvdXRwdXQ='); +final $typed_data.Uint8List getCompileOutputResponseDescriptor = $convert.base64Decode('ChhHZXRDb21waWxlT3V0cHV0UmVzcG9uc2USFgoGb3V0cHV0GAEgASgJUgZvdXRwdXQ='); @$core.Deprecated('Use getRunOutputRequestDescriptor instead') const GetRunOutputRequest$json = const { '1': 'GetRunOutputRequest', @@ -201,8 +186,7 @@ const GetRunOutputRequest$json = const { }; /// Descriptor for `GetRunOutputRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getRunOutputRequestDescriptor = $convert.base64Decode( - 'ChNHZXRSdW5PdXRwdXRSZXF1ZXN0EiMKDXBpcGVsaW5lX3V1aWQYASABKAlSDHBpcGVsaW5lVXVpZA=='); +final $typed_data.Uint8List getRunOutputRequestDescriptor = $convert.base64Decode('ChNHZXRSdW5PdXRwdXRSZXF1ZXN0EiMKDXBpcGVsaW5lX3V1aWQYASABKAlSDHBpcGVsaW5lVXVpZA=='); @$core.Deprecated('Use getRunOutputResponseDescriptor instead') const GetRunOutputResponse$json = const { '1': 'GetRunOutputResponse', @@ -212,9 +196,7 @@ const GetRunOutputResponse$json = const { }; /// Descriptor for `GetRunOutputResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getRunOutputResponseDescriptor = - $convert.base64Decode( - 'ChRHZXRSdW5PdXRwdXRSZXNwb25zZRIWCgZvdXRwdXQYASABKAlSBm91dHB1dA=='); +final $typed_data.Uint8List getRunOutputResponseDescriptor = $convert.base64Decode('ChRHZXRSdW5PdXRwdXRSZXNwb25zZRIWCgZvdXRwdXQYASABKAlSBm91dHB1dA=='); @$core.Deprecated('Use getRunErrorRequestDescriptor instead') const GetRunErrorRequest$json = const { '1': 'GetRunErrorRequest', @@ -301,14 +283,7 @@ const Categories_Category$json = const { '1': 'Category', '2': const [ const {'1': 'category_name', '3': 1, '4': 1, '5': 9, '10': 'categoryName'}, - const { - '1': 'precompiled_objects', - '3': 2, - '4': 3, - '5': 11, - '6': '.api.v1.PrecompiledObject', - '10': 'precompiledObjects' - }, + const {'1': 'precompiled_objects', '3': 2, '4': 3, '5': 11, '6': '.api.v1.PrecompiledObject', '10': 'precompiledObjects'}, ], }; @@ -318,14 +293,7 @@ final $typed_data.Uint8List categoriesDescriptor = $convert.base64Decode('CgpDYX const GetPrecompiledObjectsRequest$json = const { '1': 'GetPrecompiledObjectsRequest', '2': const [ - const { - '1': 'sdk', - '3': 1, - '4': 1, - '5': 14, - '6': '.api.v1.Sdk', - '10': 'sdk' - }, + const {'1': 'sdk', '3': 1, '4': 1, '5': 14, '6': '.api.v1.Sdk', '10': 'sdk'}, const {'1': 'category', '3': 2, '4': 1, '5': 9, '10': 'category'}, ], }; @@ -362,18 +330,21 @@ const GetPrecompiledObjectLogsRequest$json = const { /// Descriptor for `GetPrecompiledObjectLogsRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List getPrecompiledObjectLogsRequestDescriptor = $convert.base64Decode('Ch9HZXRQcmVjb21waWxlZE9iamVjdExvZ3NSZXF1ZXN0Eh0KCmNsb3VkX3BhdGgYASABKAlSCWNsb3VkUGF0aA=='); +@$core.Deprecated('Use getDefaultPrecompiledObjectRequestDescriptor instead') +const GetDefaultPrecompiledObjectRequest$json = const { + '1': 'GetDefaultPrecompiledObjectRequest', + '2': const [ + const {'1': 'sdk', '3': 1, '4': 1, '5': 14, '6': '.api.v1.Sdk', '10': 'sdk'}, + ], +}; + +/// Descriptor for `GetDefaultPrecompiledObjectRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getDefaultPrecompiledObjectRequestDescriptor = $convert.base64Decode('CiJHZXREZWZhdWx0UHJlY29tcGlsZWRPYmplY3RSZXF1ZXN0Eh0KA3NkaxgBIAEoDjILLmFwaS52MS5TZGtSA3Nkaw=='); @$core.Deprecated('Use getPrecompiledObjectsResponseDescriptor instead') const GetPrecompiledObjectsResponse$json = const { '1': 'GetPrecompiledObjectsResponse', '2': const [ - const { - '1': 'sdk_categories', - '3': 1, - '4': 3, - '5': 11, - '6': '.api.v1.Categories', - '10': 'sdkCategories' - }, + const {'1': 'sdk_categories', '3': 1, '4': 3, '5': 11, '6': '.api.v1.Categories', '10': 'sdkCategories'}, ], }; @@ -388,9 +359,7 @@ const GetPrecompiledObjectCodeResponse$json = const { }; /// Descriptor for `GetPrecompiledObjectCodeResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getPrecompiledObjectCodeResponseDescriptor = - $convert.base64Decode( - 'CiBHZXRQcmVjb21waWxlZE9iamVjdENvZGVSZXNwb25zZRISCgRjb2RlGAEgASgJUgRjb2Rl'); +final $typed_data.Uint8List getPrecompiledObjectCodeResponseDescriptor = $convert.base64Decode('CiBHZXRQcmVjb21waWxlZE9iamVjdENvZGVSZXNwb25zZRISCgRjb2RlGAEgASgJUgRjb2Rl'); @$core.Deprecated('Use getPrecompiledObjectOutputResponseDescriptor instead') const GetPrecompiledObjectOutputResponse$json = const { '1': 'GetPrecompiledObjectOutputResponse', @@ -400,9 +369,7 @@ const GetPrecompiledObjectOutputResponse$json = const { }; /// Descriptor for `GetPrecompiledObjectOutputResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getPrecompiledObjectOutputResponseDescriptor = - $convert.base64Decode( - 'CiJHZXRQcmVjb21waWxlZE9iamVjdE91dHB1dFJlc3BvbnNlEhYKBm91dHB1dBgBIAEoCVIGb3V0cHV0'); +final $typed_data.Uint8List getPrecompiledObjectOutputResponseDescriptor = $convert.base64Decode('CiJHZXRQcmVjb21waWxlZE9iamVjdE91dHB1dFJlc3BvbnNlEhYKBm91dHB1dBgBIAEoCVIGb3V0cHV0'); @$core.Deprecated('Use getPrecompiledObjectLogsResponseDescriptor instead') const GetPrecompiledObjectLogsResponse$json = const { '1': 'GetPrecompiledObjectLogsResponse', @@ -412,6 +379,14 @@ const GetPrecompiledObjectLogsResponse$json = const { }; /// Descriptor for `GetPrecompiledObjectLogsResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getPrecompiledObjectLogsResponseDescriptor = - $convert.base64Decode( - 'CiBHZXRQcmVjb21waWxlZE9iamVjdExvZ3NSZXNwb25zZRIWCgZvdXRwdXQYASABKAlSBm91dHB1dA=='); +final $typed_data.Uint8List getPrecompiledObjectLogsResponseDescriptor = $convert.base64Decode('CiBHZXRQcmVjb21waWxlZE9iamVjdExvZ3NSZXNwb25zZRIWCgZvdXRwdXQYASABKAlSBm91dHB1dA=='); +@$core.Deprecated('Use getDefaultPrecompiledObjectResponseDescriptor instead') +const GetDefaultPrecompiledObjectResponse$json = const { + '1': 'GetDefaultPrecompiledObjectResponse', + '2': const [ + const {'1': 'precompiled_object', '3': 1, '4': 1, '5': 11, '6': '.api.v1.PrecompiledObject', '10': 'precompiledObject'}, + ], +}; + +/// Descriptor for `GetDefaultPrecompiledObjectResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getDefaultPrecompiledObjectResponseDescriptor = $convert.base64Decode('CiNHZXREZWZhdWx0UHJlY29tcGlsZWRPYmplY3RSZXNwb25zZRJIChJwcmVjb21waWxlZF9vYmplY3QYASABKAsyGS5hcGkudjEuUHJlY29tcGlsZWRPYmplY3RSEXByZWNvbXBpbGVkT2JqZWN0'); From e9cbe7957729db1dde2a42c145ee8d90cc9de764 Mon Sep 17 00:00:00 2001 From: Pavel Avilov Date: Wed, 12 Jan 2022 15:17:50 +0300 Subject: [PATCH 02/36] Add error handling --- playground/backend/configs/DEFAULT_EXAMPLES.json | 2 +- .../backend/internal/cloud_bucket/precompiled_objects.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/playground/backend/configs/DEFAULT_EXAMPLES.json b/playground/backend/configs/DEFAULT_EXAMPLES.json index 4b1ec7032a67..28264df0c641 100644 --- a/playground/backend/configs/DEFAULT_EXAMPLES.json +++ b/playground/backend/configs/DEFAULT_EXAMPLES.json @@ -2,4 +2,4 @@ "SDK_JAVA": "SDK_JAVA/MinimalWordCount", "SDK_GO": "SDK_GO/MinimalWordCount", "SDK_PYTHON": "SDK_PYTHON/WordCountWithMetrics" -} \ No newline at end of file +} diff --git a/playground/backend/internal/cloud_bucket/precompiled_objects.go b/playground/backend/internal/cloud_bucket/precompiled_objects.go index 0baf54e65554..86cd8296e3d9 100644 --- a/playground/backend/internal/cloud_bucket/precompiled_objects.go +++ b/playground/backend/internal/cloud_bucket/precompiled_objects.go @@ -178,7 +178,9 @@ func (cd *CloudStorage) GetPrecompiledObjects(ctx context.Context, targetSdk pb. // GetDefaultPrecompileObject returns the default precompiled object for the sdk func (cd *CloudStorage) GetDefaultPrecompileObject(ctx context.Context, targetSdk pb.Sdk, workingDir string) (*ObjectInfo, error) { defaultExampleToSdk, err := getDefaultExamplesFromJson(workingDir) - + if err != nil { + return nil, err + } infoPath := filepath.Join(defaultExampleToSdk[targetSdk.String()], MetaInfoName) metaInfo, err := cd.getFileFromBucket(ctx, infoPath, "") if err != nil { From 68edd9796b6a2d7fe1ec2c33ff22afd04a9fa36f Mon Sep 17 00:00:00 2001 From: Artur Khanin Date: Wed, 12 Jan 2022 15:59:25 +0300 Subject: [PATCH 03/36] Added saving of precompiled objects catalog to cache at the server startup --- playground/backend/cmd/server/controller.go | 38 ++++++--- playground/backend/cmd/server/server.go | 18 ++++ playground/backend/internal/cache/cache.go | 3 + .../utils/precompiled_objects_utils.go | 43 ++++++++++ .../utils/precompiled_objects_utils_test.go | 83 +++++++++++++++++++ 5 files changed, 173 insertions(+), 12 deletions(-) diff --git a/playground/backend/cmd/server/controller.go b/playground/backend/cmd/server/controller.go index 1d9a3345a6c6..e5be3d201401 100644 --- a/playground/backend/cmd/server/controller.go +++ b/playground/backend/cmd/server/controller.go @@ -241,20 +241,34 @@ func (controller *playgroundController) Cancel(ctx context.Context, info *pb.Can } // GetPrecompiledObjects returns the list of examples +// - If SDK and category are unspecified in the request, gets the whole catalog from the cache +// - If there is no catalog in the cache, gets the catalog from the Storage and saves it to the cache +// - If SDK or category is specified in the request, gets the specific catalog from the Storage func (controller *playgroundController) GetPrecompiledObjects(ctx context.Context, info *pb.GetPrecompiledObjectsRequest) (*pb.GetPrecompiledObjectsResponse, error) { - bucket := cloud_bucket.New() - sdkToCategories, err := bucket.GetPrecompiledObjects(ctx, info.Sdk, info.Category) - if err != nil { - logger.Errorf("GetPrecompiledObjects(): cloud storage error: %s", err.Error()) - return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") - } - response := pb.GetPrecompiledObjectsResponse{SdkCategories: make([]*pb.Categories, 0)} - for sdkName, categories := range *sdkToCategories { - sdkCategory := pb.Categories{Sdk: pb.Sdk(pb.Sdk_value[sdkName]), Categories: make([]*pb.Categories_Category, 0)} - for categoryName, precompiledObjects := range categories { - utils.PutPrecompiledObjectsToCategory(categoryName, &precompiledObjects, &sdkCategory) + var response pb.GetPrecompiledObjectsResponse + if info.Sdk != pb.Sdk_SDK_UNSPECIFIED || info.Category != "" { + sdkCategories, err := utils.GetPrecompiledObjectsCatalogFromStorage(ctx, info.Sdk, info.Category) + if err != nil { + logger.Errorf("GetPrecompiledObjects(): cloud storage error: %s", err.Error()) + return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") + } + response = pb.GetPrecompiledObjectsResponse{SdkCategories: sdkCategories} + } else { + catalog, err := utils.GetPrecompiledObjectsCatalogFromCache(ctx, controller.cacheService) + if err == nil { + response = pb.GetPrecompiledObjectsResponse{SdkCategories: catalog} + } else { + logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) + sdkCategories, err := utils.GetPrecompiledObjectsCatalogFromStorage(ctx, info.Sdk, info.Category) + if err != nil { + logger.Errorf("GetPrecompiledObjects(): cloud storage error: %s", err.Error()) + return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") + } + response = pb.GetPrecompiledObjectsResponse{SdkCategories: sdkCategories} + if err = utils.SetToCache(ctx, controller.cacheService, uuid.Nil, cache.ExamplesCatalog, sdkCategories); err != nil { + logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) + } } - response.SdkCategories = append(response.SdkCategories, &sdkCategory) } return &response, nil } diff --git a/playground/backend/cmd/server/server.go b/playground/backend/cmd/server/server.go index 29686b89815e..0d0f6d3939e0 100644 --- a/playground/backend/cmd/server/server.go +++ b/playground/backend/cmd/server/server.go @@ -22,7 +22,9 @@ import ( "beam.apache.org/playground/backend/internal/cache/redis" "beam.apache.org/playground/backend/internal/environment" "beam.apache.org/playground/backend/internal/logger" + "beam.apache.org/playground/backend/internal/utils" "context" + "github.com/google/uuid" "github.com/improbable-eng/grpc-web/go/grpcweb" "google.golang.org/grpc" ) @@ -50,6 +52,11 @@ func runServer() error { cacheService: cacheService, }) + err = setupExamplesCatalog(ctx, cacheService) + if err != nil { + return err + } + errChan := make(chan error) switch envService.NetworkEnvs.Protocol() { @@ -109,6 +116,17 @@ func setupCache(ctx context.Context, appEnv environment.ApplicationEnvs) (cache. } } +func setupExamplesCatalog(ctx context.Context, cacheService cache.Cache) error { + sdkCategories, err := utils.GetPrecompiledObjectsCatalogFromStorage(ctx, pb.Sdk_SDK_UNSPECIFIED, "") + if err != nil { + return err + } + if err = utils.SetToCache(ctx, cacheService, uuid.Nil, cache.ExamplesCatalog, sdkCategories); err != nil { + return err + } + return nil +} + func main() { err := runServer() if err != nil { diff --git a/playground/backend/internal/cache/cache.go b/playground/backend/internal/cache/cache.go index 1f52236b6b44..f607fb4f444b 100644 --- a/playground/backend/internal/cache/cache.go +++ b/playground/backend/internal/cache/cache.go @@ -55,6 +55,9 @@ const ( // LogsIndex is the index of the start of the log LogsIndex SubKey = "LOGS_INDEX" + + // ExamplesCatalog is catalog of examples available in Playground + ExamplesCatalog SubKey = "EXAMPLES_CATALOG" ) // Cache is used to store states and outputs for Apache Beam pipelines that running in Playground diff --git a/playground/backend/internal/utils/precompiled_objects_utils.go b/playground/backend/internal/utils/precompiled_objects_utils.go index 5eef10f31f06..544374fd7a55 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils.go +++ b/playground/backend/internal/utils/precompiled_objects_utils.go @@ -17,7 +17,16 @@ package utils import ( pb "beam.apache.org/playground/backend/internal/api/v1" + "beam.apache.org/playground/backend/internal/cache" "beam.apache.org/playground/backend/internal/cloud_bucket" + "beam.apache.org/playground/backend/internal/errors" + "beam.apache.org/playground/backend/internal/logger" + "context" + "github.com/google/uuid" +) + +var ( + ExamplesDataPipelineId = uuid.Nil ) // PutPrecompiledObjectsToCategory adds categories with precompiled objects to protobuf object @@ -37,3 +46,37 @@ func PutPrecompiledObjectsToCategory(categoryName string, precompiledObjects *cl } sdkCategory.Categories = append(sdkCategory.Categories, &category) } + +// GetPrecompiledObjectsCatalogFromCache returns the precompiled objects catalog from the cache +func GetPrecompiledObjectsCatalogFromCache(ctx context.Context, cacheService cache.Cache) ([]*pb.Categories, error) { + value, err := cacheService.GetValue(ctx, ExamplesDataPipelineId, cache.ExamplesCatalog) + if err != nil { + logger.Errorf("%s: cache.GetValue: %s\n", ExamplesDataPipelineId, err.Error()) + return nil, err + } + catalog, converted := value.([]*pb.Categories) + if !converted { + logger.Errorf("%s: couldn't convert value to catalog: %s", cache.ExamplesCatalog, value) + return nil, errors.InternalError("Error during getting the catalog from cache", "Error during getting status") + } + return catalog, nil +} + +// GetPrecompiledObjectsCatalogFromStorage returns the precompiled objects catalog from the cloud storage in the response format +func GetPrecompiledObjectsCatalogFromStorage(ctx context.Context, sdk pb.Sdk, category string) ([]*pb.Categories, error) { + bucket := cloud_bucket.New() + sdkToCategories, err := bucket.GetPrecompiledObjects(ctx, sdk, category) + if err != nil { + logger.Errorf("GetPrecompiledObjects(): cloud storage error: %s", err.Error()) + return nil, err + } + sdkCategories := make([]*pb.Categories, 0) + for sdkName, categories := range *sdkToCategories { + sdkCategory := pb.Categories{Sdk: pb.Sdk(pb.Sdk_value[sdkName]), Categories: make([]*pb.Categories_Category, 0)} + for categoryName, precompiledObjects := range categories { + PutPrecompiledObjectsToCategory(categoryName, &precompiledObjects, &sdkCategory) + } + sdkCategories = append(sdkCategories, &sdkCategory) + } + return sdkCategories, nil +} diff --git a/playground/backend/internal/utils/precompiled_objects_utils_test.go b/playground/backend/internal/utils/precompiled_objects_utils_test.go index d24f865ec4ac..c777d6c07da4 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils_test.go +++ b/playground/backend/internal/utils/precompiled_objects_utils_test.go @@ -17,7 +17,11 @@ package utils import ( pb "beam.apache.org/playground/backend/internal/api/v1" + "beam.apache.org/playground/backend/internal/cache" + "beam.apache.org/playground/backend/internal/cache/local" "beam.apache.org/playground/backend/internal/cloud_bucket" + "context" + "github.com/google/uuid" "reflect" "testing" ) @@ -73,3 +77,82 @@ func TestPutPrecompiledObjectsToCategory(t *testing.T) { }) } } + +func TestGetPrecompiledObjectsCatalogFromCache(t *testing.T) { + ctx := context.Background() + sdkCategories := []*pb.Categories{ + { + Sdk: pb.Sdk_SDK_JAVA, + Categories: []*pb.Categories_Category{ + { + CategoryName: "TestCategory", PrecompiledObjects: []*pb.PrecompiledObject{ + { + CloudPath: "SDK_JAVA/TestCategory/TestName.java", + Name: "TestName", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + }, + }, + }, + }, + }} + type args struct { + ctx context.Context + cacheService cache.Cache + } + tests := []struct { + name string + args args + prepFunc func(cacheService cache.Cache) error + want []*pb.Categories + wantErr bool + }{ + { + // Test case with getting Precompiled Objects Catalog from cache when it exists. + // As a result, want to receive an expected catalog from cache. + name: "get existing catalog", + args: args{ + ctx: ctx, + cacheService: local.New(ctx), + }, + prepFunc: func(cacheService cache.Cache) error { + err := cacheService.SetValue(ctx, uuid.Nil, cache.ExamplesCatalog, sdkCategories) + if err != nil { + return err + } + return nil + }, + want: sdkCategories, + wantErr: false, + }, + // Test case with getting Precompiled Objects Catalog from cache when it doesn't exist. + // As a result, want to receive an error. + { + name: "get missing catalog", + args: args{ + ctx: ctx, + cacheService: local.New(ctx), + }, + prepFunc: func(cacheService cache.Cache) error { + return nil + }, + want: nil, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if err := tt.prepFunc(tt.args.cacheService); err != nil { + t.Errorf("prepFunc() error = %v, wantErr %v", err, tt.wantErr) + } + got, err := GetPrecompiledObjectsCatalogFromCache(tt.args.ctx, tt.args.cacheService) + if (err != nil) != tt.wantErr { + t.Errorf("GetPrecompiledObjectsCatalogFromCache() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("GetPrecompiledObjectsCatalogFromCache() got = %v, want %v", got, tt.want) + } + }) + } +} From ab16bea44b08c00b97faa20244c7e47e797b6c16 Mon Sep 17 00:00:00 2001 From: Artur Khanin Date: Wed, 12 Jan 2022 17:48:41 +0300 Subject: [PATCH 04/36] Added caching of the catalog only in case of unspecified SDK --- playground/backend/cmd/server/server.go | 10 +++++++--- .../internal/environment/environment_service.go | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/playground/backend/cmd/server/server.go b/playground/backend/cmd/server/server.go index 0d0f6d3939e0..eb138c358d2e 100644 --- a/playground/backend/cmd/server/server.go +++ b/playground/backend/cmd/server/server.go @@ -52,9 +52,12 @@ func runServer() error { cacheService: cacheService, }) - err = setupExamplesCatalog(ctx, cacheService) - if err != nil { - return err + // Examples catalog should be retrieved and saved to cache only if the server doesn't suppose to run code, i.e. SDK is unspecified + if envService.BeamSdkEnvs.ApacheBeamSdk == pb.Sdk_SDK_UNSPECIFIED { + err = setupExamplesCatalog(ctx, cacheService) + if err != nil { + return err + } } errChan := make(chan error) @@ -116,6 +119,7 @@ func setupCache(ctx context.Context, appEnv environment.ApplicationEnvs) (cache. } } +// setupExamplesCatalog saves precompiled objects catalog from storage to cache func setupExamplesCatalog(ctx context.Context, cacheService cache.Cache) error { sdkCategories, err := utils.GetPrecompiledObjectsCatalogFromStorage(ctx, pb.Sdk_SDK_UNSPECIFIED, "") if err != nil { diff --git a/playground/backend/internal/environment/environment_service.go b/playground/backend/internal/environment/environment_service.go index 81f733ee8181..a2c373c78fa8 100644 --- a/playground/backend/internal/environment/environment_service.go +++ b/playground/backend/internal/environment/environment_service.go @@ -181,7 +181,7 @@ func ConfigureBeamEnvs(workDir string) (*BeamEnvs, error) { } } if sdk == pb.Sdk_SDK_UNSPECIFIED { - return nil, errors.New("env BEAM_SDK must be specified in the environment variables") + return NewBeamEnvs(sdk, nil, preparedModDir, numOfParallelJobs), nil } configPath := filepath.Join(workDir, configFolderName, sdk.String()+jsonExt) executorConfig, err := createExecutorConfig(sdk, configPath) From d181ccecf78964d30d6224e13167aafb6db0c77e Mon Sep 17 00:00:00 2001 From: Artur Khanin Date: Thu, 13 Jan 2022 18:13:01 +0300 Subject: [PATCH 05/36] Update regarding comments --- playground/backend/cmd/server/controller.go | 17 +++++++---------- .../internal/utils/precompiled_objects_utils.go | 13 +++++++++++-- .../utils/precompiled_objects_utils_test.go | 4 ++-- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/playground/backend/cmd/server/controller.go b/playground/backend/cmd/server/controller.go index e5be3d201401..195e7731f222 100644 --- a/playground/backend/cmd/server/controller.go +++ b/playground/backend/cmd/server/controller.go @@ -245,32 +245,29 @@ func (controller *playgroundController) Cancel(ctx context.Context, info *pb.Can // - If there is no catalog in the cache, gets the catalog from the Storage and saves it to the cache // - If SDK or category is specified in the request, gets the specific catalog from the Storage func (controller *playgroundController) GetPrecompiledObjects(ctx context.Context, info *pb.GetPrecompiledObjectsRequest) (*pb.GetPrecompiledObjectsResponse, error) { - var response pb.GetPrecompiledObjectsResponse + var response *pb.GetPrecompiledObjectsResponse + var err error if info.Sdk != pb.Sdk_SDK_UNSPECIFIED || info.Category != "" { - sdkCategories, err := utils.GetPrecompiledObjectsCatalogFromStorage(ctx, info.Sdk, info.Category) + response, err = utils.GetPrecompiledObjectsCatalogFromStorageToResponse(ctx, info.Sdk, info.Category) if err != nil { - logger.Errorf("GetPrecompiledObjects(): cloud storage error: %s", err.Error()) return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") } - response = pb.GetPrecompiledObjectsResponse{SdkCategories: sdkCategories} } else { catalog, err := utils.GetPrecompiledObjectsCatalogFromCache(ctx, controller.cacheService) if err == nil { - response = pb.GetPrecompiledObjectsResponse{SdkCategories: catalog} + response = &pb.GetPrecompiledObjectsResponse{SdkCategories: catalog} } else { logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) - sdkCategories, err := utils.GetPrecompiledObjectsCatalogFromStorage(ctx, info.Sdk, info.Category) + response, err = utils.GetPrecompiledObjectsCatalogFromStorageToResponse(ctx, info.Sdk, info.Category) if err != nil { - logger.Errorf("GetPrecompiledObjects(): cloud storage error: %s", err.Error()) return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") } - response = pb.GetPrecompiledObjectsResponse{SdkCategories: sdkCategories} - if err = utils.SetToCache(ctx, controller.cacheService, uuid.Nil, cache.ExamplesCatalog, sdkCategories); err != nil { + if err = utils.SetToCache(ctx, controller.cacheService, uuid.Nil, cache.ExamplesCatalog, response.SdkCategories); err != nil { logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) } } } - return &response, nil + return response, nil } // GetPrecompiledObjectCode returns the code of the specific example diff --git a/playground/backend/internal/utils/precompiled_objects_utils.go b/playground/backend/internal/utils/precompiled_objects_utils.go index 544374fd7a55..4d010d5491e6 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils.go +++ b/playground/backend/internal/utils/precompiled_objects_utils.go @@ -57,12 +57,12 @@ func GetPrecompiledObjectsCatalogFromCache(ctx context.Context, cacheService cac catalog, converted := value.([]*pb.Categories) if !converted { logger.Errorf("%s: couldn't convert value to catalog: %s", cache.ExamplesCatalog, value) - return nil, errors.InternalError("Error during getting the catalog from cache", "Error during getting status") + return nil, errors.InternalError("Error during getting the catalog from cache", "Error during getting catalog") } return catalog, nil } -// GetPrecompiledObjectsCatalogFromStorage returns the precompiled objects catalog from the cloud storage in the response format +// GetPrecompiledObjectsCatalogFromStorage returns the precompiled objects catalog from the cloud storage func GetPrecompiledObjectsCatalogFromStorage(ctx context.Context, sdk pb.Sdk, category string) ([]*pb.Categories, error) { bucket := cloud_bucket.New() sdkToCategories, err := bucket.GetPrecompiledObjects(ctx, sdk, category) @@ -80,3 +80,12 @@ func GetPrecompiledObjectsCatalogFromStorage(ctx context.Context, sdk pb.Sdk, ca } return sdkCategories, nil } + +// GetPrecompiledObjectsCatalogFromStorageToResponse returns the precompiled objects catalog from the cloud storage in the response format +func GetPrecompiledObjectsCatalogFromStorageToResponse(ctx context.Context, sdk pb.Sdk, category string) (*pb.GetPrecompiledObjectsResponse, error) { + sdkCategories, err := GetPrecompiledObjectsCatalogFromStorage(ctx, sdk, category) + if err != nil { + return nil, err + } + return &pb.GetPrecompiledObjectsResponse{SdkCategories: sdkCategories}, nil +} diff --git a/playground/backend/internal/utils/precompiled_objects_utils_test.go b/playground/backend/internal/utils/precompiled_objects_utils_test.go index c777d6c07da4..f42b73e0b81c 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils_test.go +++ b/playground/backend/internal/utils/precompiled_objects_utils_test.go @@ -125,9 +125,9 @@ func TestGetPrecompiledObjectsCatalogFromCache(t *testing.T) { want: sdkCategories, wantErr: false, }, - // Test case with getting Precompiled Objects Catalog from cache when it doesn't exist. - // As a result, want to receive an error. { + // Test case with getting Precompiled Objects Catalog from cache when it doesn't exist. + // As a result, want to receive an error. name: "get missing catalog", args: args{ ctx: ctx, From 5743386709822512379fe7380f4d2664b4c41bb9 Mon Sep 17 00:00:00 2001 From: Artur Khanin Date: Thu, 13 Jan 2022 21:18:12 +0300 Subject: [PATCH 06/36] Update regarding comments --- playground/backend/cmd/server/controller.go | 29 ++++++++----------- .../utils/precompiled_objects_utils.go | 9 ------ 2 files changed, 12 insertions(+), 26 deletions(-) diff --git a/playground/backend/cmd/server/controller.go b/playground/backend/cmd/server/controller.go index 195e7731f222..3eedd433831b 100644 --- a/playground/backend/cmd/server/controller.go +++ b/playground/backend/cmd/server/controller.go @@ -245,29 +245,24 @@ func (controller *playgroundController) Cancel(ctx context.Context, info *pb.Can // - If there is no catalog in the cache, gets the catalog from the Storage and saves it to the cache // - If SDK or category is specified in the request, gets the specific catalog from the Storage func (controller *playgroundController) GetPrecompiledObjects(ctx context.Context, info *pb.GetPrecompiledObjectsRequest) (*pb.GetPrecompiledObjectsResponse, error) { - var response *pb.GetPrecompiledObjectsResponse - var err error - if info.Sdk != pb.Sdk_SDK_UNSPECIFIED || info.Category != "" { - response, err = utils.GetPrecompiledObjectsCatalogFromStorageToResponse(ctx, info.Sdk, info.Category) - if err != nil { - return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") - } - } else { + if info.Sdk == pb.Sdk_SDK_UNSPECIFIED && info.Category == "" { catalog, err := utils.GetPrecompiledObjectsCatalogFromCache(ctx, controller.cacheService) if err == nil { - response = &pb.GetPrecompiledObjectsResponse{SdkCategories: catalog} + return &pb.GetPrecompiledObjectsResponse{SdkCategories: catalog}, nil } else { logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) - response, err = utils.GetPrecompiledObjectsCatalogFromStorageToResponse(ctx, info.Sdk, info.Category) - if err != nil { - return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") - } - if err = utils.SetToCache(ctx, controller.cacheService, uuid.Nil, cache.ExamplesCatalog, response.SdkCategories); err != nil { - logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) - } } } - return response, nil + catalog, err := utils.GetPrecompiledObjectsCatalogFromStorage(ctx, info.Sdk, info.Category) + if err != nil { + return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") + } + if info.Sdk == pb.Sdk_SDK_UNSPECIFIED && info.Category == "" { + if err = utils.SetToCache(ctx, controller.cacheService, uuid.Nil, cache.ExamplesCatalog, catalog); err != nil { + logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) + } + } + return &pb.GetPrecompiledObjectsResponse{SdkCategories: catalog}, nil } // GetPrecompiledObjectCode returns the code of the specific example diff --git a/playground/backend/internal/utils/precompiled_objects_utils.go b/playground/backend/internal/utils/precompiled_objects_utils.go index 4d010d5491e6..b448ca7b5f2f 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils.go +++ b/playground/backend/internal/utils/precompiled_objects_utils.go @@ -80,12 +80,3 @@ func GetPrecompiledObjectsCatalogFromStorage(ctx context.Context, sdk pb.Sdk, ca } return sdkCategories, nil } - -// GetPrecompiledObjectsCatalogFromStorageToResponse returns the precompiled objects catalog from the cloud storage in the response format -func GetPrecompiledObjectsCatalogFromStorageToResponse(ctx context.Context, sdk pb.Sdk, category string) (*pb.GetPrecompiledObjectsResponse, error) { - sdkCategories, err := GetPrecompiledObjectsCatalogFromStorage(ctx, sdk, category) - if err != nil { - return nil, err - } - return &pb.GetPrecompiledObjectsResponse{SdkCategories: sdkCategories}, nil -} From 38673a4e8bdf69c7b08764bbf866c0b190dc6107 Mon Sep 17 00:00:00 2001 From: Artur Khanin Date: Fri, 14 Jan 2022 09:47:28 +0300 Subject: [PATCH 07/36] Simplified logging regarding comment --- playground/backend/cmd/server/controller.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/playground/backend/cmd/server/controller.go b/playground/backend/cmd/server/controller.go index 3eedd433831b..67a5fde5e224 100644 --- a/playground/backend/cmd/server/controller.go +++ b/playground/backend/cmd/server/controller.go @@ -249,9 +249,8 @@ func (controller *playgroundController) GetPrecompiledObjects(ctx context.Contex catalog, err := utils.GetPrecompiledObjectsCatalogFromCache(ctx, controller.cacheService) if err == nil { return &pb.GetPrecompiledObjectsResponse{SdkCategories: catalog}, nil - } else { - logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) } + logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) } catalog, err := utils.GetPrecompiledObjectsCatalogFromStorage(ctx, info.Sdk, info.Category) if err != nil { From 4071bdbf9d963ccce14264eac9519c4bb641adf7 Mon Sep 17 00:00:00 2001 From: Pavel Avilov Date: Fri, 14 Jan 2022 18:14:44 +0300 Subject: [PATCH 08/36] Get defaultExamplePath from the corresponding config --- playground/backend/cmd/server/controller.go | 4 +- .../backend/configs/DEFAULT_EXAMPLES.json | 5 -- playground/backend/configs/SDK_GO.json | 3 +- playground/backend/configs/SDK_JAVA.json | 3 +- playground/backend/configs/SDK_PYTHON.json | 3 +- playground/backend/go.mod | 1 + playground/backend/go.sum | 6 +++ .../cloud_bucket/precompiled_objects.go | 25 ++-------- .../cloud_bucket/precompiled_objects_test.go | 44 ----------------- .../backend/internal/environment/beam.go | 18 ++++--- .../environment/environment_service.go | 18 ++++++- .../environment/environment_service_test.go | 49 +++++++++++++++++-- playground/infrastructure/proxy/allow_list.py | 1 + 13 files changed, 92 insertions(+), 88 deletions(-) delete mode 100644 playground/backend/configs/DEFAULT_EXAMPLES.json diff --git a/playground/backend/cmd/server/controller.go b/playground/backend/cmd/server/controller.go index 0cdb1765c100..9788d24d9c05 100644 --- a/playground/backend/cmd/server/controller.go +++ b/playground/backend/cmd/server/controller.go @@ -304,9 +304,9 @@ func (controller *playgroundController) GetDefaultPrecompiledObject(ctx context. } bucket := cloud_bucket.New() - precompiledObject, err := bucket.GetDefaultPrecompileObject(ctx, info.Sdk, controller.env.ApplicationEnvs.WorkingDir()) + precompiledObject, err := bucket.GetDefaultPrecompiledObject(ctx, controller.env.BeamSdkEnvs.DefaultExamplePath()) if err != nil { - logger.Errorf("GetDefaultPrecompileObject(): cloud storage error: %s", err.Error()) + logger.Errorf("GetDefaultPrecompiledObject(): cloud storage error: %s", err.Error()) return nil, errors.InternalError("Error during getting default Precompiled Object", "Error with cloud connection") } diff --git a/playground/backend/configs/DEFAULT_EXAMPLES.json b/playground/backend/configs/DEFAULT_EXAMPLES.json deleted file mode 100644 index 28264df0c641..000000000000 --- a/playground/backend/configs/DEFAULT_EXAMPLES.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "SDK_JAVA": "SDK_JAVA/MinimalWordCount", - "SDK_GO": "SDK_GO/MinimalWordCount", - "SDK_PYTHON": "SDK_PYTHON/WordCountWithMetrics" -} diff --git a/playground/backend/configs/SDK_GO.json b/playground/backend/configs/SDK_GO.json index 790db4f31761..097af5ac41c8 100644 --- a/playground/backend/configs/SDK_GO.json +++ b/playground/backend/configs/SDK_GO.json @@ -12,5 +12,6 @@ "test_args": [ "test", "-v" - ] + ], + "default_example": "SDK_GO/MinimalWordCount" } diff --git a/playground/backend/configs/SDK_JAVA.json b/playground/backend/configs/SDK_JAVA.json index 47b0339a7add..187fbb9fc4d3 100644 --- a/playground/backend/configs/SDK_JAVA.json +++ b/playground/backend/configs/SDK_JAVA.json @@ -16,5 +16,6 @@ "-cp", "bin:", "org.junit.runner.JUnitCore" - ] + ], + "default_example": "SDK_JAVA/MinimalWordCount" } diff --git a/playground/backend/configs/SDK_PYTHON.json b/playground/backend/configs/SDK_PYTHON.json index d1f89d366a52..6e14fabfece5 100644 --- a/playground/backend/configs/SDK_PYTHON.json +++ b/playground/backend/configs/SDK_PYTHON.json @@ -4,5 +4,6 @@ "test_cmd": "pytest", "compile_args": [], "run_args": [], - "test_args": [] + "test_args": [], + "default_example": "SDK_PYTHON/WordCountWithMetrics" } diff --git a/playground/backend/go.mod b/playground/backend/go.mod index 8a619ef3f050..f2714a7a905a 100644 --- a/playground/backend/go.mod +++ b/playground/backend/go.mod @@ -25,6 +25,7 @@ require ( github.com/google/uuid v1.3.0 github.com/improbable-eng/grpc-web v0.14.1 github.com/rs/cors v1.8.0 + github.com/tidwall/gjson v1.13.0 go.uber.org/goleak v1.1.12 google.golang.org/api v0.58.0 google.golang.org/grpc v1.41.0 diff --git a/playground/backend/go.sum b/playground/backend/go.sum index 840556536a6b..096e6bce8f07 100644 --- a/playground/backend/go.sum +++ b/playground/backend/go.sum @@ -454,6 +454,12 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/tidwall/gjson v1.13.0 h1:3TFY9yxOQShrvmjdM76K+jc66zJeT6D3/VFFYCGQf7M= +github.com/tidwall/gjson v1.13.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= +github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= +github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= diff --git a/playground/backend/internal/cloud_bucket/precompiled_objects.go b/playground/backend/internal/cloud_bucket/precompiled_objects.go index 86cd8296e3d9..063def60ef16 100644 --- a/playground/backend/internal/cloud_bucket/precompiled_objects.go +++ b/playground/backend/internal/cloud_bucket/precompiled_objects.go @@ -175,13 +175,9 @@ func (cd *CloudStorage) GetPrecompiledObjects(ctx context.Context, targetSdk pb. return &precompiledObjects, nil } -// GetDefaultPrecompileObject returns the default precompiled object for the sdk -func (cd *CloudStorage) GetDefaultPrecompileObject(ctx context.Context, targetSdk pb.Sdk, workingDir string) (*ObjectInfo, error) { - defaultExampleToSdk, err := getDefaultExamplesFromJson(workingDir) - if err != nil { - return nil, err - } - infoPath := filepath.Join(defaultExampleToSdk[targetSdk.String()], MetaInfoName) +// GetDefaultPrecompiledObject returns the default precompiled object for the sdk +func (cd *CloudStorage) GetDefaultPrecompiledObject(ctx context.Context, defaultExamplePath string) (*ObjectInfo, error) { + infoPath := filepath.Join(defaultExamplePath, MetaInfoName) metaInfo, err := cd.getFileFromBucket(ctx, infoPath, "") if err != nil { return nil, err @@ -317,18 +313,3 @@ func getSdkName(path string) string { sdkName := strings.Split(path, string(os.PathSeparator))[0] // the path of the form "sdkName/example/", where the first part is sdkName return sdkName } - -// getDefaultExamplesFromJson reads a json file that contains information about default examples for sdk and converts him to map -func getDefaultExamplesFromJson(workingDir string) (map[string]string, error) { - defaultExampleToSdk := map[string]string{} - configPath := filepath.Join(workingDir, configFolderName, defaultExamplesConfigName) - file, err := ioutil.ReadFile(configPath) - if err != nil { - return nil, err - } - err = json.Unmarshal(file, &defaultExampleToSdk) - if err != nil { - return nil, err - } - return defaultExampleToSdk, nil -} diff --git a/playground/backend/internal/cloud_bucket/precompiled_objects_test.go b/playground/backend/internal/cloud_bucket/precompiled_objects_test.go index c3bf69fa79d2..74c6f71564b7 100644 --- a/playground/backend/internal/cloud_bucket/precompiled_objects_test.go +++ b/playground/backend/internal/cloud_bucket/precompiled_objects_test.go @@ -287,47 +287,3 @@ func Benchmark_GetPrecompiledObject(b *testing.B) { _, _ = bucket.GetPrecompiledObjectCode(ctx, precompiledObjectPath) } } - -func Benchmark_GetDefaultPrecompileObject(b *testing.B) { - for i := 0; i < b.N; i++ { - _, _ = bucket.GetDefaultPrecompileObject(ctx, targetSdk, "") - } -} - -func Test_getDefaultExamplesFromJson(t *testing.T) { - expectedMap := map[string]string{"SDK_JAVA": "1", "SDK_GO": "2", "SDK_PYTHON": "3"} - type args struct { - workingDir string - } - tests := []struct { - name string - args args - want map[string]string - wantErr bool - }{ - { - name: "get object from json", - args: args{workingDir: ""}, - want: expectedMap, - wantErr: false, - }, - { - name: "error if wrong json path", - args: args{workingDir: "Wrong_path"}, - want: nil, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got, err := getDefaultExamplesFromJson(tt.args.workingDir) - if (err != nil) != tt.wantErr { - t.Errorf("getDefaultExamplesFromJson() error = %v, wantErr %v", err, tt.wantErr) - return - } - if !reflect.DeepEqual(got, tt.want) { - t.Errorf("getDefaultExamplesFromJson() got = %v, want %v", got, tt.want) - } - }) - } -} diff --git a/playground/backend/internal/environment/beam.go b/playground/backend/internal/environment/beam.go index c40d86e15e5e..728982a19097 100644 --- a/playground/backend/internal/environment/beam.go +++ b/playground/backend/internal/environment/beam.go @@ -42,15 +42,16 @@ func NewExecutorConfig(compileCmd, runCmd, testCmd string, compileArgs, runArgs, // BeamEnvs contains all environments related of ApacheBeam. These will use to run pipelines type BeamEnvs struct { - ApacheBeamSdk pb.Sdk - ExecutorConfig *ExecutorConfig - preparedModDir string - numOfParallelJobs int + ApacheBeamSdk pb.Sdk + ExecutorConfig *ExecutorConfig + preparedModDir string + numOfParallelJobs int + defaultExamplePath string } // NewBeamEnvs is a BeamEnvs constructor -func NewBeamEnvs(apacheBeamSdk pb.Sdk, executorConfig *ExecutorConfig, preparedModDir string, numOfParallelJobs int) *BeamEnvs { - return &BeamEnvs{ApacheBeamSdk: apacheBeamSdk, ExecutorConfig: executorConfig, preparedModDir: preparedModDir, numOfParallelJobs: numOfParallelJobs} +func NewBeamEnvs(apacheBeamSdk pb.Sdk, executorConfig *ExecutorConfig, preparedModDir, defaultExamplePath string, numOfParallelJobs int) *BeamEnvs { + return &BeamEnvs{ApacheBeamSdk: apacheBeamSdk, ExecutorConfig: executorConfig, preparedModDir: preparedModDir, numOfParallelJobs: numOfParallelJobs, defaultExamplePath: defaultExamplePath} } // PreparedModDir returns the path to the directory where prepared go.mod and go.sum are located @@ -62,3 +63,8 @@ func (b *BeamEnvs) PreparedModDir() string { func (b *BeamEnvs) NumOfParallelJobs() int { return b.numOfParallelJobs } + +// DefaultExamplePath returns the path to the default example +func (b *BeamEnvs) DefaultExamplePath() string { + return b.defaultExamplePath +} diff --git a/playground/backend/internal/environment/environment_service.go b/playground/backend/internal/environment/environment_service.go index 81f733ee8181..99ea65a6a7e0 100644 --- a/playground/backend/internal/environment/environment_service.go +++ b/playground/backend/internal/environment/environment_service.go @@ -21,6 +21,7 @@ import ( "encoding/json" "errors" "fmt" + "github.com/tidwall/gjson" "io/ioutil" "log" "os" @@ -47,6 +48,7 @@ const ( projectIdKey = "GOOGLE_CLOUD_PROJECT" pipelinesFolderKey = "PIPELINES_FOLDER_NAME" defaultPipelinesFolder = "executable_files" + defaultExampleKey = "default_example" defaultLaunchSite = "local" defaultProtocol = "HTTP" defaultIp = "localhost" @@ -188,7 +190,11 @@ func ConfigureBeamEnvs(workDir string) (*BeamEnvs, error) { if err != nil { return nil, err } - return NewBeamEnvs(sdk, executorConfig, preparedModDir, numOfParallelJobs), nil + defaultExamplePath, err := getDefaultExamplesPathFromJson(configPath) + if err != nil { + return nil, err + } + return NewBeamEnvs(sdk, executorConfig, preparedModDir, defaultExamplePath, numOfParallelJobs), nil } // createExecutorConfig creates ExecutorConfig that corresponds to specific Apache Beam SDK. @@ -240,6 +246,16 @@ func getConfigFromJson(configPath string) (*ExecutorConfig, error) { return &executorConfig, err } +// getDefaultExamplesPathFromJson reads a json file and returns default example path +func getDefaultExamplesPathFromJson(configPath string) (string, error) { + file, err := ioutil.ReadFile(configPath) + if err != nil { + return "", err + } + defaultExamplePath := gjson.Get(string(file), defaultExampleKey).String() + return defaultExamplePath, nil +} + // getEnv returns an environment variable or default value func getEnv(key, defaultValue string) string { if value, ok := os.LookupEnv(key); ok { diff --git a/playground/backend/internal/environment/environment_service_test.go b/playground/backend/internal/environment/environment_service_test.go index fde2ed4b3c14..43bc16a10479 100644 --- a/playground/backend/internal/environment/environment_service_test.go +++ b/playground/backend/internal/environment/environment_service_test.go @@ -26,7 +26,7 @@ import ( ) const ( - javaConfig = "{\n \"compile_cmd\": \"javac\",\n \"run_cmd\": \"java\",\n \"test_cmd\": \"java\",\n \"compile_args\": [\n \"-d\",\n \"bin\",\n \"-classpath\"\n ],\n \"run_args\": [\n \"-cp\",\n \"bin:\"\n ],\n \"test_args\": [\n \"-cp\",\n \"bin:\",\n \"org.junit.runner.JUnitCore\"\n ]\n}" + javaConfig = "{\n \"compile_cmd\": \"javac\",\n \"run_cmd\": \"java\",\n \"test_cmd\": \"java\",\n \"compile_args\": [\n \"-d\",\n \"bin\",\n \"-classpath\"\n ],\n \"run_args\": [\n \"-cp\",\n \"bin:\"\n ],\n \"test_args\": [\n \"-cp\",\n \"bin:\",\n \"org.junit.runner.JUnitCore\"\n ],\n \"default_example\": \"SDK_JAVA/MinimalWordCount\"\n}" defaultProjectId = "" ) @@ -86,13 +86,14 @@ func setOsEnvs(envsToSet map[string]string) error { func TestNewEnvironment(t *testing.T) { executorConfig := NewExecutorConfig("javac", "java", "java", []string{""}, []string{""}, []string{""}) preparedModDir := "" + preparedDefaultExamplePath := "" tests := []struct { name string want *Environment }{ {name: "create env service with default envs", want: &Environment{ NetworkEnvs: *NewNetworkEnvs(defaultIp, defaultPort, defaultProtocol), - BeamSdkEnvs: *NewBeamEnvs(defaultSdk, executorConfig, preparedModDir, 0), + BeamSdkEnvs: *NewBeamEnvs(defaultSdk, executorConfig, preparedModDir, preparedDefaultExamplePath, 0), ApplicationEnvs: *NewApplicationEnvs("/app", defaultLaunchSite, defaultProjectId, defaultPipelinesFolder, &CacheEnvs{defaultCacheType, defaultCacheAddress, defaultCacheKeyExpirationTime}, defaultPipelineExecuteTimeout), }}, } @@ -100,7 +101,7 @@ func TestNewEnvironment(t *testing.T) { t.Run(tt.name, func(t *testing.T) { if got := NewEnvironment( *NewNetworkEnvs(defaultIp, defaultPort, defaultProtocol), - *NewBeamEnvs(defaultSdk, executorConfig, preparedModDir, 0), + *NewBeamEnvs(defaultSdk, executorConfig, preparedModDir, preparedDefaultExamplePath, 0), *NewApplicationEnvs("/app", defaultLaunchSite, defaultProjectId, defaultPipelinesFolder, &CacheEnvs{defaultCacheType, defaultCacheAddress, defaultCacheKeyExpirationTime}, defaultPipelineExecuteTimeout)); !reflect.DeepEqual(got, tt.want) { t.Errorf("NewEnvironment() = %v, want %v", got, tt.want) } @@ -111,6 +112,7 @@ func TestNewEnvironment(t *testing.T) { func Test_getSdkEnvsFromOsEnvs(t *testing.T) { workingDir := "./" preparedModDir := "" + preparedDefaultExamplePath := "" tests := []struct { name string want *BeamEnvs @@ -125,13 +127,13 @@ func Test_getSdkEnvsFromOsEnvs(t *testing.T) { }, { name: "default beam envs", - want: NewBeamEnvs(defaultSdk, executorConfig, preparedModDir, defaultNumOfParallelJobs), + want: NewBeamEnvs(defaultSdk, executorConfig, preparedModDir, preparedDefaultExamplePath, defaultNumOfParallelJobs), envsToSet: map[string]string{beamSdkKey: "SDK_JAVA"}, wantErr: false, }, { name: "specific sdk key in os envs", - want: NewBeamEnvs(defaultSdk, executorConfig, preparedModDir, defaultNumOfParallelJobs), + want: NewBeamEnvs(defaultSdk, executorConfig, preparedModDir, preparedDefaultExamplePath, defaultNumOfParallelJobs), envsToSet: map[string]string{beamSdkKey: "SDK_JAVA"}, wantErr: false, }, @@ -308,3 +310,40 @@ func Test_getConfigFromJson(t *testing.T) { }) } } + +func Test_getDefaultExamplesFromJson(t *testing.T) { + type args struct { + configPath string + } + tests := []struct { + name string + args args + want string + wantErr bool + }{ + { + name: "get object from json", + args: args{filepath.Join(configFolderName, defaultSdk.String()+jsonExt)}, + want: "SDK_JAVA/MinimalWordCount", + wantErr: false, + }, + { + name: "error if wrong json path", + args: args{filepath.Join("wrong_folder", defaultSdk.String()+jsonExt)}, + want: "", + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := getDefaultExamplesPathFromJson(tt.args.configPath) + if (err != nil) != tt.wantErr { + t.Errorf("getDefaultExamplesPathFromJson() error = %v, wantErr %v", err, tt.wantErr) + return + } + if got != tt.want { + t.Errorf("getDefaultExamplesPathFromJson() got = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/playground/infrastructure/proxy/allow_list.py b/playground/infrastructure/proxy/allow_list.py index 98fedb0a6fe8..4bf59ddd100b 100644 --- a/playground/infrastructure/proxy/allow_list.py +++ b/playground/infrastructure/proxy/allow_list.py @@ -26,4 +26,5 @@ "dataflow-samples", "beam-samples", "apache-beam-samples", + "playground-precompiled-objects", ] From 304746966e3fefc76593bcadf76f5083ff7f4283 Mon Sep 17 00:00:00 2001 From: Pavel Avilov Date: Fri, 14 Jan 2022 18:22:37 +0300 Subject: [PATCH 09/36] Refactoring code --- .../cloud_bucket/precompiled_objects.go | 22 ++++++------ .../cloud_bucket/precompiled_objects_test.go | 34 ------------------- 2 files changed, 10 insertions(+), 46 deletions(-) diff --git a/playground/backend/internal/cloud_bucket/precompiled_objects.go b/playground/backend/internal/cloud_bucket/precompiled_objects.go index 063def60ef16..3d855e407c6a 100644 --- a/playground/backend/internal/cloud_bucket/precompiled_objects.go +++ b/playground/backend/internal/cloud_bucket/precompiled_objects.go @@ -32,18 +32,16 @@ import ( ) const ( - BucketName = "playground-precompiled-objects" - OutputExtension = "output" - LogsExtension = "log" - MetaInfoName = "meta.info" - Timeout = time.Second * 10 - javaExtension = "java" - goExtension = "go" - pyExtension = "py" - scioExtension = "scala" - separatorsNumber = 2 - defaultExamplesConfigName = "DEFAULT_EXAMPLES.json" - configFolderName = "configs" + BucketName = "playground-precompiled-objects" + OutputExtension = "output" + LogsExtension = "log" + MetaInfoName = "meta.info" + Timeout = time.Second * 10 + javaExtension = "java" + goExtension = "go" + pyExtension = "py" + scioExtension = "scala" + separatorsNumber = 2 ) type ObjectInfo struct { diff --git a/playground/backend/internal/cloud_bucket/precompiled_objects_test.go b/playground/backend/internal/cloud_bucket/precompiled_objects_test.go index 74c6f71564b7..676e2b8d5ed8 100644 --- a/playground/backend/internal/cloud_bucket/precompiled_objects_test.go +++ b/playground/backend/internal/cloud_bucket/precompiled_objects_test.go @@ -18,10 +18,6 @@ package cloud_bucket import ( pb "beam.apache.org/playground/backend/internal/api/v1" "context" - "fmt" - "io/fs" - "os" - "path/filepath" "reflect" "testing" ) @@ -29,7 +25,6 @@ import ( const ( precompiledObjectPath = "SDK_JAVA/MinimalWordCount" targetSdk = pb.Sdk_SDK_UNSPECIFIED - defaultExamplesConfig = "{\n \"SDK_JAVA\": \"1\",\n \"SDK_GO\": \"2\",\n \"SDK_PYTHON\": \"3\"\n}" ) var bucket *CloudStorage @@ -40,35 +35,6 @@ func init() { ctx = context.Background() } -func TestMain(m *testing.M) { - err := setup() - if err != nil { - panic(fmt.Errorf("error during test setup: %s", err.Error())) - } - defer teardown() - m.Run() -} - -func setup() error { - err := os.Mkdir(configFolderName, fs.ModePerm) - if err != nil { - return err - } - filePath := filepath.Join(configFolderName, defaultExamplesConfigName) - err = os.WriteFile(filePath, []byte(defaultExamplesConfig), 0600) - if err != nil { - return err - } - return nil -} - -func teardown() { - err := os.RemoveAll(configFolderName) - if err != nil { - panic(fmt.Errorf("error during test setup: %s", err.Error())) - } -} - func Test_getFullFilePath(t *testing.T) { type args struct { examplePath string From d6e5d0bb0d21b6f62091c12a900566a9152bb2e8 Mon Sep 17 00:00:00 2001 From: Pavel Avilov Date: Tue, 18 Jan 2022 14:49:49 +0300 Subject: [PATCH 10/36] Add the `link` field to response --- playground/backend/cmd/server/controller.go | 1 + .../backend/internal/cloud_bucket/precompiled_objects_test.go | 2 +- .../backend/internal/environment/environment_service_test.go | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/playground/backend/cmd/server/controller.go b/playground/backend/cmd/server/controller.go index 9788d24d9c05..dfed5d47f4b3 100644 --- a/playground/backend/cmd/server/controller.go +++ b/playground/backend/cmd/server/controller.go @@ -316,6 +316,7 @@ func (controller *playgroundController) GetDefaultPrecompiledObject(ctx context. Description: precompiledObject.Description, Type: precompiledObject.Type, PipelineOptions: precompiledObject.PipelineOptions, + Link: precompiledObject.Link, }} return &response, nil } diff --git a/playground/backend/internal/cloud_bucket/precompiled_objects_test.go b/playground/backend/internal/cloud_bucket/precompiled_objects_test.go index 676e2b8d5ed8..77a3c711654d 100644 --- a/playground/backend/internal/cloud_bucket/precompiled_objects_test.go +++ b/playground/backend/internal/cloud_bucket/precompiled_objects_test.go @@ -248,7 +248,7 @@ func Benchmark_GetPrecompiledObjectOutput(b *testing.B) { } } -func Benchmark_GetPrecompiledObject(b *testing.B) { +func Benchmark_GetPrecompiledObjectCode(b *testing.B) { for i := 0; i < b.N; i++ { _, _ = bucket.GetPrecompiledObjectCode(ctx, precompiledObjectPath) } diff --git a/playground/backend/internal/environment/environment_service_test.go b/playground/backend/internal/environment/environment_service_test.go index 43bc16a10479..1403df63db0c 100644 --- a/playground/backend/internal/environment/environment_service_test.go +++ b/playground/backend/internal/environment/environment_service_test.go @@ -322,12 +322,16 @@ func Test_getDefaultExamplesFromJson(t *testing.T) { wantErr bool }{ { + // Test case with getting default example from json when it exists. + // As a result, want to receive an expected path to default example on bucket. name: "get object from json", args: args{filepath.Join(configFolderName, defaultSdk.String()+jsonExt)}, want: "SDK_JAVA/MinimalWordCount", wantErr: false, }, { + // Test case with getting default example from json when it doesn't exist. + // As a result, want to receive an error. name: "error if wrong json path", args: args{filepath.Join("wrong_folder", defaultSdk.String()+jsonExt)}, want: "", From e035006e332d3d0603cc4aa9e5d910a74a28f5e1 Mon Sep 17 00:00:00 2001 From: Pavel Avilov Date: Wed, 19 Jan 2022 15:17:48 +0300 Subject: [PATCH 11/36] Remove gjson; Resolve conflicts; --- playground/backend/go.mod | 1 - playground/backend/go.sum | 6 - playground/backend/internal/api/v1/api.pb.go | 275 ++++++++++-------- .../environment/environment_service.go | 10 +- playground/frontend/lib/api/v1/api.pb.dart | 79 +---- .../frontend/lib/api/v1/api.pbjson.dart | 3 +- 6 files changed, 169 insertions(+), 205 deletions(-) diff --git a/playground/backend/go.mod b/playground/backend/go.mod index f2714a7a905a..8a619ef3f050 100644 --- a/playground/backend/go.mod +++ b/playground/backend/go.mod @@ -25,7 +25,6 @@ require ( github.com/google/uuid v1.3.0 github.com/improbable-eng/grpc-web v0.14.1 github.com/rs/cors v1.8.0 - github.com/tidwall/gjson v1.13.0 go.uber.org/goleak v1.1.12 google.golang.org/api v0.58.0 google.golang.org/grpc v1.41.0 diff --git a/playground/backend/go.sum b/playground/backend/go.sum index 096e6bce8f07..840556536a6b 100644 --- a/playground/backend/go.sum +++ b/playground/backend/go.sum @@ -454,12 +454,6 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/tidwall/gjson v1.13.0 h1:3TFY9yxOQShrvmjdM76K+jc66zJeT6D3/VFFYCGQf7M= -github.com/tidwall/gjson v1.13.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= -github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= -github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= -github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= diff --git a/playground/backend/internal/api/v1/api.pb.go b/playground/backend/internal/api/v1/api.pb.go index 3a2135c090f7..30d762bf9dee 100644 --- a/playground/backend/internal/api/v1/api.pb.go +++ b/playground/backend/internal/api/v1/api.pb.go @@ -1898,136 +1898,155 @@ var file_api_v1_api_proto_rawDesc = []byte{ 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x5a, - 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x39, 0x0a, 0x0e, 0x73, 0x64, 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x0d, 0x73, 0x64, 0x6b, - 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0x36, 0x0a, 0x20, 0x47, 0x65, - 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x22, 0x3c, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, - 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x22, 0x3a, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, - 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2a, 0x52, 0x0a, 0x03, - 0x53, 0x64, 0x6b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x44, 0x4b, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, - 0x4a, 0x41, 0x56, 0x41, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x44, 0x4b, 0x5f, 0x47, 0x4f, - 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x44, 0x4b, 0x5f, 0x50, 0x59, 0x54, 0x48, 0x4f, 0x4e, - 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, 0x53, 0x43, 0x49, 0x4f, 0x10, 0x04, - 0x2a, 0xb8, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, - 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x1c, 0x0a, - 0x18, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x49, 0x4e, 0x47, 0x10, - 0x05, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, - 0x49, 0x4c, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4e, 0x47, 0x10, - 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x49, - 0x53, 0x48, 0x45, 0x44, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x09, 0x12, 0x10, 0x0a, 0x0c, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x0a, 0x12, 0x16, - 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x54, 0x49, 0x4d, - 0x45, 0x4f, 0x55, 0x54, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x0c, 0x2a, 0xae, 0x01, 0x0a, 0x15, - 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x23, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, - 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, - 0x0a, 0x1f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, - 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x41, 0x4d, 0x50, 0x4c, - 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, - 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4b, - 0x41, 0x54, 0x41, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, - 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x03, 0x32, 0xf2, 0x08, 0x0a, - 0x11, 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, - 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, - 0x0b, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x22, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, - 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x23, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, - 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, - 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x37, 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x43, + 0x0a, 0x22, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x03, 0x73, 0x64, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x64, 0x6b, 0x52, 0x03, + 0x73, 0x64, 0x6b, 0x22, 0x5a, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0e, 0x73, 0x64, 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x65, + 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, + 0x52, 0x0d, 0x73, 0x64, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, + 0x36, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x3c, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x3a, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x22, 0x6f, 0x0a, 0x23, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, - 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, - 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, - 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, - 0x1a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x29, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, - 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, - 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x27, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, - 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x63, + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, + 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x11, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x2a, 0x52, 0x0a, 0x03, 0x53, 0x64, 0x6b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x44, 0x4b, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, + 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, 0x4a, 0x41, 0x56, 0x41, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, + 0x53, 0x44, 0x4b, 0x5f, 0x47, 0x4f, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x44, 0x4b, 0x5f, + 0x50, 0x59, 0x54, 0x48, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, + 0x53, 0x43, 0x49, 0x4f, 0x10, 0x04, 0x2a, 0xb8, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, + 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x14, 0x0a, + 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x49, 0x4e, + 0x47, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, + 0x45, 0x50, 0x41, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, + 0x04, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, + 0x49, 0x4c, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, + 0x06, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x45, 0x43, + 0x55, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x10, 0x09, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, + 0x4f, 0x52, 0x10, 0x0a, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, + 0x55, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, + 0x0c, 0x2a, 0xae, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x23, 0x50, + 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, + 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, + 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x45, 0x58, 0x41, 0x4d, 0x50, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x52, 0x45, + 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4b, 0x41, 0x54, 0x41, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x50, + 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, + 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, + 0x10, 0x03, 0x32, 0xea, 0x09, 0x0a, 0x11, 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, + 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x43, + 0x6f, 0x64, 0x65, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, + 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, + 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1b, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, + 0x67, 0x73, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, + 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, + 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x13, 0x47, + 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x47, + 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, + 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, + 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, + 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x42, 0x38, 0x5a, 0x36, 0x62, 0x65, 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, - 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x3b, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, + 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, + 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, + 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0x38, 0x5a, 0x36, 0x62, 0x65, 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x6f, + 0x72, 0x67, 0x2f, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x62, 0x61, + 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x3b, 0x70, + 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/playground/backend/internal/environment/environment_service.go b/playground/backend/internal/environment/environment_service.go index 99ea65a6a7e0..bc41dc6d6740 100644 --- a/playground/backend/internal/environment/environment_service.go +++ b/playground/backend/internal/environment/environment_service.go @@ -21,7 +21,6 @@ import ( "encoding/json" "errors" "fmt" - "github.com/tidwall/gjson" "io/ioutil" "log" "os" @@ -252,8 +251,13 @@ func getDefaultExamplesPathFromJson(configPath string) (string, error) { if err != nil { return "", err } - defaultExamplePath := gjson.Get(string(file), defaultExampleKey).String() - return defaultExamplePath, nil + jsonMap := make(map[string]interface{}) + err = json.Unmarshal(file, &jsonMap) + if err != nil { + return "", err + } + defaultExamplePath := jsonMap[defaultExampleKey] + return fmt.Sprint(defaultExamplePath), nil } // getEnv returns an environment variable or default value diff --git a/playground/frontend/lib/api/v1/api.pb.dart b/playground/frontend/lib/api/v1/api.pb.dart index 824d9b0ab95e..b01190c7bb53 100644 --- a/playground/frontend/lib/api/v1/api.pb.dart +++ b/playground/frontend/lib/api/v1/api.pb.dart @@ -888,54 +888,17 @@ class CancelResponse extends $pb.GeneratedMessage { } class PrecompiledObject extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'PrecompiledObject', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'api.v1'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'cloudPath') - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'name') - ..aOS( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'description') - ..e( - 4, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'type', - $pb.PbFieldType.OE, - defaultOrMaker: - PrecompiledObjectType.PRECOMPILED_OBJECT_TYPE_UNSPECIFIED, - valueOf: PrecompiledObjectType.valueOf, - enumValues: PrecompiledObjectType.values) - ..aOS( - 5, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'pipelineOptions') - ..aOS( - 6, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'link') - ..hasRequiredFields = false; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'PrecompiledObject', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cloudPath') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'description') + ..e(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'type', $pb.PbFieldType.OE, defaultOrMaker: PrecompiledObjectType.PRECOMPILED_OBJECT_TYPE_UNSPECIFIED, valueOf: PrecompiledObjectType.valueOf, enumValues: PrecompiledObjectType.values) + ..aOS(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pipelineOptions') + ..aOS(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'link') + ..hasRequiredFields = false + ; PrecompiledObject._() : super(); - factory PrecompiledObject({ $core.String? cloudPath, $core.String? name, @@ -1006,12 +969,8 @@ class PrecompiledObject extends $pb.GeneratedMessage { @$pb.TagNumber(3) $core.String get description => $_getSZ(2); - @$pb.TagNumber(3) - set description($core.String v) { - $_setString(2, v); - } - + set description($core.String v) { $_setString(2, v); } @$pb.TagNumber(3) $core.bool hasDescription() => $_has(2); @$pb.TagNumber(3) @@ -1019,12 +978,8 @@ class PrecompiledObject extends $pb.GeneratedMessage { @$pb.TagNumber(4) PrecompiledObjectType get type => $_getN(3); - @$pb.TagNumber(4) - set type(PrecompiledObjectType v) { - setField(4, v); - } - + set type(PrecompiledObjectType v) { setField(4, v); } @$pb.TagNumber(4) $core.bool hasType() => $_has(3); @$pb.TagNumber(4) @@ -1032,12 +987,8 @@ class PrecompiledObject extends $pb.GeneratedMessage { @$pb.TagNumber(5) $core.String get pipelineOptions => $_getSZ(4); - @$pb.TagNumber(5) - set pipelineOptions($core.String v) { - $_setString(4, v); - } - + set pipelineOptions($core.String v) { $_setString(4, v); } @$pb.TagNumber(5) $core.bool hasPipelineOptions() => $_has(4); @$pb.TagNumber(5) @@ -1045,12 +996,8 @@ class PrecompiledObject extends $pb.GeneratedMessage { @$pb.TagNumber(6) $core.String get link => $_getSZ(5); - @$pb.TagNumber(6) - set link($core.String v) { - $_setString(5, v); - } - + set link($core.String v) { $_setString(5, v); } @$pb.TagNumber(6) $core.bool hasLink() => $_has(5); @$pb.TagNumber(6) diff --git a/playground/frontend/lib/api/v1/api.pbjson.dart b/playground/frontend/lib/api/v1/api.pbjson.dart index 94edab5b1da3..a2d3c331d08c 100644 --- a/playground/frontend/lib/api/v1/api.pbjson.dart +++ b/playground/frontend/lib/api/v1/api.pbjson.dart @@ -263,11 +263,12 @@ const PrecompiledObject$json = const { const {'1': 'description', '3': 3, '4': 1, '5': 9, '10': 'description'}, const {'1': 'type', '3': 4, '4': 1, '5': 14, '6': '.api.v1.PrecompiledObjectType', '10': 'type'}, const {'1': 'pipeline_options', '3': 5, '4': 1, '5': 9, '10': 'pipelineOptions'}, + const {'1': 'link', '3': 6, '4': 1, '5': 9, '10': 'link'}, ], }; /// Descriptor for `PrecompiledObject`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List precompiledObjectDescriptor = $convert.base64Decode('ChFQcmVjb21waWxlZE9iamVjdBIdCgpjbG91ZF9wYXRoGAEgASgJUgljbG91ZFBhdGgSEgoEbmFtZRgCIAEoCVIEbmFtZRIgCgtkZXNjcmlwdGlvbhgDIAEoCVILZGVzY3JpcHRpb24SMQoEdHlwZRgEIAEoDjIdLmFwaS52MS5QcmVjb21waWxlZE9iamVjdFR5cGVSBHR5cGUSKQoQcGlwZWxpbmVfb3B0aW9ucxgFIAEoCVIPcGlwZWxpbmVPcHRpb25z'); +final $typed_data.Uint8List precompiledObjectDescriptor = $convert.base64Decode('ChFQcmVjb21waWxlZE9iamVjdBIdCgpjbG91ZF9wYXRoGAEgASgJUgljbG91ZFBhdGgSEgoEbmFtZRgCIAEoCVIEbmFtZRIgCgtkZXNjcmlwdGlvbhgDIAEoCVILZGVzY3JpcHRpb24SMQoEdHlwZRgEIAEoDjIdLmFwaS52MS5QcmVjb21waWxlZE9iamVjdFR5cGVSBHR5cGUSKQoQcGlwZWxpbmVfb3B0aW9ucxgFIAEoCVIPcGlwZWxpbmVPcHRpb25zEhIKBGxpbmsYBiABKAlSBGxpbms='); @$core.Deprecated('Use categoriesDescriptor instead') const Categories$json = const { '1': 'Categories', From c3c5c79ed0714f1cf2a1c7a4a825734531034e74 Mon Sep 17 00:00:00 2001 From: Pavel Avilov Date: Wed, 19 Jan 2022 15:31:15 +0300 Subject: [PATCH 12/36] Refactoring code --- .../internal/environment/environment_service_test.go | 2 +- .../internal/setup_tools/builder/setup_builder_test.go | 6 +++--- .../internal/utils/precompiled_objects_utils_test.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/playground/backend/internal/environment/environment_service_test.go b/playground/backend/internal/environment/environment_service_test.go index 1403df63db0c..cd0cfa224514 100644 --- a/playground/backend/internal/environment/environment_service_test.go +++ b/playground/backend/internal/environment/environment_service_test.go @@ -112,7 +112,7 @@ func TestNewEnvironment(t *testing.T) { func Test_getSdkEnvsFromOsEnvs(t *testing.T) { workingDir := "./" preparedModDir := "" - preparedDefaultExamplePath := "" + preparedDefaultExamplePath := "SDK_JAVA/MinimalWordCount" tests := []struct { name string want *BeamEnvs diff --git a/playground/backend/internal/setup_tools/builder/setup_builder_test.go b/playground/backend/internal/setup_tools/builder/setup_builder_test.go index 89c577c76675..a839192c603d 100644 --- a/playground/backend/internal/setup_tools/builder/setup_builder_test.go +++ b/playground/backend/internal/setup_tools/builder/setup_builder_test.go @@ -47,7 +47,7 @@ func setup() { CompileCmd: "MOCK_COMPILE_CMD", CompileArgs: []string{"MOCK_COMPILE_ARG"}, } - sdkEnv = environment.NewBeamEnvs(sdk, executorConfig, "", 0) + sdkEnv = environment.NewBeamEnvs(sdk, executorConfig, "", "", 0) } func TestValidator(t *testing.T) { @@ -59,7 +59,7 @@ func TestValidator(t *testing.T) { WithValidator(). WithSdkValidators(vals) - wrongSdkEnv := environment.NewBeamEnvs(pb.Sdk_SDK_UNSPECIFIED, sdkEnv.ExecutorConfig, "", 0) + wrongSdkEnv := environment.NewBeamEnvs(pb.Sdk_SDK_UNSPECIFIED, sdkEnv.ExecutorConfig, "", "", 0) type args struct { paths *fs_tool.LifeCyclePaths @@ -126,7 +126,7 @@ func TestPreparer(t *testing.T) { WithPreparer(). WithSdkPreparers(prep) - wrongSdkEnv := environment.NewBeamEnvs(pb.Sdk_SDK_UNSPECIFIED, sdkEnv.ExecutorConfig, "", 0) + wrongSdkEnv := environment.NewBeamEnvs(pb.Sdk_SDK_UNSPECIFIED, sdkEnv.ExecutorConfig, "", "", 0) type args struct { paths fs_tool.LifeCyclePaths diff --git a/playground/backend/internal/utils/precompiled_objects_utils_test.go b/playground/backend/internal/utils/precompiled_objects_utils_test.go index d24f865ec4ac..2cbcccd40674 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils_test.go +++ b/playground/backend/internal/utils/precompiled_objects_utils_test.go @@ -24,7 +24,7 @@ import ( func TestPutPrecompiledObjectsToCategory(t *testing.T) { precompiledObjectToAdd := &cloud_bucket.PrecompiledObjects{ - {"TestName", "SDK_JAVA/TestCategory/TestName.java", "TestDescription", pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, []string{""}, ""}, + {"TestName", "SDK_JAVA/TestCategory/TestName.java", "TestDescription", pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, []string{""}, "", ""}, } type args struct { categoryName string From 29e6f61a5460ae88e5183e8fbd3ab0f4236a91ff Mon Sep 17 00:00:00 2001 From: Pavel Avilov Date: Fri, 21 Jan 2022 09:52:24 +0300 Subject: [PATCH 13/36] Getting default precompiled object from cache --- playground/api/v1/api.proto | 1 + playground/backend/cmd/server/controller.go | 10 +- playground/backend/cmd/server/server.go | 5 + playground/backend/configs/SDK_GO.json | 3 +- playground/backend/configs/SDK_JAVA.json | 3 +- playground/backend/configs/SDK_PYTHON.json | 3 +- playground/backend/internal/api/v1/api.pb.go | 354 +++++++++--------- playground/backend/internal/cache/cache.go | 3 + .../cloud_bucket/precompiled_objects.go | 30 +- .../backend/internal/environment/beam.go | 18 +- .../environment/environment_service.go | 24 +- .../environment/environment_service_test.go | 57 +-- .../setup_tools/builder/setup_builder_test.go | 6 +- .../utils/precompiled_objects_utils.go | 20 + .../utils/precompiled_objects_utils_test.go | 85 ++++- playground/frontend/lib/api/v1/api.pb.dart | 14 + .../frontend/lib/api/v1/api.pbjson.dart | 3 +- 17 files changed, 339 insertions(+), 300 deletions(-) diff --git a/playground/api/v1/api.proto b/playground/api/v1/api.proto index 08e6453a9fe4..b969d2d72526 100644 --- a/playground/api/v1/api.proto +++ b/playground/api/v1/api.proto @@ -153,6 +153,7 @@ message PrecompiledObject{ string pipeline_options = 5; // Link to the example in the Beam repository string link = 6; + bool default_example = 7; } // Categories represent the array of messages with sdk and categories at this sdk diff --git a/playground/backend/cmd/server/controller.go b/playground/backend/cmd/server/controller.go index 5ea3dbc48cc4..c77e04683648 100644 --- a/playground/backend/cmd/server/controller.go +++ b/playground/backend/cmd/server/controller.go @@ -308,13 +308,12 @@ func (controller *playgroundController) GetDefaultPrecompiledObject(ctx context. return nil, errors.InvalidArgumentError("Error during preparing", "Sdk is not implemented yet: %s", info.Sdk.String()) } - bucket := cloud_bucket.New() - precompiledObject, err := bucket.GetDefaultPrecompiledObject(ctx, controller.env.BeamSdkEnvs.DefaultExamplePath()) + defaultPrecompiledObjects, err := controller.cacheService.GetValue(ctx, uuid.Nil, cache.DefaultPrecompiledObjects) if err != nil { - logger.Errorf("GetDefaultPrecompiledObject(): cloud storage error: %s", err.Error()) - return nil, errors.InternalError("Error during getting default Precompiled Object", "Error with cloud connection") + logger.Errorf("GetDefaultPrecompiledObject(): cache.GetValue: %s\n", err.Error()) + return nil, errors.InvalidArgumentError("Error during getting default Precompiled Objects from cache", "Error during getting default Precompiled Objects") } - + precompiledObject := defaultPrecompiledObjects.(map[pb.Sdk]*pb.PrecompiledObject)[info.Sdk] response := pb.GetDefaultPrecompiledObjectResponse{PrecompiledObject: &pb.PrecompiledObject{ CloudPath: precompiledObject.CloudPath, Name: precompiledObject.Name, @@ -322,6 +321,7 @@ func (controller *playgroundController) GetDefaultPrecompiledObject(ctx context. Type: precompiledObject.Type, PipelineOptions: precompiledObject.PipelineOptions, Link: precompiledObject.Link, + DefaultExample: precompiledObject.DefaultExample, }} return &response, nil } diff --git a/playground/backend/cmd/server/server.go b/playground/backend/cmd/server/server.go index eb138c358d2e..49a190d41325 100644 --- a/playground/backend/cmd/server/server.go +++ b/playground/backend/cmd/server/server.go @@ -125,9 +125,14 @@ func setupExamplesCatalog(ctx context.Context, cacheService cache.Cache) error { if err != nil { return err } + defaultPrecompiledObjects := utils.GetDefaultPrecompiledObjects(sdkCategories) + if err = utils.SetToCache(ctx, cacheService, uuid.Nil, cache.ExamplesCatalog, sdkCategories); err != nil { return err } + if err = utils.SetToCache(ctx, cacheService, uuid.Nil, cache.DefaultPrecompiledObjects, defaultPrecompiledObjects); err != nil { + return err + } return nil } diff --git a/playground/backend/configs/SDK_GO.json b/playground/backend/configs/SDK_GO.json index 097af5ac41c8..790db4f31761 100644 --- a/playground/backend/configs/SDK_GO.json +++ b/playground/backend/configs/SDK_GO.json @@ -12,6 +12,5 @@ "test_args": [ "test", "-v" - ], - "default_example": "SDK_GO/MinimalWordCount" + ] } diff --git a/playground/backend/configs/SDK_JAVA.json b/playground/backend/configs/SDK_JAVA.json index 187fbb9fc4d3..47b0339a7add 100644 --- a/playground/backend/configs/SDK_JAVA.json +++ b/playground/backend/configs/SDK_JAVA.json @@ -16,6 +16,5 @@ "-cp", "bin:", "org.junit.runner.JUnitCore" - ], - "default_example": "SDK_JAVA/MinimalWordCount" + ] } diff --git a/playground/backend/configs/SDK_PYTHON.json b/playground/backend/configs/SDK_PYTHON.json index 6e14fabfece5..d1f89d366a52 100644 --- a/playground/backend/configs/SDK_PYTHON.json +++ b/playground/backend/configs/SDK_PYTHON.json @@ -4,6 +4,5 @@ "test_cmd": "pytest", "compile_args": [], "run_args": [], - "test_args": [], - "default_example": "SDK_PYTHON/WordCountWithMetrics" + "test_args": [] } diff --git a/playground/backend/internal/api/v1/api.pb.go b/playground/backend/internal/api/v1/api.pb.go index 30d762bf9dee..7826d2ff55c5 100644 --- a/playground/backend/internal/api/v1/api.pb.go +++ b/playground/backend/internal/api/v1/api.pb.go @@ -1107,7 +1107,8 @@ type PrecompiledObject struct { Type PrecompiledObjectType `protobuf:"varint,4,opt,name=type,proto3,enum=api.v1.PrecompiledObjectType" json:"type,omitempty"` PipelineOptions string `protobuf:"bytes,5,opt,name=pipeline_options,json=pipelineOptions,proto3" json:"pipeline_options,omitempty"` // Link to the example in the Beam repository - Link string `protobuf:"bytes,6,opt,name=link,proto3" json:"link,omitempty"` + Link string `protobuf:"bytes,6,opt,name=link,proto3" json:"link,omitempty"` + DefaultExample bool `protobuf:"varint,7,opt,name=default_example,json=defaultExample,proto3" json:"default_example,omitempty"` } func (x *PrecompiledObject) Reset() { @@ -1184,6 +1185,13 @@ func (x *PrecompiledObject) GetLink() string { return "" } +func (x *PrecompiledObject) GetDefaultExample() bool { + if x != nil { + return x.DefaultExample + } + return false +} + // Categories represent the array of messages with sdk and categories at this sdk type Categories struct { state protoimpl.MessageState @@ -1852,7 +1860,7 @@ var file_api_v1_api_proto_rawDesc = []byte{ 0x23, 0x0a, 0x0d, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x55, 0x75, 0x69, 0x64, 0x22, 0x10, 0x0a, 0x0e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xda, 0x01, 0x0a, 0x11, 0x50, 0x72, 0x65, 0x63, 0x6f, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x83, 0x02, 0x0a, 0x11, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, @@ -1866,187 +1874,189 @@ var file_api_v1_api_proto_rawDesc = []byte{ 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, - 0x69, 0x6e, 0x6b, 0x22, 0xe5, 0x01, 0x0a, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, - 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x03, 0x73, 0x64, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x64, 0x6b, 0x52, 0x03, 0x73, 0x64, - 0x6b, 0x12, 0x3b, 0x0a, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, - 0x72, 0x79, 0x52, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x1a, 0x7b, - 0x0a, 0x08, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x61, - 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x4a, 0x0a, 0x13, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x12, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, - 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, 0x59, 0x0a, 0x1c, 0x47, - 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x03, 0x73, + 0x69, 0x6e, 0x6b, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x65, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x22, 0xe5, 0x01, 0x0a, + 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x03, 0x73, 0x64, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x64, 0x6b, 0x52, 0x03, 0x73, 0x64, 0x6b, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, - 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, - 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x22, 0x40, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, - 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x42, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x50, + 0x31, 0x2e, 0x53, 0x64, 0x6b, 0x52, 0x03, 0x73, 0x64, 0x6b, 0x12, 0x3b, 0x0a, 0x0a, 0x63, 0x61, + 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, + 0x65, 0x73, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x0a, 0x63, 0x61, 0x74, + 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x1a, 0x7b, 0x0a, 0x08, 0x43, 0x61, 0x74, 0x65, 0x67, + 0x6f, 0x72, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x61, 0x74, 0x65, + 0x67, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x13, 0x70, 0x72, 0x65, 0x63, + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, - 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x40, 0x0a, 0x1f, - 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x43, - 0x0a, 0x22, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, + 0x52, 0x12, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x22, 0x59, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x03, 0x73, 0x64, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x64, 0x6b, 0x52, 0x03, - 0x73, 0x64, 0x6b, 0x22, 0x5a, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, - 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0e, 0x73, 0x64, 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x65, - 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, - 0x52, 0x0d, 0x73, 0x64, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, - 0x36, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x3c, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x50, 0x72, - 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x3a, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, + 0x73, 0x64, 0x6b, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x22, + 0x40, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, + 0x68, 0x22, 0x42, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x40, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x22, 0x6f, 0x0a, 0x23, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x43, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, + 0x03, 0x73, 0x64, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x64, 0x6b, 0x52, 0x03, 0x73, 0x64, 0x6b, 0x22, 0x5a, 0x0a, 0x1d, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, + 0x0e, 0x73, 0x64, 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x0d, 0x73, 0x64, 0x6b, 0x43, 0x61, + 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0x36, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, + 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, + 0x22, 0x3c, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x3a, + 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x6f, 0x0a, 0x23, 0x47, 0x65, + 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x48, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, + 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x11, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2a, 0x52, 0x0a, 0x03, 0x53, + 0x64, 0x6b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x44, 0x4b, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, 0x4a, + 0x41, 0x56, 0x41, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x44, 0x4b, 0x5f, 0x47, 0x4f, 0x10, + 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x44, 0x4b, 0x5f, 0x50, 0x59, 0x54, 0x48, 0x4f, 0x4e, 0x10, + 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, 0x53, 0x43, 0x49, 0x4f, 0x10, 0x04, 0x2a, + 0xb8, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, + 0x49, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x49, 0x4e, 0x47, 0x10, 0x05, + 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x49, + 0x4c, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x07, + 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, + 0x48, 0x45, 0x44, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x52, 0x55, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x09, 0x12, 0x10, 0x0a, 0x0c, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x0a, 0x12, 0x16, 0x0a, + 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, + 0x4f, 0x55, 0x54, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x0c, 0x2a, 0xae, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x63, - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, - 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, - 0x11, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x2a, 0x52, 0x0a, 0x03, 0x53, 0x64, 0x6b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x44, 0x4b, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, - 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, 0x4a, 0x41, 0x56, 0x41, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, - 0x53, 0x44, 0x4b, 0x5f, 0x47, 0x4f, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x44, 0x4b, 0x5f, - 0x50, 0x59, 0x54, 0x48, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, - 0x53, 0x43, 0x49, 0x4f, 0x10, 0x04, 0x2a, 0xb8, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, - 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, - 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x14, 0x0a, - 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x49, 0x4e, - 0x47, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, - 0x45, 0x50, 0x41, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, - 0x04, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, - 0x49, 0x4c, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, - 0x06, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x45, 0x43, - 0x55, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x10, 0x09, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, - 0x4f, 0x52, 0x10, 0x0a, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, - 0x55, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, - 0x0c, 0x2a, 0xae, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x23, 0x50, - 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, - 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x23, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x45, 0x58, 0x41, 0x4d, 0x50, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x52, 0x45, - 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4b, 0x41, 0x54, 0x41, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x50, - 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, - 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, - 0x10, 0x03, 0x32, 0xea, 0x09, 0x0a, 0x11, 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, - 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x43, - 0x6f, 0x64, 0x65, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, - 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, - 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1b, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, - 0x67, 0x73, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, - 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, - 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x13, 0x47, - 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x47, - 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, - 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, - 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, - 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, - 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, - 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, - 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, - 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, + 0x1f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, + 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x41, 0x4d, 0x50, 0x4c, 0x45, + 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, + 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4b, 0x41, + 0x54, 0x41, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, + 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x03, 0x32, 0xea, 0x09, 0x0a, 0x11, + 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, + 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, + 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, + 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x3a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, + 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x22, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x23, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, + 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, + 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, - 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, - 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, - 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, + 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, + 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x1a, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, - 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, - 0x38, 0x5a, 0x36, 0x62, 0x65, 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x6f, - 0x72, 0x67, 0x2f, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x3b, 0x70, - 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x76, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, + 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, + 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, + 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x38, 0x5a, 0x36, 0x62, 0x65, 0x61, 0x6d, + 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x6c, 0x61, 0x79, + 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x3b, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, + 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/playground/backend/internal/cache/cache.go b/playground/backend/internal/cache/cache.go index f607fb4f444b..b5b027acc2ad 100644 --- a/playground/backend/internal/cache/cache.go +++ b/playground/backend/internal/cache/cache.go @@ -58,6 +58,9 @@ const ( // ExamplesCatalog is catalog of examples available in Playground ExamplesCatalog SubKey = "EXAMPLES_CATALOG" + + // DefaultPrecompiledObjects is used to keep default precompiled objects for each SDK + DefaultPrecompiledObjects SubKey = "DEFAULT_PRECOMPILED_OBJECTS" ) // Cache is used to store states and outputs for Apache Beam pipelines that running in Playground diff --git a/playground/backend/internal/cloud_bucket/precompiled_objects.go b/playground/backend/internal/cloud_bucket/precompiled_objects.go index c345956e3286..87c87bf11ea5 100644 --- a/playground/backend/internal/cloud_bucket/precompiled_objects.go +++ b/playground/backend/internal/cloud_bucket/precompiled_objects.go @@ -32,7 +32,7 @@ import ( ) const ( - BucketName = "playground-precompiled-objects" + BucketName = "playground-examples228" OutputExtension = "output" LogsExtension = "log" MetaInfoName = "meta.info" @@ -50,8 +50,9 @@ type ObjectInfo struct { Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` Type pb.PrecompiledObjectType `protobuf:"varint,4,opt,name=type,proto3,enum=api.v1.PrecompiledObjectType" json:"type,omitempty"` Categories []string `json:"categories,omitempty"` - PipelineOptions string `protobuf:"bytes,3,opt,name=pipeline_options,proto3" json:"pipeline_options,omitempty"` - Link string `protobuf:"bytes,3,opt,name=link,proto3" json:"link,omitempty"` + PipelineOptions string `protobuf:"bytes,5,opt,name=pipeline_options,proto3" json:"pipeline_options,omitempty"` + Link string `protobuf:"bytes,6,opt,name=link,proto3" json:"link,omitempty"` + DefaultExample bool `protobuf:"varint,7,opt,name=default_example,json=defaultExample,proto3" json:"default_example,omitempty"` } type PrecompiledObjects []ObjectInfo @@ -174,26 +175,6 @@ func (cd *CloudStorage) GetPrecompiledObjects(ctx context.Context, targetSdk pb. return &precompiledObjects, nil } -// GetDefaultPrecompiledObject returns the default precompiled object for the sdk -func (cd *CloudStorage) GetDefaultPrecompiledObject(ctx context.Context, defaultExamplePath string) (*ObjectInfo, error) { - infoPath := filepath.Join(defaultExamplePath, MetaInfoName) - metaInfo, err := cd.getFileFromBucket(ctx, infoPath, "") - if err != nil { - return nil, err - } - - precompiledObject := ObjectInfo{} - err = json.Unmarshal(metaInfo, &precompiledObject) - if err != nil { - logger.Errorf("json.Unmarshal: %v", err.Error()) - return nil, err - } - - precompiledObject.CloudPath = filepath.Dir(infoPath) - - return &precompiledObject, nil -} - // getPrecompiledObjectsDirs finds directories with precompiled objects // Since there is no notion of directory at cloud storage, then // to avoid duplicates of a base path (directory) need to store it in a set/map. @@ -288,9 +269,6 @@ func getFileExtensionBySdk(precompiledObjectPath string) (string, error) { // getFullFilePath get full path to the precompiled object file func getFullFilePath(objectDir string, extension string) string { - if extension == "" { - return objectDir - } precompiledObjectName := filepath.Base(objectDir) //the base of the object's directory matches the name of the file fileName := strings.Join([]string{precompiledObjectName, extension}, ".") filePath := filepath.Join(objectDir, fileName) diff --git a/playground/backend/internal/environment/beam.go b/playground/backend/internal/environment/beam.go index 728982a19097..c40d86e15e5e 100644 --- a/playground/backend/internal/environment/beam.go +++ b/playground/backend/internal/environment/beam.go @@ -42,16 +42,15 @@ func NewExecutorConfig(compileCmd, runCmd, testCmd string, compileArgs, runArgs, // BeamEnvs contains all environments related of ApacheBeam. These will use to run pipelines type BeamEnvs struct { - ApacheBeamSdk pb.Sdk - ExecutorConfig *ExecutorConfig - preparedModDir string - numOfParallelJobs int - defaultExamplePath string + ApacheBeamSdk pb.Sdk + ExecutorConfig *ExecutorConfig + preparedModDir string + numOfParallelJobs int } // NewBeamEnvs is a BeamEnvs constructor -func NewBeamEnvs(apacheBeamSdk pb.Sdk, executorConfig *ExecutorConfig, preparedModDir, defaultExamplePath string, numOfParallelJobs int) *BeamEnvs { - return &BeamEnvs{ApacheBeamSdk: apacheBeamSdk, ExecutorConfig: executorConfig, preparedModDir: preparedModDir, numOfParallelJobs: numOfParallelJobs, defaultExamplePath: defaultExamplePath} +func NewBeamEnvs(apacheBeamSdk pb.Sdk, executorConfig *ExecutorConfig, preparedModDir string, numOfParallelJobs int) *BeamEnvs { + return &BeamEnvs{ApacheBeamSdk: apacheBeamSdk, ExecutorConfig: executorConfig, preparedModDir: preparedModDir, numOfParallelJobs: numOfParallelJobs} } // PreparedModDir returns the path to the directory where prepared go.mod and go.sum are located @@ -63,8 +62,3 @@ func (b *BeamEnvs) PreparedModDir() string { func (b *BeamEnvs) NumOfParallelJobs() int { return b.numOfParallelJobs } - -// DefaultExamplePath returns the path to the default example -func (b *BeamEnvs) DefaultExamplePath() string { - return b.defaultExamplePath -} diff --git a/playground/backend/internal/environment/environment_service.go b/playground/backend/internal/environment/environment_service.go index 5fad9102911f..221104a4918f 100644 --- a/playground/backend/internal/environment/environment_service.go +++ b/playground/backend/internal/environment/environment_service.go @@ -47,7 +47,6 @@ const ( projectIdKey = "GOOGLE_CLOUD_PROJECT" pipelinesFolderKey = "PIPELINES_FOLDER_NAME" defaultPipelinesFolder = "executable_files" - defaultExampleKey = "default_example" defaultLaunchSite = "local" defaultProtocol = "HTTP" defaultIp = "localhost" @@ -179,6 +178,8 @@ func ConfigureBeamEnvs(workDir string) (*BeamEnvs, error) { sdk = pb.Sdk_SDK_PYTHON case pb.Sdk_SDK_SCIO.String(): sdk = pb.Sdk_SDK_SCIO + default: + return nil, errors.New("incorrect value of sdk in the environment") } } if sdk == pb.Sdk_SDK_UNSPECIFIED { @@ -189,11 +190,7 @@ func ConfigureBeamEnvs(workDir string) (*BeamEnvs, error) { if err != nil { return nil, err } - defaultExamplePath, err := getDefaultExamplesPathFromJson(configPath) - if err != nil { - return nil, err - } - return NewBeamEnvs(sdk, executorConfig, preparedModDir, defaultExamplePath, numOfParallelJobs), nil + return NewBeamEnvs(sdk, executorConfig, preparedModDir, numOfParallelJobs), nil } // createExecutorConfig creates ExecutorConfig that corresponds to specific Apache Beam SDK. @@ -245,21 +242,6 @@ func getConfigFromJson(configPath string) (*ExecutorConfig, error) { return &executorConfig, err } -// getDefaultExamplesPathFromJson reads a json file and returns default example path -func getDefaultExamplesPathFromJson(configPath string) (string, error) { - file, err := ioutil.ReadFile(configPath) - if err != nil { - return "", err - } - jsonMap := make(map[string]interface{}) - err = json.Unmarshal(file, &jsonMap) - if err != nil { - return "", err - } - defaultExamplePath := jsonMap[defaultExampleKey] - return fmt.Sprint(defaultExamplePath), nil -} - // getEnv returns an environment variable or default value func getEnv(key, defaultValue string) string { if value, ok := os.LookupEnv(key); ok { diff --git a/playground/backend/internal/environment/environment_service_test.go b/playground/backend/internal/environment/environment_service_test.go index cd0cfa224514..b7cbace0367d 100644 --- a/playground/backend/internal/environment/environment_service_test.go +++ b/playground/backend/internal/environment/environment_service_test.go @@ -86,14 +86,13 @@ func setOsEnvs(envsToSet map[string]string) error { func TestNewEnvironment(t *testing.T) { executorConfig := NewExecutorConfig("javac", "java", "java", []string{""}, []string{""}, []string{""}) preparedModDir := "" - preparedDefaultExamplePath := "" tests := []struct { name string want *Environment }{ {name: "create env service with default envs", want: &Environment{ NetworkEnvs: *NewNetworkEnvs(defaultIp, defaultPort, defaultProtocol), - BeamSdkEnvs: *NewBeamEnvs(defaultSdk, executorConfig, preparedModDir, preparedDefaultExamplePath, 0), + BeamSdkEnvs: *NewBeamEnvs(defaultSdk, executorConfig, preparedModDir, 0), ApplicationEnvs: *NewApplicationEnvs("/app", defaultLaunchSite, defaultProjectId, defaultPipelinesFolder, &CacheEnvs{defaultCacheType, defaultCacheAddress, defaultCacheKeyExpirationTime}, defaultPipelineExecuteTimeout), }}, } @@ -101,7 +100,7 @@ func TestNewEnvironment(t *testing.T) { t.Run(tt.name, func(t *testing.T) { if got := NewEnvironment( *NewNetworkEnvs(defaultIp, defaultPort, defaultProtocol), - *NewBeamEnvs(defaultSdk, executorConfig, preparedModDir, preparedDefaultExamplePath, 0), + *NewBeamEnvs(defaultSdk, executorConfig, preparedModDir, 0), *NewApplicationEnvs("/app", defaultLaunchSite, defaultProjectId, defaultPipelinesFolder, &CacheEnvs{defaultCacheType, defaultCacheAddress, defaultCacheKeyExpirationTime}, defaultPipelineExecuteTimeout)); !reflect.DeepEqual(got, tt.want) { t.Errorf("NewEnvironment() = %v, want %v", got, tt.want) } @@ -112,28 +111,21 @@ func TestNewEnvironment(t *testing.T) { func Test_getSdkEnvsFromOsEnvs(t *testing.T) { workingDir := "./" preparedModDir := "" - preparedDefaultExamplePath := "SDK_JAVA/MinimalWordCount" tests := []struct { name string want *BeamEnvs envsToSet map[string]string wantErr bool }{ - { - name: "not specified beam sdk key in os envs", - want: nil, - envsToSet: map[string]string{}, - wantErr: true, - }, { name: "default beam envs", - want: NewBeamEnvs(defaultSdk, executorConfig, preparedModDir, preparedDefaultExamplePath, defaultNumOfParallelJobs), + want: NewBeamEnvs(defaultSdk, executorConfig, preparedModDir, defaultNumOfParallelJobs), envsToSet: map[string]string{beamSdkKey: "SDK_JAVA"}, wantErr: false, }, { name: "specific sdk key in os envs", - want: NewBeamEnvs(defaultSdk, executorConfig, preparedModDir, preparedDefaultExamplePath, defaultNumOfParallelJobs), + want: NewBeamEnvs(defaultSdk, executorConfig, preparedModDir, defaultNumOfParallelJobs), envsToSet: map[string]string{beamSdkKey: "SDK_JAVA"}, wantErr: false, }, @@ -310,44 +302,3 @@ func Test_getConfigFromJson(t *testing.T) { }) } } - -func Test_getDefaultExamplesFromJson(t *testing.T) { - type args struct { - configPath string - } - tests := []struct { - name string - args args - want string - wantErr bool - }{ - { - // Test case with getting default example from json when it exists. - // As a result, want to receive an expected path to default example on bucket. - name: "get object from json", - args: args{filepath.Join(configFolderName, defaultSdk.String()+jsonExt)}, - want: "SDK_JAVA/MinimalWordCount", - wantErr: false, - }, - { - // Test case with getting default example from json when it doesn't exist. - // As a result, want to receive an error. - name: "error if wrong json path", - args: args{filepath.Join("wrong_folder", defaultSdk.String()+jsonExt)}, - want: "", - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got, err := getDefaultExamplesPathFromJson(tt.args.configPath) - if (err != nil) != tt.wantErr { - t.Errorf("getDefaultExamplesPathFromJson() error = %v, wantErr %v", err, tt.wantErr) - return - } - if got != tt.want { - t.Errorf("getDefaultExamplesPathFromJson() got = %v, want %v", got, tt.want) - } - }) - } -} diff --git a/playground/backend/internal/setup_tools/builder/setup_builder_test.go b/playground/backend/internal/setup_tools/builder/setup_builder_test.go index a839192c603d..89c577c76675 100644 --- a/playground/backend/internal/setup_tools/builder/setup_builder_test.go +++ b/playground/backend/internal/setup_tools/builder/setup_builder_test.go @@ -47,7 +47,7 @@ func setup() { CompileCmd: "MOCK_COMPILE_CMD", CompileArgs: []string{"MOCK_COMPILE_ARG"}, } - sdkEnv = environment.NewBeamEnvs(sdk, executorConfig, "", "", 0) + sdkEnv = environment.NewBeamEnvs(sdk, executorConfig, "", 0) } func TestValidator(t *testing.T) { @@ -59,7 +59,7 @@ func TestValidator(t *testing.T) { WithValidator(). WithSdkValidators(vals) - wrongSdkEnv := environment.NewBeamEnvs(pb.Sdk_SDK_UNSPECIFIED, sdkEnv.ExecutorConfig, "", "", 0) + wrongSdkEnv := environment.NewBeamEnvs(pb.Sdk_SDK_UNSPECIFIED, sdkEnv.ExecutorConfig, "", 0) type args struct { paths *fs_tool.LifeCyclePaths @@ -126,7 +126,7 @@ func TestPreparer(t *testing.T) { WithPreparer(). WithSdkPreparers(prep) - wrongSdkEnv := environment.NewBeamEnvs(pb.Sdk_SDK_UNSPECIFIED, sdkEnv.ExecutorConfig, "", "", 0) + wrongSdkEnv := environment.NewBeamEnvs(pb.Sdk_SDK_UNSPECIFIED, sdkEnv.ExecutorConfig, "", 0) type args struct { paths fs_tool.LifeCyclePaths diff --git a/playground/backend/internal/utils/precompiled_objects_utils.go b/playground/backend/internal/utils/precompiled_objects_utils.go index c3b4a6d7e39b..7e1e768265dd 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils.go +++ b/playground/backend/internal/utils/precompiled_objects_utils.go @@ -43,6 +43,7 @@ func PutPrecompiledObjectsToCategory(categoryName string, precompiledObjects *cl Type: object.Type, PipelineOptions: object.PipelineOptions, Link: object.Link, + DefaultExample: object.DefaultExample, }) } sdkCategory.Categories = append(sdkCategory.Categories, &category) @@ -81,3 +82,22 @@ func GetPrecompiledObjectsCatalogFromStorage(ctx context.Context, sdk pb.Sdk, ca } return sdkCategories, nil } + +// GetDefaultPrecompiledObjects returns the default precompiled objects from the precompiled objects catalog +func GetDefaultPrecompiledObjects(sdkCategories []*pb.Categories) map[pb.Sdk]*pb.PrecompiledObject { + defaultPrecompiledObjects := make(map[pb.Sdk]*pb.PrecompiledObject) + for _, categories := range sdkCategories { + for _, category := range categories.Categories { + for _, precompiledObject := range category.PrecompiledObjects { + if precompiledObject.DefaultExample { + defaultPrecompiledObjects[categories.Sdk] = precompiledObject + break + } + } + if _, ok := defaultPrecompiledObjects[categories.Sdk]; ok { + break + } + } + } + return defaultPrecompiledObjects +} diff --git a/playground/backend/internal/utils/precompiled_objects_utils_test.go b/playground/backend/internal/utils/precompiled_objects_utils_test.go index 8791a411efdf..08217a56e851 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils_test.go +++ b/playground/backend/internal/utils/precompiled_objects_utils_test.go @@ -28,7 +28,7 @@ import ( func TestPutPrecompiledObjectsToCategory(t *testing.T) { precompiledObjectToAdd := &cloud_bucket.PrecompiledObjects{ - {"TestName", "SDK_JAVA/TestCategory/TestName.java", "TestDescription", pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, []string{""}, "", ""}, + {"TestName", "SDK_JAVA/TestCategory/TestName.java", "TestDescription", pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, []string{""}, "", "", false}, } type args struct { categoryName string @@ -156,3 +156,86 @@ func TestGetPrecompiledObjectsCatalogFromCache(t *testing.T) { }) } } + +func TestGetDefaultPrecompiledObjects(t *testing.T) { + preparedPrecompiledObjectJava := pb.PrecompiledObject{ + CloudPath: "SDK_JAVA/TestCategory/TestName1.java", + Name: "TestName1", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + DefaultExample: true, + } + preparedPrecompiledObjectGo := pb.PrecompiledObject{ + CloudPath: "SDK_GO/TestCategory/TestName.go", + Name: "TestName", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + DefaultExample: true, + } + sdkCategories := []*pb.Categories{ + { + Sdk: pb.Sdk_SDK_JAVA, + Categories: []*pb.Categories_Category{ + { + CategoryName: "TestCategory1", PrecompiledObjects: []*pb.PrecompiledObject{ + { + CloudPath: "SDK_JAVA/TestCategory/TestName.java", + Name: "TestName", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + DefaultExample: false, + }, + }, + }, + { + CategoryName: "TestCategory2", PrecompiledObjects: []*pb.PrecompiledObject{ + &preparedPrecompiledObjectJava, + { + CloudPath: "SDK_JAVA/TestCategory/TestName2.java", + Name: "TestName2", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + DefaultExample: false, + }, + }, + }, + }, + }, + { + Sdk: pb.Sdk_SDK_GO, + Categories: []*pb.Categories_Category{ + { + CategoryName: "TestCategory", PrecompiledObjects: []*pb.PrecompiledObject{ + &preparedPrecompiledObjectGo, + }, + }, + }, + }, + } + expectedDefaultPrecompiledObjects := make(map[pb.Sdk]*pb.PrecompiledObject) + expectedDefaultPrecompiledObjects[pb.Sdk_SDK_JAVA] = &preparedPrecompiledObjectJava + expectedDefaultPrecompiledObjects[pb.Sdk_SDK_GO] = &preparedPrecompiledObjectGo + type args struct { + sdkCategories []*pb.Categories + } + tests := []struct { + name string + args args + want map[pb.Sdk]*pb.PrecompiledObject + }{ + { + // Test case with getting default Precompiled Objects from the precompiled objects catalog + // As a result, want to receive an expected map of default Precompiled Objects. + name: "get default precompiled objects", + args: args{sdkCategories: sdkCategories}, + want: expectedDefaultPrecompiledObjects, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := GetDefaultPrecompiledObjects(tt.args.sdkCategories); !reflect.DeepEqual(got, tt.want) { + t.Errorf("GetDefaultPrecompiledObjects() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/playground/frontend/lib/api/v1/api.pb.dart b/playground/frontend/lib/api/v1/api.pb.dart index b01190c7bb53..caa90a468400 100644 --- a/playground/frontend/lib/api/v1/api.pb.dart +++ b/playground/frontend/lib/api/v1/api.pb.dart @@ -895,6 +895,7 @@ class PrecompiledObject extends $pb.GeneratedMessage { ..e(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'type', $pb.PbFieldType.OE, defaultOrMaker: PrecompiledObjectType.PRECOMPILED_OBJECT_TYPE_UNSPECIFIED, valueOf: PrecompiledObjectType.valueOf, enumValues: PrecompiledObjectType.values) ..aOS(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pipelineOptions') ..aOS(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'link') + ..aOB(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'defaultExample') ..hasRequiredFields = false ; @@ -906,6 +907,7 @@ class PrecompiledObject extends $pb.GeneratedMessage { PrecompiledObjectType? type, $core.String? pipelineOptions, $core.String? link, + $core.bool? defaultExample, }) { final _result = create(); if (cloudPath != null) { @@ -926,6 +928,9 @@ class PrecompiledObject extends $pb.GeneratedMessage { if (link != null) { _result.link = link; } + if (defaultExample != null) { + _result.defaultExample = defaultExample; + } return _result; } factory PrecompiledObject.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); @@ -1002,6 +1007,15 @@ class PrecompiledObject extends $pb.GeneratedMessage { $core.bool hasLink() => $_has(5); @$pb.TagNumber(6) void clearLink() => clearField(6); + + @$pb.TagNumber(7) + $core.bool get defaultExample => $_getBF(6); + @$pb.TagNumber(7) + set defaultExample($core.bool v) { $_setBool(6, v); } + @$pb.TagNumber(7) + $core.bool hasDefaultExample() => $_has(6); + @$pb.TagNumber(7) + void clearDefaultExample() => clearField(7); } class Categories_Category extends $pb.GeneratedMessage { diff --git a/playground/frontend/lib/api/v1/api.pbjson.dart b/playground/frontend/lib/api/v1/api.pbjson.dart index a2d3c331d08c..b5cd90fcc105 100644 --- a/playground/frontend/lib/api/v1/api.pbjson.dart +++ b/playground/frontend/lib/api/v1/api.pbjson.dart @@ -264,11 +264,12 @@ const PrecompiledObject$json = const { const {'1': 'type', '3': 4, '4': 1, '5': 14, '6': '.api.v1.PrecompiledObjectType', '10': 'type'}, const {'1': 'pipeline_options', '3': 5, '4': 1, '5': 9, '10': 'pipelineOptions'}, const {'1': 'link', '3': 6, '4': 1, '5': 9, '10': 'link'}, + const {'1': 'default_example', '3': 7, '4': 1, '5': 8, '10': 'defaultExample'}, ], }; /// Descriptor for `PrecompiledObject`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List precompiledObjectDescriptor = $convert.base64Decode('ChFQcmVjb21waWxlZE9iamVjdBIdCgpjbG91ZF9wYXRoGAEgASgJUgljbG91ZFBhdGgSEgoEbmFtZRgCIAEoCVIEbmFtZRIgCgtkZXNjcmlwdGlvbhgDIAEoCVILZGVzY3JpcHRpb24SMQoEdHlwZRgEIAEoDjIdLmFwaS52MS5QcmVjb21waWxlZE9iamVjdFR5cGVSBHR5cGUSKQoQcGlwZWxpbmVfb3B0aW9ucxgFIAEoCVIPcGlwZWxpbmVPcHRpb25zEhIKBGxpbmsYBiABKAlSBGxpbms='); +final $typed_data.Uint8List precompiledObjectDescriptor = $convert.base64Decode('ChFQcmVjb21waWxlZE9iamVjdBIdCgpjbG91ZF9wYXRoGAEgASgJUgljbG91ZFBhdGgSEgoEbmFtZRgCIAEoCVIEbmFtZRIgCgtkZXNjcmlwdGlvbhgDIAEoCVILZGVzY3JpcHRpb24SMQoEdHlwZRgEIAEoDjIdLmFwaS52MS5QcmVjb21waWxlZE9iamVjdFR5cGVSBHR5cGUSKQoQcGlwZWxpbmVfb3B0aW9ucxgFIAEoCVIPcGlwZWxpbmVPcHRpb25zEhIKBGxpbmsYBiABKAlSBGxpbmsSJwoPZGVmYXVsdF9leGFtcGxlGAcgASgIUg5kZWZhdWx0RXhhbXBsZQ=='); @$core.Deprecated('Use categoriesDescriptor instead') const Categories$json = const { '1': 'Categories', From 56888415c55cf15b2f6f6f1c741dc257df1ce205 Mon Sep 17 00:00:00 2001 From: Pavel Avilov Date: Fri, 21 Jan 2022 16:38:29 +0300 Subject: [PATCH 14/36] Refactoring code --- playground/backend/internal/cloud_bucket/precompiled_objects.go | 2 +- .../backend/internal/environment/environment_service_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/playground/backend/internal/cloud_bucket/precompiled_objects.go b/playground/backend/internal/cloud_bucket/precompiled_objects.go index 87c87bf11ea5..392c6a9bff6f 100644 --- a/playground/backend/internal/cloud_bucket/precompiled_objects.go +++ b/playground/backend/internal/cloud_bucket/precompiled_objects.go @@ -32,7 +32,7 @@ import ( ) const ( - BucketName = "playground-examples228" + BucketName = "playground-precompiled-objects" OutputExtension = "output" LogsExtension = "log" MetaInfoName = "meta.info" diff --git a/playground/backend/internal/environment/environment_service_test.go b/playground/backend/internal/environment/environment_service_test.go index b7cbace0367d..43c1c557c185 100644 --- a/playground/backend/internal/environment/environment_service_test.go +++ b/playground/backend/internal/environment/environment_service_test.go @@ -26,7 +26,7 @@ import ( ) const ( - javaConfig = "{\n \"compile_cmd\": \"javac\",\n \"run_cmd\": \"java\",\n \"test_cmd\": \"java\",\n \"compile_args\": [\n \"-d\",\n \"bin\",\n \"-classpath\"\n ],\n \"run_args\": [\n \"-cp\",\n \"bin:\"\n ],\n \"test_args\": [\n \"-cp\",\n \"bin:\",\n \"org.junit.runner.JUnitCore\"\n ],\n \"default_example\": \"SDK_JAVA/MinimalWordCount\"\n}" + javaConfig = "{\n \"compile_cmd\": \"javac\",\n \"run_cmd\": \"java\",\n \"test_cmd\": \"java\",\n \"compile_args\": [\n \"-d\",\n \"bin\",\n \"-classpath\"\n ],\n \"run_args\": [\n \"-cp\",\n \"bin:\"\n ],\n \"test_args\": [\n \"-cp\",\n \"bin:\",\n \"org.junit.runner.JUnitCore\"\n ]\n}" defaultProjectId = "" ) From 43fc19b12f84cb96b4fdfedd333fd3c4e5a50468 Mon Sep 17 00:00:00 2001 From: Artur Khanin Date: Wed, 12 Jan 2022 15:59:25 +0300 Subject: [PATCH 15/36] Added saving of precompiled objects catalog to cache at the server startup --- playground/backend/cmd/server/controller.go | 38 ++++++--- playground/backend/cmd/server/server.go | 18 ++++ playground/backend/internal/cache/cache.go | 3 + .../utils/precompiled_objects_utils.go | 43 ++++++++++ .../utils/precompiled_objects_utils_test.go | 83 +++++++++++++++++++ 5 files changed, 173 insertions(+), 12 deletions(-) diff --git a/playground/backend/cmd/server/controller.go b/playground/backend/cmd/server/controller.go index 1d9a3345a6c6..e5be3d201401 100644 --- a/playground/backend/cmd/server/controller.go +++ b/playground/backend/cmd/server/controller.go @@ -241,20 +241,34 @@ func (controller *playgroundController) Cancel(ctx context.Context, info *pb.Can } // GetPrecompiledObjects returns the list of examples +// - If SDK and category are unspecified in the request, gets the whole catalog from the cache +// - If there is no catalog in the cache, gets the catalog from the Storage and saves it to the cache +// - If SDK or category is specified in the request, gets the specific catalog from the Storage func (controller *playgroundController) GetPrecompiledObjects(ctx context.Context, info *pb.GetPrecompiledObjectsRequest) (*pb.GetPrecompiledObjectsResponse, error) { - bucket := cloud_bucket.New() - sdkToCategories, err := bucket.GetPrecompiledObjects(ctx, info.Sdk, info.Category) - if err != nil { - logger.Errorf("GetPrecompiledObjects(): cloud storage error: %s", err.Error()) - return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") - } - response := pb.GetPrecompiledObjectsResponse{SdkCategories: make([]*pb.Categories, 0)} - for sdkName, categories := range *sdkToCategories { - sdkCategory := pb.Categories{Sdk: pb.Sdk(pb.Sdk_value[sdkName]), Categories: make([]*pb.Categories_Category, 0)} - for categoryName, precompiledObjects := range categories { - utils.PutPrecompiledObjectsToCategory(categoryName, &precompiledObjects, &sdkCategory) + var response pb.GetPrecompiledObjectsResponse + if info.Sdk != pb.Sdk_SDK_UNSPECIFIED || info.Category != "" { + sdkCategories, err := utils.GetPrecompiledObjectsCatalogFromStorage(ctx, info.Sdk, info.Category) + if err != nil { + logger.Errorf("GetPrecompiledObjects(): cloud storage error: %s", err.Error()) + return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") + } + response = pb.GetPrecompiledObjectsResponse{SdkCategories: sdkCategories} + } else { + catalog, err := utils.GetPrecompiledObjectsCatalogFromCache(ctx, controller.cacheService) + if err == nil { + response = pb.GetPrecompiledObjectsResponse{SdkCategories: catalog} + } else { + logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) + sdkCategories, err := utils.GetPrecompiledObjectsCatalogFromStorage(ctx, info.Sdk, info.Category) + if err != nil { + logger.Errorf("GetPrecompiledObjects(): cloud storage error: %s", err.Error()) + return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") + } + response = pb.GetPrecompiledObjectsResponse{SdkCategories: sdkCategories} + if err = utils.SetToCache(ctx, controller.cacheService, uuid.Nil, cache.ExamplesCatalog, sdkCategories); err != nil { + logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) + } } - response.SdkCategories = append(response.SdkCategories, &sdkCategory) } return &response, nil } diff --git a/playground/backend/cmd/server/server.go b/playground/backend/cmd/server/server.go index 29686b89815e..0d0f6d3939e0 100644 --- a/playground/backend/cmd/server/server.go +++ b/playground/backend/cmd/server/server.go @@ -22,7 +22,9 @@ import ( "beam.apache.org/playground/backend/internal/cache/redis" "beam.apache.org/playground/backend/internal/environment" "beam.apache.org/playground/backend/internal/logger" + "beam.apache.org/playground/backend/internal/utils" "context" + "github.com/google/uuid" "github.com/improbable-eng/grpc-web/go/grpcweb" "google.golang.org/grpc" ) @@ -50,6 +52,11 @@ func runServer() error { cacheService: cacheService, }) + err = setupExamplesCatalog(ctx, cacheService) + if err != nil { + return err + } + errChan := make(chan error) switch envService.NetworkEnvs.Protocol() { @@ -109,6 +116,17 @@ func setupCache(ctx context.Context, appEnv environment.ApplicationEnvs) (cache. } } +func setupExamplesCatalog(ctx context.Context, cacheService cache.Cache) error { + sdkCategories, err := utils.GetPrecompiledObjectsCatalogFromStorage(ctx, pb.Sdk_SDK_UNSPECIFIED, "") + if err != nil { + return err + } + if err = utils.SetToCache(ctx, cacheService, uuid.Nil, cache.ExamplesCatalog, sdkCategories); err != nil { + return err + } + return nil +} + func main() { err := runServer() if err != nil { diff --git a/playground/backend/internal/cache/cache.go b/playground/backend/internal/cache/cache.go index 1f52236b6b44..f607fb4f444b 100644 --- a/playground/backend/internal/cache/cache.go +++ b/playground/backend/internal/cache/cache.go @@ -55,6 +55,9 @@ const ( // LogsIndex is the index of the start of the log LogsIndex SubKey = "LOGS_INDEX" + + // ExamplesCatalog is catalog of examples available in Playground + ExamplesCatalog SubKey = "EXAMPLES_CATALOG" ) // Cache is used to store states and outputs for Apache Beam pipelines that running in Playground diff --git a/playground/backend/internal/utils/precompiled_objects_utils.go b/playground/backend/internal/utils/precompiled_objects_utils.go index 31c404574f37..51488a6864db 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils.go +++ b/playground/backend/internal/utils/precompiled_objects_utils.go @@ -17,7 +17,16 @@ package utils import ( pb "beam.apache.org/playground/backend/internal/api/v1" + "beam.apache.org/playground/backend/internal/cache" "beam.apache.org/playground/backend/internal/cloud_bucket" + "beam.apache.org/playground/backend/internal/errors" + "beam.apache.org/playground/backend/internal/logger" + "context" + "github.com/google/uuid" +) + +var ( + ExamplesDataPipelineId = uuid.Nil ) // PutPrecompiledObjectsToCategory adds categories with precompiled objects to protobuf object @@ -38,3 +47,37 @@ func PutPrecompiledObjectsToCategory(categoryName string, precompiledObjects *cl } sdkCategory.Categories = append(sdkCategory.Categories, &category) } + +// GetPrecompiledObjectsCatalogFromCache returns the precompiled objects catalog from the cache +func GetPrecompiledObjectsCatalogFromCache(ctx context.Context, cacheService cache.Cache) ([]*pb.Categories, error) { + value, err := cacheService.GetValue(ctx, ExamplesDataPipelineId, cache.ExamplesCatalog) + if err != nil { + logger.Errorf("%s: cache.GetValue: %s\n", ExamplesDataPipelineId, err.Error()) + return nil, err + } + catalog, converted := value.([]*pb.Categories) + if !converted { + logger.Errorf("%s: couldn't convert value to catalog: %s", cache.ExamplesCatalog, value) + return nil, errors.InternalError("Error during getting the catalog from cache", "Error during getting status") + } + return catalog, nil +} + +// GetPrecompiledObjectsCatalogFromStorage returns the precompiled objects catalog from the cloud storage in the response format +func GetPrecompiledObjectsCatalogFromStorage(ctx context.Context, sdk pb.Sdk, category string) ([]*pb.Categories, error) { + bucket := cloud_bucket.New() + sdkToCategories, err := bucket.GetPrecompiledObjects(ctx, sdk, category) + if err != nil { + logger.Errorf("GetPrecompiledObjects(): cloud storage error: %s", err.Error()) + return nil, err + } + sdkCategories := make([]*pb.Categories, 0) + for sdkName, categories := range *sdkToCategories { + sdkCategory := pb.Categories{Sdk: pb.Sdk(pb.Sdk_value[sdkName]), Categories: make([]*pb.Categories_Category, 0)} + for categoryName, precompiledObjects := range categories { + PutPrecompiledObjectsToCategory(categoryName, &precompiledObjects, &sdkCategory) + } + sdkCategories = append(sdkCategories, &sdkCategory) + } + return sdkCategories, nil +} diff --git a/playground/backend/internal/utils/precompiled_objects_utils_test.go b/playground/backend/internal/utils/precompiled_objects_utils_test.go index d24f865ec4ac..c777d6c07da4 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils_test.go +++ b/playground/backend/internal/utils/precompiled_objects_utils_test.go @@ -17,7 +17,11 @@ package utils import ( pb "beam.apache.org/playground/backend/internal/api/v1" + "beam.apache.org/playground/backend/internal/cache" + "beam.apache.org/playground/backend/internal/cache/local" "beam.apache.org/playground/backend/internal/cloud_bucket" + "context" + "github.com/google/uuid" "reflect" "testing" ) @@ -73,3 +77,82 @@ func TestPutPrecompiledObjectsToCategory(t *testing.T) { }) } } + +func TestGetPrecompiledObjectsCatalogFromCache(t *testing.T) { + ctx := context.Background() + sdkCategories := []*pb.Categories{ + { + Sdk: pb.Sdk_SDK_JAVA, + Categories: []*pb.Categories_Category{ + { + CategoryName: "TestCategory", PrecompiledObjects: []*pb.PrecompiledObject{ + { + CloudPath: "SDK_JAVA/TestCategory/TestName.java", + Name: "TestName", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + }, + }, + }, + }, + }} + type args struct { + ctx context.Context + cacheService cache.Cache + } + tests := []struct { + name string + args args + prepFunc func(cacheService cache.Cache) error + want []*pb.Categories + wantErr bool + }{ + { + // Test case with getting Precompiled Objects Catalog from cache when it exists. + // As a result, want to receive an expected catalog from cache. + name: "get existing catalog", + args: args{ + ctx: ctx, + cacheService: local.New(ctx), + }, + prepFunc: func(cacheService cache.Cache) error { + err := cacheService.SetValue(ctx, uuid.Nil, cache.ExamplesCatalog, sdkCategories) + if err != nil { + return err + } + return nil + }, + want: sdkCategories, + wantErr: false, + }, + // Test case with getting Precompiled Objects Catalog from cache when it doesn't exist. + // As a result, want to receive an error. + { + name: "get missing catalog", + args: args{ + ctx: ctx, + cacheService: local.New(ctx), + }, + prepFunc: func(cacheService cache.Cache) error { + return nil + }, + want: nil, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if err := tt.prepFunc(tt.args.cacheService); err != nil { + t.Errorf("prepFunc() error = %v, wantErr %v", err, tt.wantErr) + } + got, err := GetPrecompiledObjectsCatalogFromCache(tt.args.ctx, tt.args.cacheService) + if (err != nil) != tt.wantErr { + t.Errorf("GetPrecompiledObjectsCatalogFromCache() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("GetPrecompiledObjectsCatalogFromCache() got = %v, want %v", got, tt.want) + } + }) + } +} From 27b01575ef3ceff23814ba73726d0de75b762c19 Mon Sep 17 00:00:00 2001 From: Artur Khanin Date: Wed, 12 Jan 2022 17:48:41 +0300 Subject: [PATCH 16/36] Added caching of the catalog only in case of unspecified SDK --- playground/backend/cmd/server/server.go | 10 +++++++--- .../internal/environment/environment_service.go | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/playground/backend/cmd/server/server.go b/playground/backend/cmd/server/server.go index 0d0f6d3939e0..eb138c358d2e 100644 --- a/playground/backend/cmd/server/server.go +++ b/playground/backend/cmd/server/server.go @@ -52,9 +52,12 @@ func runServer() error { cacheService: cacheService, }) - err = setupExamplesCatalog(ctx, cacheService) - if err != nil { - return err + // Examples catalog should be retrieved and saved to cache only if the server doesn't suppose to run code, i.e. SDK is unspecified + if envService.BeamSdkEnvs.ApacheBeamSdk == pb.Sdk_SDK_UNSPECIFIED { + err = setupExamplesCatalog(ctx, cacheService) + if err != nil { + return err + } } errChan := make(chan error) @@ -116,6 +119,7 @@ func setupCache(ctx context.Context, appEnv environment.ApplicationEnvs) (cache. } } +// setupExamplesCatalog saves precompiled objects catalog from storage to cache func setupExamplesCatalog(ctx context.Context, cacheService cache.Cache) error { sdkCategories, err := utils.GetPrecompiledObjectsCatalogFromStorage(ctx, pb.Sdk_SDK_UNSPECIFIED, "") if err != nil { diff --git a/playground/backend/internal/environment/environment_service.go b/playground/backend/internal/environment/environment_service.go index 81f733ee8181..a2c373c78fa8 100644 --- a/playground/backend/internal/environment/environment_service.go +++ b/playground/backend/internal/environment/environment_service.go @@ -181,7 +181,7 @@ func ConfigureBeamEnvs(workDir string) (*BeamEnvs, error) { } } if sdk == pb.Sdk_SDK_UNSPECIFIED { - return nil, errors.New("env BEAM_SDK must be specified in the environment variables") + return NewBeamEnvs(sdk, nil, preparedModDir, numOfParallelJobs), nil } configPath := filepath.Join(workDir, configFolderName, sdk.String()+jsonExt) executorConfig, err := createExecutorConfig(sdk, configPath) From b9b77b9fe0a8022e61188982815c72df39167f11 Mon Sep 17 00:00:00 2001 From: Artur Khanin Date: Thu, 13 Jan 2022 18:13:01 +0300 Subject: [PATCH 17/36] Update regarding comments --- playground/backend/cmd/server/controller.go | 17 +++++++---------- .../internal/utils/precompiled_objects_utils.go | 13 +++++++++++-- .../utils/precompiled_objects_utils_test.go | 4 ++-- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/playground/backend/cmd/server/controller.go b/playground/backend/cmd/server/controller.go index e5be3d201401..195e7731f222 100644 --- a/playground/backend/cmd/server/controller.go +++ b/playground/backend/cmd/server/controller.go @@ -245,32 +245,29 @@ func (controller *playgroundController) Cancel(ctx context.Context, info *pb.Can // - If there is no catalog in the cache, gets the catalog from the Storage and saves it to the cache // - If SDK or category is specified in the request, gets the specific catalog from the Storage func (controller *playgroundController) GetPrecompiledObjects(ctx context.Context, info *pb.GetPrecompiledObjectsRequest) (*pb.GetPrecompiledObjectsResponse, error) { - var response pb.GetPrecompiledObjectsResponse + var response *pb.GetPrecompiledObjectsResponse + var err error if info.Sdk != pb.Sdk_SDK_UNSPECIFIED || info.Category != "" { - sdkCategories, err := utils.GetPrecompiledObjectsCatalogFromStorage(ctx, info.Sdk, info.Category) + response, err = utils.GetPrecompiledObjectsCatalogFromStorageToResponse(ctx, info.Sdk, info.Category) if err != nil { - logger.Errorf("GetPrecompiledObjects(): cloud storage error: %s", err.Error()) return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") } - response = pb.GetPrecompiledObjectsResponse{SdkCategories: sdkCategories} } else { catalog, err := utils.GetPrecompiledObjectsCatalogFromCache(ctx, controller.cacheService) if err == nil { - response = pb.GetPrecompiledObjectsResponse{SdkCategories: catalog} + response = &pb.GetPrecompiledObjectsResponse{SdkCategories: catalog} } else { logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) - sdkCategories, err := utils.GetPrecompiledObjectsCatalogFromStorage(ctx, info.Sdk, info.Category) + response, err = utils.GetPrecompiledObjectsCatalogFromStorageToResponse(ctx, info.Sdk, info.Category) if err != nil { - logger.Errorf("GetPrecompiledObjects(): cloud storage error: %s", err.Error()) return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") } - response = pb.GetPrecompiledObjectsResponse{SdkCategories: sdkCategories} - if err = utils.SetToCache(ctx, controller.cacheService, uuid.Nil, cache.ExamplesCatalog, sdkCategories); err != nil { + if err = utils.SetToCache(ctx, controller.cacheService, uuid.Nil, cache.ExamplesCatalog, response.SdkCategories); err != nil { logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) } } } - return &response, nil + return response, nil } // GetPrecompiledObjectCode returns the code of the specific example diff --git a/playground/backend/internal/utils/precompiled_objects_utils.go b/playground/backend/internal/utils/precompiled_objects_utils.go index 51488a6864db..63935f71ee92 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils.go +++ b/playground/backend/internal/utils/precompiled_objects_utils.go @@ -58,12 +58,12 @@ func GetPrecompiledObjectsCatalogFromCache(ctx context.Context, cacheService cac catalog, converted := value.([]*pb.Categories) if !converted { logger.Errorf("%s: couldn't convert value to catalog: %s", cache.ExamplesCatalog, value) - return nil, errors.InternalError("Error during getting the catalog from cache", "Error during getting status") + return nil, errors.InternalError("Error during getting the catalog from cache", "Error during getting catalog") } return catalog, nil } -// GetPrecompiledObjectsCatalogFromStorage returns the precompiled objects catalog from the cloud storage in the response format +// GetPrecompiledObjectsCatalogFromStorage returns the precompiled objects catalog from the cloud storage func GetPrecompiledObjectsCatalogFromStorage(ctx context.Context, sdk pb.Sdk, category string) ([]*pb.Categories, error) { bucket := cloud_bucket.New() sdkToCategories, err := bucket.GetPrecompiledObjects(ctx, sdk, category) @@ -81,3 +81,12 @@ func GetPrecompiledObjectsCatalogFromStorage(ctx context.Context, sdk pb.Sdk, ca } return sdkCategories, nil } + +// GetPrecompiledObjectsCatalogFromStorageToResponse returns the precompiled objects catalog from the cloud storage in the response format +func GetPrecompiledObjectsCatalogFromStorageToResponse(ctx context.Context, sdk pb.Sdk, category string) (*pb.GetPrecompiledObjectsResponse, error) { + sdkCategories, err := GetPrecompiledObjectsCatalogFromStorage(ctx, sdk, category) + if err != nil { + return nil, err + } + return &pb.GetPrecompiledObjectsResponse{SdkCategories: sdkCategories}, nil +} diff --git a/playground/backend/internal/utils/precompiled_objects_utils_test.go b/playground/backend/internal/utils/precompiled_objects_utils_test.go index c777d6c07da4..f42b73e0b81c 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils_test.go +++ b/playground/backend/internal/utils/precompiled_objects_utils_test.go @@ -125,9 +125,9 @@ func TestGetPrecompiledObjectsCatalogFromCache(t *testing.T) { want: sdkCategories, wantErr: false, }, - // Test case with getting Precompiled Objects Catalog from cache when it doesn't exist. - // As a result, want to receive an error. { + // Test case with getting Precompiled Objects Catalog from cache when it doesn't exist. + // As a result, want to receive an error. name: "get missing catalog", args: args{ ctx: ctx, From 21879186a22ffbc7f6b03baf2e9cd5482e1b6d01 Mon Sep 17 00:00:00 2001 From: Artur Khanin Date: Thu, 13 Jan 2022 21:18:12 +0300 Subject: [PATCH 18/36] Update regarding comments --- playground/backend/cmd/server/controller.go | 29 ++++++++----------- .../utils/precompiled_objects_utils.go | 9 ------ 2 files changed, 12 insertions(+), 26 deletions(-) diff --git a/playground/backend/cmd/server/controller.go b/playground/backend/cmd/server/controller.go index 195e7731f222..3eedd433831b 100644 --- a/playground/backend/cmd/server/controller.go +++ b/playground/backend/cmd/server/controller.go @@ -245,29 +245,24 @@ func (controller *playgroundController) Cancel(ctx context.Context, info *pb.Can // - If there is no catalog in the cache, gets the catalog from the Storage and saves it to the cache // - If SDK or category is specified in the request, gets the specific catalog from the Storage func (controller *playgroundController) GetPrecompiledObjects(ctx context.Context, info *pb.GetPrecompiledObjectsRequest) (*pb.GetPrecompiledObjectsResponse, error) { - var response *pb.GetPrecompiledObjectsResponse - var err error - if info.Sdk != pb.Sdk_SDK_UNSPECIFIED || info.Category != "" { - response, err = utils.GetPrecompiledObjectsCatalogFromStorageToResponse(ctx, info.Sdk, info.Category) - if err != nil { - return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") - } - } else { + if info.Sdk == pb.Sdk_SDK_UNSPECIFIED && info.Category == "" { catalog, err := utils.GetPrecompiledObjectsCatalogFromCache(ctx, controller.cacheService) if err == nil { - response = &pb.GetPrecompiledObjectsResponse{SdkCategories: catalog} + return &pb.GetPrecompiledObjectsResponse{SdkCategories: catalog}, nil } else { logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) - response, err = utils.GetPrecompiledObjectsCatalogFromStorageToResponse(ctx, info.Sdk, info.Category) - if err != nil { - return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") - } - if err = utils.SetToCache(ctx, controller.cacheService, uuid.Nil, cache.ExamplesCatalog, response.SdkCategories); err != nil { - logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) - } } } - return response, nil + catalog, err := utils.GetPrecompiledObjectsCatalogFromStorage(ctx, info.Sdk, info.Category) + if err != nil { + return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") + } + if info.Sdk == pb.Sdk_SDK_UNSPECIFIED && info.Category == "" { + if err = utils.SetToCache(ctx, controller.cacheService, uuid.Nil, cache.ExamplesCatalog, catalog); err != nil { + logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) + } + } + return &pb.GetPrecompiledObjectsResponse{SdkCategories: catalog}, nil } // GetPrecompiledObjectCode returns the code of the specific example diff --git a/playground/backend/internal/utils/precompiled_objects_utils.go b/playground/backend/internal/utils/precompiled_objects_utils.go index 63935f71ee92..c3b4a6d7e39b 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils.go +++ b/playground/backend/internal/utils/precompiled_objects_utils.go @@ -81,12 +81,3 @@ func GetPrecompiledObjectsCatalogFromStorage(ctx context.Context, sdk pb.Sdk, ca } return sdkCategories, nil } - -// GetPrecompiledObjectsCatalogFromStorageToResponse returns the precompiled objects catalog from the cloud storage in the response format -func GetPrecompiledObjectsCatalogFromStorageToResponse(ctx context.Context, sdk pb.Sdk, category string) (*pb.GetPrecompiledObjectsResponse, error) { - sdkCategories, err := GetPrecompiledObjectsCatalogFromStorage(ctx, sdk, category) - if err != nil { - return nil, err - } - return &pb.GetPrecompiledObjectsResponse{SdkCategories: sdkCategories}, nil -} From 3655716b80d34fe7015f3f6b0426db29157ecb63 Mon Sep 17 00:00:00 2001 From: Artur Khanin Date: Fri, 14 Jan 2022 09:47:28 +0300 Subject: [PATCH 19/36] Simplified logging regarding comment --- playground/backend/cmd/server/controller.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/playground/backend/cmd/server/controller.go b/playground/backend/cmd/server/controller.go index 3eedd433831b..67a5fde5e224 100644 --- a/playground/backend/cmd/server/controller.go +++ b/playground/backend/cmd/server/controller.go @@ -249,9 +249,8 @@ func (controller *playgroundController) GetPrecompiledObjects(ctx context.Contex catalog, err := utils.GetPrecompiledObjectsCatalogFromCache(ctx, controller.cacheService) if err == nil { return &pb.GetPrecompiledObjectsResponse{SdkCategories: catalog}, nil - } else { - logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) } + logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) } catalog, err := utils.GetPrecompiledObjectsCatalogFromStorage(ctx, info.Sdk, info.Category) if err != nil { From 7fe3d8becacfb3e668ea5ccb1cb2fdaf31f4e2a2 Mon Sep 17 00:00:00 2001 From: Artur Khanin Date: Mon, 24 Jan 2022 16:48:55 +0300 Subject: [PATCH 20/36] Updates regarding comments --- playground/backend/cmd/server/controller.go | 23 +-- playground/backend/cmd/server/server.go | 7 +- playground/backend/internal/cache/cache.go | 11 +- .../internal/cache/local/local_cache.go | 19 ++ .../internal/cache/local/local_cache_test.go | 171 +++++++++++++++ .../internal/cache/redis/redis_cache.go | 30 +++ .../internal/cache/redis/redis_cache_test.go | 195 ++++++++++++++++++ .../utils/precompiled_objects_utils.go | 60 +++--- .../utils/precompiled_objects_utils_test.go | 144 ++++++++----- 9 files changed, 568 insertions(+), 92 deletions(-) diff --git a/playground/backend/cmd/server/controller.go b/playground/backend/cmd/server/controller.go index 67a5fde5e224..bd1bafe13e99 100644 --- a/playground/backend/cmd/server/controller.go +++ b/playground/backend/cmd/server/controller.go @@ -245,23 +245,20 @@ func (controller *playgroundController) Cancel(ctx context.Context, info *pb.Can // - If there is no catalog in the cache, gets the catalog from the Storage and saves it to the cache // - If SDK or category is specified in the request, gets the specific catalog from the Storage func (controller *playgroundController) GetPrecompiledObjects(ctx context.Context, info *pb.GetPrecompiledObjectsRequest) (*pb.GetPrecompiledObjectsResponse, error) { - if info.Sdk == pb.Sdk_SDK_UNSPECIFIED && info.Category == "" { - catalog, err := utils.GetPrecompiledObjectsCatalogFromCache(ctx, controller.cacheService) - if err == nil { - return &pb.GetPrecompiledObjectsResponse{SdkCategories: catalog}, nil - } - logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) - } - catalog, err := utils.GetPrecompiledObjectsCatalogFromStorage(ctx, info.Sdk, info.Category) + catalog, err := controller.cacheService.GetCatalog(ctx) if err != nil { - return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") - } - if info.Sdk == pb.Sdk_SDK_UNSPECIFIED && info.Category == "" { - if err = utils.SetToCache(ctx, controller.cacheService, uuid.Nil, cache.ExamplesCatalog, catalog); err != nil { + logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) + catalog, err = utils.GetCatalogFromStorage(ctx) + if err != nil { + return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") + } + if err = controller.cacheService.SetCatalog(ctx, catalog); err != nil { logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) } } - return &pb.GetPrecompiledObjectsResponse{SdkCategories: catalog}, nil + return &pb.GetPrecompiledObjectsResponse{ + SdkCategories: utils.FilterCatalog(catalog, info.Sdk, info.Category), + }, nil } // GetPrecompiledObjectCode returns the code of the specific example diff --git a/playground/backend/cmd/server/server.go b/playground/backend/cmd/server/server.go index eb138c358d2e..44591cb1a168 100644 --- a/playground/backend/cmd/server/server.go +++ b/playground/backend/cmd/server/server.go @@ -24,7 +24,6 @@ import ( "beam.apache.org/playground/backend/internal/logger" "beam.apache.org/playground/backend/internal/utils" "context" - "github.com/google/uuid" "github.com/improbable-eng/grpc-web/go/grpcweb" "google.golang.org/grpc" ) @@ -121,12 +120,12 @@ func setupCache(ctx context.Context, appEnv environment.ApplicationEnvs) (cache. // setupExamplesCatalog saves precompiled objects catalog from storage to cache func setupExamplesCatalog(ctx context.Context, cacheService cache.Cache) error { - sdkCategories, err := utils.GetPrecompiledObjectsCatalogFromStorage(ctx, pb.Sdk_SDK_UNSPECIFIED, "") + catalog, err := utils.GetCatalogFromStorage(ctx) if err != nil { return err } - if err = utils.SetToCache(ctx, cacheService, uuid.Nil, cache.ExamplesCatalog, sdkCategories); err != nil { - return err + if err = cacheService.SetCatalog(ctx, catalog); err != nil { + logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) } return nil } diff --git a/playground/backend/internal/cache/cache.go b/playground/backend/internal/cache/cache.go index f607fb4f444b..efafe5ccb0d7 100644 --- a/playground/backend/internal/cache/cache.go +++ b/playground/backend/internal/cache/cache.go @@ -16,6 +16,7 @@ package cache import ( + pb "beam.apache.org/playground/backend/internal/api/v1" "context" "github.com/google/uuid" "time" @@ -24,7 +25,7 @@ import ( // SubKey is used to keep value with Cache using nested structure like pipelineId:subKey:value type SubKey string -// All possible subKeys to process with Cache +// All possible subKeys and string keys to process with Cache const ( // Status is used to keep playground.Status value Status SubKey = "STATUS" @@ -57,7 +58,7 @@ const ( LogsIndex SubKey = "LOGS_INDEX" // ExamplesCatalog is catalog of examples available in Playground - ExamplesCatalog SubKey = "EXAMPLES_CATALOG" + ExamplesCatalog string = "EXAMPLES_CATALOG" ) // Cache is used to store states and outputs for Apache Beam pipelines that running in Playground @@ -78,4 +79,10 @@ type Cache interface { // SetExpTime adds expiration time of the pipeline to cache by pipelineId. SetExpTime(ctx context.Context, pipelineId uuid.UUID, expTime time.Duration) error + + // SetCatalog adds the given catalog to cache by ExamplesCatalog key. + SetCatalog(ctx context.Context, catalog []*pb.Categories) error + + // GetCatalog return catalog from cache by ExamplesCatalog key. + GetCatalog(ctx context.Context) ([]*pb.Categories, error) } diff --git a/playground/backend/internal/cache/local/local_cache.go b/playground/backend/internal/cache/local/local_cache.go index 6fedabd4fec7..bdc149f6a3a1 100644 --- a/playground/backend/internal/cache/local/local_cache.go +++ b/playground/backend/internal/cache/local/local_cache.go @@ -16,6 +16,7 @@ package local import ( + pb "beam.apache.org/playground/backend/internal/api/v1" "beam.apache.org/playground/backend/internal/cache" "context" "fmt" @@ -33,6 +34,7 @@ type Cache struct { cleanupInterval time.Duration items map[uuid.UUID]map[cache.SubKey]interface{} pipelinesExpiration map[uuid.UUID]time.Time + catalog []*pb.Categories } func New(ctx context.Context) *Cache { @@ -42,6 +44,7 @@ func New(ctx context.Context) *Cache { cleanupInterval: cleanupInterval, items: items, pipelinesExpiration: pipelinesExpiration, + catalog: nil, } go ls.startGC(ctx) @@ -105,6 +108,22 @@ func (lc *Cache) SetExpTime(ctx context.Context, pipelineId uuid.UUID, expTime t return nil } +func (lc *Cache) SetCatalog(ctx context.Context, catalog []*pb.Categories) error { + lc.Lock() + defer lc.Unlock() + lc.catalog = catalog + return nil +} + +func (lc *Cache) GetCatalog(ctx context.Context) ([]*pb.Categories, error) { + lc.RLock() + defer lc.RUnlock() + if lc.catalog == nil { + return nil, fmt.Errorf("catalog is not found") + } + return lc.catalog, nil +} + func (lc *Cache) startGC(ctx context.Context) { ticker := time.NewTicker(lc.cleanupInterval) for { diff --git a/playground/backend/internal/cache/local/local_cache_test.go b/playground/backend/internal/cache/local/local_cache_test.go index 8bdb45d97035..c4d5a580d07a 100644 --- a/playground/backend/internal/cache/local/local_cache_test.go +++ b/playground/backend/internal/cache/local/local_cache_test.go @@ -16,6 +16,7 @@ package local import ( + pb "beam.apache.org/playground/backend/internal/api/v1" "beam.apache.org/playground/backend/internal/cache" "context" "github.com/google/uuid" @@ -228,6 +229,176 @@ func TestLocalCache_SetExpTime(t *testing.T) { } } +func TestCache_SetCatalog(t *testing.T) { + catalog := []*pb.Categories{ + { + Sdk: pb.Sdk_SDK_JAVA, + Categories: []*pb.Categories_Category{ + { + CategoryName: "TestCategory", PrecompiledObjects: []*pb.PrecompiledObject{ + { + CloudPath: "SDK_JAVA/TestCategory/TestName.java", + Name: "TestName", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + }, + }, + }, + { + CategoryName: "AnotherTestCategory", PrecompiledObjects: []*pb.PrecompiledObject{ + { + CloudPath: "SDK_JAVA/AnotherTestCategory/TestName.java", + Name: "TestName", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + }, + }, + }, + }, + }, + { + Sdk: pb.Sdk_SDK_PYTHON, + Categories: []*pb.Categories_Category{ + { + CategoryName: "TestCategory", PrecompiledObjects: []*pb.PrecompiledObject{ + { + CloudPath: "SDK_PYTHON/TestCategory/TestName.java", + Name: "TestName", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + }, + }, + }, + }, + }, + } + type fields struct { + catalog []*pb.Categories + } + type args struct { + ctx context.Context + catalog []*pb.Categories + } + tests := []struct { + name string + fields fields + args args + wantErr bool + }{ + { + name: "Set catalog", + fields: fields{ + catalog: catalog, + }, + args: args{ + ctx: context.Background(), + catalog: catalog, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + lc := &Cache{ + catalog: tt.fields.catalog, + } + if err := lc.SetCatalog(tt.args.ctx, tt.args.catalog); (err != nil) != tt.wantErr { + t.Errorf("SetCatalog() error = %v, wantErr %v", err, tt.wantErr) + } + if !reflect.DeepEqual(lc.catalog, tt.args.catalog) { + t.Errorf("SetCatalog() got = %v, want %v", lc.catalog, tt.args.catalog) + } + }) + } +} + +func TestCache_GetCatalog(t *testing.T) { + catalog := []*pb.Categories{ + { + Sdk: pb.Sdk_SDK_JAVA, + Categories: []*pb.Categories_Category{ + { + CategoryName: "TestCategory", PrecompiledObjects: []*pb.PrecompiledObject{ + { + CloudPath: "SDK_JAVA/TestCategory/TestName.java", + Name: "TestName", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + }, + }, + }, + { + CategoryName: "AnotherTestCategory", PrecompiledObjects: []*pb.PrecompiledObject{ + { + CloudPath: "SDK_JAVA/AnotherTestCategory/TestName.java", + Name: "TestName", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + }, + }, + }, + }, + }, + { + Sdk: pb.Sdk_SDK_PYTHON, + Categories: []*pb.Categories_Category{ + { + CategoryName: "TestCategory", PrecompiledObjects: []*pb.PrecompiledObject{ + { + CloudPath: "SDK_PYTHON/TestCategory/TestName.java", + Name: "TestName", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + }, + }, + }, + }, + }, + } + type fields struct { + catalog []*pb.Categories + } + type args struct { + ctx context.Context + } + tests := []struct { + name string + fields fields + args args + want []*pb.Categories + wantErr bool + }{ + { + name: "Get existing catalog", + fields: fields{catalog}, + args: args{context.Background()}, + want: catalog, + wantErr: false, + }, + { + name: "Get non existing catalog", + fields: fields{nil}, + args: args{context.Background()}, + want: nil, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + lc := &Cache{ + catalog: tt.fields.catalog, + } + got, err := lc.GetCatalog(tt.args.ctx) + if (err != nil) != tt.wantErr { + t.Errorf("GetCatalog() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("GetCatalog() got = %v, want %v", got, tt.want) + } + }) + } +} + func TestLocalCache_startGC(t *testing.T) { defer goleak.VerifyNone(t) diff --git a/playground/backend/internal/cache/redis/redis_cache.go b/playground/backend/internal/cache/redis/redis_cache.go index 51bb9bda447d..97b439f22bf9 100644 --- a/playground/backend/internal/cache/redis/redis_cache.go +++ b/playground/backend/internal/cache/redis/redis_cache.go @@ -96,6 +96,36 @@ func (rc *Cache) SetExpTime(ctx context.Context, pipelineId uuid.UUID, expTime t return nil } +func (rc *Cache) SetCatalog(ctx context.Context, catalog []*pb.Categories) error { + catalogMarsh, err := json.Marshal(catalog) + if err != nil { + logger.Errorf("Redis Cache: set catalog: error during marshal catalog: %s, err: %s\n", catalog, err.Error()) + return err + } + err = rc.Set(ctx, cache.ExamplesCatalog, catalogMarsh, 0).Err() + if err != nil { + logger.Errorf("Redis Cache: set catalog: error during Set operation, err: %s\n", err.Error()) + return err + } + return nil + +} + +func (rc *Cache) GetCatalog(ctx context.Context) ([]*pb.Categories, error) { + value, err := rc.Get(ctx, cache.ExamplesCatalog).Result() + if err != nil { + logger.Errorf("Redis Cache: get catalog: error during Get operation for key: %s, err: %s\n", cache.ExamplesCatalog, err.Error()) + return nil, err + } + var result []*pb.Categories + err = json.Unmarshal([]byte(value), &result) + if err != nil { + logger.Errorf("Redis Cache: get catalog: error during unmarshal catalog, err: %s\n", err.Error()) + } + + return result, nil +} + // unmarshalBySubKey unmarshal value by subKey func unmarshalBySubKey(subKey cache.SubKey, value string) (result interface{}, err error) { switch subKey { diff --git a/playground/backend/internal/cache/redis/redis_cache_test.go b/playground/backend/internal/cache/redis/redis_cache_test.go index d8496c76e85c..92742359ff0d 100644 --- a/playground/backend/internal/cache/redis/redis_cache_test.go +++ b/playground/backend/internal/cache/redis/redis_cache_test.go @@ -258,6 +258,201 @@ func TestRedisCache_SetValue(t *testing.T) { } } +func TestCache_GetCatalog(t *testing.T) { + client, mock := redismock.NewClientMock() + catalog := []*pb.Categories{ + { + Sdk: pb.Sdk_SDK_JAVA, + Categories: []*pb.Categories_Category{ + { + CategoryName: "TestCategory", PrecompiledObjects: []*pb.PrecompiledObject{ + { + CloudPath: "SDK_JAVA/TestCategory/TestName.java", + Name: "TestName", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + }, + }, + }, + { + CategoryName: "AnotherTestCategory", PrecompiledObjects: []*pb.PrecompiledObject{ + { + CloudPath: "SDK_JAVA/AnotherTestCategory/TestName.java", + Name: "TestName", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + }, + }, + }, + }, + }, + { + Sdk: pb.Sdk_SDK_PYTHON, + Categories: []*pb.Categories_Category{ + { + CategoryName: "TestCategory", PrecompiledObjects: []*pb.PrecompiledObject{ + { + CloudPath: "SDK_PYTHON/TestCategory/TestName.java", + Name: "TestName", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + }, + }, + }, + }, + }, + } + catalogMarsh, _ := json.Marshal(catalog) + type fields struct { + Client *redis.Client + } + type args struct { + ctx context.Context + } + tests := []struct { + name string + mocks func() + fields fields + args args + want []*pb.Categories + wantErr bool + }{ + { + name: "Success", + mocks: func() { + mock.ExpectGet(cache.ExamplesCatalog).SetVal(string(catalogMarsh)) + }, + fields: fields{client}, + args: args{context.Background()}, + want: catalog, + wantErr: false, + }, + { + name: "Error during Get operation", + mocks: func() { + mock.ExpectGet(cache.ExamplesCatalog).SetErr(fmt.Errorf("MOCK_ERROR")) + }, + fields: fields{client}, + args: args{context.Background()}, + want: nil, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + tt.mocks() + rc := &Cache{ + Client: tt.fields.Client, + } + got, err := rc.GetCatalog(tt.args.ctx) + if (err != nil) != tt.wantErr { + t.Errorf("GetCatalog() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("GetCatalog() got = %v, want %v", got, tt.want) + } + }) + } +} + +func TestCache_SetCatalog(t *testing.T) { + client, mock := redismock.NewClientMock() + catalog := []*pb.Categories{ + { + Sdk: pb.Sdk_SDK_JAVA, + Categories: []*pb.Categories_Category{ + { + CategoryName: "TestCategory", PrecompiledObjects: []*pb.PrecompiledObject{ + { + CloudPath: "SDK_JAVA/TestCategory/TestName.java", + Name: "TestName", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + }, + }, + }, + { + CategoryName: "AnotherTestCategory", PrecompiledObjects: []*pb.PrecompiledObject{ + { + CloudPath: "SDK_JAVA/AnotherTestCategory/TestName.java", + Name: "TestName", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + }, + }, + }, + }, + }, + { + Sdk: pb.Sdk_SDK_PYTHON, + Categories: []*pb.Categories_Category{ + { + CategoryName: "TestCategory", PrecompiledObjects: []*pb.PrecompiledObject{ + { + CloudPath: "SDK_PYTHON/TestCategory/TestName.java", + Name: "TestName", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + }, + }, + }, + }, + }, + } + catalogMarsh, _ := json.Marshal(catalog) + type fields struct { + Client *redis.Client + } + type args struct { + ctx context.Context + catalog []*pb.Categories + } + tests := []struct { + name string + mocks func() + fields fields + args args + wantErr bool + }{ + { + name: "Success", + mocks: func() { + mock.ExpectSet(cache.ExamplesCatalog, catalogMarsh, 0).SetVal("") + }, + fields: fields{client}, + args: args{ + ctx: context.Background(), + catalog: catalog, + }, + wantErr: false, + }, + { + name: "Error during Set operation", + mocks: func() { + mock.ExpectSet(cache.ExamplesCatalog, catalogMarsh, 0).SetErr(fmt.Errorf("MOCK_ERROR")) + }, + fields: fields{client}, + args: args{ + ctx: context.Background(), + catalog: catalog, + }, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + tt.mocks() + rc := &Cache{ + Client: tt.fields.Client, + } + if err := rc.SetCatalog(tt.args.ctx, tt.args.catalog); (err != nil) != tt.wantErr { + t.Errorf("SetCatalog() error = %v, wantErr %v", err, tt.wantErr) + } + }) + } +} + func Test_newRedisCache(t *testing.T) { address := "host:port" type args struct { diff --git a/playground/backend/internal/utils/precompiled_objects_utils.go b/playground/backend/internal/utils/precompiled_objects_utils.go index c3b4a6d7e39b..bde5ee13691a 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils.go +++ b/playground/backend/internal/utils/precompiled_objects_utils.go @@ -17,16 +17,9 @@ package utils import ( pb "beam.apache.org/playground/backend/internal/api/v1" - "beam.apache.org/playground/backend/internal/cache" "beam.apache.org/playground/backend/internal/cloud_bucket" - "beam.apache.org/playground/backend/internal/errors" "beam.apache.org/playground/backend/internal/logger" "context" - "github.com/google/uuid" -) - -var ( - ExamplesDataPipelineId = uuid.Nil ) // PutPrecompiledObjectsToCategory adds categories with precompiled objects to protobuf object @@ -48,25 +41,10 @@ func PutPrecompiledObjectsToCategory(categoryName string, precompiledObjects *cl sdkCategory.Categories = append(sdkCategory.Categories, &category) } -// GetPrecompiledObjectsCatalogFromCache returns the precompiled objects catalog from the cache -func GetPrecompiledObjectsCatalogFromCache(ctx context.Context, cacheService cache.Cache) ([]*pb.Categories, error) { - value, err := cacheService.GetValue(ctx, ExamplesDataPipelineId, cache.ExamplesCatalog) - if err != nil { - logger.Errorf("%s: cache.GetValue: %s\n", ExamplesDataPipelineId, err.Error()) - return nil, err - } - catalog, converted := value.([]*pb.Categories) - if !converted { - logger.Errorf("%s: couldn't convert value to catalog: %s", cache.ExamplesCatalog, value) - return nil, errors.InternalError("Error during getting the catalog from cache", "Error during getting catalog") - } - return catalog, nil -} - -// GetPrecompiledObjectsCatalogFromStorage returns the precompiled objects catalog from the cloud storage -func GetPrecompiledObjectsCatalogFromStorage(ctx context.Context, sdk pb.Sdk, category string) ([]*pb.Categories, error) { +// GetCatalogFromStorage returns the precompiled objects catalog from the cloud storage +func GetCatalogFromStorage(ctx context.Context) ([]*pb.Categories, error) { bucket := cloud_bucket.New() - sdkToCategories, err := bucket.GetPrecompiledObjects(ctx, sdk, category) + sdkToCategories, err := bucket.GetPrecompiledObjects(ctx, pb.Sdk_SDK_UNSPECIFIED, "") if err != nil { logger.Errorf("GetPrecompiledObjects(): cloud storage error: %s", err.Error()) return nil, err @@ -81,3 +59,35 @@ func GetPrecompiledObjectsCatalogFromStorage(ctx context.Context, sdk pb.Sdk, ca } return sdkCategories, nil } + +// FilterCatalog returns the catalog filtered by sdk and categoryName +func FilterCatalog(catalog []*pb.Categories, sdk pb.Sdk, categoryName string) []*pb.Categories { + var result []*pb.Categories + if sdk == pb.Sdk_SDK_UNSPECIFIED { + result = catalog + } else { + for _, categoriesSdk := range catalog { + if categoriesSdk.Sdk == sdk { + result = append(result, categoriesSdk) + break + } + } + } + if categoryName == "" { + return result + } + for _, categoriesSdk := range result { + foundCategory := false + for _, category := range categoriesSdk.Categories { + if category.CategoryName == categoryName { + categoriesSdk.Categories = []*pb.Categories_Category{category} + foundCategory = true + break + } + } + if !foundCategory { + categoriesSdk.Categories = []*pb.Categories_Category{} + } + } + return result +} diff --git a/playground/backend/internal/utils/precompiled_objects_utils_test.go b/playground/backend/internal/utils/precompiled_objects_utils_test.go index f42b73e0b81c..20a78009e533 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils_test.go +++ b/playground/backend/internal/utils/precompiled_objects_utils_test.go @@ -17,18 +17,14 @@ package utils import ( pb "beam.apache.org/playground/backend/internal/api/v1" - "beam.apache.org/playground/backend/internal/cache" - "beam.apache.org/playground/backend/internal/cache/local" "beam.apache.org/playground/backend/internal/cloud_bucket" - "context" - "github.com/google/uuid" "reflect" "testing" ) func TestPutPrecompiledObjectsToCategory(t *testing.T) { precompiledObjectToAdd := &cloud_bucket.PrecompiledObjects{ - {"TestName", "SDK_JAVA/TestCategory/TestName.java", "TestDescription", pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, []string{""}, ""}, + {"TestName", "SDK_JAVA/TestCategory/TestName.java", "TestDescription", pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, []string{""}, "", ""}, } type args struct { categoryName string @@ -78,9 +74,8 @@ func TestPutPrecompiledObjectsToCategory(t *testing.T) { } } -func TestGetPrecompiledObjectsCatalogFromCache(t *testing.T) { - ctx := context.Background() - sdkCategories := []*pb.Categories{ +func TestFilterPrecompiledObjects(t *testing.T) { + catalog := []*pb.Categories{ { Sdk: pb.Sdk_SDK_JAVA, Categories: []*pb.Categories_Category{ @@ -94,64 +89,117 @@ func TestGetPrecompiledObjectsCatalogFromCache(t *testing.T) { }, }, }, + { + CategoryName: "AnotherTestCategory", PrecompiledObjects: []*pb.PrecompiledObject{ + { + CloudPath: "SDK_JAVA/AnotherTestCategory/TestName.java", + Name: "TestName", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + }, + }, + }, + }, + }, + { + Sdk: pb.Sdk_SDK_PYTHON, + Categories: []*pb.Categories_Category{ + { + CategoryName: "TestCategory", PrecompiledObjects: []*pb.PrecompiledObject{ + { + CloudPath: "SDK_PYTHON/TestCategory/TestName.java", + Name: "TestName", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + }, + }, + }, }, - }} + }, + } + catalogWithSpecificCategory := []*pb.Categories{ + { + Sdk: pb.Sdk_SDK_JAVA, + Categories: []*pb.Categories_Category{ + { + CategoryName: "TestCategory", PrecompiledObjects: []*pb.PrecompiledObject{ + { + CloudPath: "SDK_JAVA/TestCategory/TestName.java", + Name: "TestName", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + }, + }, + }, + }, + }, + { + Sdk: pb.Sdk_SDK_PYTHON, + Categories: []*pb.Categories_Category{ + { + CategoryName: "TestCategory", PrecompiledObjects: []*pb.PrecompiledObject{ + { + CloudPath: "SDK_PYTHON/TestCategory/TestName.java", + Name: "TestName", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + }, + }, + }, + }, + }, + } type args struct { - ctx context.Context - cacheService cache.Cache + catalog []*pb.Categories + sdk pb.Sdk + categoryName string } tests := []struct { - name string - args args - prepFunc func(cacheService cache.Cache) error - want []*pb.Categories - wantErr bool + name string + args args + want []*pb.Categories }{ { - // Test case with getting Precompiled Objects Catalog from cache when it exists. - // As a result, want to receive an expected catalog from cache. - name: "get existing catalog", + name: "All catalog", args: args{ - ctx: ctx, - cacheService: local.New(ctx), + catalog: catalog, + sdk: pb.Sdk_SDK_UNSPECIFIED, + categoryName: "", }, - prepFunc: func(cacheService cache.Cache) error { - err := cacheService.SetValue(ctx, uuid.Nil, cache.ExamplesCatalog, sdkCategories) - if err != nil { - return err - } - return nil + want: catalog, + }, + { + name: "Specific SDK", + args: args{ + catalog: catalog, + sdk: pb.Sdk_SDK_JAVA, + categoryName: "", }, - want: sdkCategories, - wantErr: false, + want: catalog[:1], }, { - // Test case with getting Precompiled Objects Catalog from cache when it doesn't exist. - // As a result, want to receive an error. - name: "get missing catalog", + name: "Specific Category", args: args{ - ctx: ctx, - cacheService: local.New(ctx), + catalog: catalog, + sdk: pb.Sdk_SDK_UNSPECIFIED, + categoryName: "TestCategory", }, - prepFunc: func(cacheService cache.Cache) error { - return nil + want: catalogWithSpecificCategory, + }, + { + name: "Specific SDK and Category", + args: args{ + catalog: catalog, + sdk: pb.Sdk_SDK_JAVA, + categoryName: "TestCategory", }, - want: nil, - wantErr: true, + want: catalogWithSpecificCategory[:1], }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - if err := tt.prepFunc(tt.args.cacheService); err != nil { - t.Errorf("prepFunc() error = %v, wantErr %v", err, tt.wantErr) - } - got, err := GetPrecompiledObjectsCatalogFromCache(tt.args.ctx, tt.args.cacheService) - if (err != nil) != tt.wantErr { - t.Errorf("GetPrecompiledObjectsCatalogFromCache() error = %v, wantErr %v", err, tt.wantErr) - return - } - if !reflect.DeepEqual(got, tt.want) { - t.Errorf("GetPrecompiledObjectsCatalogFromCache() got = %v, want %v", got, tt.want) + if got := FilterCatalog(tt.args.catalog, tt.args.sdk, tt.args.categoryName); !reflect.DeepEqual(got, tt.want) { + t.Errorf("FilterCatalog() = %v, want %v", got, tt.want) } }) } From 68306709ae1edfc1909ad7e3a0b46b76dccbf227 Mon Sep 17 00:00:00 2001 From: Artur Khanin Date: Mon, 24 Jan 2022 17:38:56 +0300 Subject: [PATCH 21/36] Update for environment_service_test.go --- .../internal/environment/environment_service_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/playground/backend/internal/environment/environment_service_test.go b/playground/backend/internal/environment/environment_service_test.go index fde2ed4b3c14..94bc2eda194a 100644 --- a/playground/backend/internal/environment/environment_service_test.go +++ b/playground/backend/internal/environment/environment_service_test.go @@ -119,9 +119,9 @@ func Test_getSdkEnvsFromOsEnvs(t *testing.T) { }{ { name: "not specified beam sdk key in os envs", - want: nil, + want: NewBeamEnvs(playground.Sdk_SDK_UNSPECIFIED, nil, preparedModDir, defaultNumOfParallelJobs), envsToSet: map[string]string{}, - wantErr: true, + wantErr: false, }, { name: "default beam envs", @@ -137,9 +137,9 @@ func Test_getSdkEnvsFromOsEnvs(t *testing.T) { }, { name: "wrong sdk key in os envs", - want: nil, + want: NewBeamEnvs(playground.Sdk_SDK_UNSPECIFIED, nil, preparedModDir, defaultNumOfParallelJobs), envsToSet: map[string]string{beamSdkKey: "SDK_J"}, - wantErr: true, + wantErr: false, }, } for _, tt := range tests { From b95103c6ffd34e846da6160892ba6dab08be375b Mon Sep 17 00:00:00 2001 From: Pavel Avilov Date: Mon, 24 Jan 2022 19:23:53 +0300 Subject: [PATCH 22/36] Get default example from catalog --- playground/backend/cmd/server/controller.go | 17 ++++-- playground/backend/cmd/server/server.go | 1 - .../environment/environment_service.go | 2 - .../utils/precompiled_objects_utils.go | 23 +++---- .../utils/precompiled_objects_utils_test.go | 61 ++++++++++--------- 5 files changed, 53 insertions(+), 51 deletions(-) diff --git a/playground/backend/cmd/server/controller.go b/playground/backend/cmd/server/controller.go index 6781c3454873..eeae85b7d644 100644 --- a/playground/backend/cmd/server/controller.go +++ b/playground/backend/cmd/server/controller.go @@ -252,7 +252,6 @@ func (controller *playgroundController) GetPrecompiledObjects(ctx context.Contex if err = controller.cacheService.SetCatalog(ctx, catalog); err != nil { logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) } - response.SdkCategories = append(response.SdkCategories, &sdkCategory) } return &pb.GetPrecompiledObjectsResponse{ SdkCategories: utils.FilterCatalog(catalog, info.Sdk, info.Category), @@ -302,13 +301,19 @@ func (controller *playgroundController) GetDefaultPrecompiledObject(ctx context. logger.Errorf("GetDefaultPrecompiledObject(): unimplemented sdk: %s\n", info.Sdk) return nil, errors.InvalidArgumentError("Error during preparing", "Sdk is not implemented yet: %s", info.Sdk.String()) } - - defaultPrecompiledObjects, err := controller.cacheService.GetValue(ctx, uuid.Nil, cache.DefaultPrecompiledObjects) + catalog, err := controller.cacheService.GetCatalog(ctx) if err != nil { - logger.Errorf("GetDefaultPrecompiledObject(): cache.GetValue: %s\n", err.Error()) - return nil, errors.InvalidArgumentError("Error during getting default Precompiled Objects from cache", "Error during getting default Precompiled Objects") + logger.Errorf("GetDefaultPrecompiledObject(): cache error: %s", err.Error()) + catalog, err = utils.GetCatalogFromStorage(ctx) + if err != nil { + return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") + } + if err = controller.cacheService.SetCatalog(ctx, catalog); err != nil { + logger.Errorf("GetDefaultPrecompiledObject(): cache error: %s", err.Error()) + } } - precompiledObject := defaultPrecompiledObjects.(map[pb.Sdk]*pb.PrecompiledObject)[info.Sdk] + + precompiledObject := utils.GetDefaultPrecompiledObject(catalog, info.Sdk) response := pb.GetDefaultPrecompiledObjectResponse{PrecompiledObject: &pb.PrecompiledObject{ CloudPath: precompiledObject.CloudPath, Name: precompiledObject.Name, diff --git a/playground/backend/cmd/server/server.go b/playground/backend/cmd/server/server.go index 790e6efa17ca..44591cb1a168 100644 --- a/playground/backend/cmd/server/server.go +++ b/playground/backend/cmd/server/server.go @@ -24,7 +24,6 @@ import ( "beam.apache.org/playground/backend/internal/logger" "beam.apache.org/playground/backend/internal/utils" "context" - "github.com/google/uuid" "github.com/improbable-eng/grpc-web/go/grpcweb" "google.golang.org/grpc" ) diff --git a/playground/backend/internal/environment/environment_service.go b/playground/backend/internal/environment/environment_service.go index 221104a4918f..a2c373c78fa8 100644 --- a/playground/backend/internal/environment/environment_service.go +++ b/playground/backend/internal/environment/environment_service.go @@ -178,8 +178,6 @@ func ConfigureBeamEnvs(workDir string) (*BeamEnvs, error) { sdk = pb.Sdk_SDK_PYTHON case pb.Sdk_SDK_SCIO.String(): sdk = pb.Sdk_SDK_SCIO - default: - return nil, errors.New("incorrect value of sdk in the environment") } } if sdk == pb.Sdk_SDK_UNSPECIFIED { diff --git a/playground/backend/internal/utils/precompiled_objects_utils.go b/playground/backend/internal/utils/precompiled_objects_utils.go index 6770cd87ae8a..60088e517087 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils.go +++ b/playground/backend/internal/utils/precompiled_objects_utils.go @@ -93,21 +93,18 @@ func FilterCatalog(catalog []*pb.Categories, sdk pb.Sdk, categoryName string) [] return result } -// GetDefaultPrecompiledObjects returns the default precompiled objects from the precompiled objects catalog -func GetDefaultPrecompiledObjects(sdkCategories []*pb.Categories) map[pb.Sdk]*pb.PrecompiledObject { - defaultPrecompiledObjects := make(map[pb.Sdk]*pb.PrecompiledObject) - for _, categories := range sdkCategories { - for _, category := range categories.Categories { - for _, precompiledObject := range category.PrecompiledObjects { - if precompiledObject.DefaultExample { - defaultPrecompiledObjects[categories.Sdk] = precompiledObject - break +// GetDefaultPrecompiledObject returns the default precompiled objects from the precompiled objects catalog for sdk +func GetDefaultPrecompiledObject(catalog []*pb.Categories, sdk pb.Sdk) *pb.PrecompiledObject { + for _, categoriesSdk := range catalog { + if categoriesSdk.Sdk == sdk { + for _, category := range categoriesSdk.Categories { + for _, precompiledObject := range category.PrecompiledObjects { + if precompiledObject.DefaultExample { + return precompiledObject + } } } - if _, ok := defaultPrecompiledObjects[categories.Sdk]; ok { - break - } } } - return defaultPrecompiledObjects + return nil } diff --git a/playground/backend/internal/utils/precompiled_objects_utils_test.go b/playground/backend/internal/utils/precompiled_objects_utils_test.go index 2c833b2e4483..8c2c4e614985 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils_test.go +++ b/playground/backend/internal/utils/precompiled_objects_utils_test.go @@ -17,11 +17,7 @@ package utils import ( pb "beam.apache.org/playground/backend/internal/api/v1" - "beam.apache.org/playground/backend/internal/cache" - "beam.apache.org/playground/backend/internal/cache/local" "beam.apache.org/playground/backend/internal/cloud_bucket" - "context" - "github.com/google/uuid" "reflect" "testing" ) @@ -230,27 +226,27 @@ func TestGetDefaultPrecompiledObjects(t *testing.T) { Categories: []*pb.Categories_Category{ { CategoryName: "TestCategory1", PrecompiledObjects: []*pb.PrecompiledObject{ - { - CloudPath: "SDK_JAVA/TestCategory/TestName.java", - Name: "TestName", - Description: "TestDescription", - Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, - DefaultExample: false, + { + CloudPath: "SDK_JAVA/TestCategory/TestName.java", + Name: "TestName", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + DefaultExample: false, + }, }, }, - }, { CategoryName: "TestCategory2", PrecompiledObjects: []*pb.PrecompiledObject{ - &preparedPrecompiledObjectJava, - { - CloudPath: "SDK_JAVA/TestCategory/TestName2.java", - Name: "TestName2", - Description: "TestDescription", - Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, - DefaultExample: false, + &preparedPrecompiledObjectJava, + { + CloudPath: "SDK_JAVA/TestCategory/TestName2.java", + Name: "TestName2", + Description: "TestDescription", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + DefaultExample: false, + }, }, }, - }, }, }, { @@ -258,8 +254,8 @@ func TestGetDefaultPrecompiledObjects(t *testing.T) { Categories: []*pb.Categories_Category{ { CategoryName: "TestCategory", PrecompiledObjects: []*pb.PrecompiledObject{ - &preparedPrecompiledObjectGo, - }, + &preparedPrecompiledObjectGo, + }, }, }, }, @@ -269,26 +265,33 @@ func TestGetDefaultPrecompiledObjects(t *testing.T) { expectedDefaultPrecompiledObjects[pb.Sdk_SDK_GO] = &preparedPrecompiledObjectGo type args struct { sdkCategories []*pb.Categories + sdk pb.Sdk } tests := []struct { name string args args - want map[pb.Sdk]*pb.PrecompiledObject + want *pb.PrecompiledObject }{ { // Test case with getting default Precompiled Objects from the precompiled objects catalog - // As a result, want to receive an expected map of default Precompiled Objects. - name: "get default precompiled objects", - args: args{sdkCategories: sdkCategories}, - want: expectedDefaultPrecompiledObjects, + // As a result, want to receive an expected java default Precompiled Objects. + name: "get java default precompiled objects", + args: args{sdkCategories: sdkCategories, sdk: pb.Sdk_SDK_JAVA}, + want: &preparedPrecompiledObjectJava, + }, + { + // Test case with getting default Precompiled Objects from the precompiled objects catalog + // As a result, want to receive an expected go default Precompiled Objects. + name: "get java default precompiled objects", + args: args{sdkCategories: sdkCategories, sdk: pb.Sdk_SDK_GO}, + want: &preparedPrecompiledObjectGo, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - if got := GetDefaultPrecompiledObjects(tt.args.sdkCategories); !reflect.DeepEqual(got, tt.want) { - t.Errorf("GetDefaultPrecompiledObjects() = %v, want %v", got, tt.want) + if got := GetDefaultPrecompiledObject(tt.args.sdkCategories, tt.args.sdk); !reflect.DeepEqual(got, tt.want) { + t.Errorf("GetDefaultPrecompiledObject() = %v, want %v", got, tt.want) } }) } } - From f4ae9a750cff9e30c4afeca7662021276680eb21 Mon Sep 17 00:00:00 2001 From: Pavel Avilov Date: Tue, 25 Jan 2022 18:06:59 +0300 Subject: [PATCH 23/36] GetCatalogFromCacheOrStorage method --- playground/backend/cmd/server/controller.go | 26 +++++-------------- .../utils/precompiled_objects_utils.go | 18 +++++++++++++ 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/playground/backend/cmd/server/controller.go b/playground/backend/cmd/server/controller.go index eeae85b7d644..892c8c0bbb86 100644 --- a/playground/backend/cmd/server/controller.go +++ b/playground/backend/cmd/server/controller.go @@ -242,16 +242,10 @@ func (controller *playgroundController) Cancel(ctx context.Context, info *pb.Can // GetPrecompiledObjects returns the list of examples func (controller *playgroundController) GetPrecompiledObjects(ctx context.Context, info *pb.GetPrecompiledObjectsRequest) (*pb.GetPrecompiledObjectsResponse, error) { - catalog, err := controller.cacheService.GetCatalog(ctx) + catalog, err := utils.GetCatalogFromCacheOrStorage(ctx, controller.cacheService) if err != nil { - logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) - catalog, err = utils.GetCatalogFromStorage(ctx) - if err != nil { - return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") - } - if err = controller.cacheService.SetCatalog(ctx, catalog); err != nil { - logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) - } + logger.Errorf("GetPrecompiledObjects(): error during getting catalog: %s", err.Error()) + return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") } return &pb.GetPrecompiledObjectsResponse{ SdkCategories: utils.FilterCatalog(catalog, info.Sdk, info.Category), @@ -297,20 +291,14 @@ func (controller *playgroundController) GetPrecompiledObjectLogs(ctx context.Con // GetDefaultPrecompiledObject returns the default precompile object for sdk. func (controller *playgroundController) GetDefaultPrecompiledObject(ctx context.Context, info *pb.GetDefaultPrecompiledObjectRequest) (*pb.GetDefaultPrecompiledObjectResponse, error) { switch info.Sdk { - case pb.Sdk_SDK_UNSPECIFIED, pb.Sdk_SDK_SCIO: + case pb.Sdk_SDK_UNSPECIFIED: logger.Errorf("GetDefaultPrecompiledObject(): unimplemented sdk: %s\n", info.Sdk) return nil, errors.InvalidArgumentError("Error during preparing", "Sdk is not implemented yet: %s", info.Sdk.String()) } - catalog, err := controller.cacheService.GetCatalog(ctx) + catalog, err := utils.GetCatalogFromCacheOrStorage(ctx, controller.cacheService) if err != nil { - logger.Errorf("GetDefaultPrecompiledObject(): cache error: %s", err.Error()) - catalog, err = utils.GetCatalogFromStorage(ctx) - if err != nil { - return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") - } - if err = controller.cacheService.SetCatalog(ctx, catalog); err != nil { - logger.Errorf("GetDefaultPrecompiledObject(): cache error: %s", err.Error()) - } + logger.Errorf("GetDefaultPrecompiledObject(): error during getting catalog: %s", err.Error()) + return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") } precompiledObject := utils.GetDefaultPrecompiledObject(catalog, info.Sdk) diff --git a/playground/backend/internal/utils/precompiled_objects_utils.go b/playground/backend/internal/utils/precompiled_objects_utils.go index 60088e517087..5350a0dcb357 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils.go +++ b/playground/backend/internal/utils/precompiled_objects_utils.go @@ -17,6 +17,7 @@ package utils import ( pb "beam.apache.org/playground/backend/internal/api/v1" + "beam.apache.org/playground/backend/internal/cache" "beam.apache.org/playground/backend/internal/cloud_bucket" "beam.apache.org/playground/backend/internal/logger" "context" @@ -108,3 +109,20 @@ func GetDefaultPrecompiledObject(catalog []*pb.Categories, sdk pb.Sdk) *pb.Preco } return nil } + +// GetCatalogFromCacheOrStorage returns the precompiled objects catalog from cache +// - If there is no catalog in the cache, gets the catalog from the Storage and saves it to the cache +func GetCatalogFromCacheOrStorage(ctx context.Context, cacheService cache.Cache) ([]*pb.Categories, error) { + catalog, err := cacheService.GetCatalog(ctx) + if err != nil { + logger.Errorf("GetCatalog(): cache error: %s", err.Error()) + catalog, err = GetCatalogFromStorage(ctx) + if err != nil { + return nil, err + } + if err = cacheService.SetCatalog(ctx, catalog); err != nil { + logger.Errorf("SetCatalog(): cache error: %s", err.Error()) + } + } + return catalog, nil +} From 1550e3a6930a010374939b9199f1022044e81287 Mon Sep 17 00:00:00 2001 From: Pavel Avilov Date: Wed, 26 Jan 2022 16:38:28 +0300 Subject: [PATCH 24/36] Update licenses --- playground/backend/internal/api/v1/api.pb.go | 659 +++++++++++------- playground/frontend/lib/api/v1/api.pb.dart | 116 +++ .../frontend/lib/api/v1/api.pbjson.dart | 31 +- 3 files changed, 552 insertions(+), 254 deletions(-) diff --git a/playground/backend/internal/api/v1/api.pb.go b/playground/backend/internal/api/v1/api.pb.go index efbaf8752a36..c80c003418ad 100644 --- a/playground/backend/internal/api/v1/api.pb.go +++ b/playground/backend/internal/api/v1/api.pb.go @@ -1203,7 +1203,8 @@ type PrecompiledObject struct { Type PrecompiledObjectType `protobuf:"varint,4,opt,name=type,proto3,enum=api.v1.PrecompiledObjectType" json:"type,omitempty"` PipelineOptions string `protobuf:"bytes,5,opt,name=pipeline_options,json=pipelineOptions,proto3" json:"pipeline_options,omitempty"` // Link to the example in the Beam repository - Link string `protobuf:"bytes,6,opt,name=link,proto3" json:"link,omitempty"` + Link string `protobuf:"bytes,6,opt,name=link,proto3" json:"link,omitempty"` + DefaultExample bool `protobuf:"varint,7,opt,name=default_example,json=defaultExample,proto3" json:"default_example,omitempty"` } func (x *PrecompiledObject) Reset() { @@ -1280,6 +1281,13 @@ func (x *PrecompiledObject) GetLink() string { return "" } +func (x *PrecompiledObject) GetDefaultExample() bool { + if x != nil { + return x.DefaultExample + } + return false +} + // Categories represent the array of messages with sdk and categories at this sdk type Categories struct { state protoimpl.MessageState @@ -1536,7 +1544,55 @@ func (x *GetPrecompiledObjectLogsRequest) GetCloudPath() string { return "" } -// GetListOfPrecompiledObjectsResponse represent the map between sdk and categories for the sdk. +// GetDefaultPrecompiledObjectRequest contains information of the needed PrecompiledObject sdk. +type GetDefaultPrecompiledObjectRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sdk Sdk `protobuf:"varint,1,opt,name=sdk,proto3,enum=api.v1.Sdk" json:"sdk,omitempty"` +} + +func (x *GetDefaultPrecompiledObjectRequest) Reset() { + *x = GetDefaultPrecompiledObjectRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_api_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDefaultPrecompiledObjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDefaultPrecompiledObjectRequest) ProtoMessage() {} + +func (x *GetDefaultPrecompiledObjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_api_proto_msgTypes[26] + 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 GetDefaultPrecompiledObjectRequest.ProtoReflect.Descriptor instead. +func (*GetDefaultPrecompiledObjectRequest) Descriptor() ([]byte, []int) { + return file_api_v1_api_proto_rawDescGZIP(), []int{26} +} + +func (x *GetDefaultPrecompiledObjectRequest) GetSdk() Sdk { + if x != nil { + return x.Sdk + } + return Sdk_SDK_UNSPECIFIED +} + +// GetPrecompiledObjectsResponse represent the map between sdk and categories for the sdk. type GetPrecompiledObjectsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1548,7 +1604,7 @@ type GetPrecompiledObjectsResponse struct { func (x *GetPrecompiledObjectsResponse) Reset() { *x = GetPrecompiledObjectsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[26] + mi := &file_api_v1_api_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1561,7 +1617,7 @@ func (x *GetPrecompiledObjectsResponse) String() string { func (*GetPrecompiledObjectsResponse) ProtoMessage() {} func (x *GetPrecompiledObjectsResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[26] + mi := &file_api_v1_api_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1574,7 +1630,7 @@ func (x *GetPrecompiledObjectsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPrecompiledObjectsResponse.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectsResponse) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{26} + return file_api_v1_api_proto_rawDescGZIP(), []int{27} } func (x *GetPrecompiledObjectsResponse) GetSdkCategories() []*Categories { @@ -1596,7 +1652,7 @@ type GetPrecompiledObjectCodeResponse struct { func (x *GetPrecompiledObjectCodeResponse) Reset() { *x = GetPrecompiledObjectCodeResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[27] + mi := &file_api_v1_api_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1609,7 +1665,7 @@ func (x *GetPrecompiledObjectCodeResponse) String() string { func (*GetPrecompiledObjectCodeResponse) ProtoMessage() {} func (x *GetPrecompiledObjectCodeResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[27] + mi := &file_api_v1_api_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1622,7 +1678,7 @@ func (x *GetPrecompiledObjectCodeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPrecompiledObjectCodeResponse.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectCodeResponse) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{27} + return file_api_v1_api_proto_rawDescGZIP(), []int{28} } func (x *GetPrecompiledObjectCodeResponse) GetCode() string { @@ -1644,7 +1700,7 @@ type GetPrecompiledObjectOutputResponse struct { func (x *GetPrecompiledObjectOutputResponse) Reset() { *x = GetPrecompiledObjectOutputResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[28] + mi := &file_api_v1_api_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1657,7 +1713,7 @@ func (x *GetPrecompiledObjectOutputResponse) String() string { func (*GetPrecompiledObjectOutputResponse) ProtoMessage() {} func (x *GetPrecompiledObjectOutputResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[28] + mi := &file_api_v1_api_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1670,7 +1726,7 @@ func (x *GetPrecompiledObjectOutputResponse) ProtoReflect() protoreflect.Message // Deprecated: Use GetPrecompiledObjectOutputResponse.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectOutputResponse) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{28} + return file_api_v1_api_proto_rawDescGZIP(), []int{29} } func (x *GetPrecompiledObjectOutputResponse) GetOutput() string { @@ -1692,7 +1748,7 @@ type GetPrecompiledObjectLogsResponse struct { func (x *GetPrecompiledObjectLogsResponse) Reset() { *x = GetPrecompiledObjectLogsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[29] + mi := &file_api_v1_api_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1705,7 +1761,7 @@ func (x *GetPrecompiledObjectLogsResponse) String() string { func (*GetPrecompiledObjectLogsResponse) ProtoMessage() {} func (x *GetPrecompiledObjectLogsResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[29] + mi := &file_api_v1_api_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1718,7 +1774,7 @@ func (x *GetPrecompiledObjectLogsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPrecompiledObjectLogsResponse.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectLogsResponse) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{29} + return file_api_v1_api_proto_rawDescGZIP(), []int{30} } func (x *GetPrecompiledObjectLogsResponse) GetOutput() string { @@ -1728,6 +1784,54 @@ func (x *GetPrecompiledObjectLogsResponse) GetOutput() string { return "" } +// GetDefaultPrecompiledObjectResponse represents the default PrecompiledObject and his category for the sdk. +type GetDefaultPrecompiledObjectResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PrecompiledObject *PrecompiledObject `protobuf:"bytes,1,opt,name=precompiled_object,json=precompiledObject,proto3" json:"precompiled_object,omitempty"` +} + +func (x *GetDefaultPrecompiledObjectResponse) Reset() { + *x = GetDefaultPrecompiledObjectResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_api_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDefaultPrecompiledObjectResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDefaultPrecompiledObjectResponse) ProtoMessage() {} + +func (x *GetDefaultPrecompiledObjectResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_api_proto_msgTypes[31] + 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 GetDefaultPrecompiledObjectResponse.ProtoReflect.Descriptor instead. +func (*GetDefaultPrecompiledObjectResponse) Descriptor() ([]byte, []int) { + return file_api_v1_api_proto_rawDescGZIP(), []int{31} +} + +func (x *GetDefaultPrecompiledObjectResponse) GetPrecompiledObject() *PrecompiledObject { + if x != nil { + return x.PrecompiledObject + } + return nil +} + type Categories_Category struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1740,7 +1844,7 @@ type Categories_Category struct { func (x *Categories_Category) Reset() { *x = Categories_Category{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[30] + mi := &file_api_v1_api_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1753,7 +1857,7 @@ func (x *Categories_Category) String() string { func (*Categories_Category) ProtoMessage() {} func (x *Categories_Category) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[30] + mi := &file_api_v1_api_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1858,7 +1962,7 @@ var file_api_v1_api_proto_rawDesc = []byte{ 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x55, 0x75, 0x69, 0x64, 0x22, 0x10, 0x0a, 0x0e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xda, 0x01, 0x0a, 0x11, 0x50, 0x72, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x83, 0x02, 0x0a, 0x11, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, @@ -1872,172 +1976,193 @@ var file_api_v1_api_proto_rawDesc = []byte{ 0x6e, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x22, 0xe5, 0x01, 0x0a, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, - 0x72, 0x69, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x03, 0x73, 0x64, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x64, 0x6b, 0x52, 0x03, - 0x73, 0x64, 0x6b, 0x12, 0x3b, 0x0a, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2e, 0x43, 0x61, 0x74, 0x65, - 0x67, 0x6f, 0x72, 0x79, 0x52, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, - 0x1a, 0x7b, 0x0a, 0x08, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x23, 0x0a, 0x0d, - 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x4a, 0x0a, 0x13, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, - 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, - 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x12, 0x70, 0x72, 0x65, 0x63, 0x6f, - 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, 0x59, 0x0a, - 0x1c, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, + 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x22, 0xe5, + 0x01, 0x0a, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x03, 0x73, 0x64, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x64, 0x6b, 0x52, 0x03, 0x73, 0x64, 0x6b, 0x12, 0x1a, 0x0a, 0x08, - 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x22, 0x40, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x50, - 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x42, 0x0a, 0x21, 0x47, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x64, 0x6b, 0x52, 0x03, 0x73, 0x64, 0x6b, 0x12, 0x3b, 0x0a, 0x0a, + 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, + 0x72, 0x69, 0x65, 0x73, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x0a, 0x63, + 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x1a, 0x7b, 0x0a, 0x08, 0x43, 0x61, 0x74, + 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, + 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x61, + 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x13, 0x70, 0x72, + 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x52, 0x12, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, 0x59, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x03, 0x73, 0x64, 0x6b, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x64, 0x6b, + 0x52, 0x03, 0x73, 0x64, 0x6b, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, + 0x79, 0x22, 0x40, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, + 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, + 0x61, 0x74, 0x68, 0x22, 0x42, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x40, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, + 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x43, 0x0a, 0x22, 0x47, 0x65, 0x74, + 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1d, 0x0a, 0x03, 0x73, 0x64, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x64, 0x6b, 0x52, 0x03, 0x73, 0x64, 0x6b, 0x22, 0x5a, + 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x39, 0x0a, 0x0e, 0x73, 0x64, 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x0d, 0x73, 0x64, 0x6b, + 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0x36, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x40, - 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, - 0x22, 0x5a, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, - 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x39, 0x0a, 0x0e, 0x73, 0x64, 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, - 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x0d, 0x73, - 0x64, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0x36, 0x0a, 0x20, - 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x63, 0x6f, 0x64, 0x65, 0x22, 0x3c, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, - 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x22, 0x3a, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, - 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2a, 0x52, - 0x0a, 0x03, 0x53, 0x64, 0x6b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x44, 0x4b, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, - 0x4b, 0x5f, 0x4a, 0x41, 0x56, 0x41, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x44, 0x4b, 0x5f, - 0x47, 0x4f, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x44, 0x4b, 0x5f, 0x50, 0x59, 0x54, 0x48, - 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, 0x53, 0x43, 0x49, 0x4f, - 0x10, 0x04, 0x2a, 0xb8, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, - 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, - 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, - 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x14, 0x0a, - 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x49, 0x4e, - 0x47, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, - 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x06, 0x12, 0x14, 0x0a, - 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4e, - 0x47, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, - 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x09, 0x12, 0x10, - 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x0a, - 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x54, - 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x0c, 0x2a, 0xae, 0x01, - 0x0a, 0x15, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x23, 0x50, 0x52, 0x45, 0x43, 0x4f, - 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, - 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x41, 0x4d, - 0x50, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, - 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x4b, 0x41, 0x54, 0x41, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x50, 0x52, 0x45, 0x43, 0x4f, - 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x03, 0x32, 0xb1, - 0x09, 0x0a, 0x11, 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, - 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, - 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x16, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, + 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, + 0x64, 0x65, 0x22, 0x3c, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x22, 0x3a, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x6f, 0x0a, 0x23, + 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x11, 0x70, 0x72, 0x65, 0x63, + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2a, 0x52, 0x0a, + 0x03, 0x53, 0x64, 0x6b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x44, 0x4b, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, + 0x5f, 0x4a, 0x41, 0x56, 0x41, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x44, 0x4b, 0x5f, 0x47, + 0x4f, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x44, 0x4b, 0x5f, 0x50, 0x59, 0x54, 0x48, 0x4f, + 0x4e, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, 0x53, 0x43, 0x49, 0x4f, 0x10, + 0x04, 0x2a, 0xb8, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, + 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x1c, + 0x0a, 0x18, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x41, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x49, 0x4e, 0x47, + 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, + 0x50, 0x49, 0x4c, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4e, 0x47, + 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4e, + 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x09, 0x12, 0x10, 0x0a, + 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x0a, 0x12, + 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x54, 0x49, + 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x0c, 0x2a, 0xae, 0x01, 0x0a, + 0x15, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x23, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, + 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x23, 0x0a, 0x1f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, + 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x41, 0x4d, 0x50, + 0x4c, 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, + 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x4b, 0x41, 0x54, 0x41, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, + 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x03, 0x32, 0xa9, 0x0a, + 0x0a, 0x11, 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3d, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x17, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, - 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x22, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, - 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x23, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, - 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x2e, + 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x46, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, 0x75, + 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x16, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, + 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, + 0x0b, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x22, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, + 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x23, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, + 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, - 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, - 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x37, 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, - 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, 0x74, - 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, + 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x37, 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x2e, 0x61, 0x70, + 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, + 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, + 0x1a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, - 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, - 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x29, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, - 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x27, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, - 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, - 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0x38, 0x5a, 0x36, 0x62, 0x65, 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, - 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, - 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x3b, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x76, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, + 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x12, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x38, 0x5a, 0x36, 0x62, 0x65, 0x61, + 0x6d, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x6c, 0x61, + 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x3b, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, + 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2053,85 +2178,91 @@ func file_api_v1_api_proto_rawDescGZIP() []byte { } var file_api_v1_api_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_api_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 31) +var file_api_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 33) var file_api_v1_api_proto_goTypes = []interface{}{ - (Sdk)(0), // 0: api.v1.Sdk - (Status)(0), // 1: api.v1.Status - (PrecompiledObjectType)(0), // 2: api.v1.PrecompiledObjectType - (*RunCodeRequest)(nil), // 3: api.v1.RunCodeRequest - (*RunCodeResponse)(nil), // 4: api.v1.RunCodeResponse - (*CheckStatusRequest)(nil), // 5: api.v1.CheckStatusRequest - (*CheckStatusResponse)(nil), // 6: api.v1.CheckStatusResponse - (*GetValidationOutputRequest)(nil), // 7: api.v1.GetValidationOutputRequest - (*GetValidationOutputResponse)(nil), // 8: api.v1.GetValidationOutputResponse - (*GetPreparationOutputRequest)(nil), // 9: api.v1.GetPreparationOutputRequest - (*GetPreparationOutputResponse)(nil), // 10: api.v1.GetPreparationOutputResponse - (*GetCompileOutputRequest)(nil), // 11: api.v1.GetCompileOutputRequest - (*GetCompileOutputResponse)(nil), // 12: api.v1.GetCompileOutputResponse - (*GetRunOutputRequest)(nil), // 13: api.v1.GetRunOutputRequest - (*GetRunOutputResponse)(nil), // 14: api.v1.GetRunOutputResponse - (*GetRunErrorRequest)(nil), // 15: api.v1.GetRunErrorRequest - (*GetRunErrorResponse)(nil), // 16: api.v1.GetRunErrorResponse - (*GetLogsRequest)(nil), // 17: api.v1.GetLogsRequest - (*GetLogsResponse)(nil), // 18: api.v1.GetLogsResponse - (*GetGraphRequest)(nil), // 19: api.v1.GetGraphRequest - (*GetGraphResponse)(nil), // 20: api.v1.GetGraphResponse - (*CancelRequest)(nil), // 21: api.v1.CancelRequest - (*CancelResponse)(nil), // 22: api.v1.CancelResponse - (*PrecompiledObject)(nil), // 23: api.v1.PrecompiledObject - (*Categories)(nil), // 24: api.v1.Categories - (*GetPrecompiledObjectsRequest)(nil), // 25: api.v1.GetPrecompiledObjectsRequest - (*GetPrecompiledObjectCodeRequest)(nil), // 26: api.v1.GetPrecompiledObjectCodeRequest - (*GetPrecompiledObjectOutputRequest)(nil), // 27: api.v1.GetPrecompiledObjectOutputRequest - (*GetPrecompiledObjectLogsRequest)(nil), // 28: api.v1.GetPrecompiledObjectLogsRequest - (*GetPrecompiledObjectsResponse)(nil), // 29: api.v1.GetPrecompiledObjectsResponse - (*GetPrecompiledObjectCodeResponse)(nil), // 30: api.v1.GetPrecompiledObjectCodeResponse - (*GetPrecompiledObjectOutputResponse)(nil), // 31: api.v1.GetPrecompiledObjectOutputResponse - (*GetPrecompiledObjectLogsResponse)(nil), // 32: api.v1.GetPrecompiledObjectLogsResponse - (*Categories_Category)(nil), // 33: api.v1.Categories.Category + (Sdk)(0), // 0: api.v1.Sdk + (Status)(0), // 1: api.v1.Status + (PrecompiledObjectType)(0), // 2: api.v1.PrecompiledObjectType + (*RunCodeRequest)(nil), // 3: api.v1.RunCodeRequest + (*RunCodeResponse)(nil), // 4: api.v1.RunCodeResponse + (*CheckStatusRequest)(nil), // 5: api.v1.CheckStatusRequest + (*CheckStatusResponse)(nil), // 6: api.v1.CheckStatusResponse + (*GetValidationOutputRequest)(nil), // 7: api.v1.GetValidationOutputRequest + (*GetValidationOutputResponse)(nil), // 8: api.v1.GetValidationOutputResponse + (*GetPreparationOutputRequest)(nil), // 9: api.v1.GetPreparationOutputRequest + (*GetPreparationOutputResponse)(nil), // 10: api.v1.GetPreparationOutputResponse + (*GetCompileOutputRequest)(nil), // 11: api.v1.GetCompileOutputRequest + (*GetCompileOutputResponse)(nil), // 12: api.v1.GetCompileOutputResponse + (*GetRunOutputRequest)(nil), // 13: api.v1.GetRunOutputRequest + (*GetRunOutputResponse)(nil), // 14: api.v1.GetRunOutputResponse + (*GetRunErrorRequest)(nil), // 15: api.v1.GetRunErrorRequest + (*GetRunErrorResponse)(nil), // 16: api.v1.GetRunErrorResponse + (*GetLogsRequest)(nil), // 17: api.v1.GetLogsRequest + (*GetLogsResponse)(nil), // 18: api.v1.GetLogsResponse + (*GetGraphRequest)(nil), // 19: api.v1.GetGraphRequest + (*GetGraphResponse)(nil), // 20: api.v1.GetGraphResponse + (*CancelRequest)(nil), // 21: api.v1.CancelRequest + (*CancelResponse)(nil), // 22: api.v1.CancelResponse + (*PrecompiledObject)(nil), // 23: api.v1.PrecompiledObject + (*Categories)(nil), // 24: api.v1.Categories + (*GetPrecompiledObjectsRequest)(nil), // 25: api.v1.GetPrecompiledObjectsRequest + (*GetPrecompiledObjectCodeRequest)(nil), // 26: api.v1.GetPrecompiledObjectCodeRequest + (*GetPrecompiledObjectOutputRequest)(nil), // 27: api.v1.GetPrecompiledObjectOutputRequest + (*GetPrecompiledObjectLogsRequest)(nil), // 28: api.v1.GetPrecompiledObjectLogsRequest + (*GetDefaultPrecompiledObjectRequest)(nil), // 29: api.v1.GetDefaultPrecompiledObjectRequest + (*GetPrecompiledObjectsResponse)(nil), // 30: api.v1.GetPrecompiledObjectsResponse + (*GetPrecompiledObjectCodeResponse)(nil), // 31: api.v1.GetPrecompiledObjectCodeResponse + (*GetPrecompiledObjectOutputResponse)(nil), // 32: api.v1.GetPrecompiledObjectOutputResponse + (*GetPrecompiledObjectLogsResponse)(nil), // 33: api.v1.GetPrecompiledObjectLogsResponse + (*GetDefaultPrecompiledObjectResponse)(nil), // 34: api.v1.GetDefaultPrecompiledObjectResponse + (*Categories_Category)(nil), // 35: api.v1.Categories.Category } var file_api_v1_api_proto_depIdxs = []int32{ 0, // 0: api.v1.RunCodeRequest.sdk:type_name -> api.v1.Sdk 1, // 1: api.v1.CheckStatusResponse.status:type_name -> api.v1.Status 2, // 2: api.v1.PrecompiledObject.type:type_name -> api.v1.PrecompiledObjectType 0, // 3: api.v1.Categories.sdk:type_name -> api.v1.Sdk - 33, // 4: api.v1.Categories.categories:type_name -> api.v1.Categories.Category + 35, // 4: api.v1.Categories.categories:type_name -> api.v1.Categories.Category 0, // 5: api.v1.GetPrecompiledObjectsRequest.sdk:type_name -> api.v1.Sdk - 24, // 6: api.v1.GetPrecompiledObjectsResponse.sdk_categories:type_name -> api.v1.Categories - 23, // 7: api.v1.Categories.Category.precompiled_objects:type_name -> api.v1.PrecompiledObject - 3, // 8: api.v1.PlaygroundService.RunCode:input_type -> api.v1.RunCodeRequest - 5, // 9: api.v1.PlaygroundService.CheckStatus:input_type -> api.v1.CheckStatusRequest - 13, // 10: api.v1.PlaygroundService.GetRunOutput:input_type -> api.v1.GetRunOutputRequest - 17, // 11: api.v1.PlaygroundService.GetLogs:input_type -> api.v1.GetLogsRequest - 19, // 12: api.v1.PlaygroundService.GetGraph:input_type -> api.v1.GetGraphRequest - 15, // 13: api.v1.PlaygroundService.GetRunError:input_type -> api.v1.GetRunErrorRequest - 7, // 14: api.v1.PlaygroundService.GetValidationOutput:input_type -> api.v1.GetValidationOutputRequest - 9, // 15: api.v1.PlaygroundService.GetPreparationOutput:input_type -> api.v1.GetPreparationOutputRequest - 11, // 16: api.v1.PlaygroundService.GetCompileOutput:input_type -> api.v1.GetCompileOutputRequest - 21, // 17: api.v1.PlaygroundService.Cancel:input_type -> api.v1.CancelRequest - 25, // 18: api.v1.PlaygroundService.GetPrecompiledObjects:input_type -> api.v1.GetPrecompiledObjectsRequest - 26, // 19: api.v1.PlaygroundService.GetPrecompiledObjectCode:input_type -> api.v1.GetPrecompiledObjectCodeRequest - 27, // 20: api.v1.PlaygroundService.GetPrecompiledObjectOutput:input_type -> api.v1.GetPrecompiledObjectOutputRequest - 28, // 21: api.v1.PlaygroundService.GetPrecompiledObjectLogs:input_type -> api.v1.GetPrecompiledObjectLogsRequest - 4, // 22: api.v1.PlaygroundService.RunCode:output_type -> api.v1.RunCodeResponse - 6, // 23: api.v1.PlaygroundService.CheckStatus:output_type -> api.v1.CheckStatusResponse - 14, // 24: api.v1.PlaygroundService.GetRunOutput:output_type -> api.v1.GetRunOutputResponse - 18, // 25: api.v1.PlaygroundService.GetLogs:output_type -> api.v1.GetLogsResponse - 20, // 26: api.v1.PlaygroundService.GetGraph:output_type -> api.v1.GetGraphResponse - 16, // 27: api.v1.PlaygroundService.GetRunError:output_type -> api.v1.GetRunErrorResponse - 8, // 28: api.v1.PlaygroundService.GetValidationOutput:output_type -> api.v1.GetValidationOutputResponse - 10, // 29: api.v1.PlaygroundService.GetPreparationOutput:output_type -> api.v1.GetPreparationOutputResponse - 12, // 30: api.v1.PlaygroundService.GetCompileOutput:output_type -> api.v1.GetCompileOutputResponse - 22, // 31: api.v1.PlaygroundService.Cancel:output_type -> api.v1.CancelResponse - 29, // 32: api.v1.PlaygroundService.GetPrecompiledObjects:output_type -> api.v1.GetPrecompiledObjectsResponse - 30, // 33: api.v1.PlaygroundService.GetPrecompiledObjectCode:output_type -> api.v1.GetPrecompiledObjectCodeResponse - 31, // 34: api.v1.PlaygroundService.GetPrecompiledObjectOutput:output_type -> api.v1.GetPrecompiledObjectOutputResponse - 32, // 35: api.v1.PlaygroundService.GetPrecompiledObjectLogs:output_type -> api.v1.GetPrecompiledObjectLogsResponse - 22, // [22:36] is the sub-list for method output_type - 8, // [8:22] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 0, // 6: api.v1.GetDefaultPrecompiledObjectRequest.sdk:type_name -> api.v1.Sdk + 24, // 7: api.v1.GetPrecompiledObjectsResponse.sdk_categories:type_name -> api.v1.Categories + 23, // 8: api.v1.GetDefaultPrecompiledObjectResponse.precompiled_object:type_name -> api.v1.PrecompiledObject + 23, // 9: api.v1.Categories.Category.precompiled_objects:type_name -> api.v1.PrecompiledObject + 3, // 10: api.v1.PlaygroundService.RunCode:input_type -> api.v1.RunCodeRequest + 5, // 11: api.v1.PlaygroundService.CheckStatus:input_type -> api.v1.CheckStatusRequest + 13, // 12: api.v1.PlaygroundService.GetRunOutput:input_type -> api.v1.GetRunOutputRequest + 17, // 13: api.v1.PlaygroundService.GetLogs:input_type -> api.v1.GetLogsRequest + 19, // 14: api.v1.PlaygroundService.GetGraph:input_type -> api.v1.GetGraphRequest + 15, // 15: api.v1.PlaygroundService.GetRunError:input_type -> api.v1.GetRunErrorRequest + 7, // 16: api.v1.PlaygroundService.GetValidationOutput:input_type -> api.v1.GetValidationOutputRequest + 9, // 17: api.v1.PlaygroundService.GetPreparationOutput:input_type -> api.v1.GetPreparationOutputRequest + 11, // 18: api.v1.PlaygroundService.GetCompileOutput:input_type -> api.v1.GetCompileOutputRequest + 21, // 19: api.v1.PlaygroundService.Cancel:input_type -> api.v1.CancelRequest + 25, // 20: api.v1.PlaygroundService.GetPrecompiledObjects:input_type -> api.v1.GetPrecompiledObjectsRequest + 26, // 21: api.v1.PlaygroundService.GetPrecompiledObjectCode:input_type -> api.v1.GetPrecompiledObjectCodeRequest + 27, // 22: api.v1.PlaygroundService.GetPrecompiledObjectOutput:input_type -> api.v1.GetPrecompiledObjectOutputRequest + 28, // 23: api.v1.PlaygroundService.GetPrecompiledObjectLogs:input_type -> api.v1.GetPrecompiledObjectLogsRequest + 29, // 24: api.v1.PlaygroundService.GetDefaultPrecompiledObject:input_type -> api.v1.GetDefaultPrecompiledObjectRequest + 4, // 25: api.v1.PlaygroundService.RunCode:output_type -> api.v1.RunCodeResponse + 6, // 26: api.v1.PlaygroundService.CheckStatus:output_type -> api.v1.CheckStatusResponse + 14, // 27: api.v1.PlaygroundService.GetRunOutput:output_type -> api.v1.GetRunOutputResponse + 18, // 28: api.v1.PlaygroundService.GetLogs:output_type -> api.v1.GetLogsResponse + 20, // 29: api.v1.PlaygroundService.GetGraph:output_type -> api.v1.GetGraphResponse + 16, // 30: api.v1.PlaygroundService.GetRunError:output_type -> api.v1.GetRunErrorResponse + 8, // 31: api.v1.PlaygroundService.GetValidationOutput:output_type -> api.v1.GetValidationOutputResponse + 10, // 32: api.v1.PlaygroundService.GetPreparationOutput:output_type -> api.v1.GetPreparationOutputResponse + 12, // 33: api.v1.PlaygroundService.GetCompileOutput:output_type -> api.v1.GetCompileOutputResponse + 22, // 34: api.v1.PlaygroundService.Cancel:output_type -> api.v1.CancelResponse + 30, // 35: api.v1.PlaygroundService.GetPrecompiledObjects:output_type -> api.v1.GetPrecompiledObjectsResponse + 31, // 36: api.v1.PlaygroundService.GetPrecompiledObjectCode:output_type -> api.v1.GetPrecompiledObjectCodeResponse + 32, // 37: api.v1.PlaygroundService.GetPrecompiledObjectOutput:output_type -> api.v1.GetPrecompiledObjectOutputResponse + 33, // 38: api.v1.PlaygroundService.GetPrecompiledObjectLogs:output_type -> api.v1.GetPrecompiledObjectLogsResponse + 34, // 39: api.v1.PlaygroundService.GetDefaultPrecompiledObject:output_type -> api.v1.GetDefaultPrecompiledObjectResponse + 25, // [25:40] is the sub-list for method output_type + 10, // [10:25] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_api_v1_api_proto_init() } @@ -2453,7 +2584,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectsResponse); i { + switch v := v.(*GetDefaultPrecompiledObjectRequest); i { case 0: return &v.state case 1: @@ -2465,7 +2596,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectCodeResponse); i { + switch v := v.(*GetPrecompiledObjectsResponse); i { case 0: return &v.state case 1: @@ -2477,7 +2608,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectOutputResponse); i { + switch v := v.(*GetPrecompiledObjectCodeResponse); i { case 0: return &v.state case 1: @@ -2489,7 +2620,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectLogsResponse); i { + switch v := v.(*GetPrecompiledObjectOutputResponse); i { case 0: return &v.state case 1: @@ -2501,6 +2632,30 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPrecompiledObjectLogsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_api_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDefaultPrecompiledObjectResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_api_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Categories_Category); i { case 0: return &v.state @@ -2519,7 +2674,7 @@ func file_api_v1_api_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_v1_api_proto_rawDesc, NumEnums: 3, - NumMessages: 31, + NumMessages: 33, NumExtensions: 0, NumServices: 1, }, diff --git a/playground/frontend/lib/api/v1/api.pb.dart b/playground/frontend/lib/api/v1/api.pb.dart index 9f2121e5cc3b..86b47fd669fd 100644 --- a/playground/frontend/lib/api/v1/api.pb.dart +++ b/playground/frontend/lib/api/v1/api.pb.dart @@ -17,6 +17,12 @@ */ /// +// Generated code. Do not modify. +// source: api/v1/api.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields + import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; @@ -983,6 +989,7 @@ class PrecompiledObject extends $pb.GeneratedMessage { ..e(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'type', $pb.PbFieldType.OE, defaultOrMaker: PrecompiledObjectType.PRECOMPILED_OBJECT_TYPE_UNSPECIFIED, valueOf: PrecompiledObjectType.valueOf, enumValues: PrecompiledObjectType.values) ..aOS(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pipelineOptions') ..aOS(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'link') + ..aOB(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'defaultExample') ..hasRequiredFields = false ; @@ -994,6 +1001,7 @@ class PrecompiledObject extends $pb.GeneratedMessage { PrecompiledObjectType? type, $core.String? pipelineOptions, $core.String? link, + $core.bool? defaultExample, }) { final _result = create(); if (cloudPath != null) { @@ -1014,6 +1022,9 @@ class PrecompiledObject extends $pb.GeneratedMessage { if (link != null) { _result.link = link; } + if (defaultExample != null) { + _result.defaultExample = defaultExample; + } return _result; } factory PrecompiledObject.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); @@ -1090,6 +1101,15 @@ class PrecompiledObject extends $pb.GeneratedMessage { $core.bool hasLink() => $_has(5); @$pb.TagNumber(6) void clearLink() => clearField(6); + + @$pb.TagNumber(7) + $core.bool get defaultExample => $_getBF(6); + @$pb.TagNumber(7) + set defaultExample($core.bool v) { $_setBool(6, v); } + @$pb.TagNumber(7) + $core.bool hasDefaultExample() => $_has(6); + @$pb.TagNumber(7) + void clearDefaultExample() => clearField(7); } class Categories_Category extends $pb.GeneratedMessage { @@ -1404,6 +1424,53 @@ class GetPrecompiledObjectLogsRequest extends $pb.GeneratedMessage { void clearCloudPath() => clearField(1); } +class GetDefaultPrecompiledObjectRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetDefaultPrecompiledObjectRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..e(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sdk', $pb.PbFieldType.OE, defaultOrMaker: Sdk.SDK_UNSPECIFIED, valueOf: Sdk.valueOf, enumValues: Sdk.values) + ..hasRequiredFields = false + ; + + GetDefaultPrecompiledObjectRequest._() : super(); + factory GetDefaultPrecompiledObjectRequest({ + Sdk? sdk, + }) { + final _result = create(); + if (sdk != null) { + _result.sdk = sdk; + } + return _result; + } + factory GetDefaultPrecompiledObjectRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetDefaultPrecompiledObjectRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetDefaultPrecompiledObjectRequest clone() => GetDefaultPrecompiledObjectRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetDefaultPrecompiledObjectRequest copyWith(void Function(GetDefaultPrecompiledObjectRequest) updates) => super.copyWith((message) => updates(message as GetDefaultPrecompiledObjectRequest)) as GetDefaultPrecompiledObjectRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetDefaultPrecompiledObjectRequest create() => GetDefaultPrecompiledObjectRequest._(); + GetDefaultPrecompiledObjectRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetDefaultPrecompiledObjectRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetDefaultPrecompiledObjectRequest? _defaultInstance; + + @$pb.TagNumber(1) + Sdk get sdk => $_getN(0); + @$pb.TagNumber(1) + set sdk(Sdk v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasSdk() => $_has(0); + @$pb.TagNumber(1) + void clearSdk() => clearField(1); +} + class GetPrecompiledObjectsResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPrecompiledObjectsResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) ..pc(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sdkCategories', $pb.PbFieldType.PM, subBuilder: Categories.create) @@ -1586,3 +1653,52 @@ class GetPrecompiledObjectLogsResponse extends $pb.GeneratedMessage { void clearOutput() => clearField(1); } +class GetDefaultPrecompiledObjectResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetDefaultPrecompiledObjectResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOM(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'precompiledObject', subBuilder: PrecompiledObject.create) + ..hasRequiredFields = false + ; + + GetDefaultPrecompiledObjectResponse._() : super(); + factory GetDefaultPrecompiledObjectResponse({ + PrecompiledObject? precompiledObject, + }) { + final _result = create(); + if (precompiledObject != null) { + _result.precompiledObject = precompiledObject; + } + return _result; + } + factory GetDefaultPrecompiledObjectResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetDefaultPrecompiledObjectResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetDefaultPrecompiledObjectResponse clone() => GetDefaultPrecompiledObjectResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetDefaultPrecompiledObjectResponse copyWith(void Function(GetDefaultPrecompiledObjectResponse) updates) => super.copyWith((message) => updates(message as GetDefaultPrecompiledObjectResponse)) as GetDefaultPrecompiledObjectResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetDefaultPrecompiledObjectResponse create() => GetDefaultPrecompiledObjectResponse._(); + GetDefaultPrecompiledObjectResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetDefaultPrecompiledObjectResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetDefaultPrecompiledObjectResponse? _defaultInstance; + + @$pb.TagNumber(1) + PrecompiledObject get precompiledObject => $_getN(0); + @$pb.TagNumber(1) + set precompiledObject(PrecompiledObject v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasPrecompiledObject() => $_has(0); + @$pb.TagNumber(1) + void clearPrecompiledObject() => clearField(1); + @$pb.TagNumber(1) + PrecompiledObject ensurePrecompiledObject() => $_ensure(0); +} + diff --git a/playground/frontend/lib/api/v1/api.pbjson.dart b/playground/frontend/lib/api/v1/api.pbjson.dart index 40e35d34fab6..717cfda9287d 100644 --- a/playground/frontend/lib/api/v1/api.pbjson.dart +++ b/playground/frontend/lib/api/v1/api.pbjson.dart @@ -17,8 +17,14 @@ */ /// -import 'dart:convert' as $convert; +// Generated code. Do not modify. +// source: api/v1/api.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package + import 'dart:core' as $core; +import 'dart:convert' as $convert; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use sdkDescriptor instead') const Sdk$json = const { @@ -278,11 +284,12 @@ const PrecompiledObject$json = const { const {'1': 'type', '3': 4, '4': 1, '5': 14, '6': '.api.v1.PrecompiledObjectType', '10': 'type'}, const {'1': 'pipeline_options', '3': 5, '4': 1, '5': 9, '10': 'pipelineOptions'}, const {'1': 'link', '3': 6, '4': 1, '5': 9, '10': 'link'}, + const {'1': 'default_example', '3': 7, '4': 1, '5': 8, '10': 'defaultExample'}, ], }; /// Descriptor for `PrecompiledObject`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List precompiledObjectDescriptor = $convert.base64Decode('ChFQcmVjb21waWxlZE9iamVjdBIdCgpjbG91ZF9wYXRoGAEgASgJUgljbG91ZFBhdGgSEgoEbmFtZRgCIAEoCVIEbmFtZRIgCgtkZXNjcmlwdGlvbhgDIAEoCVILZGVzY3JpcHRpb24SMQoEdHlwZRgEIAEoDjIdLmFwaS52MS5QcmVjb21waWxlZE9iamVjdFR5cGVSBHR5cGUSKQoQcGlwZWxpbmVfb3B0aW9ucxgFIAEoCVIPcGlwZWxpbmVPcHRpb25zEhIKBGxpbmsYBiABKAlSBGxpbms='); +final $typed_data.Uint8List precompiledObjectDescriptor = $convert.base64Decode('ChFQcmVjb21waWxlZE9iamVjdBIdCgpjbG91ZF9wYXRoGAEgASgJUgljbG91ZFBhdGgSEgoEbmFtZRgCIAEoCVIEbmFtZRIgCgtkZXNjcmlwdGlvbhgDIAEoCVILZGVzY3JpcHRpb24SMQoEdHlwZRgEIAEoDjIdLmFwaS52MS5QcmVjb21waWxlZE9iamVjdFR5cGVSBHR5cGUSKQoQcGlwZWxpbmVfb3B0aW9ucxgFIAEoCVIPcGlwZWxpbmVPcHRpb25zEhIKBGxpbmsYBiABKAlSBGxpbmsSJwoPZGVmYXVsdF9leGFtcGxlGAcgASgIUg5kZWZhdWx0RXhhbXBsZQ=='); @$core.Deprecated('Use categoriesDescriptor instead') const Categories$json = const { '1': 'Categories', @@ -345,6 +352,16 @@ const GetPrecompiledObjectLogsRequest$json = const { /// Descriptor for `GetPrecompiledObjectLogsRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List getPrecompiledObjectLogsRequestDescriptor = $convert.base64Decode('Ch9HZXRQcmVjb21waWxlZE9iamVjdExvZ3NSZXF1ZXN0Eh0KCmNsb3VkX3BhdGgYASABKAlSCWNsb3VkUGF0aA=='); +@$core.Deprecated('Use getDefaultPrecompiledObjectRequestDescriptor instead') +const GetDefaultPrecompiledObjectRequest$json = const { + '1': 'GetDefaultPrecompiledObjectRequest', + '2': const [ + const {'1': 'sdk', '3': 1, '4': 1, '5': 14, '6': '.api.v1.Sdk', '10': 'sdk'}, + ], +}; + +/// Descriptor for `GetDefaultPrecompiledObjectRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getDefaultPrecompiledObjectRequestDescriptor = $convert.base64Decode('CiJHZXREZWZhdWx0UHJlY29tcGlsZWRPYmplY3RSZXF1ZXN0Eh0KA3NkaxgBIAEoDjILLmFwaS52MS5TZGtSA3Nkaw=='); @$core.Deprecated('Use getPrecompiledObjectsResponseDescriptor instead') const GetPrecompiledObjectsResponse$json = const { '1': 'GetPrecompiledObjectsResponse', @@ -385,3 +402,13 @@ const GetPrecompiledObjectLogsResponse$json = const { /// Descriptor for `GetPrecompiledObjectLogsResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List getPrecompiledObjectLogsResponseDescriptor = $convert.base64Decode('CiBHZXRQcmVjb21waWxlZE9iamVjdExvZ3NSZXNwb25zZRIWCgZvdXRwdXQYASABKAlSBm91dHB1dA=='); +@$core.Deprecated('Use getDefaultPrecompiledObjectResponseDescriptor instead') +const GetDefaultPrecompiledObjectResponse$json = const { + '1': 'GetDefaultPrecompiledObjectResponse', + '2': const [ + const {'1': 'precompiled_object', '3': 1, '4': 1, '5': 11, '6': '.api.v1.PrecompiledObject', '10': 'precompiledObject'}, + ], +}; + +/// Descriptor for `GetDefaultPrecompiledObjectResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getDefaultPrecompiledObjectResponseDescriptor = $convert.base64Decode('CiNHZXREZWZhdWx0UHJlY29tcGlsZWRPYmplY3RSZXNwb25zZRJIChJwcmVjb21waWxlZF9vYmplY3QYASABKAsyGS5hcGkudjEuUHJlY29tcGlsZWRPYmplY3RSEXByZWNvbXBpbGVkT2JqZWN0'); From af3623c9423f5689180f0c6917466efab2f207e7 Mon Sep 17 00:00:00 2001 From: Pavel Avilov Date: Tue, 1 Feb 2022 16:02:40 +0300 Subject: [PATCH 25/36] Update licenses; Resolve conflicts; --- playground/backend/cmd/server/controller.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/playground/backend/cmd/server/controller.go b/playground/backend/cmd/server/controller.go index 1da5653fd383..a436f0bd7db9 100644 --- a/playground/backend/cmd/server/controller.go +++ b/playground/backend/cmd/server/controller.go @@ -260,16 +260,10 @@ func (controller *playgroundController) Cancel(ctx context.Context, info *pb.Can // - If there is no catalog in the cache, gets the catalog from the Storage and saves it to the cache // - If SDK or category is specified in the request, gets the catalog from the cache and filters it by SDK and category func (controller *playgroundController) GetPrecompiledObjects(ctx context.Context, info *pb.GetPrecompiledObjectsRequest) (*pb.GetPrecompiledObjectsResponse, error) { - catalog, err := controller.cacheService.GetCatalog(ctx) + catalog, err := utils.GetCatalogFromCacheOrStorage(ctx, controller.cacheService) if err != nil { - logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) - catalog, err = utils.GetCatalogFromStorage(ctx) - if err != nil { - return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") - } - if err = controller.cacheService.SetCatalog(ctx, catalog); err != nil { - logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) - } + logger.Errorf("GetPrecompiledObjects(): error during getting catalog: %s", err.Error()) + return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") } return &pb.GetPrecompiledObjectsResponse{ SdkCategories: utils.FilterCatalog(catalog, info.Sdk, info.Category), From 3c8bd039c996f8abfa3e2d95a603c04344d24b8a Mon Sep 17 00:00:00 2001 From: AydarZaynutdinov Date: Mon, 7 Feb 2022 16:15:36 +0300 Subject: [PATCH 26/36] [BEAM-13633][Playground] Change saving default precompiled objects to the cache --- playground/backend/cmd/server/controller.go | 4 +- playground/backend/cmd/server/server.go | 15 + playground/backend/internal/api/v1/api.pb.go | 392 +++++++++--------- playground/backend/internal/cache/cache.go | 11 +- .../internal/cache/local/local_cache.go | 36 +- .../internal/cache/redis/redis_cache.go | 41 ++ .../utils/precompiled_objects_utils.go | 20 +- .../utils/precompiled_objects_utils_test.go | 123 +++--- playground/frontend/lib/api/v1/api.pb.dart | 2 +- .../frontend/lib/api/v1/api.pbjson.dart | 2 +- playground/infrastructure/api/v1/api_pb2.py | 83 ++-- 11 files changed, 396 insertions(+), 333 deletions(-) diff --git a/playground/backend/cmd/server/controller.go b/playground/backend/cmd/server/controller.go index 6c9886851859..06d6d62b2adb 100644 --- a/playground/backend/cmd/server/controller.go +++ b/playground/backend/cmd/server/controller.go @@ -325,13 +325,11 @@ func (controller *playgroundController) GetDefaultPrecompiledObject(ctx context. logger.Errorf("GetDefaultPrecompiledObject(): unimplemented sdk: %s\n", info.Sdk) return nil, errors.InvalidArgumentError("Error during preparing", "Sdk is not implemented yet: %s", info.Sdk.String()) } - catalog, err := utils.GetCatalogFromCacheOrStorage(ctx, controller.cacheService) + precompiledObject, err := utils.GetDefaultPrecompiledObject(ctx, info.Sdk, controller.cacheService) if err != nil { logger.Errorf("GetDefaultPrecompiledObject(): error during getting catalog: %s", err.Error()) return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") } - - precompiledObject := utils.GetDefaultPrecompiledObject(catalog, info.Sdk) response := pb.GetDefaultPrecompiledObjectResponse{PrecompiledObject: &pb.PrecompiledObject{ CloudPath: precompiledObject.CloudPath, Name: precompiledObject.Name, diff --git a/playground/backend/cmd/server/server.go b/playground/backend/cmd/server/server.go index 44591cb1a168..04c6402e5e71 100644 --- a/playground/backend/cmd/server/server.go +++ b/playground/backend/cmd/server/server.go @@ -127,6 +127,21 @@ func setupExamplesCatalog(ctx context.Context, cacheService cache.Cache) error { if err = cacheService.SetCatalog(ctx, catalog); err != nil { logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) } +Loop: + for _, categories := range catalog { + sdk := categories.Sdk + for _, category := range categories.Categories { + for _, precompiledObject := range category.PrecompiledObjects { + if precompiledObject.DefaultExample { + err = cacheService.SetDefaultPrecompiledObject(ctx, sdk, precompiledObject) + if err != nil { + logger.Errorf("Error during setup default example for sdk %s: %s", sdk.String(), err.Error()) + } + continue Loop + } + } + } + } return nil } diff --git a/playground/backend/internal/api/v1/api.pb.go b/playground/backend/internal/api/v1/api.pb.go index 7864f814dd0c..e7a9afc7af30 100644 --- a/playground/backend/internal/api/v1/api.pb.go +++ b/playground/backend/internal/api/v1/api.pb.go @@ -1203,9 +1203,9 @@ type PrecompiledObject struct { Type PrecompiledObjectType `protobuf:"varint,4,opt,name=type,proto3,enum=api.v1.PrecompiledObjectType" json:"type,omitempty"` PipelineOptions string `protobuf:"bytes,5,opt,name=pipeline_options,json=pipelineOptions,proto3" json:"pipeline_options,omitempty"` // Link to the example in the Beam repository - Link string `protobuf:"bytes,6,opt,name=link,proto3" json:"link,omitempty"` - ContextLine int32 `protobuf:"varint,7,opt,name=context_line,json=contextLine,proto3" json:"context_line,omitempty"` - DefaultExample bool `protobuf:"varint,7,opt,name=default_example,json=defaultExample,proto3" json:"default_example,omitempty"` + Link string `protobuf:"bytes,6,opt,name=link,proto3" json:"link,omitempty"` + ContextLine int32 `protobuf:"varint,7,opt,name=context_line,json=contextLine,proto3" json:"context_line,omitempty"` + DefaultExample bool `protobuf:"varint,8,opt,name=default_example,json=defaultExample,proto3" json:"default_example,omitempty"` } func (x *PrecompiledObject) Reset() { @@ -2066,7 +2066,7 @@ var file_api_v1_api_proto_rawDesc = []byte{ 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x55, 0x75, 0x69, 0x64, 0x22, 0x10, 0x0a, 0x0e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfd, 0x01, 0x0a, 0x11, 0x50, 0x72, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa6, 0x02, 0x0a, 0x11, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, @@ -2082,206 +2082,208 @@ var file_api_v1_api_proto_rawDesc = []byte{ 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x22, 0xe5, 0x01, 0x0a, 0x0a, 0x43, 0x61, 0x74, - 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x03, 0x73, 0x64, 0x6b, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x64, - 0x6b, 0x52, 0x03, 0x73, 0x64, 0x6b, 0x12, 0x3b, 0x0a, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, - 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2e, 0x43, - 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, - 0x69, 0x65, 0x73, 0x1a, 0x7b, 0x0a, 0x08, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, - 0x23, 0x0a, 0x0d, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x13, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, - 0x6c, 0x65, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, - 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x12, 0x70, 0x72, - 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x22, 0x59, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, - 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x74, 0x65, 0x78, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x22, 0xe5, 0x01, 0x0a, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x03, 0x73, 0x64, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x64, 0x6b, 0x52, 0x03, 0x73, 0x64, 0x6b, 0x12, - 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x22, 0x40, 0x0a, 0x1f, 0x47, - 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x42, 0x0a, - 0x21, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, - 0x68, 0x22, 0x40, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, - 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, - 0x61, 0x74, 0x68, 0x22, 0x41, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, - 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, + 0x3b, 0x0a, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x74, + 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, + 0x52, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x1a, 0x7b, 0x0a, 0x08, + 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x61, 0x74, 0x65, + 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4a, 0x0a, + 0x13, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x12, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, 0x59, 0x0a, 0x1c, 0x47, 0x65, 0x74, + 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x03, 0x73, 0x64, 0x6b, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x64, 0x6b, 0x52, 0x03, 0x73, 0x64, 0x6b, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, + 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, + 0x67, 0x6f, 0x72, 0x79, 0x22, 0x40, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x43, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x03, - 0x73, 0x64, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x64, 0x6b, 0x52, 0x03, 0x73, 0x64, 0x6b, 0x22, 0x5a, 0x0a, 0x1d, 0x47, - 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0e, - 0x73, 0x64, 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, - 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x0d, 0x73, 0x64, 0x6b, 0x43, 0x61, 0x74, - 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0x36, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, - 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, - 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, - 0x3c, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x3a, 0x0a, - 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x39, 0x0a, 0x21, 0x47, 0x65, 0x74, - 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x67, 0x72, 0x61, 0x70, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, - 0x72, 0x61, 0x70, 0x68, 0x22, 0x6f, 0x0a, 0x23, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x70, - 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x11, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2a, 0x52, 0x0a, 0x03, 0x53, 0x64, 0x6b, 0x12, 0x13, 0x0a, 0x0f, - 0x53, 0x44, 0x4b, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, 0x4a, 0x41, 0x56, 0x41, 0x10, 0x01, 0x12, - 0x0a, 0x0a, 0x06, 0x53, 0x44, 0x4b, 0x5f, 0x47, 0x4f, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, - 0x44, 0x4b, 0x5f, 0x50, 0x59, 0x54, 0x48, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53, - 0x44, 0x4b, 0x5f, 0x53, 0x43, 0x49, 0x4f, 0x10, 0x04, 0x2a, 0xb8, 0x02, 0x0a, 0x06, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4e, - 0x47, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, - 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, - 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, - 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, - 0x4f, 0x52, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, - 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x5f, 0x45, 0x52, 0x52, - 0x4f, 0x52, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, - 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x08, 0x12, - 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x45, 0x52, - 0x52, 0x4f, 0x52, 0x10, 0x09, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x0a, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x0b, 0x12, - 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, - 0x45, 0x44, 0x10, 0x0c, 0x2a, 0xae, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, - 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, - 0x0a, 0x23, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, - 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x52, 0x45, 0x43, 0x4f, + 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x42, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x40, 0x0a, 0x1f, 0x47, 0x65, + 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x41, 0x0a, 0x20, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, + 0x43, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x03, 0x73, 0x64, 0x6b, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x64, 0x6b, 0x52, + 0x03, 0x73, 0x64, 0x6b, 0x22, 0x5a, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0e, 0x73, 0x64, 0x6b, 0x5f, 0x63, 0x61, 0x74, + 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, + 0x73, 0x52, 0x0d, 0x73, 0x64, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, + 0x22, 0x36, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x3c, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x50, + 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x3a, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, + 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x22, 0x39, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x70, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x61, 0x70, 0x68, 0x22, 0x6f, 0x0a, + 0x23, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x11, 0x70, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2a, 0x52, + 0x0a, 0x03, 0x53, 0x64, 0x6b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x44, 0x4b, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, + 0x4b, 0x5f, 0x4a, 0x41, 0x56, 0x41, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x44, 0x4b, 0x5f, + 0x47, 0x4f, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x44, 0x4b, 0x5f, 0x50, 0x59, 0x54, 0x48, + 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, 0x53, 0x43, 0x49, 0x4f, + 0x10, 0x04, 0x2a, 0xb8, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, + 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, + 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x14, 0x0a, + 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x49, 0x4e, + 0x47, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, + 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x06, 0x12, 0x14, 0x0a, + 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4e, + 0x47, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, + 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x09, 0x12, 0x10, + 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x0a, + 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x54, + 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x0c, 0x2a, 0xae, 0x01, + 0x0a, 0x15, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x23, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x45, 0x58, 0x41, 0x4d, 0x50, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, - 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, - 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4b, 0x41, 0x54, 0x41, 0x10, 0x02, 0x12, 0x25, - 0x0a, 0x21, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, - 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x54, - 0x45, 0x53, 0x54, 0x10, 0x03, 0x32, 0x9b, 0x0b, 0x0a, 0x11, 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, - 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x52, - 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x49, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, - 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x47, 0x65, - 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, - 0x70, 0x68, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, - 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, - 0x13, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, - 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x63, 0x65, - 0x6c, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, - 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, - 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, - 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, - 0x64, 0x65, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, + 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, + 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x41, 0x4d, + 0x50, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, + 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x4b, 0x41, 0x54, 0x41, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x50, 0x52, 0x45, 0x43, 0x4f, + 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x03, 0x32, 0x9b, + 0x0b, 0x0a, 0x11, 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, + 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x16, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x3d, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x17, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, + 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x22, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, + 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x23, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, + 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x37, 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, 0x74, + 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, - 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, - 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, + 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, + 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, + 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x29, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, + 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x19, 0x47, 0x65, 0x74, - 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, - 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, - 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x1b, 0x47, - 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, - 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2a, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, - 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, - 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x42, 0x38, 0x5a, 0x36, 0x62, 0x65, 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x61, 0x63, - 0x68, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, - 0x64, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x3b, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x70, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, + 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, + 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x12, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x38, 0x5a, 0x36, + 0x62, 0x65, 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, + 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, + 0x6e, 0x64, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x3b, 0x70, 0x6c, 0x61, 0x79, + 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/playground/backend/internal/cache/cache.go b/playground/backend/internal/cache/cache.go index e207f07f75b9..2b30f145378b 100644 --- a/playground/backend/internal/cache/cache.go +++ b/playground/backend/internal/cache/cache.go @@ -62,6 +62,9 @@ const ( // ExamplesCatalog is catalog of examples available in Playground ExamplesCatalog string = "EXAMPLES_CATALOG" + + // DefaultPrecompiledExamples is used to keep default examples + DefaultPrecompiledExamples string = "DEFAULT_PRECOMPILED_OBJECTS" ) // Cache is used to store states and outputs for Apache Beam pipelines that running in Playground @@ -86,6 +89,12 @@ type Cache interface { // SetCatalog adds the given catalog to cache by ExamplesCatalog key. SetCatalog(ctx context.Context, catalog []*pb.Categories) error - // GetCatalog return catalog from cache by ExamplesCatalog key. + // GetCatalog returns catalog from cache by ExamplesCatalog key. GetCatalog(ctx context.Context) ([]*pb.Categories, error) + + // SetDefaultPrecompiledObject adds default precompiled object for SDK into cache. + SetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk, precompiledObject *pb.PrecompiledObject) error + + // GetDefaultPrecompiledObject returns default precompiled object for SDK from cache. + GetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk) (*pb.PrecompiledObject, error) } diff --git a/playground/backend/internal/cache/local/local_cache.go b/playground/backend/internal/cache/local/local_cache.go index bdc149f6a3a1..64c39b6863ad 100644 --- a/playground/backend/internal/cache/local/local_cache.go +++ b/playground/backend/internal/cache/local/local_cache.go @@ -31,20 +31,23 @@ const ( type Cache struct { sync.RWMutex - cleanupInterval time.Duration - items map[uuid.UUID]map[cache.SubKey]interface{} - pipelinesExpiration map[uuid.UUID]time.Time - catalog []*pb.Categories + cleanupInterval time.Duration + items map[uuid.UUID]map[cache.SubKey]interface{} + pipelinesExpiration map[uuid.UUID]time.Time + catalog []*pb.Categories + defaultPrecompiledObjects map[pb.Sdk]*pb.PrecompiledObject } func New(ctx context.Context) *Cache { items := make(map[uuid.UUID]map[cache.SubKey]interface{}) pipelinesExpiration := make(map[uuid.UUID]time.Time) + defaultPrecompiledObjects := make(map[pb.Sdk]*pb.PrecompiledObject) ls := &Cache{ - cleanupInterval: cleanupInterval, - items: items, - pipelinesExpiration: pipelinesExpiration, - catalog: nil, + cleanupInterval: cleanupInterval, + items: items, + pipelinesExpiration: pipelinesExpiration, + catalog: nil, + defaultPrecompiledObjects: defaultPrecompiledObjects, } go ls.startGC(ctx) @@ -124,6 +127,23 @@ func (lc *Cache) GetCatalog(ctx context.Context) ([]*pb.Categories, error) { return lc.catalog, nil } +func (lc *Cache) SetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk, precompiledObject *pb.PrecompiledObject) error { + lc.Lock() + defer lc.Unlock() + lc.defaultPrecompiledObjects[sdk] = precompiledObject + return nil +} + +func (lc *Cache) GetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk) (*pb.PrecompiledObject, error) { + lc.RLock() + defer lc.RUnlock() + defaultPrecompiledObject := lc.defaultPrecompiledObjects[sdk] + if defaultPrecompiledObject == nil { + return nil, fmt.Errorf("default precompiled obejct is not found for %s sdk", sdk.String()) + } + return defaultPrecompiledObject, nil +} + func (lc *Cache) startGC(ctx context.Context) { ticker := time.NewTicker(lc.cleanupInterval) for { diff --git a/playground/backend/internal/cache/redis/redis_cache.go b/playground/backend/internal/cache/redis/redis_cache.go index b3cf206e30ce..31bc0a479d24 100644 --- a/playground/backend/internal/cache/redis/redis_cache.go +++ b/playground/backend/internal/cache/redis/redis_cache.go @@ -126,6 +126,47 @@ func (rc *Cache) GetCatalog(ctx context.Context) ([]*pb.Categories, error) { return result, nil } +func (rc *Cache) SetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk, precompiledObject *pb.PrecompiledObject) error { + precompiledObjectMarsh, err := json.Marshal(precompiledObject) + if err != nil { + logger.Errorf("Redis Cache: set default precompiled object: error during marshal precompiled object: %s, err: %s\n", precompiledObject, err.Error()) + return err + } + sdkMarsh, err := json.Marshal(sdk) + if err != nil { + logger.Errorf("Redis Cache: set default precompiled object: error during marshal sdk: %s, err: %s\n", sdk, err.Error()) + return err + } + err = rc.HSet(ctx, cache.DefaultPrecompiledExamples, sdkMarsh, precompiledObjectMarsh).Err() + if err != nil { + logger.Errorf("Redis Cache: set default precompiled object: error during HGet operation, err: %s\n", err.Error()) + return err + } + return nil + +} + +func (rc *Cache) GetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk) (*pb.PrecompiledObject, error) { + sdkMarsh, err := json.Marshal(sdk) + if err != nil { + logger.Errorf("Redis Cache: get default precompiled object: error during marshal sdk: %s, err: %s\n", sdk, err.Error()) + return nil, err + } + + value, err := rc.HGet(ctx, cache.DefaultPrecompiledExamples, string(sdkMarsh)).Result() + if err != nil { + logger.Errorf("Redis Cache: get default precompiled object: error during HGet operation for key: %s, subKey: %s, err: %s\n", cache.DefaultPrecompiledExamples, sdkMarsh, err.Error()) + return nil, err + } + + result := new(pb.PrecompiledObject) + err = json.Unmarshal([]byte(value), &result) + if err != nil { + logger.Errorf("Redis Cache: get default precompiled object: error during unmarshal value, err: %s\n", err.Error()) + } + return result, nil +} + // unmarshalBySubKey unmarshal value by subKey func unmarshalBySubKey(subKey cache.SubKey, value string) (interface{}, error) { var result interface{} diff --git a/playground/backend/internal/utils/precompiled_objects_utils.go b/playground/backend/internal/utils/precompiled_objects_utils.go index 35e36aaf2c92..3f53beeb9773 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils.go +++ b/playground/backend/internal/utils/precompiled_objects_utils.go @@ -95,20 +95,14 @@ func FilterCatalog(catalog []*pb.Categories, sdk pb.Sdk, categoryName string) [] return result } -// GetDefaultPrecompiledObject returns the default precompiled objects from the precompiled objects catalog for sdk -func GetDefaultPrecompiledObject(catalog []*pb.Categories, sdk pb.Sdk) *pb.PrecompiledObject { - for _, categoriesSdk := range catalog { - if categoriesSdk.Sdk == sdk { - for _, category := range categoriesSdk.Categories { - for _, precompiledObject := range category.PrecompiledObjects { - if precompiledObject.DefaultExample { - return precompiledObject - } - } - } - } +// GetDefaultPrecompiledObject returns the default precompiled objects from cache for sdk +func GetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk, cacheService cache.Cache) (*pb.PrecompiledObject, error) { + precompiledObject, err := cacheService.GetDefaultPrecompiledObject(ctx, sdk) + if err != nil { + logger.Errorf("GetDefaultPrecompiledObject(): error during getting default precompiled object %s", err.Error()) + return nil, err } - return nil + return precompiledObject, nil } // GetCatalogFromCacheOrStorage returns the precompiled objects catalog from cache diff --git a/playground/backend/internal/utils/precompiled_objects_utils_test.go b/playground/backend/internal/utils/precompiled_objects_utils_test.go index ebb485925057..9a0981861fd5 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils_test.go +++ b/playground/backend/internal/utils/precompiled_objects_utils_test.go @@ -17,7 +17,11 @@ package utils import ( pb "beam.apache.org/playground/backend/internal/api/v1" + "beam.apache.org/playground/backend/internal/cache" + "beam.apache.org/playground/backend/internal/cache/local" "beam.apache.org/playground/backend/internal/cloud_bucket" + "beam.apache.org/playground/backend/internal/logger" + "context" "reflect" "testing" ) @@ -206,92 +210,65 @@ func TestFilterPrecompiledObjects(t *testing.T) { } } -func TestGetDefaultPrecompiledObjects(t *testing.T) { - preparedPrecompiledObjectJava := pb.PrecompiledObject{ - CloudPath: "SDK_JAVA/TestCategory/TestName1.java", - Name: "TestName1", - Description: "TestDescription", - Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, - DefaultExample: true, +func TestGetDefaultPrecompiledObject(t *testing.T) { + ctx := context.Background() + cacheService := local.New(ctx) + defaultPrecompiledObject := &pb.PrecompiledObject{ + CloudPath: "cloudPath", + Name: "Name", + Description: "Description", + Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, + PipelineOptions: "--key value", + Link: "Link", + ContextLine: 1, + DefaultExample: true, } - preparedPrecompiledObjectGo := pb.PrecompiledObject{ - CloudPath: "SDK_GO/TestCategory/TestName.go", - Name: "TestName", - Description: "TestDescription", - Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, - DefaultExample: true, + err := cacheService.SetDefaultPrecompiledObject(ctx, pb.Sdk_SDK_JAVA, defaultPrecompiledObject) + if err != nil { + logger.Errorf("Error during set up test") } - sdkCategories := []*pb.Categories{ - { - Sdk: pb.Sdk_SDK_JAVA, - Categories: []*pb.Categories_Category{ - { - CategoryName: "TestCategory1", PrecompiledObjects: []*pb.PrecompiledObject{ - { - CloudPath: "SDK_JAVA/TestCategory/TestName.java", - Name: "TestName", - Description: "TestDescription", - Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, - DefaultExample: false, - }, - }, - }, - { - CategoryName: "TestCategory2", PrecompiledObjects: []*pb.PrecompiledObject{ - &preparedPrecompiledObjectJava, - { - CloudPath: "SDK_JAVA/TestCategory/TestName2.java", - Name: "TestName2", - Description: "TestDescription", - Type: pb.PrecompiledObjectType_PRECOMPILED_OBJECT_TYPE_EXAMPLE, - DefaultExample: false, - }, - }, - }, - }, - }, - { - Sdk: pb.Sdk_SDK_GO, - Categories: []*pb.Categories_Category{ - { - CategoryName: "TestCategory", PrecompiledObjects: []*pb.PrecompiledObject{ - &preparedPrecompiledObjectGo, - }, - }, - }, - }, - } - expectedDefaultPrecompiledObjects := make(map[pb.Sdk]*pb.PrecompiledObject) - expectedDefaultPrecompiledObjects[pb.Sdk_SDK_JAVA] = &preparedPrecompiledObjectJava - expectedDefaultPrecompiledObjects[pb.Sdk_SDK_GO] = &preparedPrecompiledObjectGo + type args struct { - sdkCategories []*pb.Categories - sdk pb.Sdk + ctx context.Context + sdk pb.Sdk + cacheService cache.Cache } tests := []struct { - name string - args args - want *pb.PrecompiledObject + name string + args args + want *pb.PrecompiledObject + wantErr bool }{ { - // Test case with getting default Precompiled Objects from the precompiled objects catalog - // As a result, want to receive an expected java default Precompiled Objects. - name: "get java default precompiled objects", - args: args{sdkCategories: sdkCategories, sdk: pb.Sdk_SDK_JAVA}, - want: &preparedPrecompiledObjectJava, + name: "there is default precompiled object", + args: args{ + ctx: ctx, + sdk: pb.Sdk_SDK_JAVA, + cacheService: cacheService, + }, + want: defaultPrecompiledObject, + wantErr: false, }, { - // Test case with getting default Precompiled Objects from the precompiled objects catalog - // As a result, want to receive an expected go default Precompiled Objects. - name: "get java default precompiled objects", - args: args{sdkCategories: sdkCategories, sdk: pb.Sdk_SDK_GO}, - want: &preparedPrecompiledObjectGo, + name: "there is no default precompiled object", + args: args{ + ctx: ctx, + sdk: pb.Sdk_SDK_UNSPECIFIED, + cacheService: cacheService, + }, + want: nil, + wantErr: true, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - if got := GetDefaultPrecompiledObject(tt.args.sdkCategories, tt.args.sdk); !reflect.DeepEqual(got, tt.want) { - t.Errorf("GetDefaultPrecompiledObject() = %v, want %v", got, tt.want) + got, err := GetDefaultPrecompiledObject(tt.args.ctx, tt.args.sdk, tt.args.cacheService) + if (err != nil) != tt.wantErr { + t.Errorf("GetDefaultPrecompiledObject() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("GetDefaultPrecompiledObject() got = %v, want %v", got, tt.want) } }) } diff --git a/playground/frontend/lib/api/v1/api.pb.dart b/playground/frontend/lib/api/v1/api.pb.dart index d28e449d0c30..0233ffed8897 100644 --- a/playground/frontend/lib/api/v1/api.pb.dart +++ b/playground/frontend/lib/api/v1/api.pb.dart @@ -990,7 +990,7 @@ class PrecompiledObject extends $pb.GeneratedMessage { ..aOS(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pipelineOptions') ..aOS(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'link') ..a<$core.int>(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'contextLine', $pb.PbFieldType.O3) - ..aOB(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'defaultExample') + ..aOB(8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'defaultExample') ..hasRequiredFields = false ; diff --git a/playground/frontend/lib/api/v1/api.pbjson.dart b/playground/frontend/lib/api/v1/api.pbjson.dart index ba7229ee8de2..dfe7951d3d45 100644 --- a/playground/frontend/lib/api/v1/api.pbjson.dart +++ b/playground/frontend/lib/api/v1/api.pbjson.dart @@ -290,7 +290,7 @@ const PrecompiledObject$json = const { }; /// Descriptor for `PrecompiledObject`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List precompiledObjectDescriptor = $convert.base64Decode('ChFQcmVjb21waWxlZE9iamVjdBIdCgpjbG91ZF9wYXRoGAEgASgJUgljbG91ZFBhdGgSEgoEbmFtZRgCIAEoCVIEbmFtZRIgCgtkZXNjcmlwdGlvbhgDIAEoCVILZGVzY3JpcHRpb24SMQoEdHlwZRgEIAEoDjIdLmFwaS52MS5QcmVjb21waWxlZE9iamVjdFR5cGVSBHR5cGUSKQoQcGlwZWxpbmVfb3B0aW9ucxgFIAEoCVIPcGlwZWxpbmVPcHRpb25zEhIKBGxpbmsYBiABKAlSBGxpbmsSJwoPZGVmYXVsdF9leGFtcGxlGAcgASgIUg5kZWZhdWx0RXhhbXBsZQ=='); +final $typed_data.Uint8List precompiledObjectDescriptor = $convert.base64Decode('ChFQcmVjb21waWxlZE9iamVjdBIdCgpjbG91ZF9wYXRoGAEgASgJUgljbG91ZFBhdGgSEgoEbmFtZRgCIAEoCVIEbmFtZRIgCgtkZXNjcmlwdGlvbhgDIAEoCVILZGVzY3JpcHRpb24SMQoEdHlwZRgEIAEoDjIdLmFwaS52MS5QcmVjb21waWxlZE9iamVjdFR5cGVSBHR5cGUSKQoQcGlwZWxpbmVfb3B0aW9ucxgFIAEoCVIPcGlwZWxpbmVPcHRpb25zEhIKBGxpbmsYBiABKAlSBGxpbmsSIQoMY29udGV4dF9saW5lGAcgASgFUgtjb250ZXh0TGluZRInCg9kZWZhdWx0X2V4YW1wbGUYCCABKAhSDmRlZmF1bHRFeGFtcGxl'); @$core.Deprecated('Use categoriesDescriptor instead') const Categories$json = const { '1': 'Categories', diff --git a/playground/infrastructure/api/v1/api_pb2.py b/playground/infrastructure/api/v1/api_pb2.py index 24abdbf1b51b..d166cd4b0c0d 100644 --- a/playground/infrastructure/api/v1/api_pb2.py +++ b/playground/infrastructure/api/v1/api_pb2.py @@ -35,7 +35,7 @@ syntax='proto3', serialized_options=b'Z6beam.apache.org/playground/backend/internal;playground', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\tapi.proto\x12\x06\x61pi.v1\"R\n\x0eRunCodeRequest\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x18\n\x03sdk\x18\x02 \x01(\x0e\x32\x0b.api.v1.Sdk\x12\x18\n\x10pipeline_options\x18\x03 \x01(\t\"(\n\x0fRunCodeResponse\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"+\n\x12\x43heckStatusRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"5\n\x13\x43heckStatusResponse\x12\x1e\n\x06status\x18\x01 \x01(\x0e\x32\x0e.api.v1.Status\"3\n\x1aGetValidationOutputRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"-\n\x1bGetValidationOutputResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"4\n\x1bGetPreparationOutputRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\".\n\x1cGetPreparationOutputResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"0\n\x17GetCompileOutputRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"*\n\x18GetCompileOutputResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\",\n\x13GetRunOutputRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"&\n\x14GetRunOutputResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"+\n\x12GetRunErrorRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"%\n\x13GetRunErrorResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"\'\n\x0eGetLogsRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"!\n\x0fGetLogsResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"(\n\x0fGetGraphRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"!\n\x10GetGraphResponse\x12\r\n\x05graph\x18\x01 \x01(\t\"&\n\rCancelRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"\x10\n\x0e\x43\x61ncelResponse\"\xb5\x01\n\x11PrecompiledObject\x12\x12\n\ncloud_path\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12+\n\x04type\x18\x04 \x01(\x0e\x32\x1d.api.v1.PrecompiledObjectType\x12\x18\n\x10pipeline_options\x18\x05 \x01(\t\x12\x0c\n\x04link\x18\x06 \x01(\t\x12\x14\n\x0c\x63ontext_line\x18\x07 \x01(\x05\"\xb2\x01\n\nCategories\x12\x18\n\x03sdk\x18\x01 \x01(\x0e\x32\x0b.api.v1.Sdk\x12/\n\ncategories\x18\x02 \x03(\x0b\x32\x1b.api.v1.Categories.Category\x1aY\n\x08\x43\x61tegory\x12\x15\n\rcategory_name\x18\x01 \x01(\t\x12\x36\n\x13precompiled_objects\x18\x02 \x03(\x0b\x32\x19.api.v1.PrecompiledObject\"J\n\x1cGetPrecompiledObjectsRequest\x12\x18\n\x03sdk\x18\x01 \x01(\x0e\x32\x0b.api.v1.Sdk\x12\x10\n\x08\x63\x61tegory\x18\x02 \x01(\t\"5\n\x1fGetPrecompiledObjectCodeRequest\x12\x12\n\ncloud_path\x18\x01 \x01(\t\"7\n!GetPrecompiledObjectOutputRequest\x12\x12\n\ncloud_path\x18\x01 \x01(\t\"5\n\x1fGetPrecompiledObjectLogsRequest\x12\x12\n\ncloud_path\x18\x01 \x01(\t\"6\n GetPrecompiledObjectGraphRequest\x12\x12\n\ncloud_path\x18\x01 \x01(\t\">\n\"GetDefaultPrecompiledObjectRequest\x12\x18\n\x03sdk\x18\x01 \x01(\x0e\x32\x0b.api.v1.Sdk\"K\n\x1dGetPrecompiledObjectsResponse\x12*\n\x0esdk_categories\x18\x01 \x03(\x0b\x32\x12.api.v1.Categories\"0\n GetPrecompiledObjectCodeResponse\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\"4\n\"GetPrecompiledObjectOutputResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"2\n GetPrecompiledObjectLogsResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"2\n!GetPrecompiledObjectGraphResponse\x12\r\n\x05graph\x18\x01 \x01(\t\"\\\n#GetDefaultPrecompiledObjectResponse\x12\x35\n\x12precompiled_object\x18\x01 \x01(\x0b\x32\x19.api.v1.PrecompiledObject*R\n\x03Sdk\x12\x13\n\x0fSDK_UNSPECIFIED\x10\x00\x12\x0c\n\x08SDK_JAVA\x10\x01\x12\n\n\x06SDK_GO\x10\x02\x12\x0e\n\nSDK_PYTHON\x10\x03\x12\x0c\n\x08SDK_SCIO\x10\x04*\xb8\x02\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x15\n\x11STATUS_VALIDATING\x10\x01\x12\x1b\n\x17STATUS_VALIDATION_ERROR\x10\x02\x12\x14\n\x10STATUS_PREPARING\x10\x03\x12\x1c\n\x18STATUS_PREPARATION_ERROR\x10\x04\x12\x14\n\x10STATUS_COMPILING\x10\x05\x12\x18\n\x14STATUS_COMPILE_ERROR\x10\x06\x12\x14\n\x10STATUS_EXECUTING\x10\x07\x12\x13\n\x0fSTATUS_FINISHED\x10\x08\x12\x14\n\x10STATUS_RUN_ERROR\x10\t\x12\x10\n\x0cSTATUS_ERROR\x10\n\x12\x16\n\x12STATUS_RUN_TIMEOUT\x10\x0b\x12\x13\n\x0fSTATUS_CANCELED\x10\x0c*\xae\x01\n\x15PrecompiledObjectType\x12\'\n#PRECOMPILED_OBJECT_TYPE_UNSPECIFIED\x10\x00\x12#\n\x1fPRECOMPILED_OBJECT_TYPE_EXAMPLE\x10\x01\x12 \n\x1cPRECOMPILED_OBJECT_TYPE_KATA\x10\x02\x12%\n!PRECOMPILED_OBJECT_TYPE_UNIT_TEST\x10\x03\x32\x9b\x0b\n\x11PlaygroundService\x12:\n\x07RunCode\x12\x16.api.v1.RunCodeRequest\x1a\x17.api.v1.RunCodeResponse\x12\x46\n\x0b\x43heckStatus\x12\x1a.api.v1.CheckStatusRequest\x1a\x1b.api.v1.CheckStatusResponse\x12I\n\x0cGetRunOutput\x12\x1b.api.v1.GetRunOutputRequest\x1a\x1c.api.v1.GetRunOutputResponse\x12:\n\x07GetLogs\x12\x16.api.v1.GetLogsRequest\x1a\x17.api.v1.GetLogsResponse\x12=\n\x08GetGraph\x12\x17.api.v1.GetGraphRequest\x1a\x18.api.v1.GetGraphResponse\x12\x46\n\x0bGetRunError\x12\x1a.api.v1.GetRunErrorRequest\x1a\x1b.api.v1.GetRunErrorResponse\x12^\n\x13GetValidationOutput\x12\".api.v1.GetValidationOutputRequest\x1a#.api.v1.GetValidationOutputResponse\x12\x61\n\x14GetPreparationOutput\x12#.api.v1.GetPreparationOutputRequest\x1a$.api.v1.GetPreparationOutputResponse\x12U\n\x10GetCompileOutput\x12\x1f.api.v1.GetCompileOutputRequest\x1a .api.v1.GetCompileOutputResponse\x12\x37\n\x06\x43\x61ncel\x12\x15.api.v1.CancelRequest\x1a\x16.api.v1.CancelResponse\x12\x64\n\x15GetPrecompiledObjects\x12$.api.v1.GetPrecompiledObjectsRequest\x1a%.api.v1.GetPrecompiledObjectsResponse\x12m\n\x18GetPrecompiledObjectCode\x12\'.api.v1.GetPrecompiledObjectCodeRequest\x1a(.api.v1.GetPrecompiledObjectCodeResponse\x12s\n\x1aGetPrecompiledObjectOutput\x12).api.v1.GetPrecompiledObjectOutputRequest\x1a*.api.v1.GetPrecompiledObjectOutputResponse\x12m\n\x18GetPrecompiledObjectLogs\x12\'.api.v1.GetPrecompiledObjectLogsRequest\x1a(.api.v1.GetPrecompiledObjectLogsResponse\x12p\n\x19GetPrecompiledObjectGraph\x12(.api.v1.GetPrecompiledObjectGraphRequest\x1a).api.v1.GetPrecompiledObjectGraphResponse\x12v\n\x1bGetDefaultPrecompiledObject\x12*.api.v1.GetDefaultPrecompiledObjectRequest\x1a+.api.v1.GetDefaultPrecompiledObjectResponseB8Z6beam.apache.org/playground/backend/internal;playgroundb\x06proto3' + serialized_pb=b'\n\tapi.proto\x12\x06\x61pi.v1\"R\n\x0eRunCodeRequest\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x18\n\x03sdk\x18\x02 \x01(\x0e\x32\x0b.api.v1.Sdk\x12\x18\n\x10pipeline_options\x18\x03 \x01(\t\"(\n\x0fRunCodeResponse\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"+\n\x12\x43heckStatusRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"5\n\x13\x43heckStatusResponse\x12\x1e\n\x06status\x18\x01 \x01(\x0e\x32\x0e.api.v1.Status\"3\n\x1aGetValidationOutputRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"-\n\x1bGetValidationOutputResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"4\n\x1bGetPreparationOutputRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\".\n\x1cGetPreparationOutputResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"0\n\x17GetCompileOutputRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"*\n\x18GetCompileOutputResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\",\n\x13GetRunOutputRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"&\n\x14GetRunOutputResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"+\n\x12GetRunErrorRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"%\n\x13GetRunErrorResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"\'\n\x0eGetLogsRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"!\n\x0fGetLogsResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"(\n\x0fGetGraphRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"!\n\x10GetGraphResponse\x12\r\n\x05graph\x18\x01 \x01(\t\"&\n\rCancelRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"\x10\n\x0e\x43\x61ncelResponse\"\xce\x01\n\x11PrecompiledObject\x12\x12\n\ncloud_path\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12+\n\x04type\x18\x04 \x01(\x0e\x32\x1d.api.v1.PrecompiledObjectType\x12\x18\n\x10pipeline_options\x18\x05 \x01(\t\x12\x0c\n\x04link\x18\x06 \x01(\t\x12\x14\n\x0c\x63ontext_line\x18\x07 \x01(\x05\x12\x17\n\x0f\x64\x65\x66\x61ult_example\x18\x08 \x01(\x08\"\xb2\x01\n\nCategories\x12\x18\n\x03sdk\x18\x01 \x01(\x0e\x32\x0b.api.v1.Sdk\x12/\n\ncategories\x18\x02 \x03(\x0b\x32\x1b.api.v1.Categories.Category\x1aY\n\x08\x43\x61tegory\x12\x15\n\rcategory_name\x18\x01 \x01(\t\x12\x36\n\x13precompiled_objects\x18\x02 \x03(\x0b\x32\x19.api.v1.PrecompiledObject\"J\n\x1cGetPrecompiledObjectsRequest\x12\x18\n\x03sdk\x18\x01 \x01(\x0e\x32\x0b.api.v1.Sdk\x12\x10\n\x08\x63\x61tegory\x18\x02 \x01(\t\"5\n\x1fGetPrecompiledObjectCodeRequest\x12\x12\n\ncloud_path\x18\x01 \x01(\t\"7\n!GetPrecompiledObjectOutputRequest\x12\x12\n\ncloud_path\x18\x01 \x01(\t\"5\n\x1fGetPrecompiledObjectLogsRequest\x12\x12\n\ncloud_path\x18\x01 \x01(\t\"6\n GetPrecompiledObjectGraphRequest\x12\x12\n\ncloud_path\x18\x01 \x01(\t\">\n\"GetDefaultPrecompiledObjectRequest\x12\x18\n\x03sdk\x18\x01 \x01(\x0e\x32\x0b.api.v1.Sdk\"K\n\x1dGetPrecompiledObjectsResponse\x12*\n\x0esdk_categories\x18\x01 \x03(\x0b\x32\x12.api.v1.Categories\"0\n GetPrecompiledObjectCodeResponse\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\"4\n\"GetPrecompiledObjectOutputResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"2\n GetPrecompiledObjectLogsResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"2\n!GetPrecompiledObjectGraphResponse\x12\r\n\x05graph\x18\x01 \x01(\t\"\\\n#GetDefaultPrecompiledObjectResponse\x12\x35\n\x12precompiled_object\x18\x01 \x01(\x0b\x32\x19.api.v1.PrecompiledObject*R\n\x03Sdk\x12\x13\n\x0fSDK_UNSPECIFIED\x10\x00\x12\x0c\n\x08SDK_JAVA\x10\x01\x12\n\n\x06SDK_GO\x10\x02\x12\x0e\n\nSDK_PYTHON\x10\x03\x12\x0c\n\x08SDK_SCIO\x10\x04*\xb8\x02\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x15\n\x11STATUS_VALIDATING\x10\x01\x12\x1b\n\x17STATUS_VALIDATION_ERROR\x10\x02\x12\x14\n\x10STATUS_PREPARING\x10\x03\x12\x1c\n\x18STATUS_PREPARATION_ERROR\x10\x04\x12\x14\n\x10STATUS_COMPILING\x10\x05\x12\x18\n\x14STATUS_COMPILE_ERROR\x10\x06\x12\x14\n\x10STATUS_EXECUTING\x10\x07\x12\x13\n\x0fSTATUS_FINISHED\x10\x08\x12\x14\n\x10STATUS_RUN_ERROR\x10\t\x12\x10\n\x0cSTATUS_ERROR\x10\n\x12\x16\n\x12STATUS_RUN_TIMEOUT\x10\x0b\x12\x13\n\x0fSTATUS_CANCELED\x10\x0c*\xae\x01\n\x15PrecompiledObjectType\x12\'\n#PRECOMPILED_OBJECT_TYPE_UNSPECIFIED\x10\x00\x12#\n\x1fPRECOMPILED_OBJECT_TYPE_EXAMPLE\x10\x01\x12 \n\x1cPRECOMPILED_OBJECT_TYPE_KATA\x10\x02\x12%\n!PRECOMPILED_OBJECT_TYPE_UNIT_TEST\x10\x03\x32\x9b\x0b\n\x11PlaygroundService\x12:\n\x07RunCode\x12\x16.api.v1.RunCodeRequest\x1a\x17.api.v1.RunCodeResponse\x12\x46\n\x0b\x43heckStatus\x12\x1a.api.v1.CheckStatusRequest\x1a\x1b.api.v1.CheckStatusResponse\x12I\n\x0cGetRunOutput\x12\x1b.api.v1.GetRunOutputRequest\x1a\x1c.api.v1.GetRunOutputResponse\x12:\n\x07GetLogs\x12\x16.api.v1.GetLogsRequest\x1a\x17.api.v1.GetLogsResponse\x12=\n\x08GetGraph\x12\x17.api.v1.GetGraphRequest\x1a\x18.api.v1.GetGraphResponse\x12\x46\n\x0bGetRunError\x12\x1a.api.v1.GetRunErrorRequest\x1a\x1b.api.v1.GetRunErrorResponse\x12^\n\x13GetValidationOutput\x12\".api.v1.GetValidationOutputRequest\x1a#.api.v1.GetValidationOutputResponse\x12\x61\n\x14GetPreparationOutput\x12#.api.v1.GetPreparationOutputRequest\x1a$.api.v1.GetPreparationOutputResponse\x12U\n\x10GetCompileOutput\x12\x1f.api.v1.GetCompileOutputRequest\x1a .api.v1.GetCompileOutputResponse\x12\x37\n\x06\x43\x61ncel\x12\x15.api.v1.CancelRequest\x1a\x16.api.v1.CancelResponse\x12\x64\n\x15GetPrecompiledObjects\x12$.api.v1.GetPrecompiledObjectsRequest\x1a%.api.v1.GetPrecompiledObjectsResponse\x12m\n\x18GetPrecompiledObjectCode\x12\'.api.v1.GetPrecompiledObjectCodeRequest\x1a(.api.v1.GetPrecompiledObjectCodeResponse\x12s\n\x1aGetPrecompiledObjectOutput\x12).api.v1.GetPrecompiledObjectOutputRequest\x1a*.api.v1.GetPrecompiledObjectOutputResponse\x12m\n\x18GetPrecompiledObjectLogs\x12\'.api.v1.GetPrecompiledObjectLogsRequest\x1a(.api.v1.GetPrecompiledObjectLogsResponse\x12p\n\x19GetPrecompiledObjectGraph\x12(.api.v1.GetPrecompiledObjectGraphRequest\x1a).api.v1.GetPrecompiledObjectGraphResponse\x12v\n\x1bGetDefaultPrecompiledObject\x12*.api.v1.GetDefaultPrecompiledObjectRequest\x1a+.api.v1.GetDefaultPrecompiledObjectResponseB8Z6beam.apache.org/playground/backend/internal;playgroundb\x06proto3' ) _SDK = _descriptor.EnumDescriptor( @@ -73,8 +73,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=2031, - serialized_end=2113, + serialized_start=2056, + serialized_end=2138, ) _sym_db.RegisterEnumDescriptor(_SDK) @@ -154,8 +154,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=2116, - serialized_end=2428, + serialized_start=2141, + serialized_end=2453, ) _sym_db.RegisterEnumDescriptor(_STATUS) @@ -190,8 +190,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=2431, - serialized_end=2605, + serialized_start=2456, + serialized_end=2630, ) _sym_db.RegisterEnumDescriptor(_PRECOMPILEDOBJECTTYPE) @@ -925,6 +925,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='default_example', full_name='api.v1.PrecompiledObject.default_example', index=7, + number=8, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -938,7 +945,7 @@ oneofs=[ ], serialized_start=925, - serialized_end=1106, + serialized_end=1131, ) @@ -976,8 +983,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1198, - serialized_end=1287, + serialized_start=1223, + serialized_end=1312, ) _CATEGORIES = _descriptor.Descriptor( @@ -1014,8 +1021,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1109, - serialized_end=1287, + serialized_start=1134, + serialized_end=1312, ) @@ -1053,8 +1060,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1289, - serialized_end=1363, + serialized_start=1314, + serialized_end=1388, ) @@ -1085,8 +1092,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1365, - serialized_end=1418, + serialized_start=1390, + serialized_end=1443, ) @@ -1117,8 +1124,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1420, - serialized_end=1475, + serialized_start=1445, + serialized_end=1500, ) @@ -1149,8 +1156,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1477, - serialized_end=1530, + serialized_start=1502, + serialized_end=1555, ) @@ -1181,8 +1188,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1532, - serialized_end=1586, + serialized_start=1557, + serialized_end=1611, ) @@ -1213,8 +1220,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1588, - serialized_end=1650, + serialized_start=1613, + serialized_end=1675, ) @@ -1245,8 +1252,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1652, - serialized_end=1727, + serialized_start=1677, + serialized_end=1752, ) @@ -1277,8 +1284,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1729, - serialized_end=1777, + serialized_start=1754, + serialized_end=1802, ) @@ -1309,8 +1316,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1779, - serialized_end=1831, + serialized_start=1804, + serialized_end=1856, ) @@ -1341,8 +1348,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1833, - serialized_end=1883, + serialized_start=1858, + serialized_end=1908, ) @@ -1373,8 +1380,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1885, - serialized_end=1935, + serialized_start=1910, + serialized_end=1960, ) @@ -1405,8 +1412,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1937, - serialized_end=2029, + serialized_start=1962, + serialized_end=2054, ) _RUNCODEREQUEST.fields_by_name['sdk'].enum_type = _SDK @@ -1715,8 +1722,8 @@ index=0, serialized_options=None, create_key=_descriptor._internal_create_key, - serialized_start=2608, - serialized_end=4043, + serialized_start=2633, + serialized_end=4068, methods=[ _descriptor.MethodDescriptor( name='RunCode', From f27319281d6b84b6ae1a597fdcd949a5b5a98c19 Mon Sep 17 00:00:00 2001 From: AydarZaynutdinov Date: Mon, 7 Feb 2022 19:39:44 +0300 Subject: [PATCH 27/36] [BEAM-13633][Playground] Change logic of saving and receiving info about default precompiled objects --- playground/backend/cmd/server/server.go | 24 +++-- .../cloud_bucket/precompiled_objects.go | 88 ++++++++++++++++--- playground/infrastructure/cd_helper.py | 31 +++++++ playground/infrastructure/config.py | 1 + playground/infrastructure/helper.py | 17 ++-- playground/infrastructure/test_helper.py | 9 +- 6 files changed, 135 insertions(+), 35 deletions(-) diff --git a/playground/backend/cmd/server/server.go b/playground/backend/cmd/server/server.go index 04c6402e5e71..abbb37a3c6e0 100644 --- a/playground/backend/cmd/server/server.go +++ b/playground/backend/cmd/server/server.go @@ -20,6 +20,7 @@ import ( "beam.apache.org/playground/backend/internal/cache" "beam.apache.org/playground/backend/internal/cache/local" "beam.apache.org/playground/backend/internal/cache/redis" + "beam.apache.org/playground/backend/internal/cloud_bucket" "beam.apache.org/playground/backend/internal/environment" "beam.apache.org/playground/backend/internal/logger" "beam.apache.org/playground/backend/internal/utils" @@ -127,19 +128,16 @@ func setupExamplesCatalog(ctx context.Context, cacheService cache.Cache) error { if err = cacheService.SetCatalog(ctx, catalog); err != nil { logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) } -Loop: - for _, categories := range catalog { - sdk := categories.Sdk - for _, category := range categories.Categories { - for _, precompiledObject := range category.PrecompiledObjects { - if precompiledObject.DefaultExample { - err = cacheService.SetDefaultPrecompiledObject(ctx, sdk, precompiledObject) - if err != nil { - logger.Errorf("Error during setup default example for sdk %s: %s", sdk.String(), err.Error()) - } - continue Loop - } - } + + bucket := cloud_bucket.New() + defaultPrecompiledObjects, err := bucket.GetDefaultPrecompiledObjects(ctx) + if err != nil { + return err + } + for sdk, precompiledObject := range defaultPrecompiledObjects { + if err := cacheService.SetDefaultPrecompiledObject(ctx, sdk, precompiledObject); err != nil { + logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) + return err } } return nil diff --git a/playground/backend/internal/cloud_bucket/precompiled_objects.go b/playground/backend/internal/cloud_bucket/precompiled_objects.go index 9a0eee55191b..4cb8713df241 100644 --- a/playground/backend/internal/cloud_bucket/precompiled_objects.go +++ b/playground/backend/internal/cloud_bucket/precompiled_objects.go @@ -24,6 +24,7 @@ import ( "fmt" "google.golang.org/api/iterator" "google.golang.org/api/option" + "io" "io/ioutil" "os" "path/filepath" @@ -32,17 +33,18 @@ import ( ) const ( - BucketName = "playground-precompiled-objects" - OutputExtension = "output" - LogsExtension = "log" - GraphExtension = "graph" - MetaInfoName = "meta.info" - Timeout = time.Minute - javaExtension = "java" - goExtension = "go" - pyExtension = "py" - scioExtension = "scala" - separatorsNumber = 2 + BucketName = "playground-precompiled-objects" + OutputExtension = "output" + LogsExtension = "log" + GraphExtension = "graph" + DefaultPrecompiledObjectsInfo = "defaultPrecompiledObjects.info" + MetaInfoName = "meta.info" + Timeout = time.Minute + javaExtension = "java" + goExtension = "go" + pyExtension = "py" + scioExtension = "scala" + separatorsNumber = 2 ) type ObjectInfo struct { @@ -191,6 +193,70 @@ func (cd *CloudStorage) GetPrecompiledObjects(ctx context.Context, targetSdk pb. return &precompiledObjects, nil } +// GetDefaultPrecompiledObjects returns the default precompiled objects +func (cd *CloudStorage) GetDefaultPrecompiledObjects(ctx context.Context) (map[pb.Sdk]*pb.PrecompiledObject, error) { + client, err := storage.NewClient(ctx, option.WithoutAuthentication()) + if err != nil { + return nil, fmt.Errorf("storage.NewClient: %v", err) + } + defer client.Close() + bucket := client.Bucket(BucketName) + + paths, err := cd.getDefaultPrecompiledObjectsPaths(ctx, bucket) + if err != nil { + return nil, err + } + + defaultPrecompiledObjects := make(map[pb.Sdk]*pb.PrecompiledObject, 0) + for sdk, path := range paths { + infoPath := filepath.Join(path, MetaInfoName) + rc, err := bucket.Object(infoPath).NewReader(ctx) + if err != nil { + logger.Errorf("Object(%q).NewReader: %v", infoPath, err.Error()) + continue + } + metaFile, err := ioutil.ReadAll(rc) + if err != nil { + logger.Errorf("ioutil.ReadAll: %v", err.Error()) + continue + } + rc.Close() + + precompiledObject := &pb.PrecompiledObject{} + err = json.Unmarshal(metaFile, &precompiledObject) + if err != nil { + logger.Errorf("json.Unmarshal: %v", err.Error()) + return nil, err + } + precompiledObject.CloudPath = path + defaultPrecompiledObjects[sdk] = precompiledObject + } + return defaultPrecompiledObjects, nil +} + +// getDefaultPrecompiledObjectsPaths returns map where for each SDK path to the default precompiled object is contained +func (cd *CloudStorage) getDefaultPrecompiledObjectsPaths(ctx context.Context, bucket *storage.BucketHandle) (map[pb.Sdk]string, error) { + rc, err := bucket.Object(DefaultPrecompiledObjectsInfo).NewReader(ctx) + if err != nil { + return nil, err + } + + data, err := io.ReadAll(rc) + if err != nil { + return nil, err + } + + paths := make(map[string]string, 0) + sdkToPath := make(map[pb.Sdk]string, 0) + if err := json.Unmarshal(data, &paths); err != nil { + panic(err) + } + for key, value := range paths { + sdkToPath[pb.Sdk(pb.Sdk_value[key])] = value + } + return sdkToPath, nil +} + // getPrecompiledObjectsDirs finds directories with precompiled objects // Since there is no notion of directory at cloud storage, then // to avoid duplicates of a base path (directory) need to store it in a set/map. diff --git a/playground/infrastructure/cd_helper.py b/playground/infrastructure/cd_helper.py index 1f46401dcb13..b98d52d213fd 100644 --- a/playground/infrastructure/cd_helper.py +++ b/playground/infrastructure/cd_helper.py @@ -97,12 +97,43 @@ def _save_to_cloud_storage(self, examples: List[Example]): """ self._storage_client = storage.Client() self._bucket = self._storage_client.bucket(Config.BUCKET_NAME) + + default_examples_paths = {} for example in tqdm(examples): file_names = self._write_to_local_fs(example) + + if example.tag.default_example: + default_examples_paths[Sdk.Name(example.sdk)] = Path( + [*file_names].pop()).parent.__str__() + for cloud_file_name, local_file_name in file_names.items(): self._upload_blob( source_file=local_file_name, destination_blob_name=cloud_file_name) + local_filename = self._write_default_examples_paths_to_local_fs( + default_examples_paths) + self._upload_blob( + source_file=local_filename, + destination_blob_name=Config.DEFAULT_PRECOMPILED_OBJECTS) + + def _write_default_examples_paths_to_local_fs(self, paths: {}) -> str: + """ + Write paths to default examples to the file (in temp folder) + + Args: + paths: dict with paths + + Returns: name of the file + + """ + path_to_object_folder = os.path.join( + Config.TEMP_FOLDER, Config.DEFAULT_PRECOMPILED_OBJECTS) + content = json.dumps(paths) + with open(path_to_object_folder, "w", encoding="utf-8") as file: + file.write(content) + + return path_to_object_folder + def _write_to_local_fs(self, example: Example): """ Write code of an example, output and meta info diff --git a/playground/infrastructure/config.py b/playground/infrastructure/config.py index 7cc816ccb348..d09c181a6a59 100644 --- a/playground/infrastructure/config.py +++ b/playground/infrastructure/config.py @@ -43,6 +43,7 @@ class Config: Sdk.Name(SDK_SCIO)) BUCKET_NAME = "playground-precompiled-objects" TEMP_FOLDER = "temp" + DEFAULT_PRECOMPILED_OBJECTS = "defaultPrecompiledObjects.info" SDK_TO_EXTENSION = { SDK_JAVA: "java", SDK_GO: "go", SDK_PYTHON: "py", SDK_SCIO: "scala" } diff --git a/playground/infrastructure/helper.py b/playground/infrastructure/helper.py index f90cd8796cb4..52a941879810 100644 --- a/playground/infrastructure/helper.py +++ b/playground/infrastructure/helper.py @@ -46,7 +46,8 @@ TagFields.pipeline_options, TagFields.default_example, TagFields.context_line - ], defaults=(None, None, False, None, None, False, None)) + ], + defaults=(None, None, False, None, None, False, None)) @dataclass @@ -341,13 +342,13 @@ def _validate(tag: dict, supported_categories: List[str]) -> bool: # check that context line's value is integer context_line = tag.get(TagFields.context_line) if not isinstance(context_line, int): - logging.error( - "tag's field context_line is incorrect: %s \n" - "context_line variable should be integer format, " - "but tag contains: %s", - tag, - context_line) - valid = False + logging.error( + "tag's field context_line is incorrect: %s \n" + "context_line variable should be integer format, " + "but tag contains: %s", + tag, + context_line) + valid = False return valid diff --git a/playground/infrastructure/test_helper.py b/playground/infrastructure/test_helper.py index 2ae71ef7b138..6c733cc061bf 100644 --- a/playground/infrastructure/test_helper.py +++ b/playground/infrastructure/test_helper.py @@ -177,7 +177,8 @@ def test__get_example(mock_get_name): "description": "Description", "multifile": "False", "categories": [""], - "pipeline_options": "--option option" + "pipeline_options": "--option option", + "context_line": 1 }, "") @@ -189,7 +190,8 @@ def test__get_example(mock_get_name): filepath="/root/filepath.java", code="data", status=STATUS_UNSPECIFIED, - tag=Tag("Name", "Description", "False", [""], "--option option"), + tag=Tag( + "Name", "Description", "False", [""], "--option option", False, 1), link="https://github.com/apache/beam/blob/master/root/filepath.java") mock_get_name.assert_called_once_with("filepath.java") @@ -245,7 +247,8 @@ def test__validate_with_all_fields(): "description": "Description", "multifile": "true", "categories": ["category"], - "pipeline_options": "--option option" + "pipeline_options": "--option option", + "context_line": 1 } assert _validate(tag, ["category"]) is True From ebf5888eda61fc8cfd6e61a70a8f5e3d860a7431 Mon Sep 17 00:00:00 2001 From: AydarZaynutdinov Date: Tue, 8 Feb 2022 09:43:07 +0300 Subject: [PATCH 28/36] [BEAM-13633][Playground] Separate for each sdk --- .../cloud_bucket/precompiled_objects.go | 37 +++++++++++-------- playground/infrastructure/cd_helper.py | 24 +++++++----- 2 files changed, 36 insertions(+), 25 deletions(-) diff --git a/playground/backend/internal/cloud_bucket/precompiled_objects.go b/playground/backend/internal/cloud_bucket/precompiled_objects.go index 4cb8713df241..5096f607f84b 100644 --- a/playground/backend/internal/cloud_bucket/precompiled_objects.go +++ b/playground/backend/internal/cloud_bucket/precompiled_objects.go @@ -202,9 +202,17 @@ func (cd *CloudStorage) GetDefaultPrecompiledObjects(ctx context.Context) (map[p defer client.Close() bucket := client.Bucket(BucketName) - paths, err := cd.getDefaultPrecompiledObjectsPaths(ctx, bucket) - if err != nil { - return nil, err + paths := make(map[pb.Sdk]string, 0) + for _, sdkName := range pb.Sdk_name { + sdk := pb.Sdk(pb.Sdk_value[sdkName]) + if sdk == pb.Sdk_SDK_UNSPECIFIED { + continue + } + path, err := cd.getDefaultPrecompiledObjectsPath(ctx, bucket, sdk) + if err != nil { + return nil, err + } + paths[sdk] = path } defaultPrecompiledObjects := make(map[pb.Sdk]*pb.PrecompiledObject, 0) @@ -234,27 +242,24 @@ func (cd *CloudStorage) GetDefaultPrecompiledObjects(ctx context.Context) (map[p return defaultPrecompiledObjects, nil } -// getDefaultPrecompiledObjectsPaths returns map where for each SDK path to the default precompiled object is contained -func (cd *CloudStorage) getDefaultPrecompiledObjectsPaths(ctx context.Context, bucket *storage.BucketHandle) (map[pb.Sdk]string, error) { - rc, err := bucket.Object(DefaultPrecompiledObjectsInfo).NewReader(ctx) +// getDefaultPrecompiledObjectsPath returns path for SDK to the default precompiled object +func (cd *CloudStorage) getDefaultPrecompiledObjectsPath(ctx context.Context, bucket *storage.BucketHandle, sdk pb.Sdk) (string, error) { + pathToFile := fmt.Sprintf("%s/%s", sdk.String(), DefaultPrecompiledObjectsInfo) + rc, err := bucket.Object(pathToFile).NewReader(ctx) if err != nil { - return nil, err + return "", err } data, err := io.ReadAll(rc) if err != nil { - return nil, err + return "", err } - paths := make(map[string]string, 0) - sdkToPath := make(map[pb.Sdk]string, 0) - if err := json.Unmarshal(data, &paths); err != nil { - panic(err) - } - for key, value := range paths { - sdkToPath[pb.Sdk(pb.Sdk_value[key])] = value + path := make(map[string]string, 0) + if err := json.Unmarshal(data, &path); err != nil { + return "", err } - return sdkToPath, nil + return path[sdk.String()], nil } // getPrecompiledObjectsDirs finds directories with precompiled objects diff --git a/playground/infrastructure/cd_helper.py b/playground/infrastructure/cd_helper.py index b98d52d213fd..8dcd9996ad3a 100644 --- a/playground/infrastructure/cd_helper.py +++ b/playground/infrastructure/cd_helper.py @@ -110,11 +110,12 @@ def _save_to_cloud_storage(self, examples: List[Example]): self._upload_blob( source_file=local_file_name, destination_blob_name=cloud_file_name) - local_filename = self._write_default_examples_paths_to_local_fs( - default_examples_paths) - self._upload_blob( - source_file=local_filename, - destination_blob_name=Config.DEFAULT_PRECOMPILED_OBJECTS) + if len(default_examples_paths) > 0: + cloud_path = self._write_default_examples_paths_to_local_fs( + default_examples_paths) + self._upload_blob( + source_file=os.path.join(Config.TEMP_FOLDER, cloud_path), + destination_blob_name=cloud_path) def _write_default_examples_paths_to_local_fs(self, paths: {}) -> str: """ @@ -126,13 +127,18 @@ def _write_default_examples_paths_to_local_fs(self, paths: {}) -> str: Returns: name of the file """ - path_to_object_folder = os.path.join( - Config.TEMP_FOLDER, Config.DEFAULT_PRECOMPILED_OBJECTS) + cloud_path = os.path.join([*paths].pop(), + Config.DEFAULT_PRECOMPILED_OBJECTS) + + path_to_file = os.path.join(Config.TEMP_FOLDER, [*paths].pop()) + Path(path_to_file).mkdir(parents=True, exist_ok=True) + + local_path = os.path.join(path_to_file, Config.DEFAULT_PRECOMPILED_OBJECTS) content = json.dumps(paths) - with open(path_to_object_folder, "w", encoding="utf-8") as file: + with open(local_path, "x", encoding="utf-8") as file: file.write(content) - return path_to_object_folder + return cloud_path def _write_to_local_fs(self, example: Example): """ From e413153ab40d800819db271e9b6b9b6da8a23baf Mon Sep 17 00:00:00 2001 From: AydarZaynutdinov Date: Tue, 8 Feb 2022 10:05:44 +0300 Subject: [PATCH 29/36] [BEAM-13633][Playground] regenerate proto files --- playground/backend/internal/api/v1/api.pb.go | 384 +++++++++--------- .../cloud_bucket/precompiled_objects.go | 4 +- .../frontend/lib/api/v1/api.pbjson.dart | 2 +- playground/infrastructure/api/v1/api_pb2.py | 91 +++-- 4 files changed, 245 insertions(+), 236 deletions(-) diff --git a/playground/backend/internal/api/v1/api.pb.go b/playground/backend/internal/api/v1/api.pb.go index 76f524100944..95023091aaca 100644 --- a/playground/backend/internal/api/v1/api.pb.go +++ b/playground/backend/internal/api/v1/api.pb.go @@ -2074,7 +2074,7 @@ var file_api_v1_api_proto_rawDesc = []byte{ 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x55, 0x75, 0x69, 0x64, 0x22, 0x10, 0x0a, 0x0e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x02, 0x0a, 0x11, 0x50, 0x72, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc4, 0x02, 0x0a, 0x11, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, @@ -2092,206 +2092,208 @@ var file_api_v1_api_proto_rawDesc = []byte{ 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x22, 0xe5, 0x01, 0x0a, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, - 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x03, 0x73, 0x64, 0x6b, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x64, 0x6b, 0x52, - 0x03, 0x73, 0x64, 0x6b, 0x12, 0x3b, 0x0a, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2e, 0x43, 0x61, 0x74, - 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, - 0x73, 0x1a, 0x7b, 0x0a, 0x08, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x23, 0x0a, - 0x0d, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x13, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, - 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x12, 0x70, 0x72, 0x65, 0x63, - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, 0x59, - 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, + 0x78, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x22, + 0xe5, 0x01, 0x0a, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x03, 0x73, 0x64, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x64, 0x6b, 0x52, 0x03, 0x73, 0x64, 0x6b, 0x12, 0x1a, 0x0a, - 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x22, 0x40, 0x0a, 0x1f, 0x47, 0x65, 0x74, - 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x42, 0x0a, 0x21, 0x47, - 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, - 0x40, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, - 0x68, 0x22, 0x41, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, - 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x64, 0x6b, 0x52, 0x03, 0x73, 0x64, 0x6b, 0x12, 0x3b, 0x0a, + 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, + 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x0a, + 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x1a, 0x7b, 0x0a, 0x08, 0x43, 0x61, + 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, + 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, + 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x13, 0x70, + 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x12, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, 0x59, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x03, 0x73, 0x64, 0x6b, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x64, + 0x6b, 0x52, 0x03, 0x73, 0x64, 0x6b, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, + 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, + 0x72, 0x79, 0x22, 0x40, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, - 0x50, 0x61, 0x74, 0x68, 0x22, 0x43, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x03, 0x73, 0x64, - 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x64, 0x6b, 0x52, 0x03, 0x73, 0x64, 0x6b, 0x22, 0x5a, 0x0a, 0x1d, 0x47, 0x65, 0x74, - 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0e, 0x73, 0x64, - 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x74, 0x65, - 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x0d, 0x73, 0x64, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, - 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0x36, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x3c, 0x0a, - 0x22, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x3a, 0x0a, 0x20, 0x47, - 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x39, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x50, 0x72, - 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, - 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x67, 0x72, 0x61, 0x70, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x22, 0x6f, 0x0a, 0x23, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x70, 0x72, 0x65, - 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x50, 0x61, 0x74, 0x68, 0x22, 0x42, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x40, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x52, 0x11, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x2a, 0x52, 0x0a, 0x03, 0x53, 0x64, 0x6b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x44, - 0x4b, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, 0x4a, 0x41, 0x56, 0x41, 0x10, 0x01, 0x12, 0x0a, 0x0a, - 0x06, 0x53, 0x44, 0x4b, 0x5f, 0x47, 0x4f, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x44, 0x4b, - 0x5f, 0x50, 0x59, 0x54, 0x48, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, - 0x5f, 0x53, 0x43, 0x49, 0x4f, 0x10, 0x04, 0x2a, 0xb8, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, - 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, - 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x14, - 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x49, - 0x4e, 0x47, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, - 0x52, 0x45, 0x50, 0x41, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, - 0x50, 0x49, 0x4c, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x45, - 0x43, 0x55, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x08, 0x12, 0x14, 0x0a, - 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, - 0x52, 0x10, 0x09, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, - 0x52, 0x4f, 0x52, 0x10, 0x0a, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x52, 0x55, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x0b, 0x12, 0x13, 0x0a, - 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, - 0x10, 0x0c, 0x2a, 0xae, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, - 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x23, - 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, - 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, + 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x41, 0x0a, 0x20, 0x47, 0x65, + 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, + 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x43, 0x0a, + 0x22, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x03, 0x73, 0x64, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x64, 0x6b, 0x52, 0x03, 0x73, + 0x64, 0x6b, 0x22, 0x5a, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0e, 0x73, 0x64, 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, + 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, + 0x0d, 0x73, 0x64, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0x36, + 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x3c, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x22, 0x3a, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x22, 0x39, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x70, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x61, 0x70, 0x68, 0x22, 0x6f, 0x0a, 0x23, 0x47, + 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x11, 0x70, 0x72, 0x65, 0x63, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2a, 0x52, 0x0a, 0x03, + 0x53, 0x64, 0x6b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x44, 0x4b, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, + 0x4a, 0x41, 0x56, 0x41, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x44, 0x4b, 0x5f, 0x47, 0x4f, + 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x44, 0x4b, 0x5f, 0x50, 0x59, 0x54, 0x48, 0x4f, 0x4e, + 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, 0x53, 0x43, 0x49, 0x4f, 0x10, 0x04, + 0x2a, 0xb8, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, + 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x1c, 0x0a, + 0x18, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x49, 0x4e, 0x47, 0x10, + 0x05, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, + 0x49, 0x4c, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4e, 0x47, 0x10, + 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x49, + 0x53, 0x48, 0x45, 0x44, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x09, 0x12, 0x10, 0x0a, 0x0c, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x0a, 0x12, 0x16, + 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x54, 0x49, 0x4d, + 0x45, 0x4f, 0x55, 0x54, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x0c, 0x2a, 0xae, 0x01, 0x0a, 0x15, + 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x23, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x45, 0x58, 0x41, 0x4d, 0x50, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x52, - 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4b, 0x41, 0x54, 0x41, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, - 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, - 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x54, 0x45, 0x53, - 0x54, 0x10, 0x03, 0x32, 0x9b, 0x0b, 0x0a, 0x11, 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, - 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x52, 0x75, 0x6e, - 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, - 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, - 0x0c, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1b, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, - 0x6f, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, - 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, - 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, - 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x13, 0x47, - 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x47, - 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, - 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, - 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, - 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, - 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, - 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, - 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, - 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, + 0x0a, 0x1f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, + 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x41, 0x4d, 0x50, 0x4c, + 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, + 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4b, + 0x41, 0x54, 0x41, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, + 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x03, 0x32, 0x9b, 0x0b, 0x0a, + 0x11, 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, + 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, + 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, + 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, + 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x22, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x23, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, + 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, + 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, - 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, - 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, - 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, + 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, + 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x1a, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, 0x72, - 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, - 0x72, 0x61, 0x70, 0x68, 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x70, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x28, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x76, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x12, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, - 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, - 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x1b, 0x47, 0x65, 0x74, - 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, - 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, - 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x42, 0x38, 0x5a, 0x36, 0x62, 0x65, 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, - 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x3b, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x38, 0x5a, 0x36, 0x62, 0x65, + 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x6c, + 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, + 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x3b, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, + 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/playground/backend/internal/cloud_bucket/precompiled_objects.go b/playground/backend/internal/cloud_bucket/precompiled_objects.go index 2f6e6bcbc5d4..c04b75c61dd4 100644 --- a/playground/backend/internal/cloud_bucket/precompiled_objects.go +++ b/playground/backend/internal/cloud_bucket/precompiled_objects.go @@ -37,7 +37,7 @@ const ( OutputExtension = "output" LogsExtension = "log" GraphExtension = "graph" - DefaultPrecompiledObjectsInfo = "defaultPrecompiledObjects.info" + defaultPrecompiledObjectsInfo = "defaultPrecompiledObjects.info" MetaInfoName = "meta.info" Timeout = time.Minute javaExtension = "java" @@ -273,7 +273,7 @@ func (cd *CloudStorage) GetDefaultPrecompiledObjects(ctx context.Context) (map[p // getDefaultPrecompiledObjectsPath returns path for SDK to the default precompiled object func (cd *CloudStorage) getDefaultPrecompiledObjectsPath(ctx context.Context, bucket *storage.BucketHandle, sdk pb.Sdk) (string, error) { - pathToFile := fmt.Sprintf("%s/%s", sdk.String(), DefaultPrecompiledObjectsInfo) + pathToFile := fmt.Sprintf("%s/%s", sdk.String(), defaultPrecompiledObjectsInfo) rc, err := bucket.Object(pathToFile).NewReader(ctx) if err != nil { return "", err diff --git a/playground/frontend/lib/api/v1/api.pbjson.dart b/playground/frontend/lib/api/v1/api.pbjson.dart index 20a9df2d6376..a952e8404987 100644 --- a/playground/frontend/lib/api/v1/api.pbjson.dart +++ b/playground/frontend/lib/api/v1/api.pbjson.dart @@ -291,7 +291,7 @@ const PrecompiledObject$json = const { }; /// Descriptor for `PrecompiledObject`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List precompiledObjectDescriptor = $convert.base64Decode('ChFQcmVjb21waWxlZE9iamVjdBIdCgpjbG91ZF9wYXRoGAEgASgJUgljbG91ZFBhdGgSEgoEbmFtZRgCIAEoCVIEbmFtZRIgCgtkZXNjcmlwdGlvbhgDIAEoCVILZGVzY3JpcHRpb24SMQoEdHlwZRgEIAEoDjIdLmFwaS52MS5QcmVjb21waWxlZE9iamVjdFR5cGVSBHR5cGUSKQoQcGlwZWxpbmVfb3B0aW9ucxgFIAEoCVIPcGlwZWxpbmVPcHRpb25zEhIKBGxpbmsYBiABKAlSBGxpbmsSHAoJbXVsdGlmaWxlGAcgASgIUgltdWx0aWZpbGUSIQoMY29udGV4dF9saW5lGAggASgFUgtjb250ZXh0TGluZQ=='); +final $typed_data.Uint8List precompiledObjectDescriptor = $convert.base64Decode('ChFQcmVjb21waWxlZE9iamVjdBIdCgpjbG91ZF9wYXRoGAEgASgJUgljbG91ZFBhdGgSEgoEbmFtZRgCIAEoCVIEbmFtZRIgCgtkZXNjcmlwdGlvbhgDIAEoCVILZGVzY3JpcHRpb24SMQoEdHlwZRgEIAEoDjIdLmFwaS52MS5QcmVjb21waWxlZE9iamVjdFR5cGVSBHR5cGUSKQoQcGlwZWxpbmVfb3B0aW9ucxgFIAEoCVIPcGlwZWxpbmVPcHRpb25zEhIKBGxpbmsYBiABKAlSBGxpbmsSHAoJbXVsdGlmaWxlGAcgASgIUgltdWx0aWZpbGUSIQoMY29udGV4dF9saW5lGAggASgFUgtjb250ZXh0TGluZRInCg9kZWZhdWx0X2V4YW1wbGUYCSABKAhSDmRlZmF1bHRFeGFtcGxl'); @$core.Deprecated('Use categoriesDescriptor instead') const Categories$json = const { '1': 'Categories', diff --git a/playground/infrastructure/api/v1/api_pb2.py b/playground/infrastructure/api/v1/api_pb2.py index d166cd4b0c0d..3108cd746977 100644 --- a/playground/infrastructure/api/v1/api_pb2.py +++ b/playground/infrastructure/api/v1/api_pb2.py @@ -35,7 +35,7 @@ syntax='proto3', serialized_options=b'Z6beam.apache.org/playground/backend/internal;playground', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\tapi.proto\x12\x06\x61pi.v1\"R\n\x0eRunCodeRequest\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x18\n\x03sdk\x18\x02 \x01(\x0e\x32\x0b.api.v1.Sdk\x12\x18\n\x10pipeline_options\x18\x03 \x01(\t\"(\n\x0fRunCodeResponse\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"+\n\x12\x43heckStatusRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"5\n\x13\x43heckStatusResponse\x12\x1e\n\x06status\x18\x01 \x01(\x0e\x32\x0e.api.v1.Status\"3\n\x1aGetValidationOutputRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"-\n\x1bGetValidationOutputResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"4\n\x1bGetPreparationOutputRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\".\n\x1cGetPreparationOutputResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"0\n\x17GetCompileOutputRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"*\n\x18GetCompileOutputResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\",\n\x13GetRunOutputRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"&\n\x14GetRunOutputResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"+\n\x12GetRunErrorRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"%\n\x13GetRunErrorResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"\'\n\x0eGetLogsRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"!\n\x0fGetLogsResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"(\n\x0fGetGraphRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"!\n\x10GetGraphResponse\x12\r\n\x05graph\x18\x01 \x01(\t\"&\n\rCancelRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"\x10\n\x0e\x43\x61ncelResponse\"\xce\x01\n\x11PrecompiledObject\x12\x12\n\ncloud_path\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12+\n\x04type\x18\x04 \x01(\x0e\x32\x1d.api.v1.PrecompiledObjectType\x12\x18\n\x10pipeline_options\x18\x05 \x01(\t\x12\x0c\n\x04link\x18\x06 \x01(\t\x12\x14\n\x0c\x63ontext_line\x18\x07 \x01(\x05\x12\x17\n\x0f\x64\x65\x66\x61ult_example\x18\x08 \x01(\x08\"\xb2\x01\n\nCategories\x12\x18\n\x03sdk\x18\x01 \x01(\x0e\x32\x0b.api.v1.Sdk\x12/\n\ncategories\x18\x02 \x03(\x0b\x32\x1b.api.v1.Categories.Category\x1aY\n\x08\x43\x61tegory\x12\x15\n\rcategory_name\x18\x01 \x01(\t\x12\x36\n\x13precompiled_objects\x18\x02 \x03(\x0b\x32\x19.api.v1.PrecompiledObject\"J\n\x1cGetPrecompiledObjectsRequest\x12\x18\n\x03sdk\x18\x01 \x01(\x0e\x32\x0b.api.v1.Sdk\x12\x10\n\x08\x63\x61tegory\x18\x02 \x01(\t\"5\n\x1fGetPrecompiledObjectCodeRequest\x12\x12\n\ncloud_path\x18\x01 \x01(\t\"7\n!GetPrecompiledObjectOutputRequest\x12\x12\n\ncloud_path\x18\x01 \x01(\t\"5\n\x1fGetPrecompiledObjectLogsRequest\x12\x12\n\ncloud_path\x18\x01 \x01(\t\"6\n GetPrecompiledObjectGraphRequest\x12\x12\n\ncloud_path\x18\x01 \x01(\t\">\n\"GetDefaultPrecompiledObjectRequest\x12\x18\n\x03sdk\x18\x01 \x01(\x0e\x32\x0b.api.v1.Sdk\"K\n\x1dGetPrecompiledObjectsResponse\x12*\n\x0esdk_categories\x18\x01 \x03(\x0b\x32\x12.api.v1.Categories\"0\n GetPrecompiledObjectCodeResponse\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\"4\n\"GetPrecompiledObjectOutputResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"2\n GetPrecompiledObjectLogsResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"2\n!GetPrecompiledObjectGraphResponse\x12\r\n\x05graph\x18\x01 \x01(\t\"\\\n#GetDefaultPrecompiledObjectResponse\x12\x35\n\x12precompiled_object\x18\x01 \x01(\x0b\x32\x19.api.v1.PrecompiledObject*R\n\x03Sdk\x12\x13\n\x0fSDK_UNSPECIFIED\x10\x00\x12\x0c\n\x08SDK_JAVA\x10\x01\x12\n\n\x06SDK_GO\x10\x02\x12\x0e\n\nSDK_PYTHON\x10\x03\x12\x0c\n\x08SDK_SCIO\x10\x04*\xb8\x02\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x15\n\x11STATUS_VALIDATING\x10\x01\x12\x1b\n\x17STATUS_VALIDATION_ERROR\x10\x02\x12\x14\n\x10STATUS_PREPARING\x10\x03\x12\x1c\n\x18STATUS_PREPARATION_ERROR\x10\x04\x12\x14\n\x10STATUS_COMPILING\x10\x05\x12\x18\n\x14STATUS_COMPILE_ERROR\x10\x06\x12\x14\n\x10STATUS_EXECUTING\x10\x07\x12\x13\n\x0fSTATUS_FINISHED\x10\x08\x12\x14\n\x10STATUS_RUN_ERROR\x10\t\x12\x10\n\x0cSTATUS_ERROR\x10\n\x12\x16\n\x12STATUS_RUN_TIMEOUT\x10\x0b\x12\x13\n\x0fSTATUS_CANCELED\x10\x0c*\xae\x01\n\x15PrecompiledObjectType\x12\'\n#PRECOMPILED_OBJECT_TYPE_UNSPECIFIED\x10\x00\x12#\n\x1fPRECOMPILED_OBJECT_TYPE_EXAMPLE\x10\x01\x12 \n\x1cPRECOMPILED_OBJECT_TYPE_KATA\x10\x02\x12%\n!PRECOMPILED_OBJECT_TYPE_UNIT_TEST\x10\x03\x32\x9b\x0b\n\x11PlaygroundService\x12:\n\x07RunCode\x12\x16.api.v1.RunCodeRequest\x1a\x17.api.v1.RunCodeResponse\x12\x46\n\x0b\x43heckStatus\x12\x1a.api.v1.CheckStatusRequest\x1a\x1b.api.v1.CheckStatusResponse\x12I\n\x0cGetRunOutput\x12\x1b.api.v1.GetRunOutputRequest\x1a\x1c.api.v1.GetRunOutputResponse\x12:\n\x07GetLogs\x12\x16.api.v1.GetLogsRequest\x1a\x17.api.v1.GetLogsResponse\x12=\n\x08GetGraph\x12\x17.api.v1.GetGraphRequest\x1a\x18.api.v1.GetGraphResponse\x12\x46\n\x0bGetRunError\x12\x1a.api.v1.GetRunErrorRequest\x1a\x1b.api.v1.GetRunErrorResponse\x12^\n\x13GetValidationOutput\x12\".api.v1.GetValidationOutputRequest\x1a#.api.v1.GetValidationOutputResponse\x12\x61\n\x14GetPreparationOutput\x12#.api.v1.GetPreparationOutputRequest\x1a$.api.v1.GetPreparationOutputResponse\x12U\n\x10GetCompileOutput\x12\x1f.api.v1.GetCompileOutputRequest\x1a .api.v1.GetCompileOutputResponse\x12\x37\n\x06\x43\x61ncel\x12\x15.api.v1.CancelRequest\x1a\x16.api.v1.CancelResponse\x12\x64\n\x15GetPrecompiledObjects\x12$.api.v1.GetPrecompiledObjectsRequest\x1a%.api.v1.GetPrecompiledObjectsResponse\x12m\n\x18GetPrecompiledObjectCode\x12\'.api.v1.GetPrecompiledObjectCodeRequest\x1a(.api.v1.GetPrecompiledObjectCodeResponse\x12s\n\x1aGetPrecompiledObjectOutput\x12).api.v1.GetPrecompiledObjectOutputRequest\x1a*.api.v1.GetPrecompiledObjectOutputResponse\x12m\n\x18GetPrecompiledObjectLogs\x12\'.api.v1.GetPrecompiledObjectLogsRequest\x1a(.api.v1.GetPrecompiledObjectLogsResponse\x12p\n\x19GetPrecompiledObjectGraph\x12(.api.v1.GetPrecompiledObjectGraphRequest\x1a).api.v1.GetPrecompiledObjectGraphResponse\x12v\n\x1bGetDefaultPrecompiledObject\x12*.api.v1.GetDefaultPrecompiledObjectRequest\x1a+.api.v1.GetDefaultPrecompiledObjectResponseB8Z6beam.apache.org/playground/backend/internal;playgroundb\x06proto3' + serialized_pb=b'\n\tapi.proto\x12\x06\x61pi.v1\"R\n\x0eRunCodeRequest\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x18\n\x03sdk\x18\x02 \x01(\x0e\x32\x0b.api.v1.Sdk\x12\x18\n\x10pipeline_options\x18\x03 \x01(\t\"(\n\x0fRunCodeResponse\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"+\n\x12\x43heckStatusRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"5\n\x13\x43heckStatusResponse\x12\x1e\n\x06status\x18\x01 \x01(\x0e\x32\x0e.api.v1.Status\"3\n\x1aGetValidationOutputRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"-\n\x1bGetValidationOutputResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"4\n\x1bGetPreparationOutputRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\".\n\x1cGetPreparationOutputResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"0\n\x17GetCompileOutputRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"*\n\x18GetCompileOutputResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\",\n\x13GetRunOutputRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"&\n\x14GetRunOutputResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"+\n\x12GetRunErrorRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"%\n\x13GetRunErrorResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"\'\n\x0eGetLogsRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"!\n\x0fGetLogsResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"(\n\x0fGetGraphRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"!\n\x10GetGraphResponse\x12\r\n\x05graph\x18\x01 \x01(\t\"&\n\rCancelRequest\x12\x15\n\rpipeline_uuid\x18\x01 \x01(\t\"\x10\n\x0e\x43\x61ncelResponse\"\xe1\x01\n\x11PrecompiledObject\x12\x12\n\ncloud_path\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12+\n\x04type\x18\x04 \x01(\x0e\x32\x1d.api.v1.PrecompiledObjectType\x12\x18\n\x10pipeline_options\x18\x05 \x01(\t\x12\x0c\n\x04link\x18\x06 \x01(\t\x12\x11\n\tmultifile\x18\x07 \x01(\x08\x12\x14\n\x0c\x63ontext_line\x18\x08 \x01(\x05\x12\x17\n\x0f\x64\x65\x66\x61ult_example\x18\t \x01(\x08\"\xb2\x01\n\nCategories\x12\x18\n\x03sdk\x18\x01 \x01(\x0e\x32\x0b.api.v1.Sdk\x12/\n\ncategories\x18\x02 \x03(\x0b\x32\x1b.api.v1.Categories.Category\x1aY\n\x08\x43\x61tegory\x12\x15\n\rcategory_name\x18\x01 \x01(\t\x12\x36\n\x13precompiled_objects\x18\x02 \x03(\x0b\x32\x19.api.v1.PrecompiledObject\"J\n\x1cGetPrecompiledObjectsRequest\x12\x18\n\x03sdk\x18\x01 \x01(\x0e\x32\x0b.api.v1.Sdk\x12\x10\n\x08\x63\x61tegory\x18\x02 \x01(\t\"5\n\x1fGetPrecompiledObjectCodeRequest\x12\x12\n\ncloud_path\x18\x01 \x01(\t\"7\n!GetPrecompiledObjectOutputRequest\x12\x12\n\ncloud_path\x18\x01 \x01(\t\"5\n\x1fGetPrecompiledObjectLogsRequest\x12\x12\n\ncloud_path\x18\x01 \x01(\t\"6\n GetPrecompiledObjectGraphRequest\x12\x12\n\ncloud_path\x18\x01 \x01(\t\">\n\"GetDefaultPrecompiledObjectRequest\x12\x18\n\x03sdk\x18\x01 \x01(\x0e\x32\x0b.api.v1.Sdk\"K\n\x1dGetPrecompiledObjectsResponse\x12*\n\x0esdk_categories\x18\x01 \x03(\x0b\x32\x12.api.v1.Categories\"0\n GetPrecompiledObjectCodeResponse\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\"4\n\"GetPrecompiledObjectOutputResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"2\n GetPrecompiledObjectLogsResponse\x12\x0e\n\x06output\x18\x01 \x01(\t\"2\n!GetPrecompiledObjectGraphResponse\x12\r\n\x05graph\x18\x01 \x01(\t\"\\\n#GetDefaultPrecompiledObjectResponse\x12\x35\n\x12precompiled_object\x18\x01 \x01(\x0b\x32\x19.api.v1.PrecompiledObject*R\n\x03Sdk\x12\x13\n\x0fSDK_UNSPECIFIED\x10\x00\x12\x0c\n\x08SDK_JAVA\x10\x01\x12\n\n\x06SDK_GO\x10\x02\x12\x0e\n\nSDK_PYTHON\x10\x03\x12\x0c\n\x08SDK_SCIO\x10\x04*\xb8\x02\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x15\n\x11STATUS_VALIDATING\x10\x01\x12\x1b\n\x17STATUS_VALIDATION_ERROR\x10\x02\x12\x14\n\x10STATUS_PREPARING\x10\x03\x12\x1c\n\x18STATUS_PREPARATION_ERROR\x10\x04\x12\x14\n\x10STATUS_COMPILING\x10\x05\x12\x18\n\x14STATUS_COMPILE_ERROR\x10\x06\x12\x14\n\x10STATUS_EXECUTING\x10\x07\x12\x13\n\x0fSTATUS_FINISHED\x10\x08\x12\x14\n\x10STATUS_RUN_ERROR\x10\t\x12\x10\n\x0cSTATUS_ERROR\x10\n\x12\x16\n\x12STATUS_RUN_TIMEOUT\x10\x0b\x12\x13\n\x0fSTATUS_CANCELED\x10\x0c*\xae\x01\n\x15PrecompiledObjectType\x12\'\n#PRECOMPILED_OBJECT_TYPE_UNSPECIFIED\x10\x00\x12#\n\x1fPRECOMPILED_OBJECT_TYPE_EXAMPLE\x10\x01\x12 \n\x1cPRECOMPILED_OBJECT_TYPE_KATA\x10\x02\x12%\n!PRECOMPILED_OBJECT_TYPE_UNIT_TEST\x10\x03\x32\x9b\x0b\n\x11PlaygroundService\x12:\n\x07RunCode\x12\x16.api.v1.RunCodeRequest\x1a\x17.api.v1.RunCodeResponse\x12\x46\n\x0b\x43heckStatus\x12\x1a.api.v1.CheckStatusRequest\x1a\x1b.api.v1.CheckStatusResponse\x12I\n\x0cGetRunOutput\x12\x1b.api.v1.GetRunOutputRequest\x1a\x1c.api.v1.GetRunOutputResponse\x12:\n\x07GetLogs\x12\x16.api.v1.GetLogsRequest\x1a\x17.api.v1.GetLogsResponse\x12=\n\x08GetGraph\x12\x17.api.v1.GetGraphRequest\x1a\x18.api.v1.GetGraphResponse\x12\x46\n\x0bGetRunError\x12\x1a.api.v1.GetRunErrorRequest\x1a\x1b.api.v1.GetRunErrorResponse\x12^\n\x13GetValidationOutput\x12\".api.v1.GetValidationOutputRequest\x1a#.api.v1.GetValidationOutputResponse\x12\x61\n\x14GetPreparationOutput\x12#.api.v1.GetPreparationOutputRequest\x1a$.api.v1.GetPreparationOutputResponse\x12U\n\x10GetCompileOutput\x12\x1f.api.v1.GetCompileOutputRequest\x1a .api.v1.GetCompileOutputResponse\x12\x37\n\x06\x43\x61ncel\x12\x15.api.v1.CancelRequest\x1a\x16.api.v1.CancelResponse\x12\x64\n\x15GetPrecompiledObjects\x12$.api.v1.GetPrecompiledObjectsRequest\x1a%.api.v1.GetPrecompiledObjectsResponse\x12m\n\x18GetPrecompiledObjectCode\x12\'.api.v1.GetPrecompiledObjectCodeRequest\x1a(.api.v1.GetPrecompiledObjectCodeResponse\x12s\n\x1aGetPrecompiledObjectOutput\x12).api.v1.GetPrecompiledObjectOutputRequest\x1a*.api.v1.GetPrecompiledObjectOutputResponse\x12m\n\x18GetPrecompiledObjectLogs\x12\'.api.v1.GetPrecompiledObjectLogsRequest\x1a(.api.v1.GetPrecompiledObjectLogsResponse\x12p\n\x19GetPrecompiledObjectGraph\x12(.api.v1.GetPrecompiledObjectGraphRequest\x1a).api.v1.GetPrecompiledObjectGraphResponse\x12v\n\x1bGetDefaultPrecompiledObject\x12*.api.v1.GetDefaultPrecompiledObjectRequest\x1a+.api.v1.GetDefaultPrecompiledObjectResponseB8Z6beam.apache.org/playground/backend/internal;playgroundb\x06proto3' ) _SDK = _descriptor.EnumDescriptor( @@ -73,8 +73,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=2056, - serialized_end=2138, + serialized_start=2075, + serialized_end=2157, ) _sym_db.RegisterEnumDescriptor(_SDK) @@ -154,8 +154,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=2141, - serialized_end=2453, + serialized_start=2160, + serialized_end=2472, ) _sym_db.RegisterEnumDescriptor(_STATUS) @@ -190,8 +190,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=2456, - serialized_end=2630, + serialized_start=2475, + serialized_end=2649, ) _sym_db.RegisterEnumDescriptor(_PRECOMPILEDOBJECTTYPE) @@ -919,15 +919,22 @@ is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='context_line', full_name='api.v1.PrecompiledObject.context_line', index=6, - number=7, type=5, cpp_type=1, label=1, + name='multifile', full_name='api.v1.PrecompiledObject.multifile', index=6, + number=7, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='context_line', full_name='api.v1.PrecompiledObject.context_line', index=7, + number=8, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='default_example', full_name='api.v1.PrecompiledObject.default_example', index=7, - number=8, type=8, cpp_type=7, label=1, + name='default_example', full_name='api.v1.PrecompiledObject.default_example', index=8, + number=9, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -945,7 +952,7 @@ oneofs=[ ], serialized_start=925, - serialized_end=1131, + serialized_end=1150, ) @@ -983,8 +990,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1223, - serialized_end=1312, + serialized_start=1242, + serialized_end=1331, ) _CATEGORIES = _descriptor.Descriptor( @@ -1021,8 +1028,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1134, - serialized_end=1312, + serialized_start=1153, + serialized_end=1331, ) @@ -1060,8 +1067,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1314, - serialized_end=1388, + serialized_start=1333, + serialized_end=1407, ) @@ -1092,8 +1099,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1390, - serialized_end=1443, + serialized_start=1409, + serialized_end=1462, ) @@ -1124,8 +1131,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1445, - serialized_end=1500, + serialized_start=1464, + serialized_end=1519, ) @@ -1156,8 +1163,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1502, - serialized_end=1555, + serialized_start=1521, + serialized_end=1574, ) @@ -1188,8 +1195,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1557, - serialized_end=1611, + serialized_start=1576, + serialized_end=1630, ) @@ -1220,8 +1227,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1613, - serialized_end=1675, + serialized_start=1632, + serialized_end=1694, ) @@ -1252,8 +1259,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1677, - serialized_end=1752, + serialized_start=1696, + serialized_end=1771, ) @@ -1284,8 +1291,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1754, - serialized_end=1802, + serialized_start=1773, + serialized_end=1821, ) @@ -1316,8 +1323,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1804, - serialized_end=1856, + serialized_start=1823, + serialized_end=1875, ) @@ -1348,8 +1355,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1858, - serialized_end=1908, + serialized_start=1877, + serialized_end=1927, ) @@ -1380,8 +1387,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1910, - serialized_end=1960, + serialized_start=1929, + serialized_end=1979, ) @@ -1412,8 +1419,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1962, - serialized_end=2054, + serialized_start=1981, + serialized_end=2073, ) _RUNCODEREQUEST.fields_by_name['sdk'].enum_type = _SDK @@ -1722,8 +1729,8 @@ index=0, serialized_options=None, create_key=_descriptor._internal_create_key, - serialized_start=2633, - serialized_end=4068, + serialized_start=2652, + serialized_end=4087, methods=[ _descriptor.MethodDescriptor( name='RunCode', From da6baa0aaa272190d4a035568a5e4db0b093dfd9 Mon Sep 17 00:00:00 2001 From: Pavel Avilov Date: Wed, 9 Feb 2022 11:37:20 +0300 Subject: [PATCH 30/36] Add code of the default example to response --- playground/api/v1/api.proto | 20 +- playground/backend/cmd/server/controller.go | 22 +- playground/backend/cmd/server/server.go | 8 +- playground/backend/internal/api/v1/api.pb.go | 712 ++++++++++-------- .../backend/internal/api/v1/api_grpc.pb.go | 32 +- playground/backend/internal/cache/cache.go | 10 +- .../internal/cache/local/local_cache.go | 30 +- .../internal/cache/redis/redis_cache.go | 22 +- .../cloud_bucket/precompiled_objects.go | 19 +- .../utils/precompiled_objects_utils.go | 27 +- .../utils/precompiled_objects_utils_test.go | 25 +- playground/frontend/lib/api/v1/api.pb.dart | 133 +++- .../frontend/lib/api/v1/api.pbgrpc.dart | 46 +- .../frontend/lib/api/v1/api.pbjson.dart | 33 +- 14 files changed, 655 insertions(+), 484 deletions(-) diff --git a/playground/api/v1/api.proto b/playground/api/v1/api.proto index bddb56bda5c7..da105e1184d7 100644 --- a/playground/api/v1/api.proto +++ b/playground/api/v1/api.proto @@ -168,6 +168,12 @@ message PrecompiledObject{ bool default_example = 9; } +// DefaultExample represents the default PrecompiledObject and his code +message DefaultExample{ + PrecompiledObject precompiled_object = 1; + string code = 2; +} + // Categories represent the array of messages with sdk and categories at this sdk message Categories{ message Category{ @@ -204,8 +210,8 @@ message GetPrecompiledObjectGraphRequest{ string cloud_path = 1; } -// GetDefaultPrecompiledObjectRequest contains information of the needed PrecompiledObject sdk. -message GetDefaultPrecompiledObjectRequest { +// GetDefaultExampleRequest contains information of the needed PrecompiledObject sdk. +message GetDefaultExampleRequest { Sdk sdk = 1; } @@ -234,9 +240,9 @@ message GetPrecompiledObjectGraphResponse { string graph = 1; } -// GetDefaultPrecompiledObjectResponse represents the default PrecompiledObject and his category for the sdk. -message GetDefaultPrecompiledObjectResponse { - PrecompiledObject precompiled_object = 1; +// GetDefaultExampleResponse represents the default PrecompiledObject and his code for the sdk. +message GetDefaultExampleResponse { + DefaultExample default_example = 1; } service PlaygroundService { @@ -286,6 +292,6 @@ service PlaygroundService { // Get the graph of an PrecompiledObject. rpc GetPrecompiledObjectGraph(GetPrecompiledObjectGraphRequest) returns (GetPrecompiledObjectGraphResponse); - // Get the default precompile object for the sdk. - rpc GetDefaultPrecompiledObject(GetDefaultPrecompiledObjectRequest) returns (GetDefaultPrecompiledObjectResponse); + // Get the default example for the sdk. + rpc GetDefaultExample(GetDefaultExampleRequest) returns (GetDefaultExampleResponse); } diff --git a/playground/backend/cmd/server/controller.go b/playground/backend/cmd/server/controller.go index 06d6d62b2adb..5180c48a3b1e 100644 --- a/playground/backend/cmd/server/controller.go +++ b/playground/backend/cmd/server/controller.go @@ -318,26 +318,18 @@ func (controller *playgroundController) GetPrecompiledObjectGraph(ctx context.Co return &response, nil } -// GetDefaultPrecompiledObject returns the default precompile object for sdk. -func (controller *playgroundController) GetDefaultPrecompiledObject(ctx context.Context, info *pb.GetDefaultPrecompiledObjectRequest) (*pb.GetDefaultPrecompiledObjectResponse, error) { +// GetDefaultExample returns the default precompile object for sdk. +func (controller *playgroundController) GetDefaultExample(ctx context.Context, info *pb.GetDefaultExampleRequest) (*pb.GetDefaultExampleResponse, error) { switch info.Sdk { case pb.Sdk_SDK_UNSPECIFIED: - logger.Errorf("GetDefaultPrecompiledObject(): unimplemented sdk: %s\n", info.Sdk) + logger.Errorf("GetDefaultExample(): unimplemented sdk: %s\n", info.Sdk) return nil, errors.InvalidArgumentError("Error during preparing", "Sdk is not implemented yet: %s", info.Sdk.String()) } - precompiledObject, err := utils.GetDefaultPrecompiledObject(ctx, info.Sdk, controller.cacheService) + defaultExample, err := utils.GetDefaultExample(ctx, info.Sdk, controller.cacheService) if err != nil { - logger.Errorf("GetDefaultPrecompiledObject(): error during getting catalog: %s", err.Error()) - return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") + logger.Errorf("GetDefaultExample(): error during getting default example: %s", err.Error()) + return nil, errors.InternalError("Error during getting Default Examples", "Error with cloud connection") } - response := pb.GetDefaultPrecompiledObjectResponse{PrecompiledObject: &pb.PrecompiledObject{ - CloudPath: precompiledObject.CloudPath, - Name: precompiledObject.Name, - Description: precompiledObject.Description, - Type: precompiledObject.Type, - PipelineOptions: precompiledObject.PipelineOptions, - Link: precompiledObject.Link, - DefaultExample: precompiledObject.DefaultExample, - }} + response := pb.GetDefaultExampleResponse{DefaultExample: defaultExample} return &response, nil } diff --git a/playground/backend/cmd/server/server.go b/playground/backend/cmd/server/server.go index abbb37a3c6e0..a70626933aa1 100644 --- a/playground/backend/cmd/server/server.go +++ b/playground/backend/cmd/server/server.go @@ -119,7 +119,7 @@ func setupCache(ctx context.Context, appEnv environment.ApplicationEnvs) (cache. } } -// setupExamplesCatalog saves precompiled objects catalog from storage to cache +// setupExamplesCatalog saves precompiled objects catalog and default example from storage to cache func setupExamplesCatalog(ctx context.Context, cacheService cache.Cache) error { catalog, err := utils.GetCatalogFromStorage(ctx) if err != nil { @@ -130,12 +130,12 @@ func setupExamplesCatalog(ctx context.Context, cacheService cache.Cache) error { } bucket := cloud_bucket.New() - defaultPrecompiledObjects, err := bucket.GetDefaultPrecompiledObjects(ctx) + defaultExamples, err := bucket.GetDefaultExamples(ctx) if err != nil { return err } - for sdk, precompiledObject := range defaultPrecompiledObjects { - if err := cacheService.SetDefaultPrecompiledObject(ctx, sdk, precompiledObject); err != nil { + for sdk, defaultExample := range defaultExamples { + if err := cacheService.SetDefaultExample(ctx, sdk, defaultExample); err != nil { logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) return err } diff --git a/playground/backend/internal/api/v1/api.pb.go b/playground/backend/internal/api/v1/api.pb.go index 95023091aaca..d2644b1ef60d 100644 --- a/playground/backend/internal/api/v1/api.pb.go +++ b/playground/backend/internal/api/v1/api.pb.go @@ -1304,6 +1304,62 @@ func (x *PrecompiledObject) GetDefaultExample() bool { return false } +// DefaultExample represents the default PrecompiledObject and his code +type DefaultExample struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PrecompiledObject *PrecompiledObject `protobuf:"bytes,1,opt,name=precompiled_object,json=precompiledObject,proto3" json:"precompiled_object,omitempty"` + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` +} + +func (x *DefaultExample) Reset() { + *x = DefaultExample{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_api_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DefaultExample) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DefaultExample) ProtoMessage() {} + +func (x *DefaultExample) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_api_proto_msgTypes[21] + 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 DefaultExample.ProtoReflect.Descriptor instead. +func (*DefaultExample) Descriptor() ([]byte, []int) { + return file_api_v1_api_proto_rawDescGZIP(), []int{21} +} + +func (x *DefaultExample) GetPrecompiledObject() *PrecompiledObject { + if x != nil { + return x.PrecompiledObject + } + return nil +} + +func (x *DefaultExample) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + // Categories represent the array of messages with sdk and categories at this sdk type Categories struct { state protoimpl.MessageState @@ -1317,7 +1373,7 @@ type Categories struct { func (x *Categories) Reset() { *x = Categories{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[21] + mi := &file_api_v1_api_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1330,7 +1386,7 @@ func (x *Categories) String() string { func (*Categories) ProtoMessage() {} func (x *Categories) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[21] + mi := &file_api_v1_api_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1343,7 +1399,7 @@ func (x *Categories) ProtoReflect() protoreflect.Message { // Deprecated: Use Categories.ProtoReflect.Descriptor instead. func (*Categories) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{21} + return file_api_v1_api_proto_rawDescGZIP(), []int{22} } func (x *Categories) GetSdk() Sdk { @@ -1373,7 +1429,7 @@ type GetPrecompiledObjectsRequest struct { func (x *GetPrecompiledObjectsRequest) Reset() { *x = GetPrecompiledObjectsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[22] + mi := &file_api_v1_api_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1386,7 +1442,7 @@ func (x *GetPrecompiledObjectsRequest) String() string { func (*GetPrecompiledObjectsRequest) ProtoMessage() {} func (x *GetPrecompiledObjectsRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[22] + mi := &file_api_v1_api_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1399,7 +1455,7 @@ func (x *GetPrecompiledObjectsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPrecompiledObjectsRequest.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectsRequest) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{22} + return file_api_v1_api_proto_rawDescGZIP(), []int{23} } func (x *GetPrecompiledObjectsRequest) GetSdk() Sdk { @@ -1428,7 +1484,7 @@ type GetPrecompiledObjectCodeRequest struct { func (x *GetPrecompiledObjectCodeRequest) Reset() { *x = GetPrecompiledObjectCodeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[23] + mi := &file_api_v1_api_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1441,7 +1497,7 @@ func (x *GetPrecompiledObjectCodeRequest) String() string { func (*GetPrecompiledObjectCodeRequest) ProtoMessage() {} func (x *GetPrecompiledObjectCodeRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[23] + mi := &file_api_v1_api_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1454,7 +1510,7 @@ func (x *GetPrecompiledObjectCodeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPrecompiledObjectCodeRequest.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectCodeRequest) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{23} + return file_api_v1_api_proto_rawDescGZIP(), []int{24} } func (x *GetPrecompiledObjectCodeRequest) GetCloudPath() string { @@ -1476,7 +1532,7 @@ type GetPrecompiledObjectOutputRequest struct { func (x *GetPrecompiledObjectOutputRequest) Reset() { *x = GetPrecompiledObjectOutputRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[24] + mi := &file_api_v1_api_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1489,7 +1545,7 @@ func (x *GetPrecompiledObjectOutputRequest) String() string { func (*GetPrecompiledObjectOutputRequest) ProtoMessage() {} func (x *GetPrecompiledObjectOutputRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[24] + mi := &file_api_v1_api_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1502,7 +1558,7 @@ func (x *GetPrecompiledObjectOutputRequest) ProtoReflect() protoreflect.Message // Deprecated: Use GetPrecompiledObjectOutputRequest.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectOutputRequest) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{24} + return file_api_v1_api_proto_rawDescGZIP(), []int{25} } func (x *GetPrecompiledObjectOutputRequest) GetCloudPath() string { @@ -1524,7 +1580,7 @@ type GetPrecompiledObjectLogsRequest struct { func (x *GetPrecompiledObjectLogsRequest) Reset() { *x = GetPrecompiledObjectLogsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[25] + mi := &file_api_v1_api_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1537,7 +1593,7 @@ func (x *GetPrecompiledObjectLogsRequest) String() string { func (*GetPrecompiledObjectLogsRequest) ProtoMessage() {} func (x *GetPrecompiledObjectLogsRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[25] + mi := &file_api_v1_api_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1550,7 +1606,7 @@ func (x *GetPrecompiledObjectLogsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPrecompiledObjectLogsRequest.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectLogsRequest) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{25} + return file_api_v1_api_proto_rawDescGZIP(), []int{26} } func (x *GetPrecompiledObjectLogsRequest) GetCloudPath() string { @@ -1572,7 +1628,7 @@ type GetPrecompiledObjectGraphRequest struct { func (x *GetPrecompiledObjectGraphRequest) Reset() { *x = GetPrecompiledObjectGraphRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[26] + mi := &file_api_v1_api_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1585,7 +1641,7 @@ func (x *GetPrecompiledObjectGraphRequest) String() string { func (*GetPrecompiledObjectGraphRequest) ProtoMessage() {} func (x *GetPrecompiledObjectGraphRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[26] + mi := &file_api_v1_api_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1598,7 +1654,7 @@ func (x *GetPrecompiledObjectGraphRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPrecompiledObjectGraphRequest.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectGraphRequest) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{26} + return file_api_v1_api_proto_rawDescGZIP(), []int{27} } func (x *GetPrecompiledObjectGraphRequest) GetCloudPath() string { @@ -1608,8 +1664,8 @@ func (x *GetPrecompiledObjectGraphRequest) GetCloudPath() string { return "" } -// GetDefaultPrecompiledObjectRequest contains information of the needed PrecompiledObject sdk. -type GetDefaultPrecompiledObjectRequest struct { +// GetDefaultExampleRequest contains information of the needed PrecompiledObject sdk. +type GetDefaultExampleRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1617,23 +1673,23 @@ type GetDefaultPrecompiledObjectRequest struct { Sdk Sdk `protobuf:"varint,1,opt,name=sdk,proto3,enum=api.v1.Sdk" json:"sdk,omitempty"` } -func (x *GetDefaultPrecompiledObjectRequest) Reset() { - *x = GetDefaultPrecompiledObjectRequest{} +func (x *GetDefaultExampleRequest) Reset() { + *x = GetDefaultExampleRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[27] + mi := &file_api_v1_api_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetDefaultPrecompiledObjectRequest) String() string { +func (x *GetDefaultExampleRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetDefaultPrecompiledObjectRequest) ProtoMessage() {} +func (*GetDefaultExampleRequest) ProtoMessage() {} -func (x *GetDefaultPrecompiledObjectRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[27] +func (x *GetDefaultExampleRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_api_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1644,12 +1700,12 @@ func (x *GetDefaultPrecompiledObjectRequest) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use GetDefaultPrecompiledObjectRequest.ProtoReflect.Descriptor instead. -func (*GetDefaultPrecompiledObjectRequest) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{27} +// Deprecated: Use GetDefaultExampleRequest.ProtoReflect.Descriptor instead. +func (*GetDefaultExampleRequest) Descriptor() ([]byte, []int) { + return file_api_v1_api_proto_rawDescGZIP(), []int{28} } -func (x *GetDefaultPrecompiledObjectRequest) GetSdk() Sdk { +func (x *GetDefaultExampleRequest) GetSdk() Sdk { if x != nil { return x.Sdk } @@ -1668,7 +1724,7 @@ type GetPrecompiledObjectsResponse struct { func (x *GetPrecompiledObjectsResponse) Reset() { *x = GetPrecompiledObjectsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[28] + mi := &file_api_v1_api_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1681,7 +1737,7 @@ func (x *GetPrecompiledObjectsResponse) String() string { func (*GetPrecompiledObjectsResponse) ProtoMessage() {} func (x *GetPrecompiledObjectsResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[28] + mi := &file_api_v1_api_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1694,7 +1750,7 @@ func (x *GetPrecompiledObjectsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPrecompiledObjectsResponse.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectsResponse) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{28} + return file_api_v1_api_proto_rawDescGZIP(), []int{29} } func (x *GetPrecompiledObjectsResponse) GetSdkCategories() []*Categories { @@ -1716,7 +1772,7 @@ type GetPrecompiledObjectCodeResponse struct { func (x *GetPrecompiledObjectCodeResponse) Reset() { *x = GetPrecompiledObjectCodeResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[29] + mi := &file_api_v1_api_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1729,7 +1785,7 @@ func (x *GetPrecompiledObjectCodeResponse) String() string { func (*GetPrecompiledObjectCodeResponse) ProtoMessage() {} func (x *GetPrecompiledObjectCodeResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[29] + mi := &file_api_v1_api_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1742,7 +1798,7 @@ func (x *GetPrecompiledObjectCodeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPrecompiledObjectCodeResponse.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectCodeResponse) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{29} + return file_api_v1_api_proto_rawDescGZIP(), []int{30} } func (x *GetPrecompiledObjectCodeResponse) GetCode() string { @@ -1764,7 +1820,7 @@ type GetPrecompiledObjectOutputResponse struct { func (x *GetPrecompiledObjectOutputResponse) Reset() { *x = GetPrecompiledObjectOutputResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[30] + mi := &file_api_v1_api_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1777,7 +1833,7 @@ func (x *GetPrecompiledObjectOutputResponse) String() string { func (*GetPrecompiledObjectOutputResponse) ProtoMessage() {} func (x *GetPrecompiledObjectOutputResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[30] + mi := &file_api_v1_api_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1790,7 +1846,7 @@ func (x *GetPrecompiledObjectOutputResponse) ProtoReflect() protoreflect.Message // Deprecated: Use GetPrecompiledObjectOutputResponse.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectOutputResponse) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{30} + return file_api_v1_api_proto_rawDescGZIP(), []int{31} } func (x *GetPrecompiledObjectOutputResponse) GetOutput() string { @@ -1812,7 +1868,7 @@ type GetPrecompiledObjectLogsResponse struct { func (x *GetPrecompiledObjectLogsResponse) Reset() { *x = GetPrecompiledObjectLogsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[31] + mi := &file_api_v1_api_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1825,7 +1881,7 @@ func (x *GetPrecompiledObjectLogsResponse) String() string { func (*GetPrecompiledObjectLogsResponse) ProtoMessage() {} func (x *GetPrecompiledObjectLogsResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[31] + mi := &file_api_v1_api_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1838,7 +1894,7 @@ func (x *GetPrecompiledObjectLogsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPrecompiledObjectLogsResponse.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectLogsResponse) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{31} + return file_api_v1_api_proto_rawDescGZIP(), []int{32} } func (x *GetPrecompiledObjectLogsResponse) GetOutput() string { @@ -1860,7 +1916,7 @@ type GetPrecompiledObjectGraphResponse struct { func (x *GetPrecompiledObjectGraphResponse) Reset() { *x = GetPrecompiledObjectGraphResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[32] + mi := &file_api_v1_api_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1873,7 +1929,7 @@ func (x *GetPrecompiledObjectGraphResponse) String() string { func (*GetPrecompiledObjectGraphResponse) ProtoMessage() {} func (x *GetPrecompiledObjectGraphResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[32] + mi := &file_api_v1_api_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1886,7 +1942,7 @@ func (x *GetPrecompiledObjectGraphResponse) ProtoReflect() protoreflect.Message // Deprecated: Use GetPrecompiledObjectGraphResponse.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectGraphResponse) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{32} + return file_api_v1_api_proto_rawDescGZIP(), []int{33} } func (x *GetPrecompiledObjectGraphResponse) GetGraph() string { @@ -1896,32 +1952,32 @@ func (x *GetPrecompiledObjectGraphResponse) GetGraph() string { return "" } -// GetDefaultPrecompiledObjectResponse represents the default PrecompiledObject and his category for the sdk. -type GetDefaultPrecompiledObjectResponse struct { +// GetDefaultExampleResponse represents the default PrecompiledObject and his code for the sdk. +type GetDefaultExampleResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - PrecompiledObject *PrecompiledObject `protobuf:"bytes,1,opt,name=precompiled_object,json=precompiledObject,proto3" json:"precompiled_object,omitempty"` + DefaultExample *DefaultExample `protobuf:"bytes,1,opt,name=default_example,json=defaultExample,proto3" json:"default_example,omitempty"` } -func (x *GetDefaultPrecompiledObjectResponse) Reset() { - *x = GetDefaultPrecompiledObjectResponse{} +func (x *GetDefaultExampleResponse) Reset() { + *x = GetDefaultExampleResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[33] + mi := &file_api_v1_api_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetDefaultPrecompiledObjectResponse) String() string { +func (x *GetDefaultExampleResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetDefaultPrecompiledObjectResponse) ProtoMessage() {} +func (*GetDefaultExampleResponse) ProtoMessage() {} -func (x *GetDefaultPrecompiledObjectResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[33] +func (x *GetDefaultExampleResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_api_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1932,14 +1988,14 @@ func (x *GetDefaultPrecompiledObjectResponse) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use GetDefaultPrecompiledObjectResponse.ProtoReflect.Descriptor instead. -func (*GetDefaultPrecompiledObjectResponse) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{33} +// Deprecated: Use GetDefaultExampleResponse.ProtoReflect.Descriptor instead. +func (*GetDefaultExampleResponse) Descriptor() ([]byte, []int) { + return file_api_v1_api_proto_rawDescGZIP(), []int{34} } -func (x *GetDefaultPrecompiledObjectResponse) GetPrecompiledObject() *PrecompiledObject { +func (x *GetDefaultExampleResponse) GetDefaultExample() *DefaultExample { if x != nil { - return x.PrecompiledObject + return x.DefaultExample } return nil } @@ -1956,7 +2012,7 @@ type Categories_Category struct { func (x *Categories_Category) Reset() { *x = Categories_Category{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[34] + mi := &file_api_v1_api_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1969,7 +2025,7 @@ func (x *Categories_Category) String() string { func (*Categories_Category) ProtoMessage() {} func (x *Categories_Category) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[34] + mi := &file_api_v1_api_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1982,7 +2038,7 @@ func (x *Categories_Category) ProtoReflect() protoreflect.Message { // Deprecated: Use Categories_Category.ProtoReflect.Descriptor instead. func (*Categories_Category) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{21, 0} + return file_api_v1_api_proto_rawDescGZIP(), []int{22, 0} } func (x *Categories_Category) GetCategoryName() string { @@ -2095,6 +2151,13 @@ var file_api_v1_api_proto_rawDesc = []byte{ 0x78, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x22, + 0x6e, 0x0a, 0x0e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x12, 0x48, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, + 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x11, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0xe5, 0x01, 0x0a, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x03, 0x73, 0x64, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x64, 0x6b, 0x52, 0x03, 0x73, 0x64, 0x6b, 0x12, 0x3b, 0x0a, @@ -2131,169 +2194,166 @@ var file_api_v1_api_proto_rawDesc = []byte{ 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x43, 0x0a, - 0x22, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, - 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x03, 0x73, 0x64, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x64, 0x6b, 0x52, 0x03, 0x73, - 0x64, 0x6b, 0x22, 0x5a, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, - 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0e, 0x73, 0x64, 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, - 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, - 0x0d, 0x73, 0x64, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0x36, - 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x3c, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, - 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x22, 0x3a, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, - 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x22, 0x39, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, - 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x70, 0x68, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x61, 0x70, 0x68, 0x22, 0x6f, 0x0a, 0x23, 0x47, - 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, - 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, - 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x11, 0x70, 0x72, 0x65, 0x63, 0x6f, - 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2a, 0x52, 0x0a, 0x03, - 0x53, 0x64, 0x6b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x44, 0x4b, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, - 0x4a, 0x41, 0x56, 0x41, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x44, 0x4b, 0x5f, 0x47, 0x4f, - 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x44, 0x4b, 0x5f, 0x50, 0x59, 0x54, 0x48, 0x4f, 0x4e, - 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, 0x53, 0x43, 0x49, 0x4f, 0x10, 0x04, - 0x2a, 0xb8, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, - 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x1c, 0x0a, - 0x18, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x49, 0x4e, 0x47, 0x10, - 0x05, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, - 0x49, 0x4c, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4e, 0x47, 0x10, - 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x49, - 0x53, 0x48, 0x45, 0x44, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x09, 0x12, 0x10, 0x0a, 0x0c, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x0a, 0x12, 0x16, - 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x54, 0x49, 0x4d, - 0x45, 0x4f, 0x55, 0x54, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x0c, 0x2a, 0xae, 0x01, 0x0a, 0x15, - 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x23, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, - 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, - 0x0a, 0x1f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, - 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x41, 0x4d, 0x50, 0x4c, - 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, - 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4b, - 0x41, 0x54, 0x41, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, - 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x03, 0x32, 0x9b, 0x0b, 0x0a, - 0x11, 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, - 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, - 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, - 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, - 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x22, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x23, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, - 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, - 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, - 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x72, - 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, - 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, - 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, + 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x39, 0x0a, + 0x18, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x03, 0x73, 0x64, 0x6b, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x64, 0x6b, 0x52, 0x03, 0x73, 0x64, 0x6b, 0x22, 0x5a, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x1a, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0e, 0x73, 0x64, 0x6b, + 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, + 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x0d, 0x73, 0x64, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, + 0x72, 0x69, 0x65, 0x73, 0x22, 0x36, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x3c, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, - 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x3a, 0x0a, 0x20, 0x47, 0x65, + 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x39, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, + 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x67, + 0x72, 0x61, 0x70, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x61, 0x70, + 0x68, 0x22, 0x5c, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, + 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, + 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2a, + 0x52, 0x0a, 0x03, 0x53, 0x64, 0x6b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x44, 0x4b, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, + 0x44, 0x4b, 0x5f, 0x4a, 0x41, 0x56, 0x41, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x44, 0x4b, + 0x5f, 0x47, 0x4f, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x44, 0x4b, 0x5f, 0x50, 0x59, 0x54, + 0x48, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, 0x53, 0x43, 0x49, + 0x4f, 0x10, 0x04, 0x2a, 0xb8, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, + 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1b, 0x0a, + 0x17, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, + 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, + 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x14, + 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x49, + 0x4e, 0x47, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, + 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x06, 0x12, 0x14, + 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, + 0x4e, 0x47, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, + 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x09, 0x12, + 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, + 0x0a, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, + 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x0c, 0x2a, 0xae, + 0x01, 0x0a, 0x15, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x23, 0x50, 0x52, 0x45, 0x43, + 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, + 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x41, + 0x4d, 0x50, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, + 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x4b, 0x41, 0x54, 0x41, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x50, 0x52, 0x45, 0x43, + 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x03, 0x32, + 0xfd, 0x0a, 0x0a, 0x11, 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, + 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, 0x74, + 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, + 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x3d, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x17, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x46, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x22, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, + 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, + 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x37, 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x15, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, + 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, - 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x27, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, - 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x70, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, - 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x28, 0x2e, + 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x73, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, + 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, + 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x76, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x12, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x38, 0x5a, 0x36, 0x62, 0x65, - 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x6c, - 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, - 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x3b, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, - 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, + 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x20, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0x38, 0x5a, 0x36, 0x62, 0x65, 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x6f, + 0x72, 0x67, 0x2f, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x62, 0x61, + 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x3b, 0x70, + 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -2309,95 +2369,97 @@ func file_api_v1_api_proto_rawDescGZIP() []byte { } var file_api_v1_api_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_api_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 35) +var file_api_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 36) var file_api_v1_api_proto_goTypes = []interface{}{ - (Sdk)(0), // 0: api.v1.Sdk - (Status)(0), // 1: api.v1.Status - (PrecompiledObjectType)(0), // 2: api.v1.PrecompiledObjectType - (*RunCodeRequest)(nil), // 3: api.v1.RunCodeRequest - (*RunCodeResponse)(nil), // 4: api.v1.RunCodeResponse - (*CheckStatusRequest)(nil), // 5: api.v1.CheckStatusRequest - (*CheckStatusResponse)(nil), // 6: api.v1.CheckStatusResponse - (*GetValidationOutputRequest)(nil), // 7: api.v1.GetValidationOutputRequest - (*GetValidationOutputResponse)(nil), // 8: api.v1.GetValidationOutputResponse - (*GetPreparationOutputRequest)(nil), // 9: api.v1.GetPreparationOutputRequest - (*GetPreparationOutputResponse)(nil), // 10: api.v1.GetPreparationOutputResponse - (*GetCompileOutputRequest)(nil), // 11: api.v1.GetCompileOutputRequest - (*GetCompileOutputResponse)(nil), // 12: api.v1.GetCompileOutputResponse - (*GetRunOutputRequest)(nil), // 13: api.v1.GetRunOutputRequest - (*GetRunOutputResponse)(nil), // 14: api.v1.GetRunOutputResponse - (*GetRunErrorRequest)(nil), // 15: api.v1.GetRunErrorRequest - (*GetRunErrorResponse)(nil), // 16: api.v1.GetRunErrorResponse - (*GetLogsRequest)(nil), // 17: api.v1.GetLogsRequest - (*GetLogsResponse)(nil), // 18: api.v1.GetLogsResponse - (*GetGraphRequest)(nil), // 19: api.v1.GetGraphRequest - (*GetGraphResponse)(nil), // 20: api.v1.GetGraphResponse - (*CancelRequest)(nil), // 21: api.v1.CancelRequest - (*CancelResponse)(nil), // 22: api.v1.CancelResponse - (*PrecompiledObject)(nil), // 23: api.v1.PrecompiledObject - (*Categories)(nil), // 24: api.v1.Categories - (*GetPrecompiledObjectsRequest)(nil), // 25: api.v1.GetPrecompiledObjectsRequest - (*GetPrecompiledObjectCodeRequest)(nil), // 26: api.v1.GetPrecompiledObjectCodeRequest - (*GetPrecompiledObjectOutputRequest)(nil), // 27: api.v1.GetPrecompiledObjectOutputRequest - (*GetPrecompiledObjectLogsRequest)(nil), // 28: api.v1.GetPrecompiledObjectLogsRequest - (*GetPrecompiledObjectGraphRequest)(nil), // 29: api.v1.GetPrecompiledObjectGraphRequest - (*GetDefaultPrecompiledObjectRequest)(nil), // 30: api.v1.GetDefaultPrecompiledObjectRequest - (*GetPrecompiledObjectsResponse)(nil), // 31: api.v1.GetPrecompiledObjectsResponse - (*GetPrecompiledObjectCodeResponse)(nil), // 32: api.v1.GetPrecompiledObjectCodeResponse - (*GetPrecompiledObjectOutputResponse)(nil), // 33: api.v1.GetPrecompiledObjectOutputResponse - (*GetPrecompiledObjectLogsResponse)(nil), // 34: api.v1.GetPrecompiledObjectLogsResponse - (*GetPrecompiledObjectGraphResponse)(nil), // 35: api.v1.GetPrecompiledObjectGraphResponse - (*GetDefaultPrecompiledObjectResponse)(nil), // 36: api.v1.GetDefaultPrecompiledObjectResponse - (*Categories_Category)(nil), // 37: api.v1.Categories.Category + (Sdk)(0), // 0: api.v1.Sdk + (Status)(0), // 1: api.v1.Status + (PrecompiledObjectType)(0), // 2: api.v1.PrecompiledObjectType + (*RunCodeRequest)(nil), // 3: api.v1.RunCodeRequest + (*RunCodeResponse)(nil), // 4: api.v1.RunCodeResponse + (*CheckStatusRequest)(nil), // 5: api.v1.CheckStatusRequest + (*CheckStatusResponse)(nil), // 6: api.v1.CheckStatusResponse + (*GetValidationOutputRequest)(nil), // 7: api.v1.GetValidationOutputRequest + (*GetValidationOutputResponse)(nil), // 8: api.v1.GetValidationOutputResponse + (*GetPreparationOutputRequest)(nil), // 9: api.v1.GetPreparationOutputRequest + (*GetPreparationOutputResponse)(nil), // 10: api.v1.GetPreparationOutputResponse + (*GetCompileOutputRequest)(nil), // 11: api.v1.GetCompileOutputRequest + (*GetCompileOutputResponse)(nil), // 12: api.v1.GetCompileOutputResponse + (*GetRunOutputRequest)(nil), // 13: api.v1.GetRunOutputRequest + (*GetRunOutputResponse)(nil), // 14: api.v1.GetRunOutputResponse + (*GetRunErrorRequest)(nil), // 15: api.v1.GetRunErrorRequest + (*GetRunErrorResponse)(nil), // 16: api.v1.GetRunErrorResponse + (*GetLogsRequest)(nil), // 17: api.v1.GetLogsRequest + (*GetLogsResponse)(nil), // 18: api.v1.GetLogsResponse + (*GetGraphRequest)(nil), // 19: api.v1.GetGraphRequest + (*GetGraphResponse)(nil), // 20: api.v1.GetGraphResponse + (*CancelRequest)(nil), // 21: api.v1.CancelRequest + (*CancelResponse)(nil), // 22: api.v1.CancelResponse + (*PrecompiledObject)(nil), // 23: api.v1.PrecompiledObject + (*DefaultExample)(nil), // 24: api.v1.DefaultExample + (*Categories)(nil), // 25: api.v1.Categories + (*GetPrecompiledObjectsRequest)(nil), // 26: api.v1.GetPrecompiledObjectsRequest + (*GetPrecompiledObjectCodeRequest)(nil), // 27: api.v1.GetPrecompiledObjectCodeRequest + (*GetPrecompiledObjectOutputRequest)(nil), // 28: api.v1.GetPrecompiledObjectOutputRequest + (*GetPrecompiledObjectLogsRequest)(nil), // 29: api.v1.GetPrecompiledObjectLogsRequest + (*GetPrecompiledObjectGraphRequest)(nil), // 30: api.v1.GetPrecompiledObjectGraphRequest + (*GetDefaultExampleRequest)(nil), // 31: api.v1.GetDefaultExampleRequest + (*GetPrecompiledObjectsResponse)(nil), // 32: api.v1.GetPrecompiledObjectsResponse + (*GetPrecompiledObjectCodeResponse)(nil), // 33: api.v1.GetPrecompiledObjectCodeResponse + (*GetPrecompiledObjectOutputResponse)(nil), // 34: api.v1.GetPrecompiledObjectOutputResponse + (*GetPrecompiledObjectLogsResponse)(nil), // 35: api.v1.GetPrecompiledObjectLogsResponse + (*GetPrecompiledObjectGraphResponse)(nil), // 36: api.v1.GetPrecompiledObjectGraphResponse + (*GetDefaultExampleResponse)(nil), // 37: api.v1.GetDefaultExampleResponse + (*Categories_Category)(nil), // 38: api.v1.Categories.Category } var file_api_v1_api_proto_depIdxs = []int32{ 0, // 0: api.v1.RunCodeRequest.sdk:type_name -> api.v1.Sdk 1, // 1: api.v1.CheckStatusResponse.status:type_name -> api.v1.Status 2, // 2: api.v1.PrecompiledObject.type:type_name -> api.v1.PrecompiledObjectType - 0, // 3: api.v1.Categories.sdk:type_name -> api.v1.Sdk - 37, // 4: api.v1.Categories.categories:type_name -> api.v1.Categories.Category - 0, // 5: api.v1.GetPrecompiledObjectsRequest.sdk:type_name -> api.v1.Sdk - 0, // 6: api.v1.GetDefaultPrecompiledObjectRequest.sdk:type_name -> api.v1.Sdk - 24, // 7: api.v1.GetPrecompiledObjectsResponse.sdk_categories:type_name -> api.v1.Categories - 23, // 8: api.v1.GetDefaultPrecompiledObjectResponse.precompiled_object:type_name -> api.v1.PrecompiledObject - 23, // 9: api.v1.Categories.Category.precompiled_objects:type_name -> api.v1.PrecompiledObject - 3, // 10: api.v1.PlaygroundService.RunCode:input_type -> api.v1.RunCodeRequest - 5, // 11: api.v1.PlaygroundService.CheckStatus:input_type -> api.v1.CheckStatusRequest - 13, // 12: api.v1.PlaygroundService.GetRunOutput:input_type -> api.v1.GetRunOutputRequest - 17, // 13: api.v1.PlaygroundService.GetLogs:input_type -> api.v1.GetLogsRequest - 19, // 14: api.v1.PlaygroundService.GetGraph:input_type -> api.v1.GetGraphRequest - 15, // 15: api.v1.PlaygroundService.GetRunError:input_type -> api.v1.GetRunErrorRequest - 7, // 16: api.v1.PlaygroundService.GetValidationOutput:input_type -> api.v1.GetValidationOutputRequest - 9, // 17: api.v1.PlaygroundService.GetPreparationOutput:input_type -> api.v1.GetPreparationOutputRequest - 11, // 18: api.v1.PlaygroundService.GetCompileOutput:input_type -> api.v1.GetCompileOutputRequest - 21, // 19: api.v1.PlaygroundService.Cancel:input_type -> api.v1.CancelRequest - 25, // 20: api.v1.PlaygroundService.GetPrecompiledObjects:input_type -> api.v1.GetPrecompiledObjectsRequest - 26, // 21: api.v1.PlaygroundService.GetPrecompiledObjectCode:input_type -> api.v1.GetPrecompiledObjectCodeRequest - 27, // 22: api.v1.PlaygroundService.GetPrecompiledObjectOutput:input_type -> api.v1.GetPrecompiledObjectOutputRequest - 28, // 23: api.v1.PlaygroundService.GetPrecompiledObjectLogs:input_type -> api.v1.GetPrecompiledObjectLogsRequest - 29, // 24: api.v1.PlaygroundService.GetPrecompiledObjectGraph:input_type -> api.v1.GetPrecompiledObjectGraphRequest - 30, // 25: api.v1.PlaygroundService.GetDefaultPrecompiledObject:input_type -> api.v1.GetDefaultPrecompiledObjectRequest - 4, // 26: api.v1.PlaygroundService.RunCode:output_type -> api.v1.RunCodeResponse - 6, // 27: api.v1.PlaygroundService.CheckStatus:output_type -> api.v1.CheckStatusResponse - 14, // 28: api.v1.PlaygroundService.GetRunOutput:output_type -> api.v1.GetRunOutputResponse - 18, // 29: api.v1.PlaygroundService.GetLogs:output_type -> api.v1.GetLogsResponse - 20, // 30: api.v1.PlaygroundService.GetGraph:output_type -> api.v1.GetGraphResponse - 16, // 31: api.v1.PlaygroundService.GetRunError:output_type -> api.v1.GetRunErrorResponse - 8, // 32: api.v1.PlaygroundService.GetValidationOutput:output_type -> api.v1.GetValidationOutputResponse - 10, // 33: api.v1.PlaygroundService.GetPreparationOutput:output_type -> api.v1.GetPreparationOutputResponse - 12, // 34: api.v1.PlaygroundService.GetCompileOutput:output_type -> api.v1.GetCompileOutputResponse - 22, // 35: api.v1.PlaygroundService.Cancel:output_type -> api.v1.CancelResponse - 31, // 36: api.v1.PlaygroundService.GetPrecompiledObjects:output_type -> api.v1.GetPrecompiledObjectsResponse - 32, // 37: api.v1.PlaygroundService.GetPrecompiledObjectCode:output_type -> api.v1.GetPrecompiledObjectCodeResponse - 33, // 38: api.v1.PlaygroundService.GetPrecompiledObjectOutput:output_type -> api.v1.GetPrecompiledObjectOutputResponse - 34, // 39: api.v1.PlaygroundService.GetPrecompiledObjectLogs:output_type -> api.v1.GetPrecompiledObjectLogsResponse - 35, // 40: api.v1.PlaygroundService.GetPrecompiledObjectGraph:output_type -> api.v1.GetPrecompiledObjectGraphResponse - 36, // 41: api.v1.PlaygroundService.GetDefaultPrecompiledObject:output_type -> api.v1.GetDefaultPrecompiledObjectResponse - 26, // [26:42] is the sub-list for method output_type - 10, // [10:26] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 23, // 3: api.v1.DefaultExample.precompiled_object:type_name -> api.v1.PrecompiledObject + 0, // 4: api.v1.Categories.sdk:type_name -> api.v1.Sdk + 38, // 5: api.v1.Categories.categories:type_name -> api.v1.Categories.Category + 0, // 6: api.v1.GetPrecompiledObjectsRequest.sdk:type_name -> api.v1.Sdk + 0, // 7: api.v1.GetDefaultExampleRequest.sdk:type_name -> api.v1.Sdk + 25, // 8: api.v1.GetPrecompiledObjectsResponse.sdk_categories:type_name -> api.v1.Categories + 24, // 9: api.v1.GetDefaultExampleResponse.default_example:type_name -> api.v1.DefaultExample + 23, // 10: api.v1.Categories.Category.precompiled_objects:type_name -> api.v1.PrecompiledObject + 3, // 11: api.v1.PlaygroundService.RunCode:input_type -> api.v1.RunCodeRequest + 5, // 12: api.v1.PlaygroundService.CheckStatus:input_type -> api.v1.CheckStatusRequest + 13, // 13: api.v1.PlaygroundService.GetRunOutput:input_type -> api.v1.GetRunOutputRequest + 17, // 14: api.v1.PlaygroundService.GetLogs:input_type -> api.v1.GetLogsRequest + 19, // 15: api.v1.PlaygroundService.GetGraph:input_type -> api.v1.GetGraphRequest + 15, // 16: api.v1.PlaygroundService.GetRunError:input_type -> api.v1.GetRunErrorRequest + 7, // 17: api.v1.PlaygroundService.GetValidationOutput:input_type -> api.v1.GetValidationOutputRequest + 9, // 18: api.v1.PlaygroundService.GetPreparationOutput:input_type -> api.v1.GetPreparationOutputRequest + 11, // 19: api.v1.PlaygroundService.GetCompileOutput:input_type -> api.v1.GetCompileOutputRequest + 21, // 20: api.v1.PlaygroundService.Cancel:input_type -> api.v1.CancelRequest + 26, // 21: api.v1.PlaygroundService.GetPrecompiledObjects:input_type -> api.v1.GetPrecompiledObjectsRequest + 27, // 22: api.v1.PlaygroundService.GetPrecompiledObjectCode:input_type -> api.v1.GetPrecompiledObjectCodeRequest + 28, // 23: api.v1.PlaygroundService.GetPrecompiledObjectOutput:input_type -> api.v1.GetPrecompiledObjectOutputRequest + 29, // 24: api.v1.PlaygroundService.GetPrecompiledObjectLogs:input_type -> api.v1.GetPrecompiledObjectLogsRequest + 30, // 25: api.v1.PlaygroundService.GetPrecompiledObjectGraph:input_type -> api.v1.GetPrecompiledObjectGraphRequest + 31, // 26: api.v1.PlaygroundService.GetDefaultExample:input_type -> api.v1.GetDefaultExampleRequest + 4, // 27: api.v1.PlaygroundService.RunCode:output_type -> api.v1.RunCodeResponse + 6, // 28: api.v1.PlaygroundService.CheckStatus:output_type -> api.v1.CheckStatusResponse + 14, // 29: api.v1.PlaygroundService.GetRunOutput:output_type -> api.v1.GetRunOutputResponse + 18, // 30: api.v1.PlaygroundService.GetLogs:output_type -> api.v1.GetLogsResponse + 20, // 31: api.v1.PlaygroundService.GetGraph:output_type -> api.v1.GetGraphResponse + 16, // 32: api.v1.PlaygroundService.GetRunError:output_type -> api.v1.GetRunErrorResponse + 8, // 33: api.v1.PlaygroundService.GetValidationOutput:output_type -> api.v1.GetValidationOutputResponse + 10, // 34: api.v1.PlaygroundService.GetPreparationOutput:output_type -> api.v1.GetPreparationOutputResponse + 12, // 35: api.v1.PlaygroundService.GetCompileOutput:output_type -> api.v1.GetCompileOutputResponse + 22, // 36: api.v1.PlaygroundService.Cancel:output_type -> api.v1.CancelResponse + 32, // 37: api.v1.PlaygroundService.GetPrecompiledObjects:output_type -> api.v1.GetPrecompiledObjectsResponse + 33, // 38: api.v1.PlaygroundService.GetPrecompiledObjectCode:output_type -> api.v1.GetPrecompiledObjectCodeResponse + 34, // 39: api.v1.PlaygroundService.GetPrecompiledObjectOutput:output_type -> api.v1.GetPrecompiledObjectOutputResponse + 35, // 40: api.v1.PlaygroundService.GetPrecompiledObjectLogs:output_type -> api.v1.GetPrecompiledObjectLogsResponse + 36, // 41: api.v1.PlaygroundService.GetPrecompiledObjectGraph:output_type -> api.v1.GetPrecompiledObjectGraphResponse + 37, // 42: api.v1.PlaygroundService.GetDefaultExample:output_type -> api.v1.GetDefaultExampleResponse + 27, // [27:43] is the sub-list for method output_type + 11, // [11:27] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_api_v1_api_proto_init() } @@ -2659,7 +2721,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Categories); i { + switch v := v.(*DefaultExample); i { case 0: return &v.state case 1: @@ -2671,7 +2733,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectsRequest); i { + switch v := v.(*Categories); i { case 0: return &v.state case 1: @@ -2683,7 +2745,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectCodeRequest); i { + switch v := v.(*GetPrecompiledObjectsRequest); i { case 0: return &v.state case 1: @@ -2695,7 +2757,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectOutputRequest); i { + switch v := v.(*GetPrecompiledObjectCodeRequest); i { case 0: return &v.state case 1: @@ -2707,7 +2769,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectLogsRequest); i { + switch v := v.(*GetPrecompiledObjectOutputRequest); i { case 0: return &v.state case 1: @@ -2719,7 +2781,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectGraphRequest); i { + switch v := v.(*GetPrecompiledObjectLogsRequest); i { case 0: return &v.state case 1: @@ -2731,7 +2793,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetDefaultPrecompiledObjectRequest); i { + switch v := v.(*GetPrecompiledObjectGraphRequest); i { case 0: return &v.state case 1: @@ -2743,7 +2805,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectsResponse); i { + switch v := v.(*GetDefaultExampleRequest); i { case 0: return &v.state case 1: @@ -2755,7 +2817,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectCodeResponse); i { + switch v := v.(*GetPrecompiledObjectsResponse); i { case 0: return &v.state case 1: @@ -2767,7 +2829,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectOutputResponse); i { + switch v := v.(*GetPrecompiledObjectCodeResponse); i { case 0: return &v.state case 1: @@ -2779,7 +2841,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectLogsResponse); i { + switch v := v.(*GetPrecompiledObjectOutputResponse); i { case 0: return &v.state case 1: @@ -2791,7 +2853,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectGraphResponse); i { + switch v := v.(*GetPrecompiledObjectLogsResponse); i { case 0: return &v.state case 1: @@ -2803,7 +2865,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetDefaultPrecompiledObjectResponse); i { + switch v := v.(*GetPrecompiledObjectGraphResponse); i { case 0: return &v.state case 1: @@ -2815,6 +2877,18 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDefaultExampleResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_api_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Categories_Category); i { case 0: return &v.state @@ -2833,7 +2907,7 @@ func file_api_v1_api_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_v1_api_proto_rawDesc, NumEnums: 3, - NumMessages: 35, + NumMessages: 36, NumExtensions: 0, NumServices: 1, }, diff --git a/playground/backend/internal/api/v1/api_grpc.pb.go b/playground/backend/internal/api/v1/api_grpc.pb.go index 706aa2df4dfa..02c8c3c90289 100644 --- a/playground/backend/internal/api/v1/api_grpc.pb.go +++ b/playground/backend/internal/api/v1/api_grpc.pb.go @@ -65,8 +65,8 @@ type PlaygroundServiceClient interface { GetPrecompiledObjectLogs(ctx context.Context, in *GetPrecompiledObjectLogsRequest, opts ...grpc.CallOption) (*GetPrecompiledObjectLogsResponse, error) // Get the graph of an PrecompiledObject. GetPrecompiledObjectGraph(ctx context.Context, in *GetPrecompiledObjectGraphRequest, opts ...grpc.CallOption) (*GetPrecompiledObjectGraphResponse, error) - // Get the default precompile object for the sdk. - GetDefaultPrecompiledObject(ctx context.Context, in *GetDefaultPrecompiledObjectRequest, opts ...grpc.CallOption) (*GetDefaultPrecompiledObjectResponse, error) + // Get the default example for the sdk. + GetDefaultExample(ctx context.Context, in *GetDefaultExampleRequest, opts ...grpc.CallOption) (*GetDefaultExampleResponse, error) } type playgroundServiceClient struct { @@ -212,9 +212,9 @@ func (c *playgroundServiceClient) GetPrecompiledObjectGraph(ctx context.Context, return out, nil } -func (c *playgroundServiceClient) GetDefaultPrecompiledObject(ctx context.Context, in *GetDefaultPrecompiledObjectRequest, opts ...grpc.CallOption) (*GetDefaultPrecompiledObjectResponse, error) { - out := new(GetDefaultPrecompiledObjectResponse) - err := c.cc.Invoke(ctx, "/api.v1.PlaygroundService/GetDefaultPrecompiledObject", in, out, opts...) +func (c *playgroundServiceClient) GetDefaultExample(ctx context.Context, in *GetDefaultExampleRequest, opts ...grpc.CallOption) (*GetDefaultExampleResponse, error) { + out := new(GetDefaultExampleResponse) + err := c.cc.Invoke(ctx, "/api.v1.PlaygroundService/GetDefaultExample", in, out, opts...) if err != nil { return nil, err } @@ -255,8 +255,8 @@ type PlaygroundServiceServer interface { GetPrecompiledObjectLogs(context.Context, *GetPrecompiledObjectLogsRequest) (*GetPrecompiledObjectLogsResponse, error) // Get the graph of an PrecompiledObject. GetPrecompiledObjectGraph(context.Context, *GetPrecompiledObjectGraphRequest) (*GetPrecompiledObjectGraphResponse, error) - // Get the default precompile object for the sdk. - GetDefaultPrecompiledObject(context.Context, *GetDefaultPrecompiledObjectRequest) (*GetDefaultPrecompiledObjectResponse, error) + // Get the default example for the sdk. + GetDefaultExample(context.Context, *GetDefaultExampleRequest) (*GetDefaultExampleResponse, error) } // UnimplementedPlaygroundServiceServer should be embedded to have forward compatible implementations. @@ -308,8 +308,8 @@ func (UnimplementedPlaygroundServiceServer) GetPrecompiledObjectLogs(context.Con func (UnimplementedPlaygroundServiceServer) GetPrecompiledObjectGraph(context.Context, *GetPrecompiledObjectGraphRequest) (*GetPrecompiledObjectGraphResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPrecompiledObjectGraph not implemented") } -func (UnimplementedPlaygroundServiceServer) GetDefaultPrecompiledObject(context.Context, *GetDefaultPrecompiledObjectRequest) (*GetDefaultPrecompiledObjectResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDefaultPrecompiledObject not implemented") +func (UnimplementedPlaygroundServiceServer) GetDefaultExample(context.Context, *GetDefaultExampleRequest) (*GetDefaultExampleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDefaultExample not implemented") } // UnsafePlaygroundServiceServer may be embedded to opt out of forward compatibility for this service. @@ -593,20 +593,20 @@ func _PlaygroundService_GetPrecompiledObjectGraph_Handler(srv interface{}, ctx c return interceptor(ctx, in, info, handler) } -func _PlaygroundService_GetDefaultPrecompiledObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetDefaultPrecompiledObjectRequest) +func _PlaygroundService_GetDefaultExample_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDefaultExampleRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PlaygroundServiceServer).GetDefaultPrecompiledObject(ctx, in) + return srv.(PlaygroundServiceServer).GetDefaultExample(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.v1.PlaygroundService/GetDefaultPrecompiledObject", + FullMethod: "/api.v1.PlaygroundService/GetDefaultExample", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PlaygroundServiceServer).GetDefaultPrecompiledObject(ctx, req.(*GetDefaultPrecompiledObjectRequest)) + return srv.(PlaygroundServiceServer).GetDefaultExample(ctx, req.(*GetDefaultExampleRequest)) } return interceptor(ctx, in, info, handler) } @@ -679,8 +679,8 @@ var PlaygroundService_ServiceDesc = grpc.ServiceDesc{ Handler: _PlaygroundService_GetPrecompiledObjectGraph_Handler, }, { - MethodName: "GetDefaultPrecompiledObject", - Handler: _PlaygroundService_GetDefaultPrecompiledObject_Handler, + MethodName: "GetDefaultExample", + Handler: _PlaygroundService_GetDefaultExample_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/playground/backend/internal/cache/cache.go b/playground/backend/internal/cache/cache.go index 2b30f145378b..05ce48555979 100644 --- a/playground/backend/internal/cache/cache.go +++ b/playground/backend/internal/cache/cache.go @@ -64,7 +64,7 @@ const ( ExamplesCatalog string = "EXAMPLES_CATALOG" // DefaultPrecompiledExamples is used to keep default examples - DefaultPrecompiledExamples string = "DEFAULT_PRECOMPILED_OBJECTS" + DefaultPrecompiledExamples string = "DEFAULT_EXAMPLE" ) // Cache is used to store states and outputs for Apache Beam pipelines that running in Playground @@ -92,9 +92,9 @@ type Cache interface { // GetCatalog returns catalog from cache by ExamplesCatalog key. GetCatalog(ctx context.Context) ([]*pb.Categories, error) - // SetDefaultPrecompiledObject adds default precompiled object for SDK into cache. - SetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk, precompiledObject *pb.PrecompiledObject) error + // SetDefaultExample adds default example for SDK into cache. + SetDefaultExample(ctx context.Context, sdk pb.Sdk, defaultExample *pb.DefaultExample) error - // GetDefaultPrecompiledObject returns default precompiled object for SDK from cache. - GetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk) (*pb.PrecompiledObject, error) + // GetDefaultExample returns default example for SDK from cache. + GetDefaultExample(ctx context.Context, sdk pb.Sdk) (*pb.DefaultExample, error) } diff --git a/playground/backend/internal/cache/local/local_cache.go b/playground/backend/internal/cache/local/local_cache.go index 64c39b6863ad..4cce44241e57 100644 --- a/playground/backend/internal/cache/local/local_cache.go +++ b/playground/backend/internal/cache/local/local_cache.go @@ -31,23 +31,23 @@ const ( type Cache struct { sync.RWMutex - cleanupInterval time.Duration - items map[uuid.UUID]map[cache.SubKey]interface{} - pipelinesExpiration map[uuid.UUID]time.Time - catalog []*pb.Categories - defaultPrecompiledObjects map[pb.Sdk]*pb.PrecompiledObject + cleanupInterval time.Duration + items map[uuid.UUID]map[cache.SubKey]interface{} + pipelinesExpiration map[uuid.UUID]time.Time + catalog []*pb.Categories + defaultExamples map[pb.Sdk]*pb.DefaultExample } func New(ctx context.Context) *Cache { items := make(map[uuid.UUID]map[cache.SubKey]interface{}) pipelinesExpiration := make(map[uuid.UUID]time.Time) - defaultPrecompiledObjects := make(map[pb.Sdk]*pb.PrecompiledObject) + defaultExamples := make(map[pb.Sdk]*pb.DefaultExample) ls := &Cache{ - cleanupInterval: cleanupInterval, - items: items, - pipelinesExpiration: pipelinesExpiration, - catalog: nil, - defaultPrecompiledObjects: defaultPrecompiledObjects, + cleanupInterval: cleanupInterval, + items: items, + pipelinesExpiration: pipelinesExpiration, + catalog: nil, + defaultExamples: defaultExamples, } go ls.startGC(ctx) @@ -127,17 +127,17 @@ func (lc *Cache) GetCatalog(ctx context.Context) ([]*pb.Categories, error) { return lc.catalog, nil } -func (lc *Cache) SetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk, precompiledObject *pb.PrecompiledObject) error { +func (lc *Cache) SetDefaultExample(ctx context.Context, sdk pb.Sdk, defaultExample *pb.DefaultExample) error { lc.Lock() defer lc.Unlock() - lc.defaultPrecompiledObjects[sdk] = precompiledObject + lc.defaultExamples[sdk] = defaultExample return nil } -func (lc *Cache) GetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk) (*pb.PrecompiledObject, error) { +func (lc *Cache) GetDefaultExample(ctx context.Context, sdk pb.Sdk) (*pb.DefaultExample, error) { lc.RLock() defer lc.RUnlock() - defaultPrecompiledObject := lc.defaultPrecompiledObjects[sdk] + defaultPrecompiledObject := lc.defaultExamples[sdk] if defaultPrecompiledObject == nil { return nil, fmt.Errorf("default precompiled obejct is not found for %s sdk", sdk.String()) } diff --git a/playground/backend/internal/cache/redis/redis_cache.go b/playground/backend/internal/cache/redis/redis_cache.go index 31bc0a479d24..37b42de609bb 100644 --- a/playground/backend/internal/cache/redis/redis_cache.go +++ b/playground/backend/internal/cache/redis/redis_cache.go @@ -126,43 +126,43 @@ func (rc *Cache) GetCatalog(ctx context.Context) ([]*pb.Categories, error) { return result, nil } -func (rc *Cache) SetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk, precompiledObject *pb.PrecompiledObject) error { - precompiledObjectMarsh, err := json.Marshal(precompiledObject) +func (rc *Cache) SetDefaultExample(ctx context.Context, sdk pb.Sdk, defaultExample *pb.DefaultExample) error { + defaultExampleMarsh, err := json.Marshal(defaultExample) if err != nil { - logger.Errorf("Redis Cache: set default precompiled object: error during marshal precompiled object: %s, err: %s\n", precompiledObject, err.Error()) + logger.Errorf("Redis Cache: set default example: error during marshal default example: %s, err: %s\n", defaultExample, err.Error()) return err } sdkMarsh, err := json.Marshal(sdk) if err != nil { - logger.Errorf("Redis Cache: set default precompiled object: error during marshal sdk: %s, err: %s\n", sdk, err.Error()) + logger.Errorf("Redis Cache: set default example: error during marshal sdk: %s, err: %s\n", sdk, err.Error()) return err } - err = rc.HSet(ctx, cache.DefaultPrecompiledExamples, sdkMarsh, precompiledObjectMarsh).Err() + err = rc.HSet(ctx, cache.DefaultPrecompiledExamples, sdkMarsh, defaultExampleMarsh).Err() if err != nil { - logger.Errorf("Redis Cache: set default precompiled object: error during HGet operation, err: %s\n", err.Error()) + logger.Errorf("Redis Cache: set default example: error during HGet operation, err: %s\n", err.Error()) return err } return nil } -func (rc *Cache) GetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk) (*pb.PrecompiledObject, error) { +func (rc *Cache) GetDefaultExample(ctx context.Context, sdk pb.Sdk) (*pb.DefaultExample, error) { sdkMarsh, err := json.Marshal(sdk) if err != nil { - logger.Errorf("Redis Cache: get default precompiled object: error during marshal sdk: %s, err: %s\n", sdk, err.Error()) + logger.Errorf("Redis Cache: get default example: error during marshal sdk: %s, err: %s\n", sdk, err.Error()) return nil, err } value, err := rc.HGet(ctx, cache.DefaultPrecompiledExamples, string(sdkMarsh)).Result() if err != nil { - logger.Errorf("Redis Cache: get default precompiled object: error during HGet operation for key: %s, subKey: %s, err: %s\n", cache.DefaultPrecompiledExamples, sdkMarsh, err.Error()) + logger.Errorf("Redis Cache: get default example: error during HGet operation for key: %s, subKey: %s, err: %s\n", cache.DefaultPrecompiledExamples, sdkMarsh, err.Error()) return nil, err } - result := new(pb.PrecompiledObject) + result := new(pb.DefaultExample) err = json.Unmarshal([]byte(value), &result) if err != nil { - logger.Errorf("Redis Cache: get default precompiled object: error during unmarshal value, err: %s\n", err.Error()) + logger.Errorf("Redis Cache: get default example: error during unmarshal value, err: %s\n", err.Error()) } return result, nil } diff --git a/playground/backend/internal/cloud_bucket/precompiled_objects.go b/playground/backend/internal/cloud_bucket/precompiled_objects.go index c04b75c61dd4..506a4f7f9b49 100644 --- a/playground/backend/internal/cloud_bucket/precompiled_objects.go +++ b/playground/backend/internal/cloud_bucket/precompiled_objects.go @@ -222,8 +222,8 @@ func (cd *CloudStorage) GetPrecompiledObjects(ctx context.Context, targetSdk pb. return &precompiledObjects, nil } -// GetDefaultPrecompiledObjects returns the default precompiled objects -func (cd *CloudStorage) GetDefaultPrecompiledObjects(ctx context.Context) (map[pb.Sdk]*pb.PrecompiledObject, error) { +// GetDefaultExamples returns the default examples +func (cd *CloudStorage) GetDefaultExamples(ctx context.Context) (map[pb.Sdk]*pb.DefaultExample, error) { client, err := storage.NewClient(ctx, option.WithoutAuthentication()) if err != nil { return nil, fmt.Errorf("storage.NewClient: %v", err) @@ -244,7 +244,7 @@ func (cd *CloudStorage) GetDefaultPrecompiledObjects(ctx context.Context) (map[p paths[sdk] = path } - defaultPrecompiledObjects := make(map[pb.Sdk]*pb.PrecompiledObject, 0) + defaultExamples := make(map[pb.Sdk]*pb.DefaultExample, 0) for sdk, path := range paths { infoPath := filepath.Join(path, MetaInfoName) rc, err := bucket.Object(infoPath).NewReader(ctx) @@ -266,9 +266,18 @@ func (cd *CloudStorage) GetDefaultPrecompiledObjects(ctx context.Context) (map[p return nil, err } precompiledObject.CloudPath = path - defaultPrecompiledObjects[sdk] = precompiledObject + + code, err := cd.GetPrecompiledObjectCode(ctx, path) + if err != nil { + return nil, err + } + + defaultExamples[sdk] = &pb.DefaultExample{ + PrecompiledObject: precompiledObject, + Code: code, + } } - return defaultPrecompiledObjects, nil + return defaultExamples, nil } // getDefaultPrecompiledObjectsPath returns path for SDK to the default precompiled object diff --git a/playground/backend/internal/utils/precompiled_objects_utils.go b/playground/backend/internal/utils/precompiled_objects_utils.go index 797ad32519c4..e34546fa5b93 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils.go +++ b/playground/backend/internal/utils/precompiled_objects_utils.go @@ -21,6 +21,7 @@ import ( "beam.apache.org/playground/backend/internal/cloud_bucket" "beam.apache.org/playground/backend/internal/logger" "context" + "fmt" ) // PutPrecompiledObjectsToCategory adds categories with precompiled objects to protobuf object @@ -96,14 +97,28 @@ func FilterCatalog(catalog []*pb.Categories, sdk pb.Sdk, categoryName string) [] return result } -// GetDefaultPrecompiledObject returns the default precompiled objects from cache for sdk -func GetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk, cacheService cache.Cache) (*pb.PrecompiledObject, error) { - precompiledObject, err := cacheService.GetDefaultPrecompiledObject(ctx, sdk) +// GetDefaultExample returns the default precompiled objects from cache for sdk +// - If there is no default example in the cache, gets the default examples from the Storage and saves it to the cache +func GetDefaultExample(ctx context.Context, sdk pb.Sdk, cacheService cache.Cache) (*pb.DefaultExample, error) { + defaultExample, err := cacheService.GetDefaultExample(ctx, sdk) if err != nil { - logger.Errorf("GetDefaultPrecompiledObject(): error during getting default precompiled object %s", err.Error()) - return nil, err + bucket := cloud_bucket.New() + defaultExamples, err := bucket.GetDefaultExamples(ctx) + if err != nil { + return nil, err + } + for sdk, defaultExample := range defaultExamples { + if err := cacheService.SetDefaultExample(ctx, sdk, defaultExample); err != nil { + logger.Errorf("GetDefaultExample(): cache error: %s", err.Error()) + } + } + defaultExample, ok := defaultExamples[sdk] + if !ok { + return nil, fmt.Errorf("no default example found for this sdk: %s", sdk) + } + return defaultExample, nil } - return precompiledObject, nil + return defaultExample, nil } // GetCatalogFromCacheOrStorage returns the precompiled objects catalog from cache diff --git a/playground/backend/internal/utils/precompiled_objects_utils_test.go b/playground/backend/internal/utils/precompiled_objects_utils_test.go index e853d5560e1f..9b4e8f709d8b 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils_test.go +++ b/playground/backend/internal/utils/precompiled_objects_utils_test.go @@ -210,10 +210,10 @@ func TestFilterPrecompiledObjects(t *testing.T) { } } -func TestGetDefaultPrecompiledObject(t *testing.T) { +func TestGetDefaultExample(t *testing.T) { ctx := context.Background() cacheService := local.New(ctx) - defaultPrecompiledObject := &pb.PrecompiledObject{ + precompiledObject := &pb.PrecompiledObject{ CloudPath: "cloudPath", Name: "Name", Description: "Description", @@ -223,7 +223,12 @@ func TestGetDefaultPrecompiledObject(t *testing.T) { ContextLine: 1, DefaultExample: true, } - err := cacheService.SetDefaultPrecompiledObject(ctx, pb.Sdk_SDK_JAVA, defaultPrecompiledObject) + defaultExample := &pb.DefaultExample{ + PrecompiledObject: precompiledObject, + Code: "CODE", + } + + err := cacheService.SetDefaultExample(ctx, pb.Sdk_SDK_JAVA, defaultExample) if err != nil { logger.Errorf("Error during set up test") } @@ -236,21 +241,21 @@ func TestGetDefaultPrecompiledObject(t *testing.T) { tests := []struct { name string args args - want *pb.PrecompiledObject + want *pb.DefaultExample wantErr bool }{ { - name: "there is default precompiled object", + name: "there is default example", args: args{ ctx: ctx, sdk: pb.Sdk_SDK_JAVA, cacheService: cacheService, }, - want: defaultPrecompiledObject, + want: defaultExample, wantErr: false, }, { - name: "there is no default precompiled object", + name: "there is no default example", args: args{ ctx: ctx, sdk: pb.Sdk_SDK_UNSPECIFIED, @@ -262,13 +267,13 @@ func TestGetDefaultPrecompiledObject(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got, err := GetDefaultPrecompiledObject(tt.args.ctx, tt.args.sdk, tt.args.cacheService) + got, err := GetDefaultExample(tt.args.ctx, tt.args.sdk, tt.args.cacheService) if (err != nil) != tt.wantErr { - t.Errorf("GetDefaultPrecompiledObject() error = %v, wantErr %v", err, tt.wantErr) + t.Errorf("GetDefaultExample() error = %v, wantErr %v", err, tt.wantErr) return } if !reflect.DeepEqual(got, tt.want) { - t.Errorf("GetDefaultPrecompiledObject() got = %v, want %v", got, tt.want) + t.Errorf("GetDefaultExample() got = %v, want %v", got, tt.want) } }) } diff --git a/playground/frontend/lib/api/v1/api.pb.dart b/playground/frontend/lib/api/v1/api.pb.dart index de916d4552f3..af83def9976b 100644 --- a/playground/frontend/lib/api/v1/api.pb.dart +++ b/playground/frontend/lib/api/v1/api.pb.dart @@ -1140,6 +1140,69 @@ class PrecompiledObject extends $pb.GeneratedMessage { void clearDefaultExample() => clearField(9); } +class DefaultExample extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'DefaultExample', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOM(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'precompiledObject', subBuilder: PrecompiledObject.create) + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'code') + ..hasRequiredFields = false + ; + + DefaultExample._() : super(); + factory DefaultExample({ + PrecompiledObject? precompiledObject, + $core.String? code, + }) { + final _result = create(); + if (precompiledObject != null) { + _result.precompiledObject = precompiledObject; + } + if (code != null) { + _result.code = code; + } + return _result; + } + factory DefaultExample.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DefaultExample.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + DefaultExample clone() => DefaultExample()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + DefaultExample copyWith(void Function(DefaultExample) updates) => super.copyWith((message) => updates(message as DefaultExample)) as DefaultExample; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static DefaultExample create() => DefaultExample._(); + DefaultExample createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static DefaultExample getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static DefaultExample? _defaultInstance; + + @$pb.TagNumber(1) + PrecompiledObject get precompiledObject => $_getN(0); + @$pb.TagNumber(1) + set precompiledObject(PrecompiledObject v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasPrecompiledObject() => $_has(0); + @$pb.TagNumber(1) + void clearPrecompiledObject() => clearField(1); + @$pb.TagNumber(1) + PrecompiledObject ensurePrecompiledObject() => $_ensure(0); + + @$pb.TagNumber(2) + $core.String get code => $_getSZ(1); + @$pb.TagNumber(2) + set code($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasCode() => $_has(1); + @$pb.TagNumber(2) + void clearCode() => clearField(2); +} + class Categories_Category extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Categories.Category', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'categoryName') @@ -1499,14 +1562,14 @@ class GetPrecompiledObjectGraphRequest extends $pb.GeneratedMessage { void clearCloudPath() => clearField(1); } -class GetDefaultPrecompiledObjectRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetDefaultPrecompiledObjectRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) +class GetDefaultExampleRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetDefaultExampleRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) ..e(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sdk', $pb.PbFieldType.OE, defaultOrMaker: Sdk.SDK_UNSPECIFIED, valueOf: Sdk.valueOf, enumValues: Sdk.values) ..hasRequiredFields = false ; - GetDefaultPrecompiledObjectRequest._() : super(); - factory GetDefaultPrecompiledObjectRequest({ + GetDefaultExampleRequest._() : super(); + factory GetDefaultExampleRequest({ Sdk? sdk, }) { final _result = create(); @@ -1515,26 +1578,26 @@ class GetDefaultPrecompiledObjectRequest extends $pb.GeneratedMessage { } return _result; } - factory GetDefaultPrecompiledObjectRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetDefaultPrecompiledObjectRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + factory GetDefaultExampleRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetDefaultExampleRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - GetDefaultPrecompiledObjectRequest clone() => GetDefaultPrecompiledObjectRequest()..mergeFromMessage(this); + GetDefaultExampleRequest clone() => GetDefaultExampleRequest()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - GetDefaultPrecompiledObjectRequest copyWith(void Function(GetDefaultPrecompiledObjectRequest) updates) => super.copyWith((message) => updates(message as GetDefaultPrecompiledObjectRequest)) as GetDefaultPrecompiledObjectRequest; // ignore: deprecated_member_use + GetDefaultExampleRequest copyWith(void Function(GetDefaultExampleRequest) updates) => super.copyWith((message) => updates(message as GetDefaultExampleRequest)) as GetDefaultExampleRequest; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static GetDefaultPrecompiledObjectRequest create() => GetDefaultPrecompiledObjectRequest._(); - GetDefaultPrecompiledObjectRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static GetDefaultExampleRequest create() => GetDefaultExampleRequest._(); + GetDefaultExampleRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetDefaultPrecompiledObjectRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetDefaultPrecompiledObjectRequest? _defaultInstance; + static GetDefaultExampleRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetDefaultExampleRequest? _defaultInstance; @$pb.TagNumber(1) Sdk get sdk => $_getN(0); @@ -1775,52 +1838,52 @@ class GetPrecompiledObjectGraphResponse extends $pb.GeneratedMessage { void clearGraph() => clearField(1); } -class GetDefaultPrecompiledObjectResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetDefaultPrecompiledObjectResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) - ..aOM(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'precompiledObject', subBuilder: PrecompiledObject.create) +class GetDefaultExampleResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetDefaultExampleResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOM(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'defaultExample', subBuilder: DefaultExample.create) ..hasRequiredFields = false ; - GetDefaultPrecompiledObjectResponse._() : super(); - factory GetDefaultPrecompiledObjectResponse({ - PrecompiledObject? precompiledObject, + GetDefaultExampleResponse._() : super(); + factory GetDefaultExampleResponse({ + DefaultExample? defaultExample, }) { final _result = create(); - if (precompiledObject != null) { - _result.precompiledObject = precompiledObject; + if (defaultExample != null) { + _result.defaultExample = defaultExample; } return _result; } - factory GetDefaultPrecompiledObjectResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetDefaultPrecompiledObjectResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + factory GetDefaultExampleResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetDefaultExampleResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - GetDefaultPrecompiledObjectResponse clone() => GetDefaultPrecompiledObjectResponse()..mergeFromMessage(this); + GetDefaultExampleResponse clone() => GetDefaultExampleResponse()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - GetDefaultPrecompiledObjectResponse copyWith(void Function(GetDefaultPrecompiledObjectResponse) updates) => super.copyWith((message) => updates(message as GetDefaultPrecompiledObjectResponse)) as GetDefaultPrecompiledObjectResponse; // ignore: deprecated_member_use + GetDefaultExampleResponse copyWith(void Function(GetDefaultExampleResponse) updates) => super.copyWith((message) => updates(message as GetDefaultExampleResponse)) as GetDefaultExampleResponse; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static GetDefaultPrecompiledObjectResponse create() => GetDefaultPrecompiledObjectResponse._(); - GetDefaultPrecompiledObjectResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static GetDefaultExampleResponse create() => GetDefaultExampleResponse._(); + GetDefaultExampleResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetDefaultPrecompiledObjectResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetDefaultPrecompiledObjectResponse? _defaultInstance; + static GetDefaultExampleResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetDefaultExampleResponse? _defaultInstance; @$pb.TagNumber(1) - PrecompiledObject get precompiledObject => $_getN(0); + DefaultExample get defaultExample => $_getN(0); @$pb.TagNumber(1) - set precompiledObject(PrecompiledObject v) { setField(1, v); } + set defaultExample(DefaultExample v) { setField(1, v); } @$pb.TagNumber(1) - $core.bool hasPrecompiledObject() => $_has(0); + $core.bool hasDefaultExample() => $_has(0); @$pb.TagNumber(1) - void clearPrecompiledObject() => clearField(1); + void clearDefaultExample() => clearField(1); @$pb.TagNumber(1) - PrecompiledObject ensurePrecompiledObject() => $_ensure(0); + DefaultExample ensureDefaultExample() => $_ensure(0); } diff --git a/playground/frontend/lib/api/v1/api.pbgrpc.dart b/playground/frontend/lib/api/v1/api.pbgrpc.dart index 35073deb3026..a5f0c40cc998 100644 --- a/playground/frontend/lib/api/v1/api.pbgrpc.dart +++ b/playground/frontend/lib/api/v1/api.pbgrpc.dart @@ -125,13 +125,12 @@ class PlaygroundServiceClient extends $grpc.Client { ($0.GetPrecompiledObjectGraphRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $0.GetPrecompiledObjectGraphResponse.fromBuffer(value)); - static final _$getDefaultPrecompiledObject = $grpc.ClientMethod< - $0.GetDefaultPrecompiledObjectRequest, - $0.GetDefaultPrecompiledObjectResponse>( - '/api.v1.PlaygroundService/GetDefaultPrecompiledObject', - ($0.GetDefaultPrecompiledObjectRequest value) => value.writeToBuffer(), + static final _$getDefaultExample = $grpc.ClientMethod< + $0.GetDefaultExampleRequest, $0.GetDefaultExampleResponse>( + '/api.v1.PlaygroundService/GetDefaultExample', + ($0.GetDefaultExampleRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => - $0.GetDefaultPrecompiledObjectResponse.fromBuffer(value)); + $0.GetDefaultExampleResponse.fromBuffer(value)); PlaygroundServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -228,11 +227,10 @@ class PlaygroundServiceClient extends $grpc.Client { options: options); } - $grpc.ResponseFuture<$0.GetDefaultPrecompiledObjectResponse> - getDefaultPrecompiledObject($0.GetDefaultPrecompiledObjectRequest request, - {$grpc.CallOptions? options}) { - return $createUnaryCall(_$getDefaultPrecompiledObject, request, - options: options); + $grpc.ResponseFuture<$0.GetDefaultExampleResponse> getDefaultExample( + $0.GetDefaultExampleRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getDefaultExample, request, options: options); } } @@ -368,16 +366,15 @@ abstract class PlaygroundServiceBase extends $grpc.Service { ($core.List<$core.int> value) => $0.GetPrecompiledObjectGraphRequest.fromBuffer(value), ($0.GetPrecompiledObjectGraphResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$0.GetDefaultPrecompiledObjectRequest, - $0.GetDefaultPrecompiledObjectResponse>( - 'GetDefaultPrecompiledObject', - getDefaultPrecompiledObject_Pre, + $addMethod($grpc.ServiceMethod<$0.GetDefaultExampleRequest, + $0.GetDefaultExampleResponse>( + 'GetDefaultExample', + getDefaultExample_Pre, false, false, ($core.List<$core.int> value) => - $0.GetDefaultPrecompiledObjectRequest.fromBuffer(value), - ($0.GetDefaultPrecompiledObjectResponse value) => - value.writeToBuffer())); + $0.GetDefaultExampleRequest.fromBuffer(value), + ($0.GetDefaultExampleResponse value) => value.writeToBuffer())); } $async.Future<$0.RunCodeResponse> runCode_Pre( @@ -464,10 +461,10 @@ abstract class PlaygroundServiceBase extends $grpc.Service { return getPrecompiledObjectGraph(call, await request); } - $async.Future<$0.GetDefaultPrecompiledObjectResponse> - getDefaultPrecompiledObject_Pre($grpc.ServiceCall call, - $async.Future<$0.GetDefaultPrecompiledObjectRequest> request) async { - return getDefaultPrecompiledObject(call, await request); + $async.Future<$0.GetDefaultExampleResponse> getDefaultExample_Pre( + $grpc.ServiceCall call, + $async.Future<$0.GetDefaultExampleRequest> request) async { + return getDefaultExample(call, await request); } $async.Future<$0.RunCodeResponse> runCode( @@ -501,7 +498,6 @@ abstract class PlaygroundServiceBase extends $grpc.Service { $grpc.ServiceCall call, $0.GetPrecompiledObjectLogsRequest request); $async.Future<$0.GetPrecompiledObjectGraphResponse> getPrecompiledObjectGraph( $grpc.ServiceCall call, $0.GetPrecompiledObjectGraphRequest request); - $async.Future<$0.GetDefaultPrecompiledObjectResponse> - getDefaultPrecompiledObject($grpc.ServiceCall call, - $0.GetDefaultPrecompiledObjectRequest request); + $async.Future<$0.GetDefaultExampleResponse> getDefaultExample( + $grpc.ServiceCall call, $0.GetDefaultExampleRequest request); } diff --git a/playground/frontend/lib/api/v1/api.pbjson.dart b/playground/frontend/lib/api/v1/api.pbjson.dart index a952e8404987..0b16c4fdf3e2 100644 --- a/playground/frontend/lib/api/v1/api.pbjson.dart +++ b/playground/frontend/lib/api/v1/api.pbjson.dart @@ -292,6 +292,17 @@ const PrecompiledObject$json = const { /// Descriptor for `PrecompiledObject`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List precompiledObjectDescriptor = $convert.base64Decode('ChFQcmVjb21waWxlZE9iamVjdBIdCgpjbG91ZF9wYXRoGAEgASgJUgljbG91ZFBhdGgSEgoEbmFtZRgCIAEoCVIEbmFtZRIgCgtkZXNjcmlwdGlvbhgDIAEoCVILZGVzY3JpcHRpb24SMQoEdHlwZRgEIAEoDjIdLmFwaS52MS5QcmVjb21waWxlZE9iamVjdFR5cGVSBHR5cGUSKQoQcGlwZWxpbmVfb3B0aW9ucxgFIAEoCVIPcGlwZWxpbmVPcHRpb25zEhIKBGxpbmsYBiABKAlSBGxpbmsSHAoJbXVsdGlmaWxlGAcgASgIUgltdWx0aWZpbGUSIQoMY29udGV4dF9saW5lGAggASgFUgtjb250ZXh0TGluZRInCg9kZWZhdWx0X2V4YW1wbGUYCSABKAhSDmRlZmF1bHRFeGFtcGxl'); +@$core.Deprecated('Use defaultExampleDescriptor instead') +const DefaultExample$json = const { + '1': 'DefaultExample', + '2': const [ + const {'1': 'precompiled_object', '3': 1, '4': 1, '5': 11, '6': '.api.v1.PrecompiledObject', '10': 'precompiledObject'}, + const {'1': 'code', '3': 2, '4': 1, '5': 9, '10': 'code'}, + ], +}; + +/// Descriptor for `DefaultExample`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List defaultExampleDescriptor = $convert.base64Decode('Cg5EZWZhdWx0RXhhbXBsZRJIChJwcmVjb21waWxlZF9vYmplY3QYASABKAsyGS5hcGkudjEuUHJlY29tcGlsZWRPYmplY3RSEXByZWNvbXBpbGVkT2JqZWN0EhIKBGNvZGUYAiABKAlSBGNvZGU='); @$core.Deprecated('Use categoriesDescriptor instead') const Categories$json = const { '1': 'Categories', @@ -364,16 +375,16 @@ const GetPrecompiledObjectGraphRequest$json = const { /// Descriptor for `GetPrecompiledObjectGraphRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List getPrecompiledObjectGraphRequestDescriptor = $convert.base64Decode('CiBHZXRQcmVjb21waWxlZE9iamVjdEdyYXBoUmVxdWVzdBIdCgpjbG91ZF9wYXRoGAEgASgJUgljbG91ZFBhdGg='); -@$core.Deprecated('Use getDefaultPrecompiledObjectRequestDescriptor instead') -const GetDefaultPrecompiledObjectRequest$json = const { - '1': 'GetDefaultPrecompiledObjectRequest', +@$core.Deprecated('Use getDefaultExampleRequestDescriptor instead') +const GetDefaultExampleRequest$json = const { + '1': 'GetDefaultExampleRequest', '2': const [ const {'1': 'sdk', '3': 1, '4': 1, '5': 14, '6': '.api.v1.Sdk', '10': 'sdk'}, ], }; -/// Descriptor for `GetDefaultPrecompiledObjectRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getDefaultPrecompiledObjectRequestDescriptor = $convert.base64Decode('CiJHZXREZWZhdWx0UHJlY29tcGlsZWRPYmplY3RSZXF1ZXN0Eh0KA3NkaxgBIAEoDjILLmFwaS52MS5TZGtSA3Nkaw=='); +/// Descriptor for `GetDefaultExampleRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getDefaultExampleRequestDescriptor = $convert.base64Decode('ChhHZXREZWZhdWx0RXhhbXBsZVJlcXVlc3QSHQoDc2RrGAEgASgOMgsuYXBpLnYxLlNka1IDc2Rr'); @$core.Deprecated('Use getPrecompiledObjectsResponseDescriptor instead') const GetPrecompiledObjectsResponse$json = const { '1': 'GetPrecompiledObjectsResponse', @@ -424,13 +435,13 @@ const GetPrecompiledObjectGraphResponse$json = const { /// Descriptor for `GetPrecompiledObjectGraphResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List getPrecompiledObjectGraphResponseDescriptor = $convert.base64Decode('CiFHZXRQcmVjb21waWxlZE9iamVjdEdyYXBoUmVzcG9uc2USFAoFZ3JhcGgYASABKAlSBWdyYXBo'); -@$core.Deprecated('Use getDefaultPrecompiledObjectResponseDescriptor instead') -const GetDefaultPrecompiledObjectResponse$json = const { - '1': 'GetDefaultPrecompiledObjectResponse', +@$core.Deprecated('Use getDefaultExampleResponseDescriptor instead') +const GetDefaultExampleResponse$json = const { + '1': 'GetDefaultExampleResponse', '2': const [ - const {'1': 'precompiled_object', '3': 1, '4': 1, '5': 11, '6': '.api.v1.PrecompiledObject', '10': 'precompiledObject'}, + const {'1': 'default_example', '3': 1, '4': 1, '5': 11, '6': '.api.v1.DefaultExample', '10': 'defaultExample'}, ], }; -/// Descriptor for `GetDefaultPrecompiledObjectResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getDefaultPrecompiledObjectResponseDescriptor = $convert.base64Decode('CiNHZXREZWZhdWx0UHJlY29tcGlsZWRPYmplY3RSZXNwb25zZRJIChJwcmVjb21waWxlZF9vYmplY3QYASABKAsyGS5hcGkudjEuUHJlY29tcGlsZWRPYmplY3RSEXByZWNvbXBpbGVkT2JqZWN0'); +/// Descriptor for `GetDefaultExampleResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getDefaultExampleResponseDescriptor = $convert.base64Decode('ChlHZXREZWZhdWx0RXhhbXBsZVJlc3BvbnNlEj8KD2RlZmF1bHRfZXhhbXBsZRgBIAEoCzIWLmFwaS52MS5EZWZhdWx0RXhhbXBsZVIOZGVmYXVsdEV4YW1wbGU='); From 1ea1026394b48e76f9da7d9cda8da78baaf48bfc Mon Sep 17 00:00:00 2001 From: Pavel Avilov Date: Wed, 9 Feb 2022 14:37:13 +0300 Subject: [PATCH 31/36] Revert "Add code of the default example to response" This reverts commit da6baa0aaa272190d4a035568a5e4db0b093dfd9. --- playground/api/v1/api.proto | 20 +- playground/backend/cmd/server/controller.go | 22 +- playground/backend/cmd/server/server.go | 8 +- playground/backend/internal/api/v1/api.pb.go | 712 ++++++++---------- .../backend/internal/api/v1/api_grpc.pb.go | 32 +- playground/backend/internal/cache/cache.go | 10 +- .../internal/cache/local/local_cache.go | 30 +- .../internal/cache/redis/redis_cache.go | 22 +- .../cloud_bucket/precompiled_objects.go | 19 +- .../utils/precompiled_objects_utils.go | 27 +- .../utils/precompiled_objects_utils_test.go | 25 +- playground/frontend/lib/api/v1/api.pb.dart | 133 +--- .../frontend/lib/api/v1/api.pbgrpc.dart | 46 +- .../frontend/lib/api/v1/api.pbjson.dart | 33 +- 14 files changed, 484 insertions(+), 655 deletions(-) diff --git a/playground/api/v1/api.proto b/playground/api/v1/api.proto index da105e1184d7..bddb56bda5c7 100644 --- a/playground/api/v1/api.proto +++ b/playground/api/v1/api.proto @@ -168,12 +168,6 @@ message PrecompiledObject{ bool default_example = 9; } -// DefaultExample represents the default PrecompiledObject and his code -message DefaultExample{ - PrecompiledObject precompiled_object = 1; - string code = 2; -} - // Categories represent the array of messages with sdk and categories at this sdk message Categories{ message Category{ @@ -210,8 +204,8 @@ message GetPrecompiledObjectGraphRequest{ string cloud_path = 1; } -// GetDefaultExampleRequest contains information of the needed PrecompiledObject sdk. -message GetDefaultExampleRequest { +// GetDefaultPrecompiledObjectRequest contains information of the needed PrecompiledObject sdk. +message GetDefaultPrecompiledObjectRequest { Sdk sdk = 1; } @@ -240,9 +234,9 @@ message GetPrecompiledObjectGraphResponse { string graph = 1; } -// GetDefaultExampleResponse represents the default PrecompiledObject and his code for the sdk. -message GetDefaultExampleResponse { - DefaultExample default_example = 1; +// GetDefaultPrecompiledObjectResponse represents the default PrecompiledObject and his category for the sdk. +message GetDefaultPrecompiledObjectResponse { + PrecompiledObject precompiled_object = 1; } service PlaygroundService { @@ -292,6 +286,6 @@ service PlaygroundService { // Get the graph of an PrecompiledObject. rpc GetPrecompiledObjectGraph(GetPrecompiledObjectGraphRequest) returns (GetPrecompiledObjectGraphResponse); - // Get the default example for the sdk. - rpc GetDefaultExample(GetDefaultExampleRequest) returns (GetDefaultExampleResponse); + // Get the default precompile object for the sdk. + rpc GetDefaultPrecompiledObject(GetDefaultPrecompiledObjectRequest) returns (GetDefaultPrecompiledObjectResponse); } diff --git a/playground/backend/cmd/server/controller.go b/playground/backend/cmd/server/controller.go index 5180c48a3b1e..06d6d62b2adb 100644 --- a/playground/backend/cmd/server/controller.go +++ b/playground/backend/cmd/server/controller.go @@ -318,18 +318,26 @@ func (controller *playgroundController) GetPrecompiledObjectGraph(ctx context.Co return &response, nil } -// GetDefaultExample returns the default precompile object for sdk. -func (controller *playgroundController) GetDefaultExample(ctx context.Context, info *pb.GetDefaultExampleRequest) (*pb.GetDefaultExampleResponse, error) { +// GetDefaultPrecompiledObject returns the default precompile object for sdk. +func (controller *playgroundController) GetDefaultPrecompiledObject(ctx context.Context, info *pb.GetDefaultPrecompiledObjectRequest) (*pb.GetDefaultPrecompiledObjectResponse, error) { switch info.Sdk { case pb.Sdk_SDK_UNSPECIFIED: - logger.Errorf("GetDefaultExample(): unimplemented sdk: %s\n", info.Sdk) + logger.Errorf("GetDefaultPrecompiledObject(): unimplemented sdk: %s\n", info.Sdk) return nil, errors.InvalidArgumentError("Error during preparing", "Sdk is not implemented yet: %s", info.Sdk.String()) } - defaultExample, err := utils.GetDefaultExample(ctx, info.Sdk, controller.cacheService) + precompiledObject, err := utils.GetDefaultPrecompiledObject(ctx, info.Sdk, controller.cacheService) if err != nil { - logger.Errorf("GetDefaultExample(): error during getting default example: %s", err.Error()) - return nil, errors.InternalError("Error during getting Default Examples", "Error with cloud connection") + logger.Errorf("GetDefaultPrecompiledObject(): error during getting catalog: %s", err.Error()) + return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") } - response := pb.GetDefaultExampleResponse{DefaultExample: defaultExample} + response := pb.GetDefaultPrecompiledObjectResponse{PrecompiledObject: &pb.PrecompiledObject{ + CloudPath: precompiledObject.CloudPath, + Name: precompiledObject.Name, + Description: precompiledObject.Description, + Type: precompiledObject.Type, + PipelineOptions: precompiledObject.PipelineOptions, + Link: precompiledObject.Link, + DefaultExample: precompiledObject.DefaultExample, + }} return &response, nil } diff --git a/playground/backend/cmd/server/server.go b/playground/backend/cmd/server/server.go index a70626933aa1..abbb37a3c6e0 100644 --- a/playground/backend/cmd/server/server.go +++ b/playground/backend/cmd/server/server.go @@ -119,7 +119,7 @@ func setupCache(ctx context.Context, appEnv environment.ApplicationEnvs) (cache. } } -// setupExamplesCatalog saves precompiled objects catalog and default example from storage to cache +// setupExamplesCatalog saves precompiled objects catalog from storage to cache func setupExamplesCatalog(ctx context.Context, cacheService cache.Cache) error { catalog, err := utils.GetCatalogFromStorage(ctx) if err != nil { @@ -130,12 +130,12 @@ func setupExamplesCatalog(ctx context.Context, cacheService cache.Cache) error { } bucket := cloud_bucket.New() - defaultExamples, err := bucket.GetDefaultExamples(ctx) + defaultPrecompiledObjects, err := bucket.GetDefaultPrecompiledObjects(ctx) if err != nil { return err } - for sdk, defaultExample := range defaultExamples { - if err := cacheService.SetDefaultExample(ctx, sdk, defaultExample); err != nil { + for sdk, precompiledObject := range defaultPrecompiledObjects { + if err := cacheService.SetDefaultPrecompiledObject(ctx, sdk, precompiledObject); err != nil { logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) return err } diff --git a/playground/backend/internal/api/v1/api.pb.go b/playground/backend/internal/api/v1/api.pb.go index d2644b1ef60d..95023091aaca 100644 --- a/playground/backend/internal/api/v1/api.pb.go +++ b/playground/backend/internal/api/v1/api.pb.go @@ -1304,62 +1304,6 @@ func (x *PrecompiledObject) GetDefaultExample() bool { return false } -// DefaultExample represents the default PrecompiledObject and his code -type DefaultExample struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PrecompiledObject *PrecompiledObject `protobuf:"bytes,1,opt,name=precompiled_object,json=precompiledObject,proto3" json:"precompiled_object,omitempty"` - Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` -} - -func (x *DefaultExample) Reset() { - *x = DefaultExample{} - if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DefaultExample) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DefaultExample) ProtoMessage() {} - -func (x *DefaultExample) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[21] - 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 DefaultExample.ProtoReflect.Descriptor instead. -func (*DefaultExample) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{21} -} - -func (x *DefaultExample) GetPrecompiledObject() *PrecompiledObject { - if x != nil { - return x.PrecompiledObject - } - return nil -} - -func (x *DefaultExample) GetCode() string { - if x != nil { - return x.Code - } - return "" -} - // Categories represent the array of messages with sdk and categories at this sdk type Categories struct { state protoimpl.MessageState @@ -1373,7 +1317,7 @@ type Categories struct { func (x *Categories) Reset() { *x = Categories{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[22] + mi := &file_api_v1_api_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1386,7 +1330,7 @@ func (x *Categories) String() string { func (*Categories) ProtoMessage() {} func (x *Categories) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[22] + mi := &file_api_v1_api_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1399,7 +1343,7 @@ func (x *Categories) ProtoReflect() protoreflect.Message { // Deprecated: Use Categories.ProtoReflect.Descriptor instead. func (*Categories) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{22} + return file_api_v1_api_proto_rawDescGZIP(), []int{21} } func (x *Categories) GetSdk() Sdk { @@ -1429,7 +1373,7 @@ type GetPrecompiledObjectsRequest struct { func (x *GetPrecompiledObjectsRequest) Reset() { *x = GetPrecompiledObjectsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[23] + mi := &file_api_v1_api_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1442,7 +1386,7 @@ func (x *GetPrecompiledObjectsRequest) String() string { func (*GetPrecompiledObjectsRequest) ProtoMessage() {} func (x *GetPrecompiledObjectsRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[23] + mi := &file_api_v1_api_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1455,7 +1399,7 @@ func (x *GetPrecompiledObjectsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPrecompiledObjectsRequest.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectsRequest) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{23} + return file_api_v1_api_proto_rawDescGZIP(), []int{22} } func (x *GetPrecompiledObjectsRequest) GetSdk() Sdk { @@ -1484,7 +1428,7 @@ type GetPrecompiledObjectCodeRequest struct { func (x *GetPrecompiledObjectCodeRequest) Reset() { *x = GetPrecompiledObjectCodeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[24] + mi := &file_api_v1_api_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1497,7 +1441,7 @@ func (x *GetPrecompiledObjectCodeRequest) String() string { func (*GetPrecompiledObjectCodeRequest) ProtoMessage() {} func (x *GetPrecompiledObjectCodeRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[24] + mi := &file_api_v1_api_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1510,7 +1454,7 @@ func (x *GetPrecompiledObjectCodeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPrecompiledObjectCodeRequest.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectCodeRequest) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{24} + return file_api_v1_api_proto_rawDescGZIP(), []int{23} } func (x *GetPrecompiledObjectCodeRequest) GetCloudPath() string { @@ -1532,7 +1476,7 @@ type GetPrecompiledObjectOutputRequest struct { func (x *GetPrecompiledObjectOutputRequest) Reset() { *x = GetPrecompiledObjectOutputRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[25] + mi := &file_api_v1_api_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1545,7 +1489,7 @@ func (x *GetPrecompiledObjectOutputRequest) String() string { func (*GetPrecompiledObjectOutputRequest) ProtoMessage() {} func (x *GetPrecompiledObjectOutputRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[25] + mi := &file_api_v1_api_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1558,7 +1502,7 @@ func (x *GetPrecompiledObjectOutputRequest) ProtoReflect() protoreflect.Message // Deprecated: Use GetPrecompiledObjectOutputRequest.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectOutputRequest) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{25} + return file_api_v1_api_proto_rawDescGZIP(), []int{24} } func (x *GetPrecompiledObjectOutputRequest) GetCloudPath() string { @@ -1580,7 +1524,7 @@ type GetPrecompiledObjectLogsRequest struct { func (x *GetPrecompiledObjectLogsRequest) Reset() { *x = GetPrecompiledObjectLogsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[26] + mi := &file_api_v1_api_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1593,7 +1537,7 @@ func (x *GetPrecompiledObjectLogsRequest) String() string { func (*GetPrecompiledObjectLogsRequest) ProtoMessage() {} func (x *GetPrecompiledObjectLogsRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[26] + mi := &file_api_v1_api_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1606,7 +1550,7 @@ func (x *GetPrecompiledObjectLogsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPrecompiledObjectLogsRequest.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectLogsRequest) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{26} + return file_api_v1_api_proto_rawDescGZIP(), []int{25} } func (x *GetPrecompiledObjectLogsRequest) GetCloudPath() string { @@ -1628,7 +1572,7 @@ type GetPrecompiledObjectGraphRequest struct { func (x *GetPrecompiledObjectGraphRequest) Reset() { *x = GetPrecompiledObjectGraphRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[27] + mi := &file_api_v1_api_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1641,7 +1585,7 @@ func (x *GetPrecompiledObjectGraphRequest) String() string { func (*GetPrecompiledObjectGraphRequest) ProtoMessage() {} func (x *GetPrecompiledObjectGraphRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[27] + mi := &file_api_v1_api_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1654,7 +1598,7 @@ func (x *GetPrecompiledObjectGraphRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPrecompiledObjectGraphRequest.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectGraphRequest) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{27} + return file_api_v1_api_proto_rawDescGZIP(), []int{26} } func (x *GetPrecompiledObjectGraphRequest) GetCloudPath() string { @@ -1664,8 +1608,8 @@ func (x *GetPrecompiledObjectGraphRequest) GetCloudPath() string { return "" } -// GetDefaultExampleRequest contains information of the needed PrecompiledObject sdk. -type GetDefaultExampleRequest struct { +// GetDefaultPrecompiledObjectRequest contains information of the needed PrecompiledObject sdk. +type GetDefaultPrecompiledObjectRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1673,23 +1617,23 @@ type GetDefaultExampleRequest struct { Sdk Sdk `protobuf:"varint,1,opt,name=sdk,proto3,enum=api.v1.Sdk" json:"sdk,omitempty"` } -func (x *GetDefaultExampleRequest) Reset() { - *x = GetDefaultExampleRequest{} +func (x *GetDefaultPrecompiledObjectRequest) Reset() { + *x = GetDefaultPrecompiledObjectRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[28] + mi := &file_api_v1_api_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetDefaultExampleRequest) String() string { +func (x *GetDefaultPrecompiledObjectRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetDefaultExampleRequest) ProtoMessage() {} +func (*GetDefaultPrecompiledObjectRequest) ProtoMessage() {} -func (x *GetDefaultExampleRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[28] +func (x *GetDefaultPrecompiledObjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_api_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1700,12 +1644,12 @@ func (x *GetDefaultExampleRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetDefaultExampleRequest.ProtoReflect.Descriptor instead. -func (*GetDefaultExampleRequest) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{28} +// Deprecated: Use GetDefaultPrecompiledObjectRequest.ProtoReflect.Descriptor instead. +func (*GetDefaultPrecompiledObjectRequest) Descriptor() ([]byte, []int) { + return file_api_v1_api_proto_rawDescGZIP(), []int{27} } -func (x *GetDefaultExampleRequest) GetSdk() Sdk { +func (x *GetDefaultPrecompiledObjectRequest) GetSdk() Sdk { if x != nil { return x.Sdk } @@ -1724,7 +1668,7 @@ type GetPrecompiledObjectsResponse struct { func (x *GetPrecompiledObjectsResponse) Reset() { *x = GetPrecompiledObjectsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[29] + mi := &file_api_v1_api_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1737,7 +1681,7 @@ func (x *GetPrecompiledObjectsResponse) String() string { func (*GetPrecompiledObjectsResponse) ProtoMessage() {} func (x *GetPrecompiledObjectsResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[29] + mi := &file_api_v1_api_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1750,7 +1694,7 @@ func (x *GetPrecompiledObjectsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPrecompiledObjectsResponse.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectsResponse) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{29} + return file_api_v1_api_proto_rawDescGZIP(), []int{28} } func (x *GetPrecompiledObjectsResponse) GetSdkCategories() []*Categories { @@ -1772,7 +1716,7 @@ type GetPrecompiledObjectCodeResponse struct { func (x *GetPrecompiledObjectCodeResponse) Reset() { *x = GetPrecompiledObjectCodeResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[30] + mi := &file_api_v1_api_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1785,7 +1729,7 @@ func (x *GetPrecompiledObjectCodeResponse) String() string { func (*GetPrecompiledObjectCodeResponse) ProtoMessage() {} func (x *GetPrecompiledObjectCodeResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[30] + mi := &file_api_v1_api_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1798,7 +1742,7 @@ func (x *GetPrecompiledObjectCodeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPrecompiledObjectCodeResponse.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectCodeResponse) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{30} + return file_api_v1_api_proto_rawDescGZIP(), []int{29} } func (x *GetPrecompiledObjectCodeResponse) GetCode() string { @@ -1820,7 +1764,7 @@ type GetPrecompiledObjectOutputResponse struct { func (x *GetPrecompiledObjectOutputResponse) Reset() { *x = GetPrecompiledObjectOutputResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[31] + mi := &file_api_v1_api_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1833,7 +1777,7 @@ func (x *GetPrecompiledObjectOutputResponse) String() string { func (*GetPrecompiledObjectOutputResponse) ProtoMessage() {} func (x *GetPrecompiledObjectOutputResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[31] + mi := &file_api_v1_api_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1846,7 +1790,7 @@ func (x *GetPrecompiledObjectOutputResponse) ProtoReflect() protoreflect.Message // Deprecated: Use GetPrecompiledObjectOutputResponse.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectOutputResponse) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{31} + return file_api_v1_api_proto_rawDescGZIP(), []int{30} } func (x *GetPrecompiledObjectOutputResponse) GetOutput() string { @@ -1868,7 +1812,7 @@ type GetPrecompiledObjectLogsResponse struct { func (x *GetPrecompiledObjectLogsResponse) Reset() { *x = GetPrecompiledObjectLogsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[32] + mi := &file_api_v1_api_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1881,7 +1825,7 @@ func (x *GetPrecompiledObjectLogsResponse) String() string { func (*GetPrecompiledObjectLogsResponse) ProtoMessage() {} func (x *GetPrecompiledObjectLogsResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[32] + mi := &file_api_v1_api_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1894,7 +1838,7 @@ func (x *GetPrecompiledObjectLogsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPrecompiledObjectLogsResponse.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectLogsResponse) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{32} + return file_api_v1_api_proto_rawDescGZIP(), []int{31} } func (x *GetPrecompiledObjectLogsResponse) GetOutput() string { @@ -1916,7 +1860,7 @@ type GetPrecompiledObjectGraphResponse struct { func (x *GetPrecompiledObjectGraphResponse) Reset() { *x = GetPrecompiledObjectGraphResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[33] + mi := &file_api_v1_api_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1929,7 +1873,7 @@ func (x *GetPrecompiledObjectGraphResponse) String() string { func (*GetPrecompiledObjectGraphResponse) ProtoMessage() {} func (x *GetPrecompiledObjectGraphResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[33] + mi := &file_api_v1_api_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1942,7 +1886,7 @@ func (x *GetPrecompiledObjectGraphResponse) ProtoReflect() protoreflect.Message // Deprecated: Use GetPrecompiledObjectGraphResponse.ProtoReflect.Descriptor instead. func (*GetPrecompiledObjectGraphResponse) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{33} + return file_api_v1_api_proto_rawDescGZIP(), []int{32} } func (x *GetPrecompiledObjectGraphResponse) GetGraph() string { @@ -1952,32 +1896,32 @@ func (x *GetPrecompiledObjectGraphResponse) GetGraph() string { return "" } -// GetDefaultExampleResponse represents the default PrecompiledObject and his code for the sdk. -type GetDefaultExampleResponse struct { +// GetDefaultPrecompiledObjectResponse represents the default PrecompiledObject and his category for the sdk. +type GetDefaultPrecompiledObjectResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DefaultExample *DefaultExample `protobuf:"bytes,1,opt,name=default_example,json=defaultExample,proto3" json:"default_example,omitempty"` + PrecompiledObject *PrecompiledObject `protobuf:"bytes,1,opt,name=precompiled_object,json=precompiledObject,proto3" json:"precompiled_object,omitempty"` } -func (x *GetDefaultExampleResponse) Reset() { - *x = GetDefaultExampleResponse{} +func (x *GetDefaultPrecompiledObjectResponse) Reset() { + *x = GetDefaultPrecompiledObjectResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[34] + mi := &file_api_v1_api_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetDefaultExampleResponse) String() string { +func (x *GetDefaultPrecompiledObjectResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetDefaultExampleResponse) ProtoMessage() {} +func (*GetDefaultPrecompiledObjectResponse) ProtoMessage() {} -func (x *GetDefaultExampleResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[34] +func (x *GetDefaultPrecompiledObjectResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_api_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1988,14 +1932,14 @@ func (x *GetDefaultExampleResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetDefaultExampleResponse.ProtoReflect.Descriptor instead. -func (*GetDefaultExampleResponse) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{34} +// Deprecated: Use GetDefaultPrecompiledObjectResponse.ProtoReflect.Descriptor instead. +func (*GetDefaultPrecompiledObjectResponse) Descriptor() ([]byte, []int) { + return file_api_v1_api_proto_rawDescGZIP(), []int{33} } -func (x *GetDefaultExampleResponse) GetDefaultExample() *DefaultExample { +func (x *GetDefaultPrecompiledObjectResponse) GetPrecompiledObject() *PrecompiledObject { if x != nil { - return x.DefaultExample + return x.PrecompiledObject } return nil } @@ -2012,7 +1956,7 @@ type Categories_Category struct { func (x *Categories_Category) Reset() { *x = Categories_Category{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_api_proto_msgTypes[35] + mi := &file_api_v1_api_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2025,7 +1969,7 @@ func (x *Categories_Category) String() string { func (*Categories_Category) ProtoMessage() {} func (x *Categories_Category) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_api_proto_msgTypes[35] + mi := &file_api_v1_api_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2038,7 +1982,7 @@ func (x *Categories_Category) ProtoReflect() protoreflect.Message { // Deprecated: Use Categories_Category.ProtoReflect.Descriptor instead. func (*Categories_Category) Descriptor() ([]byte, []int) { - return file_api_v1_api_proto_rawDescGZIP(), []int{22, 0} + return file_api_v1_api_proto_rawDescGZIP(), []int{21, 0} } func (x *Categories_Category) GetCategoryName() string { @@ -2151,13 +2095,6 @@ var file_api_v1_api_proto_rawDesc = []byte{ 0x78, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x22, - 0x6e, 0x0a, 0x0e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x12, 0x48, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, - 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, - 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x11, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, - 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0xe5, 0x01, 0x0a, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x03, 0x73, 0x64, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x64, 0x6b, 0x52, 0x03, 0x73, 0x64, 0x6b, 0x12, 0x3b, 0x0a, @@ -2194,166 +2131,169 @@ var file_api_v1_api_proto_rawDesc = []byte{ 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x39, 0x0a, - 0x18, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x61, 0x6d, 0x70, - 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x03, 0x73, 0x64, 0x6b, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x64, 0x6b, 0x52, 0x03, 0x73, 0x64, 0x6b, 0x22, 0x5a, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x50, - 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0e, 0x73, 0x64, 0x6b, - 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, - 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x0d, 0x73, 0x64, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, - 0x72, 0x69, 0x65, 0x73, 0x22, 0x36, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, - 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x3c, 0x0a, 0x22, - 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x3a, 0x0a, 0x20, 0x47, 0x65, - 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x39, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, - 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, - 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x67, - 0x72, 0x61, 0x70, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x61, 0x70, - 0x68, 0x22, 0x5c, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, - 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, - 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, - 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2a, - 0x52, 0x0a, 0x03, 0x53, 0x64, 0x6b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x44, 0x4b, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, - 0x44, 0x4b, 0x5f, 0x4a, 0x41, 0x56, 0x41, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x44, 0x4b, - 0x5f, 0x47, 0x4f, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x44, 0x4b, 0x5f, 0x50, 0x59, 0x54, - 0x48, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, 0x53, 0x43, 0x49, - 0x4f, 0x10, 0x04, 0x2a, 0xb8, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, - 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1b, 0x0a, - 0x17, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, - 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, - 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x14, - 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x49, - 0x4e, 0x47, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, - 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x06, 0x12, 0x14, - 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, - 0x4e, 0x47, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, - 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x09, 0x12, - 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, - 0x0a, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, - 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x0c, 0x2a, 0xae, - 0x01, 0x0a, 0x15, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x23, 0x50, 0x52, 0x45, 0x43, - 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, - 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x41, - 0x4d, 0x50, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, - 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x4b, 0x41, 0x54, 0x41, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x50, 0x52, 0x45, 0x43, - 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x03, 0x32, - 0xfd, 0x0a, 0x0a, 0x11, 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, - 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, 0x74, - 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, - 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x3d, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x17, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x46, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x22, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, - 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, - 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, - 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, - 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, - 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, - 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x37, 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x15, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, - 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, - 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x61, 0x74, 0x68, 0x22, 0x43, 0x0a, + 0x22, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x03, 0x73, 0x64, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x64, 0x6b, 0x52, 0x03, 0x73, + 0x64, 0x6b, 0x22, 0x5a, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0e, 0x73, 0x64, 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, + 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, + 0x0d, 0x73, 0x64, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0x36, + 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x3c, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x22, 0x3a, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x22, 0x39, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x70, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x61, 0x70, 0x68, 0x22, 0x6f, 0x0a, 0x23, 0x47, + 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x11, 0x70, 0x72, 0x65, 0x63, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2a, 0x52, 0x0a, 0x03, + 0x53, 0x64, 0x6b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x44, 0x4b, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, + 0x4a, 0x41, 0x56, 0x41, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x44, 0x4b, 0x5f, 0x47, 0x4f, + 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x44, 0x4b, 0x5f, 0x50, 0x59, 0x54, 0x48, 0x4f, 0x4e, + 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x44, 0x4b, 0x5f, 0x53, 0x43, 0x49, 0x4f, 0x10, 0x04, + 0x2a, 0xb8, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, + 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x1c, 0x0a, + 0x18, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x49, 0x4e, 0x47, 0x10, + 0x05, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, + 0x49, 0x4c, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4e, 0x47, 0x10, + 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x49, + 0x53, 0x48, 0x45, 0x44, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x09, 0x12, 0x10, 0x0a, 0x0c, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x0a, 0x12, 0x16, + 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x54, 0x49, 0x4d, + 0x45, 0x4f, 0x55, 0x54, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x0c, 0x2a, 0xae, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x23, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, + 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, + 0x0a, 0x1f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, + 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x41, 0x4d, 0x50, 0x4c, + 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, 0x49, 0x4c, + 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4b, + 0x41, 0x54, 0x41, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x50, + 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x03, 0x32, 0x9b, 0x0b, 0x0a, + 0x11, 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x75, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, + 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x52, 0x75, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, + 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, + 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, + 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x22, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x23, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, + 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, + 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, - 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, - 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, + 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x1a, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x73, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x29, 0x2e, + 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x27, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x70, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, - 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, - 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, - 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, - 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, - 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, - 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, - 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, - 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, - 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x20, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, - 0x38, 0x5a, 0x36, 0x62, 0x65, 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x6f, - 0x72, 0x67, 0x2f, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x3b, 0x70, - 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x76, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x12, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x38, 0x5a, 0x36, 0x62, 0x65, + 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x6c, + 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, + 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x3b, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, + 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2369,97 +2309,95 @@ func file_api_v1_api_proto_rawDescGZIP() []byte { } var file_api_v1_api_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_api_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 36) +var file_api_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 35) var file_api_v1_api_proto_goTypes = []interface{}{ - (Sdk)(0), // 0: api.v1.Sdk - (Status)(0), // 1: api.v1.Status - (PrecompiledObjectType)(0), // 2: api.v1.PrecompiledObjectType - (*RunCodeRequest)(nil), // 3: api.v1.RunCodeRequest - (*RunCodeResponse)(nil), // 4: api.v1.RunCodeResponse - (*CheckStatusRequest)(nil), // 5: api.v1.CheckStatusRequest - (*CheckStatusResponse)(nil), // 6: api.v1.CheckStatusResponse - (*GetValidationOutputRequest)(nil), // 7: api.v1.GetValidationOutputRequest - (*GetValidationOutputResponse)(nil), // 8: api.v1.GetValidationOutputResponse - (*GetPreparationOutputRequest)(nil), // 9: api.v1.GetPreparationOutputRequest - (*GetPreparationOutputResponse)(nil), // 10: api.v1.GetPreparationOutputResponse - (*GetCompileOutputRequest)(nil), // 11: api.v1.GetCompileOutputRequest - (*GetCompileOutputResponse)(nil), // 12: api.v1.GetCompileOutputResponse - (*GetRunOutputRequest)(nil), // 13: api.v1.GetRunOutputRequest - (*GetRunOutputResponse)(nil), // 14: api.v1.GetRunOutputResponse - (*GetRunErrorRequest)(nil), // 15: api.v1.GetRunErrorRequest - (*GetRunErrorResponse)(nil), // 16: api.v1.GetRunErrorResponse - (*GetLogsRequest)(nil), // 17: api.v1.GetLogsRequest - (*GetLogsResponse)(nil), // 18: api.v1.GetLogsResponse - (*GetGraphRequest)(nil), // 19: api.v1.GetGraphRequest - (*GetGraphResponse)(nil), // 20: api.v1.GetGraphResponse - (*CancelRequest)(nil), // 21: api.v1.CancelRequest - (*CancelResponse)(nil), // 22: api.v1.CancelResponse - (*PrecompiledObject)(nil), // 23: api.v1.PrecompiledObject - (*DefaultExample)(nil), // 24: api.v1.DefaultExample - (*Categories)(nil), // 25: api.v1.Categories - (*GetPrecompiledObjectsRequest)(nil), // 26: api.v1.GetPrecompiledObjectsRequest - (*GetPrecompiledObjectCodeRequest)(nil), // 27: api.v1.GetPrecompiledObjectCodeRequest - (*GetPrecompiledObjectOutputRequest)(nil), // 28: api.v1.GetPrecompiledObjectOutputRequest - (*GetPrecompiledObjectLogsRequest)(nil), // 29: api.v1.GetPrecompiledObjectLogsRequest - (*GetPrecompiledObjectGraphRequest)(nil), // 30: api.v1.GetPrecompiledObjectGraphRequest - (*GetDefaultExampleRequest)(nil), // 31: api.v1.GetDefaultExampleRequest - (*GetPrecompiledObjectsResponse)(nil), // 32: api.v1.GetPrecompiledObjectsResponse - (*GetPrecompiledObjectCodeResponse)(nil), // 33: api.v1.GetPrecompiledObjectCodeResponse - (*GetPrecompiledObjectOutputResponse)(nil), // 34: api.v1.GetPrecompiledObjectOutputResponse - (*GetPrecompiledObjectLogsResponse)(nil), // 35: api.v1.GetPrecompiledObjectLogsResponse - (*GetPrecompiledObjectGraphResponse)(nil), // 36: api.v1.GetPrecompiledObjectGraphResponse - (*GetDefaultExampleResponse)(nil), // 37: api.v1.GetDefaultExampleResponse - (*Categories_Category)(nil), // 38: api.v1.Categories.Category + (Sdk)(0), // 0: api.v1.Sdk + (Status)(0), // 1: api.v1.Status + (PrecompiledObjectType)(0), // 2: api.v1.PrecompiledObjectType + (*RunCodeRequest)(nil), // 3: api.v1.RunCodeRequest + (*RunCodeResponse)(nil), // 4: api.v1.RunCodeResponse + (*CheckStatusRequest)(nil), // 5: api.v1.CheckStatusRequest + (*CheckStatusResponse)(nil), // 6: api.v1.CheckStatusResponse + (*GetValidationOutputRequest)(nil), // 7: api.v1.GetValidationOutputRequest + (*GetValidationOutputResponse)(nil), // 8: api.v1.GetValidationOutputResponse + (*GetPreparationOutputRequest)(nil), // 9: api.v1.GetPreparationOutputRequest + (*GetPreparationOutputResponse)(nil), // 10: api.v1.GetPreparationOutputResponse + (*GetCompileOutputRequest)(nil), // 11: api.v1.GetCompileOutputRequest + (*GetCompileOutputResponse)(nil), // 12: api.v1.GetCompileOutputResponse + (*GetRunOutputRequest)(nil), // 13: api.v1.GetRunOutputRequest + (*GetRunOutputResponse)(nil), // 14: api.v1.GetRunOutputResponse + (*GetRunErrorRequest)(nil), // 15: api.v1.GetRunErrorRequest + (*GetRunErrorResponse)(nil), // 16: api.v1.GetRunErrorResponse + (*GetLogsRequest)(nil), // 17: api.v1.GetLogsRequest + (*GetLogsResponse)(nil), // 18: api.v1.GetLogsResponse + (*GetGraphRequest)(nil), // 19: api.v1.GetGraphRequest + (*GetGraphResponse)(nil), // 20: api.v1.GetGraphResponse + (*CancelRequest)(nil), // 21: api.v1.CancelRequest + (*CancelResponse)(nil), // 22: api.v1.CancelResponse + (*PrecompiledObject)(nil), // 23: api.v1.PrecompiledObject + (*Categories)(nil), // 24: api.v1.Categories + (*GetPrecompiledObjectsRequest)(nil), // 25: api.v1.GetPrecompiledObjectsRequest + (*GetPrecompiledObjectCodeRequest)(nil), // 26: api.v1.GetPrecompiledObjectCodeRequest + (*GetPrecompiledObjectOutputRequest)(nil), // 27: api.v1.GetPrecompiledObjectOutputRequest + (*GetPrecompiledObjectLogsRequest)(nil), // 28: api.v1.GetPrecompiledObjectLogsRequest + (*GetPrecompiledObjectGraphRequest)(nil), // 29: api.v1.GetPrecompiledObjectGraphRequest + (*GetDefaultPrecompiledObjectRequest)(nil), // 30: api.v1.GetDefaultPrecompiledObjectRequest + (*GetPrecompiledObjectsResponse)(nil), // 31: api.v1.GetPrecompiledObjectsResponse + (*GetPrecompiledObjectCodeResponse)(nil), // 32: api.v1.GetPrecompiledObjectCodeResponse + (*GetPrecompiledObjectOutputResponse)(nil), // 33: api.v1.GetPrecompiledObjectOutputResponse + (*GetPrecompiledObjectLogsResponse)(nil), // 34: api.v1.GetPrecompiledObjectLogsResponse + (*GetPrecompiledObjectGraphResponse)(nil), // 35: api.v1.GetPrecompiledObjectGraphResponse + (*GetDefaultPrecompiledObjectResponse)(nil), // 36: api.v1.GetDefaultPrecompiledObjectResponse + (*Categories_Category)(nil), // 37: api.v1.Categories.Category } var file_api_v1_api_proto_depIdxs = []int32{ 0, // 0: api.v1.RunCodeRequest.sdk:type_name -> api.v1.Sdk 1, // 1: api.v1.CheckStatusResponse.status:type_name -> api.v1.Status 2, // 2: api.v1.PrecompiledObject.type:type_name -> api.v1.PrecompiledObjectType - 23, // 3: api.v1.DefaultExample.precompiled_object:type_name -> api.v1.PrecompiledObject - 0, // 4: api.v1.Categories.sdk:type_name -> api.v1.Sdk - 38, // 5: api.v1.Categories.categories:type_name -> api.v1.Categories.Category - 0, // 6: api.v1.GetPrecompiledObjectsRequest.sdk:type_name -> api.v1.Sdk - 0, // 7: api.v1.GetDefaultExampleRequest.sdk:type_name -> api.v1.Sdk - 25, // 8: api.v1.GetPrecompiledObjectsResponse.sdk_categories:type_name -> api.v1.Categories - 24, // 9: api.v1.GetDefaultExampleResponse.default_example:type_name -> api.v1.DefaultExample - 23, // 10: api.v1.Categories.Category.precompiled_objects:type_name -> api.v1.PrecompiledObject - 3, // 11: api.v1.PlaygroundService.RunCode:input_type -> api.v1.RunCodeRequest - 5, // 12: api.v1.PlaygroundService.CheckStatus:input_type -> api.v1.CheckStatusRequest - 13, // 13: api.v1.PlaygroundService.GetRunOutput:input_type -> api.v1.GetRunOutputRequest - 17, // 14: api.v1.PlaygroundService.GetLogs:input_type -> api.v1.GetLogsRequest - 19, // 15: api.v1.PlaygroundService.GetGraph:input_type -> api.v1.GetGraphRequest - 15, // 16: api.v1.PlaygroundService.GetRunError:input_type -> api.v1.GetRunErrorRequest - 7, // 17: api.v1.PlaygroundService.GetValidationOutput:input_type -> api.v1.GetValidationOutputRequest - 9, // 18: api.v1.PlaygroundService.GetPreparationOutput:input_type -> api.v1.GetPreparationOutputRequest - 11, // 19: api.v1.PlaygroundService.GetCompileOutput:input_type -> api.v1.GetCompileOutputRequest - 21, // 20: api.v1.PlaygroundService.Cancel:input_type -> api.v1.CancelRequest - 26, // 21: api.v1.PlaygroundService.GetPrecompiledObjects:input_type -> api.v1.GetPrecompiledObjectsRequest - 27, // 22: api.v1.PlaygroundService.GetPrecompiledObjectCode:input_type -> api.v1.GetPrecompiledObjectCodeRequest - 28, // 23: api.v1.PlaygroundService.GetPrecompiledObjectOutput:input_type -> api.v1.GetPrecompiledObjectOutputRequest - 29, // 24: api.v1.PlaygroundService.GetPrecompiledObjectLogs:input_type -> api.v1.GetPrecompiledObjectLogsRequest - 30, // 25: api.v1.PlaygroundService.GetPrecompiledObjectGraph:input_type -> api.v1.GetPrecompiledObjectGraphRequest - 31, // 26: api.v1.PlaygroundService.GetDefaultExample:input_type -> api.v1.GetDefaultExampleRequest - 4, // 27: api.v1.PlaygroundService.RunCode:output_type -> api.v1.RunCodeResponse - 6, // 28: api.v1.PlaygroundService.CheckStatus:output_type -> api.v1.CheckStatusResponse - 14, // 29: api.v1.PlaygroundService.GetRunOutput:output_type -> api.v1.GetRunOutputResponse - 18, // 30: api.v1.PlaygroundService.GetLogs:output_type -> api.v1.GetLogsResponse - 20, // 31: api.v1.PlaygroundService.GetGraph:output_type -> api.v1.GetGraphResponse - 16, // 32: api.v1.PlaygroundService.GetRunError:output_type -> api.v1.GetRunErrorResponse - 8, // 33: api.v1.PlaygroundService.GetValidationOutput:output_type -> api.v1.GetValidationOutputResponse - 10, // 34: api.v1.PlaygroundService.GetPreparationOutput:output_type -> api.v1.GetPreparationOutputResponse - 12, // 35: api.v1.PlaygroundService.GetCompileOutput:output_type -> api.v1.GetCompileOutputResponse - 22, // 36: api.v1.PlaygroundService.Cancel:output_type -> api.v1.CancelResponse - 32, // 37: api.v1.PlaygroundService.GetPrecompiledObjects:output_type -> api.v1.GetPrecompiledObjectsResponse - 33, // 38: api.v1.PlaygroundService.GetPrecompiledObjectCode:output_type -> api.v1.GetPrecompiledObjectCodeResponse - 34, // 39: api.v1.PlaygroundService.GetPrecompiledObjectOutput:output_type -> api.v1.GetPrecompiledObjectOutputResponse - 35, // 40: api.v1.PlaygroundService.GetPrecompiledObjectLogs:output_type -> api.v1.GetPrecompiledObjectLogsResponse - 36, // 41: api.v1.PlaygroundService.GetPrecompiledObjectGraph:output_type -> api.v1.GetPrecompiledObjectGraphResponse - 37, // 42: api.v1.PlaygroundService.GetDefaultExample:output_type -> api.v1.GetDefaultExampleResponse - 27, // [27:43] is the sub-list for method output_type - 11, // [11:27] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name + 0, // 3: api.v1.Categories.sdk:type_name -> api.v1.Sdk + 37, // 4: api.v1.Categories.categories:type_name -> api.v1.Categories.Category + 0, // 5: api.v1.GetPrecompiledObjectsRequest.sdk:type_name -> api.v1.Sdk + 0, // 6: api.v1.GetDefaultPrecompiledObjectRequest.sdk:type_name -> api.v1.Sdk + 24, // 7: api.v1.GetPrecompiledObjectsResponse.sdk_categories:type_name -> api.v1.Categories + 23, // 8: api.v1.GetDefaultPrecompiledObjectResponse.precompiled_object:type_name -> api.v1.PrecompiledObject + 23, // 9: api.v1.Categories.Category.precompiled_objects:type_name -> api.v1.PrecompiledObject + 3, // 10: api.v1.PlaygroundService.RunCode:input_type -> api.v1.RunCodeRequest + 5, // 11: api.v1.PlaygroundService.CheckStatus:input_type -> api.v1.CheckStatusRequest + 13, // 12: api.v1.PlaygroundService.GetRunOutput:input_type -> api.v1.GetRunOutputRequest + 17, // 13: api.v1.PlaygroundService.GetLogs:input_type -> api.v1.GetLogsRequest + 19, // 14: api.v1.PlaygroundService.GetGraph:input_type -> api.v1.GetGraphRequest + 15, // 15: api.v1.PlaygroundService.GetRunError:input_type -> api.v1.GetRunErrorRequest + 7, // 16: api.v1.PlaygroundService.GetValidationOutput:input_type -> api.v1.GetValidationOutputRequest + 9, // 17: api.v1.PlaygroundService.GetPreparationOutput:input_type -> api.v1.GetPreparationOutputRequest + 11, // 18: api.v1.PlaygroundService.GetCompileOutput:input_type -> api.v1.GetCompileOutputRequest + 21, // 19: api.v1.PlaygroundService.Cancel:input_type -> api.v1.CancelRequest + 25, // 20: api.v1.PlaygroundService.GetPrecompiledObjects:input_type -> api.v1.GetPrecompiledObjectsRequest + 26, // 21: api.v1.PlaygroundService.GetPrecompiledObjectCode:input_type -> api.v1.GetPrecompiledObjectCodeRequest + 27, // 22: api.v1.PlaygroundService.GetPrecompiledObjectOutput:input_type -> api.v1.GetPrecompiledObjectOutputRequest + 28, // 23: api.v1.PlaygroundService.GetPrecompiledObjectLogs:input_type -> api.v1.GetPrecompiledObjectLogsRequest + 29, // 24: api.v1.PlaygroundService.GetPrecompiledObjectGraph:input_type -> api.v1.GetPrecompiledObjectGraphRequest + 30, // 25: api.v1.PlaygroundService.GetDefaultPrecompiledObject:input_type -> api.v1.GetDefaultPrecompiledObjectRequest + 4, // 26: api.v1.PlaygroundService.RunCode:output_type -> api.v1.RunCodeResponse + 6, // 27: api.v1.PlaygroundService.CheckStatus:output_type -> api.v1.CheckStatusResponse + 14, // 28: api.v1.PlaygroundService.GetRunOutput:output_type -> api.v1.GetRunOutputResponse + 18, // 29: api.v1.PlaygroundService.GetLogs:output_type -> api.v1.GetLogsResponse + 20, // 30: api.v1.PlaygroundService.GetGraph:output_type -> api.v1.GetGraphResponse + 16, // 31: api.v1.PlaygroundService.GetRunError:output_type -> api.v1.GetRunErrorResponse + 8, // 32: api.v1.PlaygroundService.GetValidationOutput:output_type -> api.v1.GetValidationOutputResponse + 10, // 33: api.v1.PlaygroundService.GetPreparationOutput:output_type -> api.v1.GetPreparationOutputResponse + 12, // 34: api.v1.PlaygroundService.GetCompileOutput:output_type -> api.v1.GetCompileOutputResponse + 22, // 35: api.v1.PlaygroundService.Cancel:output_type -> api.v1.CancelResponse + 31, // 36: api.v1.PlaygroundService.GetPrecompiledObjects:output_type -> api.v1.GetPrecompiledObjectsResponse + 32, // 37: api.v1.PlaygroundService.GetPrecompiledObjectCode:output_type -> api.v1.GetPrecompiledObjectCodeResponse + 33, // 38: api.v1.PlaygroundService.GetPrecompiledObjectOutput:output_type -> api.v1.GetPrecompiledObjectOutputResponse + 34, // 39: api.v1.PlaygroundService.GetPrecompiledObjectLogs:output_type -> api.v1.GetPrecompiledObjectLogsResponse + 35, // 40: api.v1.PlaygroundService.GetPrecompiledObjectGraph:output_type -> api.v1.GetPrecompiledObjectGraphResponse + 36, // 41: api.v1.PlaygroundService.GetDefaultPrecompiledObject:output_type -> api.v1.GetDefaultPrecompiledObjectResponse + 26, // [26:42] is the sub-list for method output_type + 10, // [10:26] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_api_v1_api_proto_init() } @@ -2721,7 +2659,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DefaultExample); i { + switch v := v.(*Categories); i { case 0: return &v.state case 1: @@ -2733,7 +2671,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Categories); i { + switch v := v.(*GetPrecompiledObjectsRequest); i { case 0: return &v.state case 1: @@ -2745,7 +2683,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectsRequest); i { + switch v := v.(*GetPrecompiledObjectCodeRequest); i { case 0: return &v.state case 1: @@ -2757,7 +2695,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectCodeRequest); i { + switch v := v.(*GetPrecompiledObjectOutputRequest); i { case 0: return &v.state case 1: @@ -2769,7 +2707,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectOutputRequest); i { + switch v := v.(*GetPrecompiledObjectLogsRequest); i { case 0: return &v.state case 1: @@ -2781,7 +2719,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectLogsRequest); i { + switch v := v.(*GetPrecompiledObjectGraphRequest); i { case 0: return &v.state case 1: @@ -2793,7 +2731,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectGraphRequest); i { + switch v := v.(*GetDefaultPrecompiledObjectRequest); i { case 0: return &v.state case 1: @@ -2805,7 +2743,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetDefaultExampleRequest); i { + switch v := v.(*GetPrecompiledObjectsResponse); i { case 0: return &v.state case 1: @@ -2817,7 +2755,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectsResponse); i { + switch v := v.(*GetPrecompiledObjectCodeResponse); i { case 0: return &v.state case 1: @@ -2829,7 +2767,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectCodeResponse); i { + switch v := v.(*GetPrecompiledObjectOutputResponse); i { case 0: return &v.state case 1: @@ -2841,7 +2779,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectOutputResponse); i { + switch v := v.(*GetPrecompiledObjectLogsResponse); i { case 0: return &v.state case 1: @@ -2853,7 +2791,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectLogsResponse); i { + switch v := v.(*GetPrecompiledObjectGraphResponse); i { case 0: return &v.state case 1: @@ -2865,7 +2803,7 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPrecompiledObjectGraphResponse); i { + switch v := v.(*GetDefaultPrecompiledObjectResponse); i { case 0: return &v.state case 1: @@ -2877,18 +2815,6 @@ func file_api_v1_api_proto_init() { } } file_api_v1_api_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetDefaultExampleResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_v1_api_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Categories_Category); i { case 0: return &v.state @@ -2907,7 +2833,7 @@ func file_api_v1_api_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_v1_api_proto_rawDesc, NumEnums: 3, - NumMessages: 36, + NumMessages: 35, NumExtensions: 0, NumServices: 1, }, diff --git a/playground/backend/internal/api/v1/api_grpc.pb.go b/playground/backend/internal/api/v1/api_grpc.pb.go index 02c8c3c90289..706aa2df4dfa 100644 --- a/playground/backend/internal/api/v1/api_grpc.pb.go +++ b/playground/backend/internal/api/v1/api_grpc.pb.go @@ -65,8 +65,8 @@ type PlaygroundServiceClient interface { GetPrecompiledObjectLogs(ctx context.Context, in *GetPrecompiledObjectLogsRequest, opts ...grpc.CallOption) (*GetPrecompiledObjectLogsResponse, error) // Get the graph of an PrecompiledObject. GetPrecompiledObjectGraph(ctx context.Context, in *GetPrecompiledObjectGraphRequest, opts ...grpc.CallOption) (*GetPrecompiledObjectGraphResponse, error) - // Get the default example for the sdk. - GetDefaultExample(ctx context.Context, in *GetDefaultExampleRequest, opts ...grpc.CallOption) (*GetDefaultExampleResponse, error) + // Get the default precompile object for the sdk. + GetDefaultPrecompiledObject(ctx context.Context, in *GetDefaultPrecompiledObjectRequest, opts ...grpc.CallOption) (*GetDefaultPrecompiledObjectResponse, error) } type playgroundServiceClient struct { @@ -212,9 +212,9 @@ func (c *playgroundServiceClient) GetPrecompiledObjectGraph(ctx context.Context, return out, nil } -func (c *playgroundServiceClient) GetDefaultExample(ctx context.Context, in *GetDefaultExampleRequest, opts ...grpc.CallOption) (*GetDefaultExampleResponse, error) { - out := new(GetDefaultExampleResponse) - err := c.cc.Invoke(ctx, "/api.v1.PlaygroundService/GetDefaultExample", in, out, opts...) +func (c *playgroundServiceClient) GetDefaultPrecompiledObject(ctx context.Context, in *GetDefaultPrecompiledObjectRequest, opts ...grpc.CallOption) (*GetDefaultPrecompiledObjectResponse, error) { + out := new(GetDefaultPrecompiledObjectResponse) + err := c.cc.Invoke(ctx, "/api.v1.PlaygroundService/GetDefaultPrecompiledObject", in, out, opts...) if err != nil { return nil, err } @@ -255,8 +255,8 @@ type PlaygroundServiceServer interface { GetPrecompiledObjectLogs(context.Context, *GetPrecompiledObjectLogsRequest) (*GetPrecompiledObjectLogsResponse, error) // Get the graph of an PrecompiledObject. GetPrecompiledObjectGraph(context.Context, *GetPrecompiledObjectGraphRequest) (*GetPrecompiledObjectGraphResponse, error) - // Get the default example for the sdk. - GetDefaultExample(context.Context, *GetDefaultExampleRequest) (*GetDefaultExampleResponse, error) + // Get the default precompile object for the sdk. + GetDefaultPrecompiledObject(context.Context, *GetDefaultPrecompiledObjectRequest) (*GetDefaultPrecompiledObjectResponse, error) } // UnimplementedPlaygroundServiceServer should be embedded to have forward compatible implementations. @@ -308,8 +308,8 @@ func (UnimplementedPlaygroundServiceServer) GetPrecompiledObjectLogs(context.Con func (UnimplementedPlaygroundServiceServer) GetPrecompiledObjectGraph(context.Context, *GetPrecompiledObjectGraphRequest) (*GetPrecompiledObjectGraphResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPrecompiledObjectGraph not implemented") } -func (UnimplementedPlaygroundServiceServer) GetDefaultExample(context.Context, *GetDefaultExampleRequest) (*GetDefaultExampleResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDefaultExample not implemented") +func (UnimplementedPlaygroundServiceServer) GetDefaultPrecompiledObject(context.Context, *GetDefaultPrecompiledObjectRequest) (*GetDefaultPrecompiledObjectResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDefaultPrecompiledObject not implemented") } // UnsafePlaygroundServiceServer may be embedded to opt out of forward compatibility for this service. @@ -593,20 +593,20 @@ func _PlaygroundService_GetPrecompiledObjectGraph_Handler(srv interface{}, ctx c return interceptor(ctx, in, info, handler) } -func _PlaygroundService_GetDefaultExample_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetDefaultExampleRequest) +func _PlaygroundService_GetDefaultPrecompiledObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDefaultPrecompiledObjectRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PlaygroundServiceServer).GetDefaultExample(ctx, in) + return srv.(PlaygroundServiceServer).GetDefaultPrecompiledObject(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.v1.PlaygroundService/GetDefaultExample", + FullMethod: "/api.v1.PlaygroundService/GetDefaultPrecompiledObject", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PlaygroundServiceServer).GetDefaultExample(ctx, req.(*GetDefaultExampleRequest)) + return srv.(PlaygroundServiceServer).GetDefaultPrecompiledObject(ctx, req.(*GetDefaultPrecompiledObjectRequest)) } return interceptor(ctx, in, info, handler) } @@ -679,8 +679,8 @@ var PlaygroundService_ServiceDesc = grpc.ServiceDesc{ Handler: _PlaygroundService_GetPrecompiledObjectGraph_Handler, }, { - MethodName: "GetDefaultExample", - Handler: _PlaygroundService_GetDefaultExample_Handler, + MethodName: "GetDefaultPrecompiledObject", + Handler: _PlaygroundService_GetDefaultPrecompiledObject_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/playground/backend/internal/cache/cache.go b/playground/backend/internal/cache/cache.go index 05ce48555979..2b30f145378b 100644 --- a/playground/backend/internal/cache/cache.go +++ b/playground/backend/internal/cache/cache.go @@ -64,7 +64,7 @@ const ( ExamplesCatalog string = "EXAMPLES_CATALOG" // DefaultPrecompiledExamples is used to keep default examples - DefaultPrecompiledExamples string = "DEFAULT_EXAMPLE" + DefaultPrecompiledExamples string = "DEFAULT_PRECOMPILED_OBJECTS" ) // Cache is used to store states and outputs for Apache Beam pipelines that running in Playground @@ -92,9 +92,9 @@ type Cache interface { // GetCatalog returns catalog from cache by ExamplesCatalog key. GetCatalog(ctx context.Context) ([]*pb.Categories, error) - // SetDefaultExample adds default example for SDK into cache. - SetDefaultExample(ctx context.Context, sdk pb.Sdk, defaultExample *pb.DefaultExample) error + // SetDefaultPrecompiledObject adds default precompiled object for SDK into cache. + SetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk, precompiledObject *pb.PrecompiledObject) error - // GetDefaultExample returns default example for SDK from cache. - GetDefaultExample(ctx context.Context, sdk pb.Sdk) (*pb.DefaultExample, error) + // GetDefaultPrecompiledObject returns default precompiled object for SDK from cache. + GetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk) (*pb.PrecompiledObject, error) } diff --git a/playground/backend/internal/cache/local/local_cache.go b/playground/backend/internal/cache/local/local_cache.go index 4cce44241e57..64c39b6863ad 100644 --- a/playground/backend/internal/cache/local/local_cache.go +++ b/playground/backend/internal/cache/local/local_cache.go @@ -31,23 +31,23 @@ const ( type Cache struct { sync.RWMutex - cleanupInterval time.Duration - items map[uuid.UUID]map[cache.SubKey]interface{} - pipelinesExpiration map[uuid.UUID]time.Time - catalog []*pb.Categories - defaultExamples map[pb.Sdk]*pb.DefaultExample + cleanupInterval time.Duration + items map[uuid.UUID]map[cache.SubKey]interface{} + pipelinesExpiration map[uuid.UUID]time.Time + catalog []*pb.Categories + defaultPrecompiledObjects map[pb.Sdk]*pb.PrecompiledObject } func New(ctx context.Context) *Cache { items := make(map[uuid.UUID]map[cache.SubKey]interface{}) pipelinesExpiration := make(map[uuid.UUID]time.Time) - defaultExamples := make(map[pb.Sdk]*pb.DefaultExample) + defaultPrecompiledObjects := make(map[pb.Sdk]*pb.PrecompiledObject) ls := &Cache{ - cleanupInterval: cleanupInterval, - items: items, - pipelinesExpiration: pipelinesExpiration, - catalog: nil, - defaultExamples: defaultExamples, + cleanupInterval: cleanupInterval, + items: items, + pipelinesExpiration: pipelinesExpiration, + catalog: nil, + defaultPrecompiledObjects: defaultPrecompiledObjects, } go ls.startGC(ctx) @@ -127,17 +127,17 @@ func (lc *Cache) GetCatalog(ctx context.Context) ([]*pb.Categories, error) { return lc.catalog, nil } -func (lc *Cache) SetDefaultExample(ctx context.Context, sdk pb.Sdk, defaultExample *pb.DefaultExample) error { +func (lc *Cache) SetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk, precompiledObject *pb.PrecompiledObject) error { lc.Lock() defer lc.Unlock() - lc.defaultExamples[sdk] = defaultExample + lc.defaultPrecompiledObjects[sdk] = precompiledObject return nil } -func (lc *Cache) GetDefaultExample(ctx context.Context, sdk pb.Sdk) (*pb.DefaultExample, error) { +func (lc *Cache) GetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk) (*pb.PrecompiledObject, error) { lc.RLock() defer lc.RUnlock() - defaultPrecompiledObject := lc.defaultExamples[sdk] + defaultPrecompiledObject := lc.defaultPrecompiledObjects[sdk] if defaultPrecompiledObject == nil { return nil, fmt.Errorf("default precompiled obejct is not found for %s sdk", sdk.String()) } diff --git a/playground/backend/internal/cache/redis/redis_cache.go b/playground/backend/internal/cache/redis/redis_cache.go index 37b42de609bb..31bc0a479d24 100644 --- a/playground/backend/internal/cache/redis/redis_cache.go +++ b/playground/backend/internal/cache/redis/redis_cache.go @@ -126,43 +126,43 @@ func (rc *Cache) GetCatalog(ctx context.Context) ([]*pb.Categories, error) { return result, nil } -func (rc *Cache) SetDefaultExample(ctx context.Context, sdk pb.Sdk, defaultExample *pb.DefaultExample) error { - defaultExampleMarsh, err := json.Marshal(defaultExample) +func (rc *Cache) SetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk, precompiledObject *pb.PrecompiledObject) error { + precompiledObjectMarsh, err := json.Marshal(precompiledObject) if err != nil { - logger.Errorf("Redis Cache: set default example: error during marshal default example: %s, err: %s\n", defaultExample, err.Error()) + logger.Errorf("Redis Cache: set default precompiled object: error during marshal precompiled object: %s, err: %s\n", precompiledObject, err.Error()) return err } sdkMarsh, err := json.Marshal(sdk) if err != nil { - logger.Errorf("Redis Cache: set default example: error during marshal sdk: %s, err: %s\n", sdk, err.Error()) + logger.Errorf("Redis Cache: set default precompiled object: error during marshal sdk: %s, err: %s\n", sdk, err.Error()) return err } - err = rc.HSet(ctx, cache.DefaultPrecompiledExamples, sdkMarsh, defaultExampleMarsh).Err() + err = rc.HSet(ctx, cache.DefaultPrecompiledExamples, sdkMarsh, precompiledObjectMarsh).Err() if err != nil { - logger.Errorf("Redis Cache: set default example: error during HGet operation, err: %s\n", err.Error()) + logger.Errorf("Redis Cache: set default precompiled object: error during HGet operation, err: %s\n", err.Error()) return err } return nil } -func (rc *Cache) GetDefaultExample(ctx context.Context, sdk pb.Sdk) (*pb.DefaultExample, error) { +func (rc *Cache) GetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk) (*pb.PrecompiledObject, error) { sdkMarsh, err := json.Marshal(sdk) if err != nil { - logger.Errorf("Redis Cache: get default example: error during marshal sdk: %s, err: %s\n", sdk, err.Error()) + logger.Errorf("Redis Cache: get default precompiled object: error during marshal sdk: %s, err: %s\n", sdk, err.Error()) return nil, err } value, err := rc.HGet(ctx, cache.DefaultPrecompiledExamples, string(sdkMarsh)).Result() if err != nil { - logger.Errorf("Redis Cache: get default example: error during HGet operation for key: %s, subKey: %s, err: %s\n", cache.DefaultPrecompiledExamples, sdkMarsh, err.Error()) + logger.Errorf("Redis Cache: get default precompiled object: error during HGet operation for key: %s, subKey: %s, err: %s\n", cache.DefaultPrecompiledExamples, sdkMarsh, err.Error()) return nil, err } - result := new(pb.DefaultExample) + result := new(pb.PrecompiledObject) err = json.Unmarshal([]byte(value), &result) if err != nil { - logger.Errorf("Redis Cache: get default example: error during unmarshal value, err: %s\n", err.Error()) + logger.Errorf("Redis Cache: get default precompiled object: error during unmarshal value, err: %s\n", err.Error()) } return result, nil } diff --git a/playground/backend/internal/cloud_bucket/precompiled_objects.go b/playground/backend/internal/cloud_bucket/precompiled_objects.go index 506a4f7f9b49..c04b75c61dd4 100644 --- a/playground/backend/internal/cloud_bucket/precompiled_objects.go +++ b/playground/backend/internal/cloud_bucket/precompiled_objects.go @@ -222,8 +222,8 @@ func (cd *CloudStorage) GetPrecompiledObjects(ctx context.Context, targetSdk pb. return &precompiledObjects, nil } -// GetDefaultExamples returns the default examples -func (cd *CloudStorage) GetDefaultExamples(ctx context.Context) (map[pb.Sdk]*pb.DefaultExample, error) { +// GetDefaultPrecompiledObjects returns the default precompiled objects +func (cd *CloudStorage) GetDefaultPrecompiledObjects(ctx context.Context) (map[pb.Sdk]*pb.PrecompiledObject, error) { client, err := storage.NewClient(ctx, option.WithoutAuthentication()) if err != nil { return nil, fmt.Errorf("storage.NewClient: %v", err) @@ -244,7 +244,7 @@ func (cd *CloudStorage) GetDefaultExamples(ctx context.Context) (map[pb.Sdk]*pb. paths[sdk] = path } - defaultExamples := make(map[pb.Sdk]*pb.DefaultExample, 0) + defaultPrecompiledObjects := make(map[pb.Sdk]*pb.PrecompiledObject, 0) for sdk, path := range paths { infoPath := filepath.Join(path, MetaInfoName) rc, err := bucket.Object(infoPath).NewReader(ctx) @@ -266,18 +266,9 @@ func (cd *CloudStorage) GetDefaultExamples(ctx context.Context) (map[pb.Sdk]*pb. return nil, err } precompiledObject.CloudPath = path - - code, err := cd.GetPrecompiledObjectCode(ctx, path) - if err != nil { - return nil, err - } - - defaultExamples[sdk] = &pb.DefaultExample{ - PrecompiledObject: precompiledObject, - Code: code, - } + defaultPrecompiledObjects[sdk] = precompiledObject } - return defaultExamples, nil + return defaultPrecompiledObjects, nil } // getDefaultPrecompiledObjectsPath returns path for SDK to the default precompiled object diff --git a/playground/backend/internal/utils/precompiled_objects_utils.go b/playground/backend/internal/utils/precompiled_objects_utils.go index e34546fa5b93..797ad32519c4 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils.go +++ b/playground/backend/internal/utils/precompiled_objects_utils.go @@ -21,7 +21,6 @@ import ( "beam.apache.org/playground/backend/internal/cloud_bucket" "beam.apache.org/playground/backend/internal/logger" "context" - "fmt" ) // PutPrecompiledObjectsToCategory adds categories with precompiled objects to protobuf object @@ -97,28 +96,14 @@ func FilterCatalog(catalog []*pb.Categories, sdk pb.Sdk, categoryName string) [] return result } -// GetDefaultExample returns the default precompiled objects from cache for sdk -// - If there is no default example in the cache, gets the default examples from the Storage and saves it to the cache -func GetDefaultExample(ctx context.Context, sdk pb.Sdk, cacheService cache.Cache) (*pb.DefaultExample, error) { - defaultExample, err := cacheService.GetDefaultExample(ctx, sdk) +// GetDefaultPrecompiledObject returns the default precompiled objects from cache for sdk +func GetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk, cacheService cache.Cache) (*pb.PrecompiledObject, error) { + precompiledObject, err := cacheService.GetDefaultPrecompiledObject(ctx, sdk) if err != nil { - bucket := cloud_bucket.New() - defaultExamples, err := bucket.GetDefaultExamples(ctx) - if err != nil { - return nil, err - } - for sdk, defaultExample := range defaultExamples { - if err := cacheService.SetDefaultExample(ctx, sdk, defaultExample); err != nil { - logger.Errorf("GetDefaultExample(): cache error: %s", err.Error()) - } - } - defaultExample, ok := defaultExamples[sdk] - if !ok { - return nil, fmt.Errorf("no default example found for this sdk: %s", sdk) - } - return defaultExample, nil + logger.Errorf("GetDefaultPrecompiledObject(): error during getting default precompiled object %s", err.Error()) + return nil, err } - return defaultExample, nil + return precompiledObject, nil } // GetCatalogFromCacheOrStorage returns the precompiled objects catalog from cache diff --git a/playground/backend/internal/utils/precompiled_objects_utils_test.go b/playground/backend/internal/utils/precompiled_objects_utils_test.go index 9b4e8f709d8b..e853d5560e1f 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils_test.go +++ b/playground/backend/internal/utils/precompiled_objects_utils_test.go @@ -210,10 +210,10 @@ func TestFilterPrecompiledObjects(t *testing.T) { } } -func TestGetDefaultExample(t *testing.T) { +func TestGetDefaultPrecompiledObject(t *testing.T) { ctx := context.Background() cacheService := local.New(ctx) - precompiledObject := &pb.PrecompiledObject{ + defaultPrecompiledObject := &pb.PrecompiledObject{ CloudPath: "cloudPath", Name: "Name", Description: "Description", @@ -223,12 +223,7 @@ func TestGetDefaultExample(t *testing.T) { ContextLine: 1, DefaultExample: true, } - defaultExample := &pb.DefaultExample{ - PrecompiledObject: precompiledObject, - Code: "CODE", - } - - err := cacheService.SetDefaultExample(ctx, pb.Sdk_SDK_JAVA, defaultExample) + err := cacheService.SetDefaultPrecompiledObject(ctx, pb.Sdk_SDK_JAVA, defaultPrecompiledObject) if err != nil { logger.Errorf("Error during set up test") } @@ -241,21 +236,21 @@ func TestGetDefaultExample(t *testing.T) { tests := []struct { name string args args - want *pb.DefaultExample + want *pb.PrecompiledObject wantErr bool }{ { - name: "there is default example", + name: "there is default precompiled object", args: args{ ctx: ctx, sdk: pb.Sdk_SDK_JAVA, cacheService: cacheService, }, - want: defaultExample, + want: defaultPrecompiledObject, wantErr: false, }, { - name: "there is no default example", + name: "there is no default precompiled object", args: args{ ctx: ctx, sdk: pb.Sdk_SDK_UNSPECIFIED, @@ -267,13 +262,13 @@ func TestGetDefaultExample(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got, err := GetDefaultExample(tt.args.ctx, tt.args.sdk, tt.args.cacheService) + got, err := GetDefaultPrecompiledObject(tt.args.ctx, tt.args.sdk, tt.args.cacheService) if (err != nil) != tt.wantErr { - t.Errorf("GetDefaultExample() error = %v, wantErr %v", err, tt.wantErr) + t.Errorf("GetDefaultPrecompiledObject() error = %v, wantErr %v", err, tt.wantErr) return } if !reflect.DeepEqual(got, tt.want) { - t.Errorf("GetDefaultExample() got = %v, want %v", got, tt.want) + t.Errorf("GetDefaultPrecompiledObject() got = %v, want %v", got, tt.want) } }) } diff --git a/playground/frontend/lib/api/v1/api.pb.dart b/playground/frontend/lib/api/v1/api.pb.dart index af83def9976b..de916d4552f3 100644 --- a/playground/frontend/lib/api/v1/api.pb.dart +++ b/playground/frontend/lib/api/v1/api.pb.dart @@ -1140,69 +1140,6 @@ class PrecompiledObject extends $pb.GeneratedMessage { void clearDefaultExample() => clearField(9); } -class DefaultExample extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'DefaultExample', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) - ..aOM(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'precompiledObject', subBuilder: PrecompiledObject.create) - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'code') - ..hasRequiredFields = false - ; - - DefaultExample._() : super(); - factory DefaultExample({ - PrecompiledObject? precompiledObject, - $core.String? code, - }) { - final _result = create(); - if (precompiledObject != null) { - _result.precompiledObject = precompiledObject; - } - if (code != null) { - _result.code = code; - } - return _result; - } - factory DefaultExample.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory DefaultExample.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - DefaultExample clone() => DefaultExample()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - DefaultExample copyWith(void Function(DefaultExample) updates) => super.copyWith((message) => updates(message as DefaultExample)) as DefaultExample; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static DefaultExample create() => DefaultExample._(); - DefaultExample createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static DefaultExample getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static DefaultExample? _defaultInstance; - - @$pb.TagNumber(1) - PrecompiledObject get precompiledObject => $_getN(0); - @$pb.TagNumber(1) - set precompiledObject(PrecompiledObject v) { setField(1, v); } - @$pb.TagNumber(1) - $core.bool hasPrecompiledObject() => $_has(0); - @$pb.TagNumber(1) - void clearPrecompiledObject() => clearField(1); - @$pb.TagNumber(1) - PrecompiledObject ensurePrecompiledObject() => $_ensure(0); - - @$pb.TagNumber(2) - $core.String get code => $_getSZ(1); - @$pb.TagNumber(2) - set code($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasCode() => $_has(1); - @$pb.TagNumber(2) - void clearCode() => clearField(2); -} - class Categories_Category extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Categories.Category', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'categoryName') @@ -1562,14 +1499,14 @@ class GetPrecompiledObjectGraphRequest extends $pb.GeneratedMessage { void clearCloudPath() => clearField(1); } -class GetDefaultExampleRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetDefaultExampleRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) +class GetDefaultPrecompiledObjectRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetDefaultPrecompiledObjectRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) ..e(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sdk', $pb.PbFieldType.OE, defaultOrMaker: Sdk.SDK_UNSPECIFIED, valueOf: Sdk.valueOf, enumValues: Sdk.values) ..hasRequiredFields = false ; - GetDefaultExampleRequest._() : super(); - factory GetDefaultExampleRequest({ + GetDefaultPrecompiledObjectRequest._() : super(); + factory GetDefaultPrecompiledObjectRequest({ Sdk? sdk, }) { final _result = create(); @@ -1578,26 +1515,26 @@ class GetDefaultExampleRequest extends $pb.GeneratedMessage { } return _result; } - factory GetDefaultExampleRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetDefaultExampleRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + factory GetDefaultPrecompiledObjectRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetDefaultPrecompiledObjectRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - GetDefaultExampleRequest clone() => GetDefaultExampleRequest()..mergeFromMessage(this); + GetDefaultPrecompiledObjectRequest clone() => GetDefaultPrecompiledObjectRequest()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - GetDefaultExampleRequest copyWith(void Function(GetDefaultExampleRequest) updates) => super.copyWith((message) => updates(message as GetDefaultExampleRequest)) as GetDefaultExampleRequest; // ignore: deprecated_member_use + GetDefaultPrecompiledObjectRequest copyWith(void Function(GetDefaultPrecompiledObjectRequest) updates) => super.copyWith((message) => updates(message as GetDefaultPrecompiledObjectRequest)) as GetDefaultPrecompiledObjectRequest; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static GetDefaultExampleRequest create() => GetDefaultExampleRequest._(); - GetDefaultExampleRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static GetDefaultPrecompiledObjectRequest create() => GetDefaultPrecompiledObjectRequest._(); + GetDefaultPrecompiledObjectRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetDefaultExampleRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetDefaultExampleRequest? _defaultInstance; + static GetDefaultPrecompiledObjectRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetDefaultPrecompiledObjectRequest? _defaultInstance; @$pb.TagNumber(1) Sdk get sdk => $_getN(0); @@ -1838,52 +1775,52 @@ class GetPrecompiledObjectGraphResponse extends $pb.GeneratedMessage { void clearGraph() => clearField(1); } -class GetDefaultExampleResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetDefaultExampleResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) - ..aOM(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'defaultExample', subBuilder: DefaultExample.create) +class GetDefaultPrecompiledObjectResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetDefaultPrecompiledObjectResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOM(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'precompiledObject', subBuilder: PrecompiledObject.create) ..hasRequiredFields = false ; - GetDefaultExampleResponse._() : super(); - factory GetDefaultExampleResponse({ - DefaultExample? defaultExample, + GetDefaultPrecompiledObjectResponse._() : super(); + factory GetDefaultPrecompiledObjectResponse({ + PrecompiledObject? precompiledObject, }) { final _result = create(); - if (defaultExample != null) { - _result.defaultExample = defaultExample; + if (precompiledObject != null) { + _result.precompiledObject = precompiledObject; } return _result; } - factory GetDefaultExampleResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetDefaultExampleResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + factory GetDefaultPrecompiledObjectResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetDefaultPrecompiledObjectResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - GetDefaultExampleResponse clone() => GetDefaultExampleResponse()..mergeFromMessage(this); + GetDefaultPrecompiledObjectResponse clone() => GetDefaultPrecompiledObjectResponse()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - GetDefaultExampleResponse copyWith(void Function(GetDefaultExampleResponse) updates) => super.copyWith((message) => updates(message as GetDefaultExampleResponse)) as GetDefaultExampleResponse; // ignore: deprecated_member_use + GetDefaultPrecompiledObjectResponse copyWith(void Function(GetDefaultPrecompiledObjectResponse) updates) => super.copyWith((message) => updates(message as GetDefaultPrecompiledObjectResponse)) as GetDefaultPrecompiledObjectResponse; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static GetDefaultExampleResponse create() => GetDefaultExampleResponse._(); - GetDefaultExampleResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static GetDefaultPrecompiledObjectResponse create() => GetDefaultPrecompiledObjectResponse._(); + GetDefaultPrecompiledObjectResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetDefaultExampleResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetDefaultExampleResponse? _defaultInstance; + static GetDefaultPrecompiledObjectResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetDefaultPrecompiledObjectResponse? _defaultInstance; @$pb.TagNumber(1) - DefaultExample get defaultExample => $_getN(0); + PrecompiledObject get precompiledObject => $_getN(0); @$pb.TagNumber(1) - set defaultExample(DefaultExample v) { setField(1, v); } + set precompiledObject(PrecompiledObject v) { setField(1, v); } @$pb.TagNumber(1) - $core.bool hasDefaultExample() => $_has(0); + $core.bool hasPrecompiledObject() => $_has(0); @$pb.TagNumber(1) - void clearDefaultExample() => clearField(1); + void clearPrecompiledObject() => clearField(1); @$pb.TagNumber(1) - DefaultExample ensureDefaultExample() => $_ensure(0); + PrecompiledObject ensurePrecompiledObject() => $_ensure(0); } diff --git a/playground/frontend/lib/api/v1/api.pbgrpc.dart b/playground/frontend/lib/api/v1/api.pbgrpc.dart index a5f0c40cc998..35073deb3026 100644 --- a/playground/frontend/lib/api/v1/api.pbgrpc.dart +++ b/playground/frontend/lib/api/v1/api.pbgrpc.dart @@ -125,12 +125,13 @@ class PlaygroundServiceClient extends $grpc.Client { ($0.GetPrecompiledObjectGraphRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $0.GetPrecompiledObjectGraphResponse.fromBuffer(value)); - static final _$getDefaultExample = $grpc.ClientMethod< - $0.GetDefaultExampleRequest, $0.GetDefaultExampleResponse>( - '/api.v1.PlaygroundService/GetDefaultExample', - ($0.GetDefaultExampleRequest value) => value.writeToBuffer(), + static final _$getDefaultPrecompiledObject = $grpc.ClientMethod< + $0.GetDefaultPrecompiledObjectRequest, + $0.GetDefaultPrecompiledObjectResponse>( + '/api.v1.PlaygroundService/GetDefaultPrecompiledObject', + ($0.GetDefaultPrecompiledObjectRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => - $0.GetDefaultExampleResponse.fromBuffer(value)); + $0.GetDefaultPrecompiledObjectResponse.fromBuffer(value)); PlaygroundServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -227,10 +228,11 @@ class PlaygroundServiceClient extends $grpc.Client { options: options); } - $grpc.ResponseFuture<$0.GetDefaultExampleResponse> getDefaultExample( - $0.GetDefaultExampleRequest request, - {$grpc.CallOptions? options}) { - return $createUnaryCall(_$getDefaultExample, request, options: options); + $grpc.ResponseFuture<$0.GetDefaultPrecompiledObjectResponse> + getDefaultPrecompiledObject($0.GetDefaultPrecompiledObjectRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getDefaultPrecompiledObject, request, + options: options); } } @@ -366,15 +368,16 @@ abstract class PlaygroundServiceBase extends $grpc.Service { ($core.List<$core.int> value) => $0.GetPrecompiledObjectGraphRequest.fromBuffer(value), ($0.GetPrecompiledObjectGraphResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$0.GetDefaultExampleRequest, - $0.GetDefaultExampleResponse>( - 'GetDefaultExample', - getDefaultExample_Pre, + $addMethod($grpc.ServiceMethod<$0.GetDefaultPrecompiledObjectRequest, + $0.GetDefaultPrecompiledObjectResponse>( + 'GetDefaultPrecompiledObject', + getDefaultPrecompiledObject_Pre, false, false, ($core.List<$core.int> value) => - $0.GetDefaultExampleRequest.fromBuffer(value), - ($0.GetDefaultExampleResponse value) => value.writeToBuffer())); + $0.GetDefaultPrecompiledObjectRequest.fromBuffer(value), + ($0.GetDefaultPrecompiledObjectResponse value) => + value.writeToBuffer())); } $async.Future<$0.RunCodeResponse> runCode_Pre( @@ -461,10 +464,10 @@ abstract class PlaygroundServiceBase extends $grpc.Service { return getPrecompiledObjectGraph(call, await request); } - $async.Future<$0.GetDefaultExampleResponse> getDefaultExample_Pre( - $grpc.ServiceCall call, - $async.Future<$0.GetDefaultExampleRequest> request) async { - return getDefaultExample(call, await request); + $async.Future<$0.GetDefaultPrecompiledObjectResponse> + getDefaultPrecompiledObject_Pre($grpc.ServiceCall call, + $async.Future<$0.GetDefaultPrecompiledObjectRequest> request) async { + return getDefaultPrecompiledObject(call, await request); } $async.Future<$0.RunCodeResponse> runCode( @@ -498,6 +501,7 @@ abstract class PlaygroundServiceBase extends $grpc.Service { $grpc.ServiceCall call, $0.GetPrecompiledObjectLogsRequest request); $async.Future<$0.GetPrecompiledObjectGraphResponse> getPrecompiledObjectGraph( $grpc.ServiceCall call, $0.GetPrecompiledObjectGraphRequest request); - $async.Future<$0.GetDefaultExampleResponse> getDefaultExample( - $grpc.ServiceCall call, $0.GetDefaultExampleRequest request); + $async.Future<$0.GetDefaultPrecompiledObjectResponse> + getDefaultPrecompiledObject($grpc.ServiceCall call, + $0.GetDefaultPrecompiledObjectRequest request); } diff --git a/playground/frontend/lib/api/v1/api.pbjson.dart b/playground/frontend/lib/api/v1/api.pbjson.dart index 0b16c4fdf3e2..a952e8404987 100644 --- a/playground/frontend/lib/api/v1/api.pbjson.dart +++ b/playground/frontend/lib/api/v1/api.pbjson.dart @@ -292,17 +292,6 @@ const PrecompiledObject$json = const { /// Descriptor for `PrecompiledObject`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List precompiledObjectDescriptor = $convert.base64Decode('ChFQcmVjb21waWxlZE9iamVjdBIdCgpjbG91ZF9wYXRoGAEgASgJUgljbG91ZFBhdGgSEgoEbmFtZRgCIAEoCVIEbmFtZRIgCgtkZXNjcmlwdGlvbhgDIAEoCVILZGVzY3JpcHRpb24SMQoEdHlwZRgEIAEoDjIdLmFwaS52MS5QcmVjb21waWxlZE9iamVjdFR5cGVSBHR5cGUSKQoQcGlwZWxpbmVfb3B0aW9ucxgFIAEoCVIPcGlwZWxpbmVPcHRpb25zEhIKBGxpbmsYBiABKAlSBGxpbmsSHAoJbXVsdGlmaWxlGAcgASgIUgltdWx0aWZpbGUSIQoMY29udGV4dF9saW5lGAggASgFUgtjb250ZXh0TGluZRInCg9kZWZhdWx0X2V4YW1wbGUYCSABKAhSDmRlZmF1bHRFeGFtcGxl'); -@$core.Deprecated('Use defaultExampleDescriptor instead') -const DefaultExample$json = const { - '1': 'DefaultExample', - '2': const [ - const {'1': 'precompiled_object', '3': 1, '4': 1, '5': 11, '6': '.api.v1.PrecompiledObject', '10': 'precompiledObject'}, - const {'1': 'code', '3': 2, '4': 1, '5': 9, '10': 'code'}, - ], -}; - -/// Descriptor for `DefaultExample`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List defaultExampleDescriptor = $convert.base64Decode('Cg5EZWZhdWx0RXhhbXBsZRJIChJwcmVjb21waWxlZF9vYmplY3QYASABKAsyGS5hcGkudjEuUHJlY29tcGlsZWRPYmplY3RSEXByZWNvbXBpbGVkT2JqZWN0EhIKBGNvZGUYAiABKAlSBGNvZGU='); @$core.Deprecated('Use categoriesDescriptor instead') const Categories$json = const { '1': 'Categories', @@ -375,16 +364,16 @@ const GetPrecompiledObjectGraphRequest$json = const { /// Descriptor for `GetPrecompiledObjectGraphRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List getPrecompiledObjectGraphRequestDescriptor = $convert.base64Decode('CiBHZXRQcmVjb21waWxlZE9iamVjdEdyYXBoUmVxdWVzdBIdCgpjbG91ZF9wYXRoGAEgASgJUgljbG91ZFBhdGg='); -@$core.Deprecated('Use getDefaultExampleRequestDescriptor instead') -const GetDefaultExampleRequest$json = const { - '1': 'GetDefaultExampleRequest', +@$core.Deprecated('Use getDefaultPrecompiledObjectRequestDescriptor instead') +const GetDefaultPrecompiledObjectRequest$json = const { + '1': 'GetDefaultPrecompiledObjectRequest', '2': const [ const {'1': 'sdk', '3': 1, '4': 1, '5': 14, '6': '.api.v1.Sdk', '10': 'sdk'}, ], }; -/// Descriptor for `GetDefaultExampleRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getDefaultExampleRequestDescriptor = $convert.base64Decode('ChhHZXREZWZhdWx0RXhhbXBsZVJlcXVlc3QSHQoDc2RrGAEgASgOMgsuYXBpLnYxLlNka1IDc2Rr'); +/// Descriptor for `GetDefaultPrecompiledObjectRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getDefaultPrecompiledObjectRequestDescriptor = $convert.base64Decode('CiJHZXREZWZhdWx0UHJlY29tcGlsZWRPYmplY3RSZXF1ZXN0Eh0KA3NkaxgBIAEoDjILLmFwaS52MS5TZGtSA3Nkaw=='); @$core.Deprecated('Use getPrecompiledObjectsResponseDescriptor instead') const GetPrecompiledObjectsResponse$json = const { '1': 'GetPrecompiledObjectsResponse', @@ -435,13 +424,13 @@ const GetPrecompiledObjectGraphResponse$json = const { /// Descriptor for `GetPrecompiledObjectGraphResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List getPrecompiledObjectGraphResponseDescriptor = $convert.base64Decode('CiFHZXRQcmVjb21waWxlZE9iamVjdEdyYXBoUmVzcG9uc2USFAoFZ3JhcGgYASABKAlSBWdyYXBo'); -@$core.Deprecated('Use getDefaultExampleResponseDescriptor instead') -const GetDefaultExampleResponse$json = const { - '1': 'GetDefaultExampleResponse', +@$core.Deprecated('Use getDefaultPrecompiledObjectResponseDescriptor instead') +const GetDefaultPrecompiledObjectResponse$json = const { + '1': 'GetDefaultPrecompiledObjectResponse', '2': const [ - const {'1': 'default_example', '3': 1, '4': 1, '5': 11, '6': '.api.v1.DefaultExample', '10': 'defaultExample'}, + const {'1': 'precompiled_object', '3': 1, '4': 1, '5': 11, '6': '.api.v1.PrecompiledObject', '10': 'precompiledObject'}, ], }; -/// Descriptor for `GetDefaultExampleResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getDefaultExampleResponseDescriptor = $convert.base64Decode('ChlHZXREZWZhdWx0RXhhbXBsZVJlc3BvbnNlEj8KD2RlZmF1bHRfZXhhbXBsZRgBIAEoCzIWLmFwaS52MS5EZWZhdWx0RXhhbXBsZVIOZGVmYXVsdEV4YW1wbGU='); +/// Descriptor for `GetDefaultPrecompiledObjectResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getDefaultPrecompiledObjectResponseDescriptor = $convert.base64Decode('CiNHZXREZWZhdWx0UHJlY29tcGlsZWRPYmplY3RSZXNwb25zZRJIChJwcmVjb21waWxlZF9vYmplY3QYASABKAsyGS5hcGkudjEuUHJlY29tcGlsZWRPYmplY3RSEXByZWNvbXBpbGVkT2JqZWN0'); From d8b7bdb5f44a5210c5d024bd6978a6b11e7810ce Mon Sep 17 00:00:00 2001 From: Pavel Avilov Date: Wed, 9 Feb 2022 15:18:57 +0300 Subject: [PATCH 32/36] Refactoring code --- playground/backend/cmd/server/controller.go | 10 +--------- .../cloud_bucket/precompiled_objects.go | 2 ++ .../internal/utils/precompiled_objects_utils.go | 17 ++++++++++++++++- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/playground/backend/cmd/server/controller.go b/playground/backend/cmd/server/controller.go index 06d6d62b2adb..dd1f48c9edc1 100644 --- a/playground/backend/cmd/server/controller.go +++ b/playground/backend/cmd/server/controller.go @@ -330,14 +330,6 @@ func (controller *playgroundController) GetDefaultPrecompiledObject(ctx context. logger.Errorf("GetDefaultPrecompiledObject(): error during getting catalog: %s", err.Error()) return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") } - response := pb.GetDefaultPrecompiledObjectResponse{PrecompiledObject: &pb.PrecompiledObject{ - CloudPath: precompiledObject.CloudPath, - Name: precompiledObject.Name, - Description: precompiledObject.Description, - Type: precompiledObject.Type, - PipelineOptions: precompiledObject.PipelineOptions, - Link: precompiledObject.Link, - DefaultExample: precompiledObject.DefaultExample, - }} + response := pb.GetDefaultPrecompiledObjectResponse{PrecompiledObject: precompiledObject} return &response, nil } diff --git a/playground/backend/internal/cloud_bucket/precompiled_objects.go b/playground/backend/internal/cloud_bucket/precompiled_objects.go index c04b75c61dd4..16b2859e11cf 100644 --- a/playground/backend/internal/cloud_bucket/precompiled_objects.go +++ b/playground/backend/internal/cloud_bucket/precompiled_objects.go @@ -276,11 +276,13 @@ func (cd *CloudStorage) getDefaultPrecompiledObjectsPath(ctx context.Context, bu pathToFile := fmt.Sprintf("%s/%s", sdk.String(), defaultPrecompiledObjectsInfo) rc, err := bucket.Object(pathToFile).NewReader(ctx) if err != nil { + logger.Errorf("Object(%q).NewReader: %v", pathToFile, err.Error()) return "", err } data, err := io.ReadAll(rc) if err != nil { + logger.Errorf("ioutil.ReadAll: %v", err.Error()) return "", err } diff --git a/playground/backend/internal/utils/precompiled_objects_utils.go b/playground/backend/internal/utils/precompiled_objects_utils.go index 797ad32519c4..af08126e3820 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils.go +++ b/playground/backend/internal/utils/precompiled_objects_utils.go @@ -21,6 +21,7 @@ import ( "beam.apache.org/playground/backend/internal/cloud_bucket" "beam.apache.org/playground/backend/internal/logger" "context" + "fmt" ) // PutPrecompiledObjectsToCategory adds categories with precompiled objects to protobuf object @@ -101,7 +102,21 @@ func GetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk, cacheService c precompiledObject, err := cacheService.GetDefaultPrecompiledObject(ctx, sdk) if err != nil { logger.Errorf("GetDefaultPrecompiledObject(): error during getting default precompiled object %s", err.Error()) - return nil, err + bucket := cloud_bucket.New() + defaultPrecompiledObjects, err := bucket.GetDefaultPrecompiledObjects(ctx) + if err != nil { + return nil, err + } + for sdk, precompiledObject := range defaultPrecompiledObjects { + if err := cacheService.SetDefaultPrecompiledObject(ctx, sdk, precompiledObject); err != nil { + logger.Errorf("GetPrecompiledObjects(): cache error: %s", err.Error()) + } + } + precompiledObject, ok := defaultPrecompiledObjects[sdk] + if !ok { + return nil, fmt.Errorf("no default precompiled object found for this sdk: %s", sdk) + } + return precompiledObject, nil } return precompiledObject, nil } From c1893630b5f7dd9e385a6e67f0f47cc6d6f1237a Mon Sep 17 00:00:00 2001 From: Pavel Avilov Date: Thu, 10 Feb 2022 14:58:32 +0300 Subject: [PATCH 33/36] Refactoring code; Add test; --- .../cloud_bucket/precompiled_objects.go | 4 +-- playground/infrastructure/cd_helper.py | 36 +++++++++---------- playground/infrastructure/config.py | 2 +- playground/infrastructure/test_cd_helper.py | 19 +++++++++- 4 files changed, 38 insertions(+), 23 deletions(-) diff --git a/playground/backend/internal/cloud_bucket/precompiled_objects.go b/playground/backend/internal/cloud_bucket/precompiled_objects.go index 16b2859e11cf..948153cc67b7 100644 --- a/playground/backend/internal/cloud_bucket/precompiled_objects.go +++ b/playground/backend/internal/cloud_bucket/precompiled_objects.go @@ -37,7 +37,7 @@ const ( OutputExtension = "output" LogsExtension = "log" GraphExtension = "graph" - defaultPrecompiledObjectsInfo = "defaultPrecompiledObjects.info" + defaultPrecompiledObjectInfo = "defaultPrecompiledObject.info" MetaInfoName = "meta.info" Timeout = time.Minute javaExtension = "java" @@ -273,7 +273,7 @@ func (cd *CloudStorage) GetDefaultPrecompiledObjects(ctx context.Context) (map[p // getDefaultPrecompiledObjectsPath returns path for SDK to the default precompiled object func (cd *CloudStorage) getDefaultPrecompiledObjectsPath(ctx context.Context, bucket *storage.BucketHandle, sdk pb.Sdk) (string, error) { - pathToFile := fmt.Sprintf("%s/%s", sdk.String(), defaultPrecompiledObjectsInfo) + pathToFile := fmt.Sprintf("%s/%s", sdk.String(), defaultPrecompiledObjectInfo) rc, err := bucket.Object(pathToFile).NewReader(ctx) if err != nil { logger.Errorf("Object(%q).NewReader: %v", pathToFile, err.Error()) diff --git a/playground/infrastructure/cd_helper.py b/playground/infrastructure/cd_helper.py index ac32cf19ff65..4b19d5514854 100644 --- a/playground/infrastructure/cd_helper.py +++ b/playground/infrastructure/cd_helper.py @@ -104,44 +104,42 @@ def _save_to_cloud_storage(self, examples: List[Example]): self._storage_client = storage.Client() self._bucket = self._storage_client.bucket(Config.BUCKET_NAME) - default_examples_paths = {} for example in tqdm(examples): file_names = self._write_to_local_fs(example) if example.tag.default_example: - default_examples_paths[Sdk.Name(example.sdk)] = Path( - [*file_names].pop()).parent.__str__() + default_example_path = str(Path([*file_names].pop()).parent) + cloud_path = self._write_default_example_path_to_local_fs( + default_example_path) - for cloud_file_name, local_file_name in file_names.items(): self._upload_blob( - source_file=local_file_name, destination_blob_name=cloud_file_name) - - if len(default_examples_paths) > 0: - cloud_path = self._write_default_examples_paths_to_local_fs( - default_examples_paths) - self._upload_blob( source_file=os.path.join(Config.TEMP_FOLDER, cloud_path), destination_blob_name=cloud_path) - def _write_default_examples_paths_to_local_fs(self, paths: {}) -> str: + for cloud_file_name, local_file_name in file_names.items(): + self._upload_blob( + source_file=local_file_name, destination_blob_name=cloud_file_name) + + def _write_default_example_path_to_local_fs(self, path: str) -> str: """ - Write paths to default examples to the file (in temp folder) + Write default example path to the file (in temp folder) Args: - paths: dict with paths + path: path of the default example Returns: name of the file """ - cloud_path = os.path.join([*paths].pop(), - Config.DEFAULT_PRECOMPILED_OBJECTS) + sdk = Path(path).parts[0] + cloud_path = os.path.join(sdk, Config.DEFAULT_PRECOMPILED_OBJECT) - path_to_file = os.path.join(Config.TEMP_FOLDER, [*paths].pop()) + path_to_file = os.path.join(Config.TEMP_FOLDER, sdk) Path(path_to_file).mkdir(parents=True, exist_ok=True) - local_path = os.path.join(path_to_file, Config.DEFAULT_PRECOMPILED_OBJECTS) - content = json.dumps(paths) - with open(local_path, "x", encoding="utf-8") as file: + local_path = os.path.join(path_to_file, Config.DEFAULT_PRECOMPILED_OBJECT) + + content = json.dumps({sdk: path}) + with open(local_path, "w", encoding="utf-8") as file: file.write(content) return cloud_path diff --git a/playground/infrastructure/config.py b/playground/infrastructure/config.py index d09c181a6a59..e072297486de 100644 --- a/playground/infrastructure/config.py +++ b/playground/infrastructure/config.py @@ -43,7 +43,7 @@ class Config: Sdk.Name(SDK_SCIO)) BUCKET_NAME = "playground-precompiled-objects" TEMP_FOLDER = "temp" - DEFAULT_PRECOMPILED_OBJECTS = "defaultPrecompiledObjects.info" + DEFAULT_PRECOMPILED_OBJECT = "defaultPrecompiledObject.info" SDK_TO_EXTENSION = { SDK_JAVA: "java", SDK_GO: "go", SDK_PYTHON: "py", SDK_SCIO: "scala" } diff --git a/playground/infrastructure/test_cd_helper.py b/playground/infrastructure/test_cd_helper.py index 681851b544e8..c1f00cac683f 100644 --- a/playground/infrastructure/test_cd_helper.py +++ b/playground/infrastructure/test_cd_helper.py @@ -14,11 +14,12 @@ # limitations under the License. import os +import pathlib import shutil import pytest -from api.v1.api_pb2 import SDK_JAVA, STATUS_UNSPECIFIED, \ +from api.v1.api_pb2 import Sdk, SDK_JAVA, SDK_GO, STATUS_UNSPECIFIED, \ PRECOMPILED_OBJECT_TYPE_UNIT_TEST from cd_helper import CDHelper from config import Config @@ -127,3 +128,19 @@ def test__save_to_cloud_storage(mocker): CDHelper()._save_to_cloud_storage([example]) write_to_os_mock.assert_called_with(example) upload_blob_mock.assert_called_with(source_file="", destination_blob_name="") + + +def test__write_default_example_path_to_local_fs(delete_temp_folder): + """ + Test writing default example link of sdk to + the filesystem (in temp folder) + Args: + delete_temp_folder: python fixture to clean up temp folder + after method execution + """ + sdk = Sdk.Name(SDK_GO) + default_example_path = "SDK_GO\\PRECOMPILED_OBJECT_TYPE_EXAMPLE\\MinimalWordCount" + expected_result = str(pathlib.Path(sdk, Config.DEFAULT_PRECOMPILED_OBJECT)) + cloud_path = CDHelper()._write_default_example_path_to_local_fs(default_example_path) + assert cloud_path == expected_result + assert os.path.exists("temp\\" + cloud_path) is True From 6e63cfb0e4faac0c455c43f1aa6a4b3865d46e04 Mon Sep 17 00:00:00 2001 From: Pavel Avilov Date: Thu, 10 Feb 2022 15:15:05 +0300 Subject: [PATCH 34/36] Edit commentaries --- .../cloud_bucket/precompiled_objects.go | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/playground/backend/internal/cloud_bucket/precompiled_objects.go b/playground/backend/internal/cloud_bucket/precompiled_objects.go index 948153cc67b7..c79c32d6a8bc 100644 --- a/playground/backend/internal/cloud_bucket/precompiled_objects.go +++ b/playground/backend/internal/cloud_bucket/precompiled_objects.go @@ -33,18 +33,18 @@ import ( ) const ( - BucketName = "playground-precompiled-objects" - OutputExtension = "output" - LogsExtension = "log" - GraphExtension = "graph" + BucketName = "playground-precompiled-objects" + OutputExtension = "output" + LogsExtension = "log" + GraphExtension = "graph" defaultPrecompiledObjectInfo = "defaultPrecompiledObject.info" - MetaInfoName = "meta.info" - Timeout = time.Minute - javaExtension = "java" - goExtension = "go" - pyExtension = "py" - scioExtension = "scala" - separatorsNumber = 3 + MetaInfoName = "meta.info" + Timeout = time.Minute + javaExtension = "java" + goExtension = "go" + pyExtension = "py" + scioExtension = "scala" + separatorsNumber = 3 ) type ObjectInfo struct { @@ -69,7 +69,7 @@ type SdkToCategories map[string]CategoryToPrecompiledObjects // the bucket where examples are stored would be public, // and it has a specific structure of files, namely: // SDK_JAVA/ -// ----defaultPrecompiledObjects.info +// ----defaultPrecompiledObject.info // ----PRECOMPILED_OBJECT_TYPE_EXAMPLE/ // --------MinimalWordCount/ // ----------- MinimalWordCount.java @@ -87,7 +87,7 @@ type SdkToCategories map[string]CategoryToPrecompiledObjects // --------... // ----... // SDK_GO/ -// ----defaultPrecompiledObjects.info +// ----defaultPrecompiledObject.info // ----PRECOMPILED_OBJECT_TYPE_EXAMPLE/ // --------MinimalWordCount/ // ----------- MinimalWordCount.go @@ -100,7 +100,7 @@ type SdkToCategories map[string]CategoryToPrecompiledObjects // --------... // ----... // -// defaultPrecompiledObjects.info is a file that contains path to the default example: +// defaultPrecompiledObject.info is a file that contains path to the default example: // { // "SDK_JAVA": "SDK_JAVA/PRECOMPILED_OBJECT_TYPE_EXAMPLE/MinimalWordCount" // } From 0bcb1c48b4f6dd8f035e1257768bff960eb82672 Mon Sep 17 00:00:00 2001 From: Pavel Avilov Date: Thu, 10 Feb 2022 17:44:37 +0300 Subject: [PATCH 35/36] Refactoring code --- playground/infrastructure/test_cd_helper.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/playground/infrastructure/test_cd_helper.py b/playground/infrastructure/test_cd_helper.py index c1f00cac683f..3628540d0117 100644 --- a/playground/infrastructure/test_cd_helper.py +++ b/playground/infrastructure/test_cd_helper.py @@ -139,8 +139,9 @@ def test__write_default_example_path_to_local_fs(delete_temp_folder): after method execution """ sdk = Sdk.Name(SDK_GO) - default_example_path = "SDK_GO\\PRECOMPILED_OBJECT_TYPE_EXAMPLE\\MinimalWordCount" + default_example_path = "SDK_GO/PRECOMPILED_OBJECT_TYPE_EXAMPLE/WordCount" expected_result = str(pathlib.Path(sdk, Config.DEFAULT_PRECOMPILED_OBJECT)) - cloud_path = CDHelper()._write_default_example_path_to_local_fs(default_example_path) + cloud_path = CDHelper()._write_default_example_path_to_local_fs( + default_example_path) assert cloud_path == expected_result - assert os.path.exists("temp\\" + cloud_path) is True + assert os.path.exists(os.path.join("temp", cloud_path)) From 4f54530988851e37164050fcaf8e1591e8da65f3 Mon Sep 17 00:00:00 2001 From: Pavel Avilov Date: Tue, 1 Mar 2022 17:50:38 +0300 Subject: [PATCH 36/36] Add bucket name to methods --- playground/backend/cmd/server/controller.go | 6 +++--- playground/backend/cmd/server/server.go | 2 +- .../backend/internal/cache/local/local_cache_test.go | 3 ++- .../backend/internal/cloud_bucket/precompiled_objects.go | 6 +++--- .../backend/internal/utils/precompiled_objects_utils.go | 8 ++++---- .../internal/utils/precompiled_objects_utils_test.go | 2 +- 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/playground/backend/cmd/server/controller.go b/playground/backend/cmd/server/controller.go index c17a236e7357..303fea8b0547 100644 --- a/playground/backend/cmd/server/controller.go +++ b/playground/backend/cmd/server/controller.go @@ -260,7 +260,7 @@ func (controller *playgroundController) Cancel(ctx context.Context, info *pb.Can // - If there is no catalog in the cache, gets the catalog from the Storage and saves it to the cache // - If SDK or category is specified in the request, gets the catalog from the cache and filters it by SDK and category func (controller *playgroundController) GetPrecompiledObjects(ctx context.Context, info *pb.GetPrecompiledObjectsRequest) (*pb.GetPrecompiledObjectsResponse, error) { - catalog, err := utils.GetCatalogFromCacheOrStorage(ctx, controller.cacheService) + catalog, err := utils.GetCatalogFromCacheOrStorage(ctx, controller.cacheService, controller.env.ApplicationEnvs.BucketName()) if err != nil { logger.Errorf("GetPrecompiledObjects(): error during getting catalog: %s", err.Error()) return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") @@ -273,7 +273,7 @@ func (controller *playgroundController) GetPrecompiledObjects(ctx context.Contex // GetPrecompiledObjectCode returns the code of the specific example func (controller *playgroundController) GetPrecompiledObjectCode(ctx context.Context, info *pb.GetPrecompiledObjectCodeRequest) (*pb.GetPrecompiledObjectCodeResponse, error) { cd := cloud_bucket.New() - codeString, err := cd.GetPrecompiledObjectCode(ctx, info.GetCloudPath()) + codeString, err := cd.GetPrecompiledObjectCode(ctx, info.GetCloudPath(), controller.env.ApplicationEnvs.BucketName()) if err != nil { logger.Errorf("GetPrecompiledObjectCode(): cloud storage error: %s", err.Error()) return nil, errors.InternalError("Error during getting Precompiled Object's code", "Error with cloud connection") @@ -325,7 +325,7 @@ func (controller *playgroundController) GetDefaultPrecompiledObject(ctx context. logger.Errorf("GetDefaultPrecompiledObject(): unimplemented sdk: %s\n", info.Sdk) return nil, errors.InvalidArgumentError("Error during preparing", "Sdk is not implemented yet: %s", info.Sdk.String()) } - precompiledObject, err := utils.GetDefaultPrecompiledObject(ctx, info.Sdk, controller.cacheService) + precompiledObject, err := utils.GetDefaultPrecompiledObject(ctx, info.Sdk, controller.cacheService, controller.env.ApplicationEnvs.BucketName()) if err != nil { logger.Errorf("GetDefaultPrecompiledObject(): error during getting catalog: %s", err.Error()) return nil, errors.InternalError("Error during getting Precompiled Objects", "Error with cloud connection") diff --git a/playground/backend/cmd/server/server.go b/playground/backend/cmd/server/server.go index d639f1f324e8..b78aa7b06272 100644 --- a/playground/backend/cmd/server/server.go +++ b/playground/backend/cmd/server/server.go @@ -130,7 +130,7 @@ func setupExamplesCatalog(ctx context.Context, cacheService cache.Cache, bucketN } bucket := cloud_bucket.New() - defaultPrecompiledObjects, err := bucket.GetDefaultPrecompiledObjects(ctx) + defaultPrecompiledObjects, err := bucket.GetDefaultPrecompiledObjects(ctx, bucketName) if err != nil { return err } diff --git a/playground/backend/internal/cache/local/local_cache_test.go b/playground/backend/internal/cache/local/local_cache_test.go index 34b2654ad065..839d2dd5407a 100644 --- a/playground/backend/internal/cache/local/local_cache_test.go +++ b/playground/backend/internal/cache/local/local_cache_test.go @@ -19,6 +19,7 @@ import ( pb "beam.apache.org/playground/backend/internal/api/v1" "beam.apache.org/playground/backend/internal/cache" "context" + "fmt" "github.com/google/uuid" "go.uber.org/goleak" "reflect" @@ -625,7 +626,7 @@ func TestNew(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - if got := New(tt.args.ctx); !reflect.DeepEqual(got, tt.want) { + if got := New(tt.args.ctx); !reflect.DeepEqual(fmt.Sprint(got), fmt.Sprint(tt.want)) { t.Errorf("New() = %v, want %v", got, tt.want) } }) diff --git a/playground/backend/internal/cloud_bucket/precompiled_objects.go b/playground/backend/internal/cloud_bucket/precompiled_objects.go index 8b96e2f4dfd4..945c5bcfb229 100644 --- a/playground/backend/internal/cloud_bucket/precompiled_objects.go +++ b/playground/backend/internal/cloud_bucket/precompiled_objects.go @@ -124,7 +124,7 @@ func New() *CloudStorage { } // GetPrecompiledObjectCode returns the source code of the example -func (cd *CloudStorage) GetPrecompiledObjectCode(ctx context.Context, precompiledObjectPath string) (string, error) { +func (cd *CloudStorage) GetPrecompiledObjectCode(ctx context.Context, precompiledObjectPath, bucketName string) (string, error) { extension, err := getFileExtensionBySdk(precompiledObjectPath) if err != nil { return "", err @@ -222,13 +222,13 @@ func (cd *CloudStorage) GetPrecompiledObjects(ctx context.Context, targetSdk pb. } // GetDefaultPrecompiledObjects returns the default precompiled objects -func (cd *CloudStorage) GetDefaultPrecompiledObjects(ctx context.Context) (map[pb.Sdk]*pb.PrecompiledObject, error) { +func (cd *CloudStorage) GetDefaultPrecompiledObjects(ctx context.Context, bucketName string) (map[pb.Sdk]*pb.PrecompiledObject, error) { client, err := storage.NewClient(ctx, option.WithoutAuthentication()) if err != nil { return nil, fmt.Errorf("storage.NewClient: %v", err) } defer client.Close() - bucket := client.Bucket(BucketName) + bucket := client.Bucket(bucketName) paths := make(map[pb.Sdk]string, 0) for _, sdkName := range pb.Sdk_name { diff --git a/playground/backend/internal/utils/precompiled_objects_utils.go b/playground/backend/internal/utils/precompiled_objects_utils.go index e0f6404ff130..2b779ab5878d 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils.go +++ b/playground/backend/internal/utils/precompiled_objects_utils.go @@ -98,12 +98,12 @@ func FilterCatalog(catalog []*pb.Categories, sdk pb.Sdk, categoryName string) [] } // GetDefaultPrecompiledObject returns the default precompiled objects from cache for sdk -func GetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk, cacheService cache.Cache) (*pb.PrecompiledObject, error) { +func GetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk, cacheService cache.Cache, bucketName string) (*pb.PrecompiledObject, error) { precompiledObject, err := cacheService.GetDefaultPrecompiledObject(ctx, sdk) if err != nil { logger.Errorf("GetDefaultPrecompiledObject(): error during getting default precompiled object %s", err.Error()) bucket := cloud_bucket.New() - defaultPrecompiledObjects, err := bucket.GetDefaultPrecompiledObjects(ctx) + defaultPrecompiledObjects, err := bucket.GetDefaultPrecompiledObjects(ctx, bucketName) if err != nil { return nil, err } @@ -123,11 +123,11 @@ func GetDefaultPrecompiledObject(ctx context.Context, sdk pb.Sdk, cacheService c // GetCatalogFromCacheOrStorage returns the precompiled objects catalog from cache // - If there is no catalog in the cache, gets the catalog from the Storage and saves it to the cache -func GetCatalogFromCacheOrStorage(ctx context.Context, cacheService cache.Cache) ([]*pb.Categories, error) { +func GetCatalogFromCacheOrStorage(ctx context.Context, cacheService cache.Cache, bucketName string) ([]*pb.Categories, error) { catalog, err := cacheService.GetCatalog(ctx) if err != nil { logger.Errorf("GetCatalog(): cache error: %s", err.Error()) - catalog, err = GetCatalogFromStorage(ctx) + catalog, err = GetCatalogFromStorage(ctx, bucketName) if err != nil { return nil, err } diff --git a/playground/backend/internal/utils/precompiled_objects_utils_test.go b/playground/backend/internal/utils/precompiled_objects_utils_test.go index e853d5560e1f..e1b345a66319 100644 --- a/playground/backend/internal/utils/precompiled_objects_utils_test.go +++ b/playground/backend/internal/utils/precompiled_objects_utils_test.go @@ -262,7 +262,7 @@ func TestGetDefaultPrecompiledObject(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got, err := GetDefaultPrecompiledObject(tt.args.ctx, tt.args.sdk, tt.args.cacheService) + got, err := GetDefaultPrecompiledObject(tt.args.ctx, tt.args.sdk, tt.args.cacheService, "") if (err != nil) != tt.wantErr { t.Errorf("GetDefaultPrecompiledObject() error = %v, wantErr %v", err, tt.wantErr) return