From dab7c864140b61bb6c28b9dc7e01b2c97a20a180 Mon Sep 17 00:00:00 2001 From: Jon Deng Date: Wed, 10 Sep 2025 13:40:56 -0700 Subject: [PATCH 1/5] add new exports proto --- protos/sift/exports/v1/exports.proto | 113 +++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 protos/sift/exports/v1/exports.proto diff --git a/protos/sift/exports/v1/exports.proto b/protos/sift/exports/v1/exports.proto new file mode 100644 index 000000000..91dc18212 --- /dev/null +++ b/protos/sift/exports/v1/exports.proto @@ -0,0 +1,113 @@ +syntax = "proto3"; + +package sift.exports.v1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "sift/calculated_channels/v2/calculated_channels.proto"; + +option go_package = "azimuth/gen/protos/go/sift/exports/v1;exportsv1pb"; +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info: {title: "Exports service"} +}; + +service ExportService { + rpc ExportData(ExportDataRequest) returns (ExportDataResponse) { + option (google.api.http) = { + post: "/api/v1/export" + body: "*" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "ExportData" + description: "Export data." + }; + } + + rpc GetDownloadUrl(GetDownloadUrlRequest) returns (GetDownloadUrlResponse) { + option (google.api.http) = {get: "/api/v1/export/{job_id}/download-url"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "GetDownloadUrl" + description: "Retrieve the download URL for a completed job." + }; + } +} + +message ExportDataRequest { + oneof time_selection { + // If time_range used, channel_ids or calculated_chanel_configs must be provided to scope data. + TimeRange time_range = 1; + // Runs used to perform time selection and scope data. Times can optionally be provided to further scope within runs. + // If channel_ids or calculated_channel_configs not provided, all channels from Run Assets are added to scope. + RunsAndTimeRange runs_and_time_range = 2; + // Assets and times provided to scope data. + // If channel_ids or calculated_channel_configs not provided, all channels from Assets are added to scope. + AssetsAndTimeRange assets_and_time_range = 3; + } + repeated string channel_ids = 4 [(google.api.field_behavior) = OPTIONAL]; + repeated CalculatedChannelConfig calculated_channel_configs = 5 [(google.api.field_behavior) = OPTIONAL]; + + ExportOutputFormat output_format = 6 [(google.api.field_behavior) = REQUIRED]; + ExportOptions export_options = 7 [(google.api.field_behavior) = REQUIRED]; +} + +enum ExportOutputFormat { + EXPORT_OUTPUT_FORMAT_UNSPECIFIED = 0; + EXPORT_OUTPUT_FORMAT_CSV = 1; + EXPORT_OUTPUT_FORMAT_SUN = 2; +} + +message TimeRange { + google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Timestamp stop_time = 2 [(google.api.field_behavior) = REQUIRED]; +} + +message RunsAndTimeRange { + repeated string run_ids = 1 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Timestamp start_time = 2 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.Timestamp stop_time = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +message AssetsAndTimeRange { + repeated string asset_ids = 1 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Timestamp start_time = 2 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Timestamp stop_time = 3 [(google.api.field_behavior) = REQUIRED]; +} + +message CalculatedChannelConfig { + string name = 1 [(google.api.field_behavior) = REQUIRED]; + string expression = 2 [(google.api.field_behavior) = REQUIRED]; + repeated sift.calculated_channels.v2.CalculatedChannelAbstractChannelReference channel_references = 3 [(google.api.field_behavior) = REQUIRED]; + optional string units = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +message ExportOptions { + // Whether to use legacy format string for channel headers which contains key-value metadata. + bool use_legacy_format = 1; + // Whether to simplify channel names by removing the component part of the name if name is unique in export file + bool simplify_channel_names = 2; + // Whether to combine runs. e.g. channels from the same asset in different runs will be combined into a single column of data. + bool combine_runs = 3; + // Split each asset into their own export file + bool split_export_by_asset = 4; + // Split each run into their own export file + bool split_export_by_run = 5; +} + +message ExportDataResponse { + // Pre-signed URL of exported zip containing export files. This will be blank if + // the job is processed as a background job, in which case `job_id` will be non-empty. + string presigned_url = 1 [(google.api.field_behavior) = OPTIONAL]; + + // This will be non-empty if the export is being processed asynchronously in a background job. + string job_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +message GetDownloadUrlRequest { + string job_id = 1 [(google.api.field_behavior) = REQUIRED]; +} + +message GetDownloadUrlResponse { + string presigned_url = 1 [(google.api.field_behavior) = REQUIRED]; +} From 070b431c9763dc05b0d178ae506c8f1da9febe9c Mon Sep 17 00:00:00 2001 From: Jon Deng Date: Fri, 12 Sep 2025 13:00:54 -0700 Subject: [PATCH 2/5] sanitize --- protos/sift/exports/v1/exports.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protos/sift/exports/v1/exports.proto b/protos/sift/exports/v1/exports.proto index 91dc18212..b6e602729 100644 --- a/protos/sift/exports/v1/exports.proto +++ b/protos/sift/exports/v1/exports.proto @@ -8,7 +8,7 @@ import "google/protobuf/timestamp.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; import "sift/calculated_channels/v2/calculated_channels.proto"; -option go_package = "azimuth/gen/protos/go/sift/exports/v1;exportsv1pb"; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: {title: "Exports service"} }; From 76c2d3ee51eab5aff62f97c9bb809e52c65c4b0d Mon Sep 17 00:00:00 2001 From: Jon Deng Date: Fri, 12 Sep 2025 13:02:46 -0700 Subject: [PATCH 3/5] add codegen --- go/gen/sift/exports/v1/exports.pb.go | 1067 ++++ go/gen/sift/exports/v1/exports.pb.gw.go | 274 + go/gen/sift/exports/v1/exports_vtproto.pb.go | 4940 +++++++++++++++++ python/gen/__init__.py | 0 python/lib/sift/exports/__init__.py | 0 python/lib/sift/exports/v1/__init__.py | 0 python/lib/sift/exports/v1/exports_pb2.py | 96 + python/lib/sift/exports/v1/exports_pb2.pyi | 272 + .../lib/sift/exports/v1/exports_pb2_grpc.py | 99 + .../lib/sift/exports/v1/exports_pb2_grpc.pyi | 58 + rust/crates/sift_rs/src/gen/mod.rs | 7 + .../crates/sift_rs/src/gen/sift.exports.v1.rs | 135 + .../sift_rs/src/gen/sift.exports.v1.serde.rs | 1241 +++++ .../sift_rs/src/gen/sift.exports.v1.tonic.rs | 375 ++ 14 files changed, 8564 insertions(+) create mode 100644 go/gen/sift/exports/v1/exports.pb.go create mode 100644 go/gen/sift/exports/v1/exports.pb.gw.go create mode 100644 go/gen/sift/exports/v1/exports_vtproto.pb.go create mode 100644 python/gen/__init__.py create mode 100644 python/lib/sift/exports/__init__.py create mode 100644 python/lib/sift/exports/v1/__init__.py create mode 100644 python/lib/sift/exports/v1/exports_pb2.py create mode 100644 python/lib/sift/exports/v1/exports_pb2.pyi create mode 100644 python/lib/sift/exports/v1/exports_pb2_grpc.py create mode 100644 python/lib/sift/exports/v1/exports_pb2_grpc.pyi create mode 100644 rust/crates/sift_rs/src/gen/sift.exports.v1.rs create mode 100644 rust/crates/sift_rs/src/gen/sift.exports.v1.serde.rs create mode 100644 rust/crates/sift_rs/src/gen/sift.exports.v1.tonic.rs diff --git a/go/gen/sift/exports/v1/exports.pb.go b/go/gen/sift/exports/v1/exports.pb.go new file mode 100644 index 000000000..1bfb51f88 --- /dev/null +++ b/go/gen/sift/exports/v1/exports.pb.go @@ -0,0 +1,1067 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: sift/exports/v1/exports.proto + +package exportsv1 + +import ( + _ "github.com/sift-stack/sift/go/gen/google/api" + _ "github.com/sift-stack/sift/go/gen/protoc-gen-openapiv2/options" + v2 "github.com/sift-stack/sift/go/gen/sift/calculated_channels/v2" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ExportOutputFormat int32 + +const ( + ExportOutputFormat_EXPORT_OUTPUT_FORMAT_UNSPECIFIED ExportOutputFormat = 0 + ExportOutputFormat_EXPORT_OUTPUT_FORMAT_CSV ExportOutputFormat = 1 + ExportOutputFormat_EXPORT_OUTPUT_FORMAT_SUN ExportOutputFormat = 2 +) + +// Enum value maps for ExportOutputFormat. +var ( + ExportOutputFormat_name = map[int32]string{ + 0: "EXPORT_OUTPUT_FORMAT_UNSPECIFIED", + 1: "EXPORT_OUTPUT_FORMAT_CSV", + 2: "EXPORT_OUTPUT_FORMAT_SUN", + } + ExportOutputFormat_value = map[string]int32{ + "EXPORT_OUTPUT_FORMAT_UNSPECIFIED": 0, + "EXPORT_OUTPUT_FORMAT_CSV": 1, + "EXPORT_OUTPUT_FORMAT_SUN": 2, + } +) + +func (x ExportOutputFormat) Enum() *ExportOutputFormat { + p := new(ExportOutputFormat) + *p = x + return p +} + +func (x ExportOutputFormat) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ExportOutputFormat) Descriptor() protoreflect.EnumDescriptor { + return file_sift_exports_v1_exports_proto_enumTypes[0].Descriptor() +} + +func (ExportOutputFormat) Type() protoreflect.EnumType { + return &file_sift_exports_v1_exports_proto_enumTypes[0] +} + +func (x ExportOutputFormat) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ExportOutputFormat.Descriptor instead. +func (ExportOutputFormat) EnumDescriptor() ([]byte, []int) { + return file_sift_exports_v1_exports_proto_rawDescGZIP(), []int{0} +} + +type ExportDataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to TimeSelection: + // + // *ExportDataRequest_TimeRange + // *ExportDataRequest_RunsAndTimeRange + // *ExportDataRequest_AssetsAndTimeRange + TimeSelection isExportDataRequest_TimeSelection `protobuf_oneof:"time_selection"` + ChannelIds []string `protobuf:"bytes,4,rep,name=channel_ids,json=channelIds,proto3" json:"channel_ids,omitempty"` + CalculatedChannelConfigs []*CalculatedChannelConfig `protobuf:"bytes,5,rep,name=calculated_channel_configs,json=calculatedChannelConfigs,proto3" json:"calculated_channel_configs,omitempty"` + OutputFormat ExportOutputFormat `protobuf:"varint,6,opt,name=output_format,json=outputFormat,proto3,enum=sift.exports.v1.ExportOutputFormat" json:"output_format,omitempty"` + ExportOptions *ExportOptions `protobuf:"bytes,7,opt,name=export_options,json=exportOptions,proto3" json:"export_options,omitempty"` +} + +func (x *ExportDataRequest) Reset() { + *x = ExportDataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sift_exports_v1_exports_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportDataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportDataRequest) ProtoMessage() {} + +func (x *ExportDataRequest) ProtoReflect() protoreflect.Message { + mi := &file_sift_exports_v1_exports_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportDataRequest.ProtoReflect.Descriptor instead. +func (*ExportDataRequest) Descriptor() ([]byte, []int) { + return file_sift_exports_v1_exports_proto_rawDescGZIP(), []int{0} +} + +func (m *ExportDataRequest) GetTimeSelection() isExportDataRequest_TimeSelection { + if m != nil { + return m.TimeSelection + } + return nil +} + +func (x *ExportDataRequest) GetTimeRange() *TimeRange { + if x, ok := x.GetTimeSelection().(*ExportDataRequest_TimeRange); ok { + return x.TimeRange + } + return nil +} + +func (x *ExportDataRequest) GetRunsAndTimeRange() *RunsAndTimeRange { + if x, ok := x.GetTimeSelection().(*ExportDataRequest_RunsAndTimeRange); ok { + return x.RunsAndTimeRange + } + return nil +} + +func (x *ExportDataRequest) GetAssetsAndTimeRange() *AssetsAndTimeRange { + if x, ok := x.GetTimeSelection().(*ExportDataRequest_AssetsAndTimeRange); ok { + return x.AssetsAndTimeRange + } + return nil +} + +func (x *ExportDataRequest) GetChannelIds() []string { + if x != nil { + return x.ChannelIds + } + return nil +} + +func (x *ExportDataRequest) GetCalculatedChannelConfigs() []*CalculatedChannelConfig { + if x != nil { + return x.CalculatedChannelConfigs + } + return nil +} + +func (x *ExportDataRequest) GetOutputFormat() ExportOutputFormat { + if x != nil { + return x.OutputFormat + } + return ExportOutputFormat_EXPORT_OUTPUT_FORMAT_UNSPECIFIED +} + +func (x *ExportDataRequest) GetExportOptions() *ExportOptions { + if x != nil { + return x.ExportOptions + } + return nil +} + +type isExportDataRequest_TimeSelection interface { + isExportDataRequest_TimeSelection() +} + +type ExportDataRequest_TimeRange struct { + // If time_range used, channel_ids or calculated_chanel_configs must be provided to scope data. + TimeRange *TimeRange `protobuf:"bytes,1,opt,name=time_range,json=timeRange,proto3,oneof"` +} + +type ExportDataRequest_RunsAndTimeRange struct { + // Runs used to perform time selection and scope data. Times can optionally be provided to further scope within runs. + // If channel_ids or calculated_channel_configs not provided, all channels from Run Assets are added to scope. + RunsAndTimeRange *RunsAndTimeRange `protobuf:"bytes,2,opt,name=runs_and_time_range,json=runsAndTimeRange,proto3,oneof"` +} + +type ExportDataRequest_AssetsAndTimeRange struct { + // Assets and times provided to scope data. + // If channel_ids or calculated_channel_configs not provided, all channels from Assets are added to scope. + AssetsAndTimeRange *AssetsAndTimeRange `protobuf:"bytes,3,opt,name=assets_and_time_range,json=assetsAndTimeRange,proto3,oneof"` +} + +func (*ExportDataRequest_TimeRange) isExportDataRequest_TimeSelection() {} + +func (*ExportDataRequest_RunsAndTimeRange) isExportDataRequest_TimeSelection() {} + +func (*ExportDataRequest_AssetsAndTimeRange) isExportDataRequest_TimeSelection() {} + +type TimeRange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StartTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + StopTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=stop_time,json=stopTime,proto3" json:"stop_time,omitempty"` +} + +func (x *TimeRange) Reset() { + *x = TimeRange{} + if protoimpl.UnsafeEnabled { + mi := &file_sift_exports_v1_exports_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TimeRange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TimeRange) ProtoMessage() {} + +func (x *TimeRange) ProtoReflect() protoreflect.Message { + mi := &file_sift_exports_v1_exports_proto_msgTypes[1] + 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 TimeRange.ProtoReflect.Descriptor instead. +func (*TimeRange) Descriptor() ([]byte, []int) { + return file_sift_exports_v1_exports_proto_rawDescGZIP(), []int{1} +} + +func (x *TimeRange) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *TimeRange) GetStopTime() *timestamppb.Timestamp { + if x != nil { + return x.StopTime + } + return nil +} + +type RunsAndTimeRange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RunIds []string `protobuf:"bytes,1,rep,name=run_ids,json=runIds,proto3" json:"run_ids,omitempty"` + StartTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + StopTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=stop_time,json=stopTime,proto3" json:"stop_time,omitempty"` +} + +func (x *RunsAndTimeRange) Reset() { + *x = RunsAndTimeRange{} + if protoimpl.UnsafeEnabled { + mi := &file_sift_exports_v1_exports_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RunsAndTimeRange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RunsAndTimeRange) ProtoMessage() {} + +func (x *RunsAndTimeRange) ProtoReflect() protoreflect.Message { + mi := &file_sift_exports_v1_exports_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RunsAndTimeRange.ProtoReflect.Descriptor instead. +func (*RunsAndTimeRange) Descriptor() ([]byte, []int) { + return file_sift_exports_v1_exports_proto_rawDescGZIP(), []int{2} +} + +func (x *RunsAndTimeRange) GetRunIds() []string { + if x != nil { + return x.RunIds + } + return nil +} + +func (x *RunsAndTimeRange) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *RunsAndTimeRange) GetStopTime() *timestamppb.Timestamp { + if x != nil { + return x.StopTime + } + return nil +} + +type AssetsAndTimeRange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AssetIds []string `protobuf:"bytes,1,rep,name=asset_ids,json=assetIds,proto3" json:"asset_ids,omitempty"` + StartTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + StopTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=stop_time,json=stopTime,proto3" json:"stop_time,omitempty"` +} + +func (x *AssetsAndTimeRange) Reset() { + *x = AssetsAndTimeRange{} + if protoimpl.UnsafeEnabled { + mi := &file_sift_exports_v1_exports_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AssetsAndTimeRange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AssetsAndTimeRange) ProtoMessage() {} + +func (x *AssetsAndTimeRange) ProtoReflect() protoreflect.Message { + mi := &file_sift_exports_v1_exports_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AssetsAndTimeRange.ProtoReflect.Descriptor instead. +func (*AssetsAndTimeRange) Descriptor() ([]byte, []int) { + return file_sift_exports_v1_exports_proto_rawDescGZIP(), []int{3} +} + +func (x *AssetsAndTimeRange) GetAssetIds() []string { + if x != nil { + return x.AssetIds + } + return nil +} + +func (x *AssetsAndTimeRange) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *AssetsAndTimeRange) GetStopTime() *timestamppb.Timestamp { + if x != nil { + return x.StopTime + } + return nil +} + +type CalculatedChannelConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Expression string `protobuf:"bytes,2,opt,name=expression,proto3" json:"expression,omitempty"` + ChannelReferences []*v2.CalculatedChannelAbstractChannelReference `protobuf:"bytes,3,rep,name=channel_references,json=channelReferences,proto3" json:"channel_references,omitempty"` + Units *string `protobuf:"bytes,4,opt,name=units,proto3,oneof" json:"units,omitempty"` +} + +func (x *CalculatedChannelConfig) Reset() { + *x = CalculatedChannelConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_sift_exports_v1_exports_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CalculatedChannelConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CalculatedChannelConfig) ProtoMessage() {} + +func (x *CalculatedChannelConfig) ProtoReflect() protoreflect.Message { + mi := &file_sift_exports_v1_exports_proto_msgTypes[4] + 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 CalculatedChannelConfig.ProtoReflect.Descriptor instead. +func (*CalculatedChannelConfig) Descriptor() ([]byte, []int) { + return file_sift_exports_v1_exports_proto_rawDescGZIP(), []int{4} +} + +func (x *CalculatedChannelConfig) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CalculatedChannelConfig) GetExpression() string { + if x != nil { + return x.Expression + } + return "" +} + +func (x *CalculatedChannelConfig) GetChannelReferences() []*v2.CalculatedChannelAbstractChannelReference { + if x != nil { + return x.ChannelReferences + } + return nil +} + +func (x *CalculatedChannelConfig) GetUnits() string { + if x != nil && x.Units != nil { + return *x.Units + } + return "" +} + +type ExportOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Whether to use legacy format string for channel headers which contains key-value metadata. + UseLegacyFormat bool `protobuf:"varint,1,opt,name=use_legacy_format,json=useLegacyFormat,proto3" json:"use_legacy_format,omitempty"` + // Whether to simplify channel names by removing the component part of the name if name is unique in export file + SimplifyChannelNames bool `protobuf:"varint,2,opt,name=simplify_channel_names,json=simplifyChannelNames,proto3" json:"simplify_channel_names,omitempty"` + // Whether to combine runs. e.g. channels from the same asset in different runs will be combined into a single column of data. + CombineRuns bool `protobuf:"varint,3,opt,name=combine_runs,json=combineRuns,proto3" json:"combine_runs,omitempty"` + // Split each asset into their own export file + SplitExportByAsset bool `protobuf:"varint,4,opt,name=split_export_by_asset,json=splitExportByAsset,proto3" json:"split_export_by_asset,omitempty"` + // Split each run into their own export file + SplitExportByRun bool `protobuf:"varint,5,opt,name=split_export_by_run,json=splitExportByRun,proto3" json:"split_export_by_run,omitempty"` +} + +func (x *ExportOptions) Reset() { + *x = ExportOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_sift_exports_v1_exports_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportOptions) ProtoMessage() {} + +func (x *ExportOptions) ProtoReflect() protoreflect.Message { + mi := &file_sift_exports_v1_exports_proto_msgTypes[5] + 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 ExportOptions.ProtoReflect.Descriptor instead. +func (*ExportOptions) Descriptor() ([]byte, []int) { + return file_sift_exports_v1_exports_proto_rawDescGZIP(), []int{5} +} + +func (x *ExportOptions) GetUseLegacyFormat() bool { + if x != nil { + return x.UseLegacyFormat + } + return false +} + +func (x *ExportOptions) GetSimplifyChannelNames() bool { + if x != nil { + return x.SimplifyChannelNames + } + return false +} + +func (x *ExportOptions) GetCombineRuns() bool { + if x != nil { + return x.CombineRuns + } + return false +} + +func (x *ExportOptions) GetSplitExportByAsset() bool { + if x != nil { + return x.SplitExportByAsset + } + return false +} + +func (x *ExportOptions) GetSplitExportByRun() bool { + if x != nil { + return x.SplitExportByRun + } + return false +} + +type ExportDataResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Pre-signed URL of exported zip containing export files. This will be blank if + // the job is processed as a background job, in which case `job_id` will be non-empty. + PresignedUrl string `protobuf:"bytes,1,opt,name=presigned_url,json=presignedUrl,proto3" json:"presigned_url,omitempty"` + // This will be non-empty if the export is being processed asynchronously in a background job. + JobId string `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` +} + +func (x *ExportDataResponse) Reset() { + *x = ExportDataResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sift_exports_v1_exports_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportDataResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportDataResponse) ProtoMessage() {} + +func (x *ExportDataResponse) ProtoReflect() protoreflect.Message { + mi := &file_sift_exports_v1_exports_proto_msgTypes[6] + 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 ExportDataResponse.ProtoReflect.Descriptor instead. +func (*ExportDataResponse) Descriptor() ([]byte, []int) { + return file_sift_exports_v1_exports_proto_rawDescGZIP(), []int{6} +} + +func (x *ExportDataResponse) GetPresignedUrl() string { + if x != nil { + return x.PresignedUrl + } + return "" +} + +func (x *ExportDataResponse) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +type GetDownloadUrlRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` +} + +func (x *GetDownloadUrlRequest) Reset() { + *x = GetDownloadUrlRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sift_exports_v1_exports_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDownloadUrlRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDownloadUrlRequest) ProtoMessage() {} + +func (x *GetDownloadUrlRequest) ProtoReflect() protoreflect.Message { + mi := &file_sift_exports_v1_exports_proto_msgTypes[7] + 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 GetDownloadUrlRequest.ProtoReflect.Descriptor instead. +func (*GetDownloadUrlRequest) Descriptor() ([]byte, []int) { + return file_sift_exports_v1_exports_proto_rawDescGZIP(), []int{7} +} + +func (x *GetDownloadUrlRequest) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +type GetDownloadUrlResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PresignedUrl string `protobuf:"bytes,1,opt,name=presigned_url,json=presignedUrl,proto3" json:"presigned_url,omitempty"` +} + +func (x *GetDownloadUrlResponse) Reset() { + *x = GetDownloadUrlResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sift_exports_v1_exports_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDownloadUrlResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDownloadUrlResponse) ProtoMessage() {} + +func (x *GetDownloadUrlResponse) ProtoReflect() protoreflect.Message { + mi := &file_sift_exports_v1_exports_proto_msgTypes[8] + 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 GetDownloadUrlResponse.ProtoReflect.Descriptor instead. +func (*GetDownloadUrlResponse) Descriptor() ([]byte, []int) { + return file_sift_exports_v1_exports_proto_rawDescGZIP(), []int{8} +} + +func (x *GetDownloadUrlResponse) GetPresignedUrl() string { + if x != nil { + return x.PresignedUrl + } + return "" +} + +var File_sift_exports_v1_exports_proto protoreflect.FileDescriptor + +var file_sift_exports_v1_exports_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x73, 0x69, 0x66, 0x74, 0x2f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2f, 0x76, + 0x31, 0x2f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x0f, 0x73, 0x69, 0x66, 0x74, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x76, 0x31, + 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x35, 0x73, 0x69, 0x66, 0x74, 0x2f, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x61, + 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbe, 0x04, 0x0a, 0x11, 0x45, 0x78, 0x70, 0x6f, + 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, + 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x69, 0x66, 0x74, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, 0x52, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x52, 0x0a, 0x13, 0x72, 0x75, + 0x6e, 0x73, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x69, 0x66, 0x74, 0x2e, 0x65, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x73, 0x41, 0x6e, + 0x64, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, 0x52, 0x10, 0x72, 0x75, + 0x6e, 0x73, 0x41, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x58, + 0x0a, 0x15, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x73, 0x69, 0x66, 0x74, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x41, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x61, 0x6e, + 0x67, 0x65, 0x48, 0x00, 0x52, 0x12, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x41, 0x6e, 0x64, 0x54, + 0x69, 0x6d, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x73, 0x12, 0x6b, + 0x0a, 0x1a, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, + 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x73, 0x69, 0x66, 0x74, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x43, + 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x18, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x43, 0x68, 0x61, + 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x4d, 0x0a, 0x0d, 0x6f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x73, 0x69, 0x66, 0x74, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x6f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4a, 0x0a, 0x0e, 0x65, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x69, 0x66, 0x74, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0d, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x89, 0x01, 0x0a, 0x09, 0x54, 0x69, 0x6d, + 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x3e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x73, 0x74, 0x6f, 0x70, + 0x54, 0x69, 0x6d, 0x65, 0x22, 0xae, 0x01, 0x0a, 0x10, 0x52, 0x75, 0x6e, 0x73, 0x41, 0x6e, 0x64, + 0x54, 0x69, 0x6d, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x07, 0x72, 0x75, 0x6e, + 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x06, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x3e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x73, 0x74, 0x6f, 0x70, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x73, 0x74, 0x6f, + 0x70, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xb4, 0x01, 0x0a, 0x12, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, + 0x41, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x09, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x73, 0x12, 0x3e, + 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3c, + 0x0a, 0x09, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x08, 0x73, 0x74, 0x6f, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xfd, 0x01, 0x0a, + 0x17, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x6e, + 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x23, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x7a, 0x0a, 0x12, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x73, 0x69, 0x66, 0x74, 0x2e, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x2e, 0x76, 0x32, + 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x6e, + 0x65, 0x6c, 0x41, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x11, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x00, 0x52, 0x05, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x88, + 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x22, 0xf6, 0x01, 0x0a, + 0x0d, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2a, + 0x0a, 0x11, 0x75, 0x73, 0x65, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x4c, 0x65, + 0x67, 0x61, 0x63, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x69, + 0x6d, 0x70, 0x6c, 0x69, 0x66, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x73, 0x69, 0x6d, 0x70, + 0x6c, 0x69, 0x66, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x5f, 0x72, 0x75, 0x6e, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x52, + 0x75, 0x6e, 0x73, 0x12, 0x31, 0x0a, 0x15, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, 0x65, 0x78, 0x70, + 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x12, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x42, + 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x2d, 0x0a, 0x13, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, + 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x10, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x42, 0x79, 0x52, 0x75, 0x6e, 0x22, 0x5a, 0x0a, 0x12, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, + 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x70, + 0x72, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, + 0x64, 0x22, 0x33, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, + 0x55, 0x72, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x06, 0x6a, 0x6f, + 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x22, 0x42, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x77, + 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x28, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x72, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x70, 0x72, + 0x65, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x72, 0x6c, 0x2a, 0x76, 0x0a, 0x12, 0x45, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x12, 0x24, 0x0a, 0x20, 0x45, 0x58, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x4f, 0x55, 0x54, 0x50, 0x55, + 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x58, 0x50, 0x4f, 0x52, 0x54, + 0x5f, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x43, + 0x53, 0x56, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x58, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x4f, + 0x55, 0x54, 0x50, 0x55, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x53, 0x55, 0x4e, + 0x10, 0x02, 0x32, 0xf4, 0x02, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x0a, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x22, 0x2e, 0x73, 0x69, 0x66, 0x74, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x72, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x69, 0x66, 0x74, 0x2e, 0x65, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x92, 0x41, + 0x1a, 0x12, 0x0a, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x0c, 0x45, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x12, 0xd2, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x77, 0x6e, + 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x72, 0x6c, 0x12, 0x26, 0x2e, 0x73, 0x69, 0x66, 0x74, 0x2e, 0x65, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x77, + 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x27, 0x2e, 0x73, 0x69, 0x66, 0x74, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x72, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6f, 0x92, 0x41, 0x40, 0x12, 0x0e, 0x47, + 0x65, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x72, 0x6c, 0x1a, 0x2e, 0x52, + 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x77, 0x6e, + 0x6c, 0x6f, 0x61, 0x64, 0x20, 0x55, 0x52, 0x4c, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x63, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x20, 0x6a, 0x6f, 0x62, 0x2e, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x70, + 0x6f, 0x72, 0x74, 0x2f, 0x7b, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x6f, 0x77, + 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x2d, 0x75, 0x72, 0x6c, 0x42, 0xd4, 0x01, 0x0a, 0x13, 0x63, 0x6f, + 0x6d, 0x2e, 0x73, 0x69, 0x66, 0x74, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x42, 0x0c, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, + 0x66, 0x74, 0x2d, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x73, 0x69, 0x66, 0x74, 0x2f, 0x67, 0x6f, + 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x73, 0x69, 0x66, 0x74, 0x2f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x53, 0x45, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x69, 0x66, 0x74, 0x2e, 0x45, 0x78, 0x70, 0x6f, + 0x72, 0x74, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0f, 0x53, 0x69, 0x66, 0x74, 0x5c, 0x45, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1b, 0x53, 0x69, 0x66, 0x74, 0x5c, + 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x53, 0x69, 0x66, 0x74, 0x3a, 0x3a, 0x45, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x92, 0x41, 0x13, 0x12, 0x11, 0x0a, + 0x0f, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sift_exports_v1_exports_proto_rawDescOnce sync.Once + file_sift_exports_v1_exports_proto_rawDescData = file_sift_exports_v1_exports_proto_rawDesc +) + +func file_sift_exports_v1_exports_proto_rawDescGZIP() []byte { + file_sift_exports_v1_exports_proto_rawDescOnce.Do(func() { + file_sift_exports_v1_exports_proto_rawDescData = protoimpl.X.CompressGZIP(file_sift_exports_v1_exports_proto_rawDescData) + }) + return file_sift_exports_v1_exports_proto_rawDescData +} + +var file_sift_exports_v1_exports_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_sift_exports_v1_exports_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_sift_exports_v1_exports_proto_goTypes = []interface{}{ + (ExportOutputFormat)(0), // 0: sift.exports.v1.ExportOutputFormat + (*ExportDataRequest)(nil), // 1: sift.exports.v1.ExportDataRequest + (*TimeRange)(nil), // 2: sift.exports.v1.TimeRange + (*RunsAndTimeRange)(nil), // 3: sift.exports.v1.RunsAndTimeRange + (*AssetsAndTimeRange)(nil), // 4: sift.exports.v1.AssetsAndTimeRange + (*CalculatedChannelConfig)(nil), // 5: sift.exports.v1.CalculatedChannelConfig + (*ExportOptions)(nil), // 6: sift.exports.v1.ExportOptions + (*ExportDataResponse)(nil), // 7: sift.exports.v1.ExportDataResponse + (*GetDownloadUrlRequest)(nil), // 8: sift.exports.v1.GetDownloadUrlRequest + (*GetDownloadUrlResponse)(nil), // 9: sift.exports.v1.GetDownloadUrlResponse + (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp + (*v2.CalculatedChannelAbstractChannelReference)(nil), // 11: sift.calculated_channels.v2.CalculatedChannelAbstractChannelReference +} +var file_sift_exports_v1_exports_proto_depIdxs = []int32{ + 2, // 0: sift.exports.v1.ExportDataRequest.time_range:type_name -> sift.exports.v1.TimeRange + 3, // 1: sift.exports.v1.ExportDataRequest.runs_and_time_range:type_name -> sift.exports.v1.RunsAndTimeRange + 4, // 2: sift.exports.v1.ExportDataRequest.assets_and_time_range:type_name -> sift.exports.v1.AssetsAndTimeRange + 5, // 3: sift.exports.v1.ExportDataRequest.calculated_channel_configs:type_name -> sift.exports.v1.CalculatedChannelConfig + 0, // 4: sift.exports.v1.ExportDataRequest.output_format:type_name -> sift.exports.v1.ExportOutputFormat + 6, // 5: sift.exports.v1.ExportDataRequest.export_options:type_name -> sift.exports.v1.ExportOptions + 10, // 6: sift.exports.v1.TimeRange.start_time:type_name -> google.protobuf.Timestamp + 10, // 7: sift.exports.v1.TimeRange.stop_time:type_name -> google.protobuf.Timestamp + 10, // 8: sift.exports.v1.RunsAndTimeRange.start_time:type_name -> google.protobuf.Timestamp + 10, // 9: sift.exports.v1.RunsAndTimeRange.stop_time:type_name -> google.protobuf.Timestamp + 10, // 10: sift.exports.v1.AssetsAndTimeRange.start_time:type_name -> google.protobuf.Timestamp + 10, // 11: sift.exports.v1.AssetsAndTimeRange.stop_time:type_name -> google.protobuf.Timestamp + 11, // 12: sift.exports.v1.CalculatedChannelConfig.channel_references:type_name -> sift.calculated_channels.v2.CalculatedChannelAbstractChannelReference + 1, // 13: sift.exports.v1.ExportService.ExportData:input_type -> sift.exports.v1.ExportDataRequest + 8, // 14: sift.exports.v1.ExportService.GetDownloadUrl:input_type -> sift.exports.v1.GetDownloadUrlRequest + 7, // 15: sift.exports.v1.ExportService.ExportData:output_type -> sift.exports.v1.ExportDataResponse + 9, // 16: sift.exports.v1.ExportService.GetDownloadUrl:output_type -> sift.exports.v1.GetDownloadUrlResponse + 15, // [15:17] is the sub-list for method output_type + 13, // [13:15] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name +} + +func init() { file_sift_exports_v1_exports_proto_init() } +func file_sift_exports_v1_exports_proto_init() { + if File_sift_exports_v1_exports_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sift_exports_v1_exports_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportDataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sift_exports_v1_exports_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TimeRange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sift_exports_v1_exports_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RunsAndTimeRange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sift_exports_v1_exports_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AssetsAndTimeRange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sift_exports_v1_exports_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CalculatedChannelConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sift_exports_v1_exports_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sift_exports_v1_exports_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportDataResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sift_exports_v1_exports_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDownloadUrlRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sift_exports_v1_exports_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDownloadUrlResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_sift_exports_v1_exports_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*ExportDataRequest_TimeRange)(nil), + (*ExportDataRequest_RunsAndTimeRange)(nil), + (*ExportDataRequest_AssetsAndTimeRange)(nil), + } + file_sift_exports_v1_exports_proto_msgTypes[4].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_sift_exports_v1_exports_proto_rawDesc, + NumEnums: 1, + NumMessages: 9, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_sift_exports_v1_exports_proto_goTypes, + DependencyIndexes: file_sift_exports_v1_exports_proto_depIdxs, + EnumInfos: file_sift_exports_v1_exports_proto_enumTypes, + MessageInfos: file_sift_exports_v1_exports_proto_msgTypes, + }.Build() + File_sift_exports_v1_exports_proto = out.File + file_sift_exports_v1_exports_proto_rawDesc = nil + file_sift_exports_v1_exports_proto_goTypes = nil + file_sift_exports_v1_exports_proto_depIdxs = nil +} diff --git a/go/gen/sift/exports/v1/exports.pb.gw.go b/go/gen/sift/exports/v1/exports.pb.gw.go new file mode 100644 index 000000000..b5663d9d1 --- /dev/null +++ b/go/gen/sift/exports/v1/exports.pb.gw.go @@ -0,0 +1,274 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: sift/exports/v1/exports.proto + +/* +Package exportsv1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package exportsv1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_ExportService_ExportData_0(ctx context.Context, marshaler runtime.Marshaler, client ExportServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ExportDataRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ExportData(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ExportService_ExportData_0(ctx context.Context, marshaler runtime.Marshaler, server ExportServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ExportDataRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ExportData(ctx, &protoReq) + return msg, metadata, err + +} + +func request_ExportService_GetDownloadUrl_0(ctx context.Context, marshaler runtime.Marshaler, client ExportServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetDownloadUrlRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["job_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "job_id") + } + + protoReq.JobId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "job_id", err) + } + + msg, err := client.GetDownloadUrl(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ExportService_GetDownloadUrl_0(ctx context.Context, marshaler runtime.Marshaler, server ExportServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetDownloadUrlRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["job_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "job_id") + } + + protoReq.JobId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "job_id", err) + } + + msg, err := server.GetDownloadUrl(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterExportServiceHandlerServer registers the http handlers for service ExportService to "mux". +// UnaryRPC :call ExportServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterExportServiceHandlerFromEndpoint instead. +func RegisterExportServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ExportServiceServer) error { + + mux.Handle("POST", pattern_ExportService_ExportData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sift.exports.v1.ExportService/ExportData", runtime.WithHTTPPathPattern("/api/v1/export")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ExportService_ExportData_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ExportService_ExportData_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_ExportService_GetDownloadUrl_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sift.exports.v1.ExportService/GetDownloadUrl", runtime.WithHTTPPathPattern("/api/v1/export/{job_id}/download-url")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ExportService_GetDownloadUrl_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ExportService_GetDownloadUrl_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterExportServiceHandlerFromEndpoint is same as RegisterExportServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterExportServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.DialContext(ctx, endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterExportServiceHandler(ctx, mux, conn) +} + +// RegisterExportServiceHandler registers the http handlers for service ExportService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterExportServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterExportServiceHandlerClient(ctx, mux, NewExportServiceClient(conn)) +} + +// RegisterExportServiceHandlerClient registers the http handlers for service ExportService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ExportServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ExportServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "ExportServiceClient" to call the correct interceptors. +func RegisterExportServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ExportServiceClient) error { + + mux.Handle("POST", pattern_ExportService_ExportData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sift.exports.v1.ExportService/ExportData", runtime.WithHTTPPathPattern("/api/v1/export")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ExportService_ExportData_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ExportService_ExportData_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_ExportService_GetDownloadUrl_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sift.exports.v1.ExportService/GetDownloadUrl", runtime.WithHTTPPathPattern("/api/v1/export/{job_id}/download-url")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ExportService_GetDownloadUrl_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ExportService_GetDownloadUrl_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_ExportService_ExportData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "export"}, "")) + + pattern_ExportService_GetDownloadUrl_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "export", "job_id", "download-url"}, "")) +) + +var ( + forward_ExportService_ExportData_0 = runtime.ForwardResponseMessage + + forward_ExportService_GetDownloadUrl_0 = runtime.ForwardResponseMessage +) diff --git a/go/gen/sift/exports/v1/exports_vtproto.pb.go b/go/gen/sift/exports/v1/exports_vtproto.pb.go new file mode 100644 index 000000000..69e1d6bb1 --- /dev/null +++ b/go/gen/sift/exports/v1/exports_vtproto.pb.go @@ -0,0 +1,4940 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: v0.6.0 +// source: sift/exports/v1/exports.proto + +package exportsv1 + +import ( + context "context" + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + timestamppb1 "github.com/planetscale/vtprotobuf/types/known/timestamppb" + v2 "github.com/sift-stack/sift/go/gen/sift/calculated_channels/v2" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + proto "google.golang.org/protobuf/proto" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + io "io" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +func (m *ExportDataRequest) CloneVT() *ExportDataRequest { + if m == nil { + return (*ExportDataRequest)(nil) + } + r := new(ExportDataRequest) + r.OutputFormat = m.OutputFormat + r.ExportOptions = m.ExportOptions.CloneVT() + if m.TimeSelection != nil { + r.TimeSelection = m.TimeSelection.(interface { + CloneVT() isExportDataRequest_TimeSelection + }).CloneVT() + } + if rhs := m.ChannelIds; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.ChannelIds = tmpContainer + } + if rhs := m.CalculatedChannelConfigs; rhs != nil { + tmpContainer := make([]*CalculatedChannelConfig, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.CalculatedChannelConfigs = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ExportDataRequest) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ExportDataRequest_TimeRange) CloneVT() isExportDataRequest_TimeSelection { + if m == nil { + return (*ExportDataRequest_TimeRange)(nil) + } + r := new(ExportDataRequest_TimeRange) + r.TimeRange = m.TimeRange.CloneVT() + return r +} + +func (m *ExportDataRequest_RunsAndTimeRange) CloneVT() isExportDataRequest_TimeSelection { + if m == nil { + return (*ExportDataRequest_RunsAndTimeRange)(nil) + } + r := new(ExportDataRequest_RunsAndTimeRange) + r.RunsAndTimeRange = m.RunsAndTimeRange.CloneVT() + return r +} + +func (m *ExportDataRequest_AssetsAndTimeRange) CloneVT() isExportDataRequest_TimeSelection { + if m == nil { + return (*ExportDataRequest_AssetsAndTimeRange)(nil) + } + r := new(ExportDataRequest_AssetsAndTimeRange) + r.AssetsAndTimeRange = m.AssetsAndTimeRange.CloneVT() + return r +} + +func (m *TimeRange) CloneVT() *TimeRange { + if m == nil { + return (*TimeRange)(nil) + } + r := new(TimeRange) + r.StartTime = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.StartTime).CloneVT()) + r.StopTime = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.StopTime).CloneVT()) + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *TimeRange) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *RunsAndTimeRange) CloneVT() *RunsAndTimeRange { + if m == nil { + return (*RunsAndTimeRange)(nil) + } + r := new(RunsAndTimeRange) + r.StartTime = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.StartTime).CloneVT()) + r.StopTime = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.StopTime).CloneVT()) + if rhs := m.RunIds; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.RunIds = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *RunsAndTimeRange) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *AssetsAndTimeRange) CloneVT() *AssetsAndTimeRange { + if m == nil { + return (*AssetsAndTimeRange)(nil) + } + r := new(AssetsAndTimeRange) + r.StartTime = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.StartTime).CloneVT()) + r.StopTime = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.StopTime).CloneVT()) + if rhs := m.AssetIds; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.AssetIds = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *AssetsAndTimeRange) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *CalculatedChannelConfig) CloneVT() *CalculatedChannelConfig { + if m == nil { + return (*CalculatedChannelConfig)(nil) + } + r := new(CalculatedChannelConfig) + r.Name = m.Name + r.Expression = m.Expression + if rhs := m.ChannelReferences; rhs != nil { + tmpContainer := make([]*v2.CalculatedChannelAbstractChannelReference, len(rhs)) + for k, v := range rhs { + if vtpb, ok := interface{}(v).(interface { + CloneVT() *v2.CalculatedChannelAbstractChannelReference + }); ok { + tmpContainer[k] = vtpb.CloneVT() + } else { + tmpContainer[k] = proto.Clone(v).(*v2.CalculatedChannelAbstractChannelReference) + } + } + r.ChannelReferences = tmpContainer + } + if rhs := m.Units; rhs != nil { + tmpVal := *rhs + r.Units = &tmpVal + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *CalculatedChannelConfig) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ExportOptions) CloneVT() *ExportOptions { + if m == nil { + return (*ExportOptions)(nil) + } + r := new(ExportOptions) + r.UseLegacyFormat = m.UseLegacyFormat + r.SimplifyChannelNames = m.SimplifyChannelNames + r.CombineRuns = m.CombineRuns + r.SplitExportByAsset = m.SplitExportByAsset + r.SplitExportByRun = m.SplitExportByRun + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ExportOptions) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ExportDataResponse) CloneVT() *ExportDataResponse { + if m == nil { + return (*ExportDataResponse)(nil) + } + r := new(ExportDataResponse) + r.PresignedUrl = m.PresignedUrl + r.JobId = m.JobId + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ExportDataResponse) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *GetDownloadUrlRequest) CloneVT() *GetDownloadUrlRequest { + if m == nil { + return (*GetDownloadUrlRequest)(nil) + } + r := new(GetDownloadUrlRequest) + r.JobId = m.JobId + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *GetDownloadUrlRequest) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *GetDownloadUrlResponse) CloneVT() *GetDownloadUrlResponse { + if m == nil { + return (*GetDownloadUrlResponse)(nil) + } + r := new(GetDownloadUrlResponse) + r.PresignedUrl = m.PresignedUrl + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *GetDownloadUrlResponse) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (this *ExportDataRequest) EqualVT(that *ExportDataRequest) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.TimeSelection == nil && that.TimeSelection != nil { + return false + } else if this.TimeSelection != nil { + if that.TimeSelection == nil { + return false + } + if !this.TimeSelection.(interface { + EqualVT(isExportDataRequest_TimeSelection) bool + }).EqualVT(that.TimeSelection) { + return false + } + } + if len(this.ChannelIds) != len(that.ChannelIds) { + return false + } + for i, vx := range this.ChannelIds { + vy := that.ChannelIds[i] + if vx != vy { + return false + } + } + if len(this.CalculatedChannelConfigs) != len(that.CalculatedChannelConfigs) { + return false + } + for i, vx := range this.CalculatedChannelConfigs { + vy := that.CalculatedChannelConfigs[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &CalculatedChannelConfig{} + } + if q == nil { + q = &CalculatedChannelConfig{} + } + if !p.EqualVT(q) { + return false + } + } + } + if this.OutputFormat != that.OutputFormat { + return false + } + if !this.ExportOptions.EqualVT(that.ExportOptions) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ExportDataRequest) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ExportDataRequest) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ExportDataRequest_TimeRange) EqualVT(thatIface isExportDataRequest_TimeSelection) bool { + that, ok := thatIface.(*ExportDataRequest_TimeRange) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.TimeRange, that.TimeRange; p != q { + if p == nil { + p = &TimeRange{} + } + if q == nil { + q = &TimeRange{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *ExportDataRequest_RunsAndTimeRange) EqualVT(thatIface isExportDataRequest_TimeSelection) bool { + that, ok := thatIface.(*ExportDataRequest_RunsAndTimeRange) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.RunsAndTimeRange, that.RunsAndTimeRange; p != q { + if p == nil { + p = &RunsAndTimeRange{} + } + if q == nil { + q = &RunsAndTimeRange{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *ExportDataRequest_AssetsAndTimeRange) EqualVT(thatIface isExportDataRequest_TimeSelection) bool { + that, ok := thatIface.(*ExportDataRequest_AssetsAndTimeRange) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.AssetsAndTimeRange, that.AssetsAndTimeRange; p != q { + if p == nil { + p = &AssetsAndTimeRange{} + } + if q == nil { + q = &AssetsAndTimeRange{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *TimeRange) EqualVT(that *TimeRange) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if !(*timestamppb1.Timestamp)(this.StartTime).EqualVT((*timestamppb1.Timestamp)(that.StartTime)) { + return false + } + if !(*timestamppb1.Timestamp)(this.StopTime).EqualVT((*timestamppb1.Timestamp)(that.StopTime)) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *TimeRange) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*TimeRange) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *RunsAndTimeRange) EqualVT(that *RunsAndTimeRange) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if len(this.RunIds) != len(that.RunIds) { + return false + } + for i, vx := range this.RunIds { + vy := that.RunIds[i] + if vx != vy { + return false + } + } + if !(*timestamppb1.Timestamp)(this.StartTime).EqualVT((*timestamppb1.Timestamp)(that.StartTime)) { + return false + } + if !(*timestamppb1.Timestamp)(this.StopTime).EqualVT((*timestamppb1.Timestamp)(that.StopTime)) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *RunsAndTimeRange) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*RunsAndTimeRange) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *AssetsAndTimeRange) EqualVT(that *AssetsAndTimeRange) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if len(this.AssetIds) != len(that.AssetIds) { + return false + } + for i, vx := range this.AssetIds { + vy := that.AssetIds[i] + if vx != vy { + return false + } + } + if !(*timestamppb1.Timestamp)(this.StartTime).EqualVT((*timestamppb1.Timestamp)(that.StartTime)) { + return false + } + if !(*timestamppb1.Timestamp)(this.StopTime).EqualVT((*timestamppb1.Timestamp)(that.StopTime)) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *AssetsAndTimeRange) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*AssetsAndTimeRange) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *CalculatedChannelConfig) EqualVT(that *CalculatedChannelConfig) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Name != that.Name { + return false + } + if this.Expression != that.Expression { + return false + } + if len(this.ChannelReferences) != len(that.ChannelReferences) { + return false + } + for i, vx := range this.ChannelReferences { + vy := that.ChannelReferences[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &v2.CalculatedChannelAbstractChannelReference{} + } + if q == nil { + q = &v2.CalculatedChannelAbstractChannelReference{} + } + if equal, ok := interface{}(p).(interface { + EqualVT(*v2.CalculatedChannelAbstractChannelReference) bool + }); ok { + if !equal.EqualVT(q) { + return false + } + } else if !proto.Equal(p, q) { + return false + } + } + } + if p, q := this.Units, that.Units; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *CalculatedChannelConfig) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*CalculatedChannelConfig) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ExportOptions) EqualVT(that *ExportOptions) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.UseLegacyFormat != that.UseLegacyFormat { + return false + } + if this.SimplifyChannelNames != that.SimplifyChannelNames { + return false + } + if this.CombineRuns != that.CombineRuns { + return false + } + if this.SplitExportByAsset != that.SplitExportByAsset { + return false + } + if this.SplitExportByRun != that.SplitExportByRun { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ExportOptions) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ExportOptions) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ExportDataResponse) EqualVT(that *ExportDataResponse) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.PresignedUrl != that.PresignedUrl { + return false + } + if this.JobId != that.JobId { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ExportDataResponse) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ExportDataResponse) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *GetDownloadUrlRequest) EqualVT(that *GetDownloadUrlRequest) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.JobId != that.JobId { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *GetDownloadUrlRequest) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*GetDownloadUrlRequest) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *GetDownloadUrlResponse) EqualVT(that *GetDownloadUrlResponse) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.PresignedUrl != that.PresignedUrl { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *GetDownloadUrlResponse) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*GetDownloadUrlResponse) + if !ok { + return false + } + return this.EqualVT(that) +} + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// ExportServiceClient is the client API for ExportService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ExportServiceClient interface { + ExportData(ctx context.Context, in *ExportDataRequest, opts ...grpc.CallOption) (*ExportDataResponse, error) + GetDownloadUrl(ctx context.Context, in *GetDownloadUrlRequest, opts ...grpc.CallOption) (*GetDownloadUrlResponse, error) +} + +type exportServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewExportServiceClient(cc grpc.ClientConnInterface) ExportServiceClient { + return &exportServiceClient{cc} +} + +func (c *exportServiceClient) ExportData(ctx context.Context, in *ExportDataRequest, opts ...grpc.CallOption) (*ExportDataResponse, error) { + out := new(ExportDataResponse) + err := c.cc.Invoke(ctx, "/sift.exports.v1.ExportService/ExportData", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *exportServiceClient) GetDownloadUrl(ctx context.Context, in *GetDownloadUrlRequest, opts ...grpc.CallOption) (*GetDownloadUrlResponse, error) { + out := new(GetDownloadUrlResponse) + err := c.cc.Invoke(ctx, "/sift.exports.v1.ExportService/GetDownloadUrl", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ExportServiceServer is the server API for ExportService service. +// All implementations must embed UnimplementedExportServiceServer +// for forward compatibility +type ExportServiceServer interface { + ExportData(context.Context, *ExportDataRequest) (*ExportDataResponse, error) + GetDownloadUrl(context.Context, *GetDownloadUrlRequest) (*GetDownloadUrlResponse, error) + mustEmbedUnimplementedExportServiceServer() +} + +// UnimplementedExportServiceServer must be embedded to have forward compatible implementations. +type UnimplementedExportServiceServer struct { +} + +func (UnimplementedExportServiceServer) ExportData(context.Context, *ExportDataRequest) (*ExportDataResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExportData not implemented") +} +func (UnimplementedExportServiceServer) GetDownloadUrl(context.Context, *GetDownloadUrlRequest) (*GetDownloadUrlResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDownloadUrl not implemented") +} +func (UnimplementedExportServiceServer) mustEmbedUnimplementedExportServiceServer() {} + +// UnsafeExportServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ExportServiceServer will +// result in compilation errors. +type UnsafeExportServiceServer interface { + mustEmbedUnimplementedExportServiceServer() +} + +func RegisterExportServiceServer(s grpc.ServiceRegistrar, srv ExportServiceServer) { + s.RegisterService(&ExportService_ServiceDesc, srv) +} + +func _ExportService_ExportData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExportDataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExportServiceServer).ExportData(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sift.exports.v1.ExportService/ExportData", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExportServiceServer).ExportData(ctx, req.(*ExportDataRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ExportService_GetDownloadUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDownloadUrlRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExportServiceServer).GetDownloadUrl(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sift.exports.v1.ExportService/GetDownloadUrl", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExportServiceServer).GetDownloadUrl(ctx, req.(*GetDownloadUrlRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ExportService_ServiceDesc is the grpc.ServiceDesc for ExportService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ExportService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "sift.exports.v1.ExportService", + HandlerType: (*ExportServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ExportData", + Handler: _ExportService_ExportData_Handler, + }, + { + MethodName: "GetDownloadUrl", + Handler: _ExportService_GetDownloadUrl_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "sift/exports/v1/exports.proto", +} + +func (m *ExportDataRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExportDataRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ExportDataRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if vtmsg, ok := m.TimeSelection.(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if m.ExportOptions != nil { + size, err := m.ExportOptions.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } + if m.OutputFormat != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OutputFormat)) + i-- + dAtA[i] = 0x30 + } + if len(m.CalculatedChannelConfigs) > 0 { + for iNdEx := len(m.CalculatedChannelConfigs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.CalculatedChannelConfigs[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + } + if len(m.ChannelIds) > 0 { + for iNdEx := len(m.ChannelIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ChannelIds[iNdEx]) + copy(dAtA[i:], m.ChannelIds[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ChannelIds[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + return len(dAtA) - i, nil +} + +func (m *ExportDataRequest_TimeRange) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ExportDataRequest_TimeRange) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.TimeRange != nil { + size, err := m.TimeRange.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *ExportDataRequest_RunsAndTimeRange) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ExportDataRequest_RunsAndTimeRange) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.RunsAndTimeRange != nil { + size, err := m.RunsAndTimeRange.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *ExportDataRequest_AssetsAndTimeRange) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ExportDataRequest_AssetsAndTimeRange) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.AssetsAndTimeRange != nil { + size, err := m.AssetsAndTimeRange.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *TimeRange) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TimeRange) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TimeRange) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.StopTime != nil { + size, err := (*timestamppb1.Timestamp)(m.StopTime).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.StartTime != nil { + size, err := (*timestamppb1.Timestamp)(m.StartTime).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RunsAndTimeRange) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RunsAndTimeRange) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *RunsAndTimeRange) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.StopTime != nil { + size, err := (*timestamppb1.Timestamp)(m.StopTime).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.StartTime != nil { + size, err := (*timestamppb1.Timestamp)(m.StartTime).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if len(m.RunIds) > 0 { + for iNdEx := len(m.RunIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.RunIds[iNdEx]) + copy(dAtA[i:], m.RunIds[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RunIds[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *AssetsAndTimeRange) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AssetsAndTimeRange) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AssetsAndTimeRange) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.StopTime != nil { + size, err := (*timestamppb1.Timestamp)(m.StopTime).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.StartTime != nil { + size, err := (*timestamppb1.Timestamp)(m.StartTime).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if len(m.AssetIds) > 0 { + for iNdEx := len(m.AssetIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AssetIds[iNdEx]) + copy(dAtA[i:], m.AssetIds[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AssetIds[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *CalculatedChannelConfig) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CalculatedChannelConfig) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *CalculatedChannelConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Units != nil { + i -= len(*m.Units) + copy(dAtA[i:], *m.Units) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.Units))) + i-- + dAtA[i] = 0x22 + } + if len(m.ChannelReferences) > 0 { + for iNdEx := len(m.ChannelReferences) - 1; iNdEx >= 0; iNdEx-- { + if vtmsg, ok := interface{}(m.ChannelReferences[iNdEx]).(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + } else { + encoded, err := proto.Marshal(m.ChannelReferences[iNdEx]) + if err != nil { + return 0, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Expression) > 0 { + i -= len(m.Expression) + copy(dAtA[i:], m.Expression) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Expression))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExportOptions) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExportOptions) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ExportOptions) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.SplitExportByRun { + i-- + if m.SplitExportByRun { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.SplitExportByAsset { + i-- + if m.SplitExportByAsset { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.CombineRuns { + i-- + if m.CombineRuns { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.SimplifyChannelNames { + i-- + if m.SimplifyChannelNames { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if m.UseLegacyFormat { + i-- + if m.UseLegacyFormat { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ExportDataResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExportDataResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ExportDataResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.JobId) > 0 { + i -= len(m.JobId) + copy(dAtA[i:], m.JobId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.JobId))) + i-- + dAtA[i] = 0x12 + } + if len(m.PresignedUrl) > 0 { + i -= len(m.PresignedUrl) + copy(dAtA[i:], m.PresignedUrl) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PresignedUrl))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetDownloadUrlRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetDownloadUrlRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetDownloadUrlRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.JobId) > 0 { + i -= len(m.JobId) + copy(dAtA[i:], m.JobId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.JobId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetDownloadUrlResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetDownloadUrlResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetDownloadUrlResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.PresignedUrl) > 0 { + i -= len(m.PresignedUrl) + copy(dAtA[i:], m.PresignedUrl) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PresignedUrl))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExportDataRequest) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExportDataRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ExportDataRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.ExportOptions != nil { + size, err := m.ExportOptions.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } + if m.OutputFormat != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OutputFormat)) + i-- + dAtA[i] = 0x30 + } + if len(m.CalculatedChannelConfigs) > 0 { + for iNdEx := len(m.CalculatedChannelConfigs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.CalculatedChannelConfigs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + } + if len(m.ChannelIds) > 0 { + for iNdEx := len(m.ChannelIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ChannelIds[iNdEx]) + copy(dAtA[i:], m.ChannelIds[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ChannelIds[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if msg, ok := m.TimeSelection.(*ExportDataRequest_AssetsAndTimeRange); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.TimeSelection.(*ExportDataRequest_RunsAndTimeRange); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.TimeSelection.(*ExportDataRequest_TimeRange); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + return len(dAtA) - i, nil +} + +func (m *ExportDataRequest_TimeRange) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ExportDataRequest_TimeRange) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.TimeRange != nil { + size, err := m.TimeRange.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *ExportDataRequest_RunsAndTimeRange) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ExportDataRequest_RunsAndTimeRange) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.RunsAndTimeRange != nil { + size, err := m.RunsAndTimeRange.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *ExportDataRequest_AssetsAndTimeRange) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ExportDataRequest_AssetsAndTimeRange) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.AssetsAndTimeRange != nil { + size, err := m.AssetsAndTimeRange.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *TimeRange) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TimeRange) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TimeRange) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.StopTime != nil { + size, err := (*timestamppb1.Timestamp)(m.StopTime).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.StartTime != nil { + size, err := (*timestamppb1.Timestamp)(m.StartTime).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RunsAndTimeRange) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RunsAndTimeRange) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *RunsAndTimeRange) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.StopTime != nil { + size, err := (*timestamppb1.Timestamp)(m.StopTime).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.StartTime != nil { + size, err := (*timestamppb1.Timestamp)(m.StartTime).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if len(m.RunIds) > 0 { + for iNdEx := len(m.RunIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.RunIds[iNdEx]) + copy(dAtA[i:], m.RunIds[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RunIds[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *AssetsAndTimeRange) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AssetsAndTimeRange) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *AssetsAndTimeRange) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.StopTime != nil { + size, err := (*timestamppb1.Timestamp)(m.StopTime).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.StartTime != nil { + size, err := (*timestamppb1.Timestamp)(m.StartTime).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if len(m.AssetIds) > 0 { + for iNdEx := len(m.AssetIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AssetIds[iNdEx]) + copy(dAtA[i:], m.AssetIds[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AssetIds[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *CalculatedChannelConfig) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CalculatedChannelConfig) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *CalculatedChannelConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Units != nil { + i -= len(*m.Units) + copy(dAtA[i:], *m.Units) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.Units))) + i-- + dAtA[i] = 0x22 + } + if len(m.ChannelReferences) > 0 { + for iNdEx := len(m.ChannelReferences) - 1; iNdEx >= 0; iNdEx-- { + if vtmsg, ok := interface{}(m.ChannelReferences[iNdEx]).(interface { + MarshalToSizedBufferVTStrict([]byte) (int, error) + }); ok { + size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + } else { + encoded, err := proto.Marshal(m.ChannelReferences[iNdEx]) + if err != nil { + return 0, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Expression) > 0 { + i -= len(m.Expression) + copy(dAtA[i:], m.Expression) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Expression))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExportOptions) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExportOptions) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ExportOptions) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.SplitExportByRun { + i-- + if m.SplitExportByRun { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.SplitExportByAsset { + i-- + if m.SplitExportByAsset { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.CombineRuns { + i-- + if m.CombineRuns { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.SimplifyChannelNames { + i-- + if m.SimplifyChannelNames { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if m.UseLegacyFormat { + i-- + if m.UseLegacyFormat { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ExportDataResponse) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExportDataResponse) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ExportDataResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.JobId) > 0 { + i -= len(m.JobId) + copy(dAtA[i:], m.JobId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.JobId))) + i-- + dAtA[i] = 0x12 + } + if len(m.PresignedUrl) > 0 { + i -= len(m.PresignedUrl) + copy(dAtA[i:], m.PresignedUrl) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PresignedUrl))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetDownloadUrlRequest) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetDownloadUrlRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *GetDownloadUrlRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.JobId) > 0 { + i -= len(m.JobId) + copy(dAtA[i:], m.JobId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.JobId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetDownloadUrlResponse) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetDownloadUrlResponse) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *GetDownloadUrlResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.PresignedUrl) > 0 { + i -= len(m.PresignedUrl) + copy(dAtA[i:], m.PresignedUrl) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PresignedUrl))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExportDataRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if vtmsg, ok := m.TimeSelection.(interface{ SizeVT() int }); ok { + n += vtmsg.SizeVT() + } + if len(m.ChannelIds) > 0 { + for _, s := range m.ChannelIds { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.CalculatedChannelConfigs) > 0 { + for _, e := range m.CalculatedChannelConfigs { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.OutputFormat != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.OutputFormat)) + } + if m.ExportOptions != nil { + l = m.ExportOptions.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ExportDataRequest_TimeRange) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TimeRange != nil { + l = m.TimeRange.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *ExportDataRequest_RunsAndTimeRange) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RunsAndTimeRange != nil { + l = m.RunsAndTimeRange.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *ExportDataRequest_AssetsAndTimeRange) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AssetsAndTimeRange != nil { + l = m.AssetsAndTimeRange.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *TimeRange) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.StartTime != nil { + l = (*timestamppb1.Timestamp)(m.StartTime).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.StopTime != nil { + l = (*timestamppb1.Timestamp)(m.StopTime).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *RunsAndTimeRange) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.RunIds) > 0 { + for _, s := range m.RunIds { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.StartTime != nil { + l = (*timestamppb1.Timestamp)(m.StartTime).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.StopTime != nil { + l = (*timestamppb1.Timestamp)(m.StopTime).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AssetsAndTimeRange) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.AssetIds) > 0 { + for _, s := range m.AssetIds { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.StartTime != nil { + l = (*timestamppb1.Timestamp)(m.StartTime).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.StopTime != nil { + l = (*timestamppb1.Timestamp)(m.StopTime).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *CalculatedChannelConfig) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Expression) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.ChannelReferences) > 0 { + for _, e := range m.ChannelReferences { + if size, ok := interface{}(e).(interface { + SizeVT() int + }); ok { + l = size.SizeVT() + } else { + l = proto.Size(e) + } + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.Units != nil { + l = len(*m.Units) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ExportOptions) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.UseLegacyFormat { + n += 2 + } + if m.SimplifyChannelNames { + n += 2 + } + if m.CombineRuns { + n += 2 + } + if m.SplitExportByAsset { + n += 2 + } + if m.SplitExportByRun { + n += 2 + } + n += len(m.unknownFields) + return n +} + +func (m *ExportDataResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PresignedUrl) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.JobId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *GetDownloadUrlRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.JobId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *GetDownloadUrlResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PresignedUrl) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ExportDataRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExportDataRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExportDataRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeRange", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.TimeSelection.(*ExportDataRequest_TimeRange); ok { + if err := oneof.TimeRange.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &TimeRange{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.TimeSelection = &ExportDataRequest_TimeRange{TimeRange: v} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RunsAndTimeRange", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.TimeSelection.(*ExportDataRequest_RunsAndTimeRange); ok { + if err := oneof.RunsAndTimeRange.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &RunsAndTimeRange{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.TimeSelection = &ExportDataRequest_RunsAndTimeRange{RunsAndTimeRange: v} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AssetsAndTimeRange", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.TimeSelection.(*ExportDataRequest_AssetsAndTimeRange); ok { + if err := oneof.AssetsAndTimeRange.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &AssetsAndTimeRange{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.TimeSelection = &ExportDataRequest_AssetsAndTimeRange{AssetsAndTimeRange: v} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChannelIds = append(m.ChannelIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CalculatedChannelConfigs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CalculatedChannelConfigs = append(m.CalculatedChannelConfigs, &CalculatedChannelConfig{}) + if err := m.CalculatedChannelConfigs[len(m.CalculatedChannelConfigs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutputFormat", wireType) + } + m.OutputFormat = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OutputFormat |= ExportOutputFormat(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExportOptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExportOptions == nil { + m.ExportOptions = &ExportOptions{} + } + if err := m.ExportOptions.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TimeRange) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TimeRange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TimeRange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StartTime == nil { + m.StartTime = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.StartTime).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StopTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StopTime == nil { + m.StopTime = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.StopTime).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RunsAndTimeRange) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RunsAndTimeRange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RunsAndTimeRange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RunIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RunIds = append(m.RunIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StartTime == nil { + m.StartTime = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.StartTime).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StopTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StopTime == nil { + m.StopTime = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.StopTime).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AssetsAndTimeRange) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AssetsAndTimeRange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AssetsAndTimeRange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AssetIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AssetIds = append(m.AssetIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StartTime == nil { + m.StartTime = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.StartTime).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StopTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StopTime == nil { + m.StopTime = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.StopTime).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CalculatedChannelConfig) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CalculatedChannelConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CalculatedChannelConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Expression = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelReferences", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChannelReferences = append(m.ChannelReferences, &v2.CalculatedChannelAbstractChannelReference{}) + if unmarshal, ok := interface{}(m.ChannelReferences[len(m.ChannelReferences)-1]).(interface { + UnmarshalVT([]byte) error + }); ok { + if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.ChannelReferences[len(m.ChannelReferences)-1]); err != nil { + return err + } + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Units", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Units = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExportOptions) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExportOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExportOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UseLegacyFormat", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.UseLegacyFormat = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SimplifyChannelNames", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SimplifyChannelNames = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CombineRuns", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CombineRuns = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SplitExportByAsset", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SplitExportByAsset = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SplitExportByRun", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SplitExportByRun = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExportDataResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExportDataResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExportDataResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PresignedUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PresignedUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JobId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.JobId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetDownloadUrlRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetDownloadUrlRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetDownloadUrlRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JobId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.JobId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetDownloadUrlResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetDownloadUrlResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetDownloadUrlResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PresignedUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PresignedUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExportDataRequest) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExportDataRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExportDataRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeRange", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.TimeSelection.(*ExportDataRequest_TimeRange); ok { + if err := oneof.TimeRange.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &TimeRange{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.TimeSelection = &ExportDataRequest_TimeRange{TimeRange: v} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RunsAndTimeRange", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.TimeSelection.(*ExportDataRequest_RunsAndTimeRange); ok { + if err := oneof.RunsAndTimeRange.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &RunsAndTimeRange{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.TimeSelection = &ExportDataRequest_RunsAndTimeRange{RunsAndTimeRange: v} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AssetsAndTimeRange", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.TimeSelection.(*ExportDataRequest_AssetsAndTimeRange); ok { + if err := oneof.AssetsAndTimeRange.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &AssetsAndTimeRange{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.TimeSelection = &ExportDataRequest_AssetsAndTimeRange{AssetsAndTimeRange: v} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.ChannelIds = append(m.ChannelIds, stringValue) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CalculatedChannelConfigs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CalculatedChannelConfigs = append(m.CalculatedChannelConfigs, &CalculatedChannelConfig{}) + if err := m.CalculatedChannelConfigs[len(m.CalculatedChannelConfigs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutputFormat", wireType) + } + m.OutputFormat = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OutputFormat |= ExportOutputFormat(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExportOptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExportOptions == nil { + m.ExportOptions = &ExportOptions{} + } + if err := m.ExportOptions.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TimeRange) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TimeRange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TimeRange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StartTime == nil { + m.StartTime = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.StartTime).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StopTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StopTime == nil { + m.StopTime = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.StopTime).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RunsAndTimeRange) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RunsAndTimeRange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RunsAndTimeRange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RunIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.RunIds = append(m.RunIds, stringValue) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StartTime == nil { + m.StartTime = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.StartTime).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StopTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StopTime == nil { + m.StopTime = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.StopTime).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AssetsAndTimeRange) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AssetsAndTimeRange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AssetsAndTimeRange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AssetIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.AssetIds = append(m.AssetIds, stringValue) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StartTime == nil { + m.StartTime = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.StartTime).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StopTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StopTime == nil { + m.StopTime = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.StopTime).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CalculatedChannelConfig) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CalculatedChannelConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CalculatedChannelConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Name = stringValue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Expression = stringValue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelReferences", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChannelReferences = append(m.ChannelReferences, &v2.CalculatedChannelAbstractChannelReference{}) + if unmarshal, ok := interface{}(m.ChannelReferences[len(m.ChannelReferences)-1]).(interface { + UnmarshalVTUnsafe([]byte) error + }); ok { + if err := unmarshal.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.ChannelReferences[len(m.ChannelReferences)-1]); err != nil { + return err + } + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Units", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + s := stringValue + m.Units = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExportOptions) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExportOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExportOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UseLegacyFormat", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.UseLegacyFormat = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SimplifyChannelNames", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SimplifyChannelNames = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CombineRuns", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CombineRuns = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SplitExportByAsset", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SplitExportByAsset = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SplitExportByRun", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SplitExportByRun = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExportDataResponse) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExportDataResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExportDataResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PresignedUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.PresignedUrl = stringValue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JobId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.JobId = stringValue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetDownloadUrlRequest) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetDownloadUrlRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetDownloadUrlRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JobId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.JobId = stringValue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetDownloadUrlResponse) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetDownloadUrlResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetDownloadUrlResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PresignedUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.PresignedUrl = stringValue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/python/gen/__init__.py b/python/gen/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/python/lib/sift/exports/__init__.py b/python/lib/sift/exports/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/python/lib/sift/exports/v1/__init__.py b/python/lib/sift/exports/v1/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/python/lib/sift/exports/v1/exports_pb2.py b/python/lib/sift/exports/v1/exports_pb2.py new file mode 100644 index 000000000..189fb9263 --- /dev/null +++ b/python/lib/sift/exports/v1/exports_pb2.py @@ -0,0 +1,96 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: sift/exports/v1/exports.proto +# Protobuf Python Version: 5.26.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 +from protoc_gen_openapiv2.options import annotations_pb2 as protoc__gen__openapiv2_dot_options_dot_annotations__pb2 +from sift.calculated_channels.v2 import calculated_channels_pb2 as sift_dot_calculated__channels_dot_v2_dot_calculated__channels__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dsift/exports/v1/exports.proto\x12\x0fsift.exports.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\x1a\x35sift/calculated_channels/v2/calculated_channels.proto\"\xbe\x04\n\x11\x45xportDataRequest\x12;\n\ntime_range\x18\x01 \x01(\x0b\x32\x1a.sift.exports.v1.TimeRangeH\x00R\ttimeRange\x12R\n\x13runs_and_time_range\x18\x02 \x01(\x0b\x32!.sift.exports.v1.RunsAndTimeRangeH\x00R\x10runsAndTimeRange\x12X\n\x15\x61ssets_and_time_range\x18\x03 \x01(\x0b\x32#.sift.exports.v1.AssetsAndTimeRangeH\x00R\x12\x61ssetsAndTimeRange\x12$\n\x0b\x63hannel_ids\x18\x04 \x03(\tB\x03\xe0\x41\x01R\nchannelIds\x12k\n\x1a\x63\x61lculated_channel_configs\x18\x05 \x03(\x0b\x32(.sift.exports.v1.CalculatedChannelConfigB\x03\xe0\x41\x01R\x18\x63\x61lculatedChannelConfigs\x12M\n\routput_format\x18\x06 \x01(\x0e\x32#.sift.exports.v1.ExportOutputFormatB\x03\xe0\x41\x02R\x0coutputFormat\x12J\n\x0e\x65xport_options\x18\x07 \x01(\x0b\x32\x1e.sift.exports.v1.ExportOptionsB\x03\xe0\x41\x02R\rexportOptionsB\x10\n\x0etime_selection\"\x89\x01\n\tTimeRange\x12>\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\tstartTime\x12<\n\tstop_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x08stopTime\"\xae\x01\n\x10RunsAndTimeRange\x12\x1c\n\x07run_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02R\x06runIds\x12>\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01R\tstartTime\x12<\n\tstop_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01R\x08stopTime\"\xb4\x01\n\x12\x41ssetsAndTimeRange\x12 \n\tasset_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02R\x08\x61ssetIds\x12>\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\tstartTime\x12<\n\tstop_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x08stopTime\"\xfd\x01\n\x17\x43\x61lculatedChannelConfig\x12\x17\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x04name\x12#\n\nexpression\x18\x02 \x01(\tB\x03\xe0\x41\x02R\nexpression\x12z\n\x12\x63hannel_references\x18\x03 \x03(\x0b\x32\x46.sift.calculated_channels.v2.CalculatedChannelAbstractChannelReferenceB\x03\xe0\x41\x02R\x11\x63hannelReferences\x12\x1e\n\x05units\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x00R\x05units\x88\x01\x01\x42\x08\n\x06_units\"\xf6\x01\n\rExportOptions\x12*\n\x11use_legacy_format\x18\x01 \x01(\x08R\x0fuseLegacyFormat\x12\x34\n\x16simplify_channel_names\x18\x02 \x01(\x08R\x14simplifyChannelNames\x12!\n\x0c\x63ombine_runs\x18\x03 \x01(\x08R\x0b\x63ombineRuns\x12\x31\n\x15split_export_by_asset\x18\x04 \x01(\x08R\x12splitExportByAsset\x12-\n\x13split_export_by_run\x18\x05 \x01(\x08R\x10splitExportByRun\"Z\n\x12\x45xportDataResponse\x12(\n\rpresigned_url\x18\x01 \x01(\tB\x03\xe0\x41\x01R\x0cpresignedUrl\x12\x1a\n\x06job_id\x18\x02 \x01(\tB\x03\xe0\x41\x01R\x05jobId\"3\n\x15GetDownloadUrlRequest\x12\x1a\n\x06job_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x05jobId\"B\n\x16GetDownloadUrlResponse\x12(\n\rpresigned_url\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0cpresignedUrl*v\n\x12\x45xportOutputFormat\x12$\n EXPORT_OUTPUT_FORMAT_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x45XPORT_OUTPUT_FORMAT_CSV\x10\x01\x12\x1c\n\x18\x45XPORT_OUTPUT_FORMAT_SUN\x10\x02\x32\xf4\x02\n\rExportService\x12\x8d\x01\n\nExportData\x12\".sift.exports.v1.ExportDataRequest\x1a#.sift.exports.v1.ExportDataResponse\"6\x92\x41\x1a\x12\nExportData\x1a\x0c\x45xport data.\x82\xd3\xe4\x93\x02\x13\"\x0e/api/v1/export:\x01*\x12\xd2\x01\n\x0eGetDownloadUrl\x12&.sift.exports.v1.GetDownloadUrlRequest\x1a\'.sift.exports.v1.GetDownloadUrlResponse\"o\x92\x41@\x12\x0eGetDownloadUrl\x1a.Retrieve the download URL for a completed job.\x82\xd3\xe4\x93\x02&\x12$/api/v1/export/{job_id}/download-urlB\x97\x01\n\x13\x63om.sift.exports.v1B\x0c\x45xportsProtoP\x01\xa2\x02\x03SEX\xaa\x02\x0fSift.Exports.V1\xca\x02\x0fSift\\Exports\\V1\xe2\x02\x1bSift\\Exports\\V1\\GPBMetadata\xea\x02\x11Sift::Exports::V1\x92\x41\x13\x12\x11\n\x0f\x45xports serviceb\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'sift.exports.v1.exports_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\023com.sift.exports.v1B\014ExportsProtoP\001\242\002\003SEX\252\002\017Sift.Exports.V1\312\002\017Sift\\Exports\\V1\342\002\033Sift\\Exports\\V1\\GPBMetadata\352\002\021Sift::Exports::V1\222A\023\022\021\n\017Exports service' + _globals['_EXPORTDATAREQUEST'].fields_by_name['channel_ids']._loaded_options = None + _globals['_EXPORTDATAREQUEST'].fields_by_name['channel_ids']._serialized_options = b'\340A\001' + _globals['_EXPORTDATAREQUEST'].fields_by_name['calculated_channel_configs']._loaded_options = None + _globals['_EXPORTDATAREQUEST'].fields_by_name['calculated_channel_configs']._serialized_options = b'\340A\001' + _globals['_EXPORTDATAREQUEST'].fields_by_name['output_format']._loaded_options = None + _globals['_EXPORTDATAREQUEST'].fields_by_name['output_format']._serialized_options = b'\340A\002' + _globals['_EXPORTDATAREQUEST'].fields_by_name['export_options']._loaded_options = None + _globals['_EXPORTDATAREQUEST'].fields_by_name['export_options']._serialized_options = b'\340A\002' + _globals['_TIMERANGE'].fields_by_name['start_time']._loaded_options = None + _globals['_TIMERANGE'].fields_by_name['start_time']._serialized_options = b'\340A\002' + _globals['_TIMERANGE'].fields_by_name['stop_time']._loaded_options = None + _globals['_TIMERANGE'].fields_by_name['stop_time']._serialized_options = b'\340A\002' + _globals['_RUNSANDTIMERANGE'].fields_by_name['run_ids']._loaded_options = None + _globals['_RUNSANDTIMERANGE'].fields_by_name['run_ids']._serialized_options = b'\340A\002' + _globals['_RUNSANDTIMERANGE'].fields_by_name['start_time']._loaded_options = None + _globals['_RUNSANDTIMERANGE'].fields_by_name['start_time']._serialized_options = b'\340A\001' + _globals['_RUNSANDTIMERANGE'].fields_by_name['stop_time']._loaded_options = None + _globals['_RUNSANDTIMERANGE'].fields_by_name['stop_time']._serialized_options = b'\340A\001' + _globals['_ASSETSANDTIMERANGE'].fields_by_name['asset_ids']._loaded_options = None + _globals['_ASSETSANDTIMERANGE'].fields_by_name['asset_ids']._serialized_options = b'\340A\002' + _globals['_ASSETSANDTIMERANGE'].fields_by_name['start_time']._loaded_options = None + _globals['_ASSETSANDTIMERANGE'].fields_by_name['start_time']._serialized_options = b'\340A\002' + _globals['_ASSETSANDTIMERANGE'].fields_by_name['stop_time']._loaded_options = None + _globals['_ASSETSANDTIMERANGE'].fields_by_name['stop_time']._serialized_options = b'\340A\002' + _globals['_CALCULATEDCHANNELCONFIG'].fields_by_name['name']._loaded_options = None + _globals['_CALCULATEDCHANNELCONFIG'].fields_by_name['name']._serialized_options = b'\340A\002' + _globals['_CALCULATEDCHANNELCONFIG'].fields_by_name['expression']._loaded_options = None + _globals['_CALCULATEDCHANNELCONFIG'].fields_by_name['expression']._serialized_options = b'\340A\002' + _globals['_CALCULATEDCHANNELCONFIG'].fields_by_name['channel_references']._loaded_options = None + _globals['_CALCULATEDCHANNELCONFIG'].fields_by_name['channel_references']._serialized_options = b'\340A\002' + _globals['_CALCULATEDCHANNELCONFIG'].fields_by_name['units']._loaded_options = None + _globals['_CALCULATEDCHANNELCONFIG'].fields_by_name['units']._serialized_options = b'\340A\001' + _globals['_EXPORTDATARESPONSE'].fields_by_name['presigned_url']._loaded_options = None + _globals['_EXPORTDATARESPONSE'].fields_by_name['presigned_url']._serialized_options = b'\340A\001' + _globals['_EXPORTDATARESPONSE'].fields_by_name['job_id']._loaded_options = None + _globals['_EXPORTDATARESPONSE'].fields_by_name['job_id']._serialized_options = b'\340A\001' + _globals['_GETDOWNLOADURLREQUEST'].fields_by_name['job_id']._loaded_options = None + _globals['_GETDOWNLOADURLREQUEST'].fields_by_name['job_id']._serialized_options = b'\340A\002' + _globals['_GETDOWNLOADURLRESPONSE'].fields_by_name['presigned_url']._loaded_options = None + _globals['_GETDOWNLOADURLRESPONSE'].fields_by_name['presigned_url']._serialized_options = b'\340A\002' + _globals['_EXPORTSERVICE'].methods_by_name['ExportData']._loaded_options = None + _globals['_EXPORTSERVICE'].methods_by_name['ExportData']._serialized_options = b'\222A\032\022\nExportData\032\014Export data.\202\323\344\223\002\023\"\016/api/v1/export:\001*' + _globals['_EXPORTSERVICE'].methods_by_name['GetDownloadUrl']._loaded_options = None + _globals['_EXPORTSERVICE'].methods_by_name['GetDownloadUrl']._serialized_options = b'\222A@\022\016GetDownloadUrl\032.Retrieve the download URL for a completed job.\202\323\344\223\002&\022$/api/v1/export/{job_id}/download-url' + _globals['_EXPORTOUTPUTFORMAT']._serialized_start=2044 + _globals['_EXPORTOUTPUTFORMAT']._serialized_end=2162 + _globals['_EXPORTDATAREQUEST']._serialized_start=250 + _globals['_EXPORTDATAREQUEST']._serialized_end=824 + _globals['_TIMERANGE']._serialized_start=827 + _globals['_TIMERANGE']._serialized_end=964 + _globals['_RUNSANDTIMERANGE']._serialized_start=967 + _globals['_RUNSANDTIMERANGE']._serialized_end=1141 + _globals['_ASSETSANDTIMERANGE']._serialized_start=1144 + _globals['_ASSETSANDTIMERANGE']._serialized_end=1324 + _globals['_CALCULATEDCHANNELCONFIG']._serialized_start=1327 + _globals['_CALCULATEDCHANNELCONFIG']._serialized_end=1580 + _globals['_EXPORTOPTIONS']._serialized_start=1583 + _globals['_EXPORTOPTIONS']._serialized_end=1829 + _globals['_EXPORTDATARESPONSE']._serialized_start=1831 + _globals['_EXPORTDATARESPONSE']._serialized_end=1921 + _globals['_GETDOWNLOADURLREQUEST']._serialized_start=1923 + _globals['_GETDOWNLOADURLREQUEST']._serialized_end=1974 + _globals['_GETDOWNLOADURLRESPONSE']._serialized_start=1976 + _globals['_GETDOWNLOADURLRESPONSE']._serialized_end=2042 + _globals['_EXPORTSERVICE']._serialized_start=2165 + _globals['_EXPORTSERVICE']._serialized_end=2537 +# @@protoc_insertion_point(module_scope) diff --git a/python/lib/sift/exports/v1/exports_pb2.pyi b/python/lib/sift/exports/v1/exports_pb2.pyi new file mode 100644 index 000000000..d21e8039e --- /dev/null +++ b/python/lib/sift/exports/v1/exports_pb2.pyi @@ -0,0 +1,272 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import builtins +import collections.abc +import google.protobuf.descriptor +import google.protobuf.internal.containers +import google.protobuf.internal.enum_type_wrapper +import google.protobuf.message +import google.protobuf.timestamp_pb2 +import sift.calculated_channels.v2.calculated_channels_pb2 +import sys +import typing + +if sys.version_info >= (3, 10): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +class _ExportOutputFormat: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _ExportOutputFormatEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_ExportOutputFormat.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + EXPORT_OUTPUT_FORMAT_UNSPECIFIED: _ExportOutputFormat.ValueType # 0 + EXPORT_OUTPUT_FORMAT_CSV: _ExportOutputFormat.ValueType # 1 + EXPORT_OUTPUT_FORMAT_SUN: _ExportOutputFormat.ValueType # 2 + +class ExportOutputFormat(_ExportOutputFormat, metaclass=_ExportOutputFormatEnumTypeWrapper): ... + +EXPORT_OUTPUT_FORMAT_UNSPECIFIED: ExportOutputFormat.ValueType # 0 +EXPORT_OUTPUT_FORMAT_CSV: ExportOutputFormat.ValueType # 1 +EXPORT_OUTPUT_FORMAT_SUN: ExportOutputFormat.ValueType # 2 +global___ExportOutputFormat = ExportOutputFormat + +@typing.final +class ExportDataRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TIME_RANGE_FIELD_NUMBER: builtins.int + RUNS_AND_TIME_RANGE_FIELD_NUMBER: builtins.int + ASSETS_AND_TIME_RANGE_FIELD_NUMBER: builtins.int + CHANNEL_IDS_FIELD_NUMBER: builtins.int + CALCULATED_CHANNEL_CONFIGS_FIELD_NUMBER: builtins.int + OUTPUT_FORMAT_FIELD_NUMBER: builtins.int + EXPORT_OPTIONS_FIELD_NUMBER: builtins.int + output_format: global___ExportOutputFormat.ValueType + @property + def time_range(self) -> global___TimeRange: + """If time_range used, channel_ids or calculated_chanel_configs must be provided to scope data.""" + + @property + def runs_and_time_range(self) -> global___RunsAndTimeRange: + """Runs used to perform time selection and scope data. Times can optionally be provided to further scope within runs. + If channel_ids or calculated_channel_configs not provided, all channels from Run Assets are added to scope. + """ + + @property + def assets_and_time_range(self) -> global___AssetsAndTimeRange: + """Assets and times provided to scope data. + If channel_ids or calculated_channel_configs not provided, all channels from Assets are added to scope. + """ + + @property + def channel_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... + @property + def calculated_channel_configs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___CalculatedChannelConfig]: ... + @property + def export_options(self) -> global___ExportOptions: ... + def __init__( + self, + *, + time_range: global___TimeRange | None = ..., + runs_and_time_range: global___RunsAndTimeRange | None = ..., + assets_and_time_range: global___AssetsAndTimeRange | None = ..., + channel_ids: collections.abc.Iterable[builtins.str] | None = ..., + calculated_channel_configs: collections.abc.Iterable[global___CalculatedChannelConfig] | None = ..., + output_format: global___ExportOutputFormat.ValueType = ..., + export_options: global___ExportOptions | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["assets_and_time_range", b"assets_and_time_range", "export_options", b"export_options", "runs_and_time_range", b"runs_and_time_range", "time_range", b"time_range", "time_selection", b"time_selection"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["assets_and_time_range", b"assets_and_time_range", "calculated_channel_configs", b"calculated_channel_configs", "channel_ids", b"channel_ids", "export_options", b"export_options", "output_format", b"output_format", "runs_and_time_range", b"runs_and_time_range", "time_range", b"time_range", "time_selection", b"time_selection"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["time_selection", b"time_selection"]) -> typing.Literal["time_range", "runs_and_time_range", "assets_and_time_range"] | None: ... + +global___ExportDataRequest = ExportDataRequest + +@typing.final +class TimeRange(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + START_TIME_FIELD_NUMBER: builtins.int + STOP_TIME_FIELD_NUMBER: builtins.int + @property + def start_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + @property + def stop_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + def __init__( + self, + *, + start_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + stop_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["start_time", b"start_time", "stop_time", b"stop_time"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["start_time", b"start_time", "stop_time", b"stop_time"]) -> None: ... + +global___TimeRange = TimeRange + +@typing.final +class RunsAndTimeRange(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RUN_IDS_FIELD_NUMBER: builtins.int + START_TIME_FIELD_NUMBER: builtins.int + STOP_TIME_FIELD_NUMBER: builtins.int + @property + def run_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... + @property + def start_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + @property + def stop_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + def __init__( + self, + *, + run_ids: collections.abc.Iterable[builtins.str] | None = ..., + start_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + stop_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["start_time", b"start_time", "stop_time", b"stop_time"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["run_ids", b"run_ids", "start_time", b"start_time", "stop_time", b"stop_time"]) -> None: ... + +global___RunsAndTimeRange = RunsAndTimeRange + +@typing.final +class AssetsAndTimeRange(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASSET_IDS_FIELD_NUMBER: builtins.int + START_TIME_FIELD_NUMBER: builtins.int + STOP_TIME_FIELD_NUMBER: builtins.int + @property + def asset_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... + @property + def start_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + @property + def stop_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + def __init__( + self, + *, + asset_ids: collections.abc.Iterable[builtins.str] | None = ..., + start_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + stop_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["start_time", b"start_time", "stop_time", b"stop_time"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["asset_ids", b"asset_ids", "start_time", b"start_time", "stop_time", b"stop_time"]) -> None: ... + +global___AssetsAndTimeRange = AssetsAndTimeRange + +@typing.final +class CalculatedChannelConfig(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAME_FIELD_NUMBER: builtins.int + EXPRESSION_FIELD_NUMBER: builtins.int + CHANNEL_REFERENCES_FIELD_NUMBER: builtins.int + UNITS_FIELD_NUMBER: builtins.int + name: builtins.str + expression: builtins.str + units: builtins.str + @property + def channel_references(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[sift.calculated_channels.v2.calculated_channels_pb2.CalculatedChannelAbstractChannelReference]: ... + def __init__( + self, + *, + name: builtins.str = ..., + expression: builtins.str = ..., + channel_references: collections.abc.Iterable[sift.calculated_channels.v2.calculated_channels_pb2.CalculatedChannelAbstractChannelReference] | None = ..., + units: builtins.str | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["_units", b"_units", "units", b"units"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_units", b"_units", "channel_references", b"channel_references", "expression", b"expression", "name", b"name", "units", b"units"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["_units", b"_units"]) -> typing.Literal["units"] | None: ... + +global___CalculatedChannelConfig = CalculatedChannelConfig + +@typing.final +class ExportOptions(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + USE_LEGACY_FORMAT_FIELD_NUMBER: builtins.int + SIMPLIFY_CHANNEL_NAMES_FIELD_NUMBER: builtins.int + COMBINE_RUNS_FIELD_NUMBER: builtins.int + SPLIT_EXPORT_BY_ASSET_FIELD_NUMBER: builtins.int + SPLIT_EXPORT_BY_RUN_FIELD_NUMBER: builtins.int + use_legacy_format: builtins.bool + """Whether to use legacy format string for channel headers which contains key-value metadata.""" + simplify_channel_names: builtins.bool + """Whether to simplify channel names by removing the component part of the name if name is unique in export file""" + combine_runs: builtins.bool + """Whether to combine runs. e.g. channels from the same asset in different runs will be combined into a single column of data.""" + split_export_by_asset: builtins.bool + """Split each asset into their own export file""" + split_export_by_run: builtins.bool + """Split each run into their own export file""" + def __init__( + self, + *, + use_legacy_format: builtins.bool = ..., + simplify_channel_names: builtins.bool = ..., + combine_runs: builtins.bool = ..., + split_export_by_asset: builtins.bool = ..., + split_export_by_run: builtins.bool = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["combine_runs", b"combine_runs", "simplify_channel_names", b"simplify_channel_names", "split_export_by_asset", b"split_export_by_asset", "split_export_by_run", b"split_export_by_run", "use_legacy_format", b"use_legacy_format"]) -> None: ... + +global___ExportOptions = ExportOptions + +@typing.final +class ExportDataResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PRESIGNED_URL_FIELD_NUMBER: builtins.int + JOB_ID_FIELD_NUMBER: builtins.int + presigned_url: builtins.str + """Pre-signed URL of exported zip containing export files. This will be blank if + the job is processed as a background job, in which case `job_id` will be non-empty. + """ + job_id: builtins.str + """This will be non-empty if the export is being processed asynchronously in a background job.""" + def __init__( + self, + *, + presigned_url: builtins.str = ..., + job_id: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["job_id", b"job_id", "presigned_url", b"presigned_url"]) -> None: ... + +global___ExportDataResponse = ExportDataResponse + +@typing.final +class GetDownloadUrlRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + JOB_ID_FIELD_NUMBER: builtins.int + job_id: builtins.str + def __init__( + self, + *, + job_id: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["job_id", b"job_id"]) -> None: ... + +global___GetDownloadUrlRequest = GetDownloadUrlRequest + +@typing.final +class GetDownloadUrlResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PRESIGNED_URL_FIELD_NUMBER: builtins.int + presigned_url: builtins.str + def __init__( + self, + *, + presigned_url: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["presigned_url", b"presigned_url"]) -> None: ... + +global___GetDownloadUrlResponse = GetDownloadUrlResponse diff --git a/python/lib/sift/exports/v1/exports_pb2_grpc.py b/python/lib/sift/exports/v1/exports_pb2_grpc.py new file mode 100644 index 000000000..dd2b93fcd --- /dev/null +++ b/python/lib/sift/exports/v1/exports_pb2_grpc.py @@ -0,0 +1,99 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from sift.exports.v1 import exports_pb2 as sift_dot_exports_dot_v1_dot_exports__pb2 + + +class ExportServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ExportData = channel.unary_unary( + '/sift.exports.v1.ExportService/ExportData', + request_serializer=sift_dot_exports_dot_v1_dot_exports__pb2.ExportDataRequest.SerializeToString, + response_deserializer=sift_dot_exports_dot_v1_dot_exports__pb2.ExportDataResponse.FromString, + ) + self.GetDownloadUrl = channel.unary_unary( + '/sift.exports.v1.ExportService/GetDownloadUrl', + request_serializer=sift_dot_exports_dot_v1_dot_exports__pb2.GetDownloadUrlRequest.SerializeToString, + response_deserializer=sift_dot_exports_dot_v1_dot_exports__pb2.GetDownloadUrlResponse.FromString, + ) + + +class ExportServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def ExportData(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetDownloadUrl(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ExportServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ExportData': grpc.unary_unary_rpc_method_handler( + servicer.ExportData, + request_deserializer=sift_dot_exports_dot_v1_dot_exports__pb2.ExportDataRequest.FromString, + response_serializer=sift_dot_exports_dot_v1_dot_exports__pb2.ExportDataResponse.SerializeToString, + ), + 'GetDownloadUrl': grpc.unary_unary_rpc_method_handler( + servicer.GetDownloadUrl, + request_deserializer=sift_dot_exports_dot_v1_dot_exports__pb2.GetDownloadUrlRequest.FromString, + response_serializer=sift_dot_exports_dot_v1_dot_exports__pb2.GetDownloadUrlResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'sift.exports.v1.ExportService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ExportService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def ExportData(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/sift.exports.v1.ExportService/ExportData', + sift_dot_exports_dot_v1_dot_exports__pb2.ExportDataRequest.SerializeToString, + sift_dot_exports_dot_v1_dot_exports__pb2.ExportDataResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetDownloadUrl(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/sift.exports.v1.ExportService/GetDownloadUrl', + sift_dot_exports_dot_v1_dot_exports__pb2.GetDownloadUrlRequest.SerializeToString, + sift_dot_exports_dot_v1_dot_exports__pb2.GetDownloadUrlResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/python/lib/sift/exports/v1/exports_pb2_grpc.pyi b/python/lib/sift/exports/v1/exports_pb2_grpc.pyi new file mode 100644 index 000000000..a2761e2a2 --- /dev/null +++ b/python/lib/sift/exports/v1/exports_pb2_grpc.pyi @@ -0,0 +1,58 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import abc +import collections.abc +import grpc +import grpc.aio +import sift.exports.v1.exports_pb2 +import typing + +_T = typing.TypeVar("_T") + +class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): ... + +class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg] + ... + +class ExportServiceStub: + def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ... + ExportData: grpc.UnaryUnaryMultiCallable[ + sift.exports.v1.exports_pb2.ExportDataRequest, + sift.exports.v1.exports_pb2.ExportDataResponse, + ] + + GetDownloadUrl: grpc.UnaryUnaryMultiCallable[ + sift.exports.v1.exports_pb2.GetDownloadUrlRequest, + sift.exports.v1.exports_pb2.GetDownloadUrlResponse, + ] + +class ExportServiceAsyncStub: + ExportData: grpc.aio.UnaryUnaryMultiCallable[ + sift.exports.v1.exports_pb2.ExportDataRequest, + sift.exports.v1.exports_pb2.ExportDataResponse, + ] + + GetDownloadUrl: grpc.aio.UnaryUnaryMultiCallable[ + sift.exports.v1.exports_pb2.GetDownloadUrlRequest, + sift.exports.v1.exports_pb2.GetDownloadUrlResponse, + ] + +class ExportServiceServicer(metaclass=abc.ABCMeta): + @abc.abstractmethod + def ExportData( + self, + request: sift.exports.v1.exports_pb2.ExportDataRequest, + context: _ServicerContext, + ) -> typing.Union[sift.exports.v1.exports_pb2.ExportDataResponse, collections.abc.Awaitable[sift.exports.v1.exports_pb2.ExportDataResponse]]: ... + + @abc.abstractmethod + def GetDownloadUrl( + self, + request: sift.exports.v1.exports_pb2.GetDownloadUrlRequest, + context: _ServicerContext, + ) -> typing.Union[sift.exports.v1.exports_pb2.GetDownloadUrlResponse, collections.abc.Awaitable[sift.exports.v1.exports_pb2.GetDownloadUrlResponse]]: ... + +def add_ExportServiceServicer_to_server(servicer: ExportServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ... diff --git a/rust/crates/sift_rs/src/gen/mod.rs b/rust/crates/sift_rs/src/gen/mod.rs index bc0c988a0..5b393a9f1 100644 --- a/rust/crates/sift_rs/src/gen/mod.rs +++ b/rust/crates/sift_rs/src/gen/mod.rs @@ -124,6 +124,13 @@ pub mod sift { // @@protoc_insertion_point(sift.dlq_errors.v2) } } + pub mod exports { + // @@protoc_insertion_point(attribute:sift.exports.v1) + pub mod v1 { + include!("sift.exports.v1.rs"); + // @@protoc_insertion_point(sift.exports.v1) + } + } pub mod ingest { // @@protoc_insertion_point(attribute:sift.ingest.v1) pub mod v1 { diff --git a/rust/crates/sift_rs/src/gen/sift.exports.v1.rs b/rust/crates/sift_rs/src/gen/sift.exports.v1.rs new file mode 100644 index 000000000..dcffdb840 --- /dev/null +++ b/rust/crates/sift_rs/src/gen/sift.exports.v1.rs @@ -0,0 +1,135 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExportDataRequest { + #[prost(string, repeated, tag="4")] + pub channel_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, repeated, tag="5")] + pub calculated_channel_configs: ::prost::alloc::vec::Vec, + #[prost(enumeration="ExportOutputFormat", tag="6")] + pub output_format: i32, + #[prost(message, optional, tag="7")] + pub export_options: ::core::option::Option, + #[prost(oneof="export_data_request::TimeSelection", tags="1, 2, 3")] + pub time_selection: ::core::option::Option, +} +/// Nested message and enum types in `ExportDataRequest`. +pub mod export_data_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum TimeSelection { + #[prost(message, tag="1")] + TimeRange(super::TimeRange), + #[prost(message, tag="2")] + RunsAndTimeRange(super::RunsAndTimeRange), + #[prost(message, tag="3")] + AssetsAndTimeRange(super::AssetsAndTimeRange), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct TimeRange { + #[prost(message, optional, tag="1")] + pub start_time: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(message, optional, tag="2")] + pub stop_time: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RunsAndTimeRange { + #[prost(string, repeated, tag="1")] + pub run_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="2")] + pub start_time: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(message, optional, tag="3")] + pub stop_time: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AssetsAndTimeRange { + #[prost(string, repeated, tag="1")] + pub asset_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="2")] + pub start_time: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(message, optional, tag="3")] + pub stop_time: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CalculatedChannelConfig { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub expression: ::prost::alloc::string::String, + #[prost(message, repeated, tag="3")] + pub channel_references: ::prost::alloc::vec::Vec, + #[prost(string, optional, tag="4")] + pub units: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ExportOptions { + #[prost(bool, tag="1")] + pub use_legacy_format: bool, + #[prost(bool, tag="2")] + pub simplify_channel_names: bool, + #[prost(bool, tag="3")] + pub combine_runs: bool, + #[prost(bool, tag="4")] + pub split_export_by_asset: bool, + #[prost(bool, tag="5")] + pub split_export_by_run: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExportDataResponse { + #[prost(string, tag="1")] + pub presigned_url: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub job_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDownloadUrlRequest { + #[prost(string, tag="1")] + pub job_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDownloadUrlResponse { + #[prost(string, tag="1")] + pub presigned_url: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ExportOutputFormat { + Unspecified = 0, + Csv = 1, + Sun = 2, +} +impl ExportOutputFormat { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ExportOutputFormat::Unspecified => "EXPORT_OUTPUT_FORMAT_UNSPECIFIED", + ExportOutputFormat::Csv => "EXPORT_OUTPUT_FORMAT_CSV", + ExportOutputFormat::Sun => "EXPORT_OUTPUT_FORMAT_SUN", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "EXPORT_OUTPUT_FORMAT_UNSPECIFIED" => Some(Self::Unspecified), + "EXPORT_OUTPUT_FORMAT_CSV" => Some(Self::Csv), + "EXPORT_OUTPUT_FORMAT_SUN" => Some(Self::Sun), + _ => None, + } + } +} +include!("sift.exports.v1.tonic.rs"); +include!("sift.exports.v1.serde.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/rust/crates/sift_rs/src/gen/sift.exports.v1.serde.rs b/rust/crates/sift_rs/src/gen/sift.exports.v1.serde.rs new file mode 100644 index 000000000..25d42d98f --- /dev/null +++ b/rust/crates/sift_rs/src/gen/sift.exports.v1.serde.rs @@ -0,0 +1,1241 @@ +// @generated +impl serde::Serialize for AssetsAndTimeRange { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.asset_ids.is_empty() { + len += 1; + } + if self.start_time.is_some() { + len += 1; + } + if self.stop_time.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("sift.exports.v1.AssetsAndTimeRange", len)?; + if !self.asset_ids.is_empty() { + struct_ser.serialize_field("assetIds", &self.asset_ids)?; + } + if let Some(v) = self.start_time.as_ref() { + struct_ser.serialize_field("startTime", v)?; + } + if let Some(v) = self.stop_time.as_ref() { + struct_ser.serialize_field("stopTime", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AssetsAndTimeRange { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "asset_ids", + "assetIds", + "start_time", + "startTime", + "stop_time", + "stopTime", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + AssetIds, + StartTime, + StopTime, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "assetIds" | "asset_ids" => Ok(GeneratedField::AssetIds), + "startTime" | "start_time" => Ok(GeneratedField::StartTime), + "stopTime" | "stop_time" => Ok(GeneratedField::StopTime), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AssetsAndTimeRange; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct sift.exports.v1.AssetsAndTimeRange") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut asset_ids__ = None; + let mut start_time__ = None; + let mut stop_time__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::AssetIds => { + if asset_ids__.is_some() { + return Err(serde::de::Error::duplicate_field("assetIds")); + } + asset_ids__ = Some(map_.next_value()?); + } + GeneratedField::StartTime => { + if start_time__.is_some() { + return Err(serde::de::Error::duplicate_field("startTime")); + } + start_time__ = map_.next_value()?; + } + GeneratedField::StopTime => { + if stop_time__.is_some() { + return Err(serde::de::Error::duplicate_field("stopTime")); + } + stop_time__ = map_.next_value()?; + } + } + } + Ok(AssetsAndTimeRange { + asset_ids: asset_ids__.unwrap_or_default(), + start_time: start_time__, + stop_time: stop_time__, + }) + } + } + deserializer.deserialize_struct("sift.exports.v1.AssetsAndTimeRange", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for CalculatedChannelConfig { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.name.is_empty() { + len += 1; + } + if !self.expression.is_empty() { + len += 1; + } + if !self.channel_references.is_empty() { + len += 1; + } + if self.units.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("sift.exports.v1.CalculatedChannelConfig", len)?; + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + if !self.expression.is_empty() { + struct_ser.serialize_field("expression", &self.expression)?; + } + if !self.channel_references.is_empty() { + struct_ser.serialize_field("channelReferences", &self.channel_references)?; + } + if let Some(v) = self.units.as_ref() { + struct_ser.serialize_field("units", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for CalculatedChannelConfig { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "name", + "expression", + "channel_references", + "channelReferences", + "units", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Name, + Expression, + ChannelReferences, + Units, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "name" => Ok(GeneratedField::Name), + "expression" => Ok(GeneratedField::Expression), + "channelReferences" | "channel_references" => Ok(GeneratedField::ChannelReferences), + "units" => Ok(GeneratedField::Units), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = CalculatedChannelConfig; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct sift.exports.v1.CalculatedChannelConfig") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut name__ = None; + let mut expression__ = None; + let mut channel_references__ = None; + let mut units__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); + } + name__ = Some(map_.next_value()?); + } + GeneratedField::Expression => { + if expression__.is_some() { + return Err(serde::de::Error::duplicate_field("expression")); + } + expression__ = Some(map_.next_value()?); + } + GeneratedField::ChannelReferences => { + if channel_references__.is_some() { + return Err(serde::de::Error::duplicate_field("channelReferences")); + } + channel_references__ = Some(map_.next_value()?); + } + GeneratedField::Units => { + if units__.is_some() { + return Err(serde::de::Error::duplicate_field("units")); + } + units__ = map_.next_value()?; + } + } + } + Ok(CalculatedChannelConfig { + name: name__.unwrap_or_default(), + expression: expression__.unwrap_or_default(), + channel_references: channel_references__.unwrap_or_default(), + units: units__, + }) + } + } + deserializer.deserialize_struct("sift.exports.v1.CalculatedChannelConfig", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ExportDataRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.channel_ids.is_empty() { + len += 1; + } + if !self.calculated_channel_configs.is_empty() { + len += 1; + } + if self.output_format != 0 { + len += 1; + } + if self.export_options.is_some() { + len += 1; + } + if self.time_selection.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("sift.exports.v1.ExportDataRequest", len)?; + if !self.channel_ids.is_empty() { + struct_ser.serialize_field("channelIds", &self.channel_ids)?; + } + if !self.calculated_channel_configs.is_empty() { + struct_ser.serialize_field("calculatedChannelConfigs", &self.calculated_channel_configs)?; + } + if self.output_format != 0 { + let v = ExportOutputFormat::try_from(self.output_format) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.output_format)))?; + struct_ser.serialize_field("outputFormat", &v)?; + } + if let Some(v) = self.export_options.as_ref() { + struct_ser.serialize_field("exportOptions", v)?; + } + if let Some(v) = self.time_selection.as_ref() { + match v { + export_data_request::TimeSelection::TimeRange(v) => { + struct_ser.serialize_field("timeRange", v)?; + } + export_data_request::TimeSelection::RunsAndTimeRange(v) => { + struct_ser.serialize_field("runsAndTimeRange", v)?; + } + export_data_request::TimeSelection::AssetsAndTimeRange(v) => { + struct_ser.serialize_field("assetsAndTimeRange", v)?; + } + } + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ExportDataRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "channel_ids", + "channelIds", + "calculated_channel_configs", + "calculatedChannelConfigs", + "output_format", + "outputFormat", + "export_options", + "exportOptions", + "time_range", + "timeRange", + "runs_and_time_range", + "runsAndTimeRange", + "assets_and_time_range", + "assetsAndTimeRange", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ChannelIds, + CalculatedChannelConfigs, + OutputFormat, + ExportOptions, + TimeRange, + RunsAndTimeRange, + AssetsAndTimeRange, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "channelIds" | "channel_ids" => Ok(GeneratedField::ChannelIds), + "calculatedChannelConfigs" | "calculated_channel_configs" => Ok(GeneratedField::CalculatedChannelConfigs), + "outputFormat" | "output_format" => Ok(GeneratedField::OutputFormat), + "exportOptions" | "export_options" => Ok(GeneratedField::ExportOptions), + "timeRange" | "time_range" => Ok(GeneratedField::TimeRange), + "runsAndTimeRange" | "runs_and_time_range" => Ok(GeneratedField::RunsAndTimeRange), + "assetsAndTimeRange" | "assets_and_time_range" => Ok(GeneratedField::AssetsAndTimeRange), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ExportDataRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct sift.exports.v1.ExportDataRequest") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut channel_ids__ = None; + let mut calculated_channel_configs__ = None; + let mut output_format__ = None; + let mut export_options__ = None; + let mut time_selection__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::ChannelIds => { + if channel_ids__.is_some() { + return Err(serde::de::Error::duplicate_field("channelIds")); + } + channel_ids__ = Some(map_.next_value()?); + } + GeneratedField::CalculatedChannelConfigs => { + if calculated_channel_configs__.is_some() { + return Err(serde::de::Error::duplicate_field("calculatedChannelConfigs")); + } + calculated_channel_configs__ = Some(map_.next_value()?); + } + GeneratedField::OutputFormat => { + if output_format__.is_some() { + return Err(serde::de::Error::duplicate_field("outputFormat")); + } + output_format__ = Some(map_.next_value::()? as i32); + } + GeneratedField::ExportOptions => { + if export_options__.is_some() { + return Err(serde::de::Error::duplicate_field("exportOptions")); + } + export_options__ = map_.next_value()?; + } + GeneratedField::TimeRange => { + if time_selection__.is_some() { + return Err(serde::de::Error::duplicate_field("timeRange")); + } + time_selection__ = map_.next_value::<::std::option::Option<_>>()?.map(export_data_request::TimeSelection::TimeRange) +; + } + GeneratedField::RunsAndTimeRange => { + if time_selection__.is_some() { + return Err(serde::de::Error::duplicate_field("runsAndTimeRange")); + } + time_selection__ = map_.next_value::<::std::option::Option<_>>()?.map(export_data_request::TimeSelection::RunsAndTimeRange) +; + } + GeneratedField::AssetsAndTimeRange => { + if time_selection__.is_some() { + return Err(serde::de::Error::duplicate_field("assetsAndTimeRange")); + } + time_selection__ = map_.next_value::<::std::option::Option<_>>()?.map(export_data_request::TimeSelection::AssetsAndTimeRange) +; + } + } + } + Ok(ExportDataRequest { + channel_ids: channel_ids__.unwrap_or_default(), + calculated_channel_configs: calculated_channel_configs__.unwrap_or_default(), + output_format: output_format__.unwrap_or_default(), + export_options: export_options__, + time_selection: time_selection__, + }) + } + } + deserializer.deserialize_struct("sift.exports.v1.ExportDataRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ExportDataResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.presigned_url.is_empty() { + len += 1; + } + if !self.job_id.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("sift.exports.v1.ExportDataResponse", len)?; + if !self.presigned_url.is_empty() { + struct_ser.serialize_field("presignedUrl", &self.presigned_url)?; + } + if !self.job_id.is_empty() { + struct_ser.serialize_field("jobId", &self.job_id)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ExportDataResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "presigned_url", + "presignedUrl", + "job_id", + "jobId", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + PresignedUrl, + JobId, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "presignedUrl" | "presigned_url" => Ok(GeneratedField::PresignedUrl), + "jobId" | "job_id" => Ok(GeneratedField::JobId), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ExportDataResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct sift.exports.v1.ExportDataResponse") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut presigned_url__ = None; + let mut job_id__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::PresignedUrl => { + if presigned_url__.is_some() { + return Err(serde::de::Error::duplicate_field("presignedUrl")); + } + presigned_url__ = Some(map_.next_value()?); + } + GeneratedField::JobId => { + if job_id__.is_some() { + return Err(serde::de::Error::duplicate_field("jobId")); + } + job_id__ = Some(map_.next_value()?); + } + } + } + Ok(ExportDataResponse { + presigned_url: presigned_url__.unwrap_or_default(), + job_id: job_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("sift.exports.v1.ExportDataResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ExportOptions { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.use_legacy_format { + len += 1; + } + if self.simplify_channel_names { + len += 1; + } + if self.combine_runs { + len += 1; + } + if self.split_export_by_asset { + len += 1; + } + if self.split_export_by_run { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("sift.exports.v1.ExportOptions", len)?; + if self.use_legacy_format { + struct_ser.serialize_field("useLegacyFormat", &self.use_legacy_format)?; + } + if self.simplify_channel_names { + struct_ser.serialize_field("simplifyChannelNames", &self.simplify_channel_names)?; + } + if self.combine_runs { + struct_ser.serialize_field("combineRuns", &self.combine_runs)?; + } + if self.split_export_by_asset { + struct_ser.serialize_field("splitExportByAsset", &self.split_export_by_asset)?; + } + if self.split_export_by_run { + struct_ser.serialize_field("splitExportByRun", &self.split_export_by_run)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ExportOptions { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "use_legacy_format", + "useLegacyFormat", + "simplify_channel_names", + "simplifyChannelNames", + "combine_runs", + "combineRuns", + "split_export_by_asset", + "splitExportByAsset", + "split_export_by_run", + "splitExportByRun", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + UseLegacyFormat, + SimplifyChannelNames, + CombineRuns, + SplitExportByAsset, + SplitExportByRun, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "useLegacyFormat" | "use_legacy_format" => Ok(GeneratedField::UseLegacyFormat), + "simplifyChannelNames" | "simplify_channel_names" => Ok(GeneratedField::SimplifyChannelNames), + "combineRuns" | "combine_runs" => Ok(GeneratedField::CombineRuns), + "splitExportByAsset" | "split_export_by_asset" => Ok(GeneratedField::SplitExportByAsset), + "splitExportByRun" | "split_export_by_run" => Ok(GeneratedField::SplitExportByRun), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ExportOptions; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct sift.exports.v1.ExportOptions") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut use_legacy_format__ = None; + let mut simplify_channel_names__ = None; + let mut combine_runs__ = None; + let mut split_export_by_asset__ = None; + let mut split_export_by_run__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::UseLegacyFormat => { + if use_legacy_format__.is_some() { + return Err(serde::de::Error::duplicate_field("useLegacyFormat")); + } + use_legacy_format__ = Some(map_.next_value()?); + } + GeneratedField::SimplifyChannelNames => { + if simplify_channel_names__.is_some() { + return Err(serde::de::Error::duplicate_field("simplifyChannelNames")); + } + simplify_channel_names__ = Some(map_.next_value()?); + } + GeneratedField::CombineRuns => { + if combine_runs__.is_some() { + return Err(serde::de::Error::duplicate_field("combineRuns")); + } + combine_runs__ = Some(map_.next_value()?); + } + GeneratedField::SplitExportByAsset => { + if split_export_by_asset__.is_some() { + return Err(serde::de::Error::duplicate_field("splitExportByAsset")); + } + split_export_by_asset__ = Some(map_.next_value()?); + } + GeneratedField::SplitExportByRun => { + if split_export_by_run__.is_some() { + return Err(serde::de::Error::duplicate_field("splitExportByRun")); + } + split_export_by_run__ = Some(map_.next_value()?); + } + } + } + Ok(ExportOptions { + use_legacy_format: use_legacy_format__.unwrap_or_default(), + simplify_channel_names: simplify_channel_names__.unwrap_or_default(), + combine_runs: combine_runs__.unwrap_or_default(), + split_export_by_asset: split_export_by_asset__.unwrap_or_default(), + split_export_by_run: split_export_by_run__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("sift.exports.v1.ExportOptions", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ExportOutputFormat { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unspecified => "EXPORT_OUTPUT_FORMAT_UNSPECIFIED", + Self::Csv => "EXPORT_OUTPUT_FORMAT_CSV", + Self::Sun => "EXPORT_OUTPUT_FORMAT_SUN", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for ExportOutputFormat { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "EXPORT_OUTPUT_FORMAT_UNSPECIFIED", + "EXPORT_OUTPUT_FORMAT_CSV", + "EXPORT_OUTPUT_FORMAT_SUN", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ExportOutputFormat; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "EXPORT_OUTPUT_FORMAT_UNSPECIFIED" => Ok(ExportOutputFormat::Unspecified), + "EXPORT_OUTPUT_FORMAT_CSV" => Ok(ExportOutputFormat::Csv), + "EXPORT_OUTPUT_FORMAT_SUN" => Ok(ExportOutputFormat::Sun), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for GetDownloadUrlRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.job_id.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("sift.exports.v1.GetDownloadUrlRequest", len)?; + if !self.job_id.is_empty() { + struct_ser.serialize_field("jobId", &self.job_id)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetDownloadUrlRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "job_id", + "jobId", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + JobId, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "jobId" | "job_id" => Ok(GeneratedField::JobId), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetDownloadUrlRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct sift.exports.v1.GetDownloadUrlRequest") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut job_id__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::JobId => { + if job_id__.is_some() { + return Err(serde::de::Error::duplicate_field("jobId")); + } + job_id__ = Some(map_.next_value()?); + } + } + } + Ok(GetDownloadUrlRequest { + job_id: job_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("sift.exports.v1.GetDownloadUrlRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetDownloadUrlResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.presigned_url.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("sift.exports.v1.GetDownloadUrlResponse", len)?; + if !self.presigned_url.is_empty() { + struct_ser.serialize_field("presignedUrl", &self.presigned_url)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetDownloadUrlResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "presigned_url", + "presignedUrl", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + PresignedUrl, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "presignedUrl" | "presigned_url" => Ok(GeneratedField::PresignedUrl), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetDownloadUrlResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct sift.exports.v1.GetDownloadUrlResponse") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut presigned_url__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::PresignedUrl => { + if presigned_url__.is_some() { + return Err(serde::de::Error::duplicate_field("presignedUrl")); + } + presigned_url__ = Some(map_.next_value()?); + } + } + } + Ok(GetDownloadUrlResponse { + presigned_url: presigned_url__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("sift.exports.v1.GetDownloadUrlResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for RunsAndTimeRange { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.run_ids.is_empty() { + len += 1; + } + if self.start_time.is_some() { + len += 1; + } + if self.stop_time.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("sift.exports.v1.RunsAndTimeRange", len)?; + if !self.run_ids.is_empty() { + struct_ser.serialize_field("runIds", &self.run_ids)?; + } + if let Some(v) = self.start_time.as_ref() { + struct_ser.serialize_field("startTime", v)?; + } + if let Some(v) = self.stop_time.as_ref() { + struct_ser.serialize_field("stopTime", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for RunsAndTimeRange { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "run_ids", + "runIds", + "start_time", + "startTime", + "stop_time", + "stopTime", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + RunIds, + StartTime, + StopTime, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "runIds" | "run_ids" => Ok(GeneratedField::RunIds), + "startTime" | "start_time" => Ok(GeneratedField::StartTime), + "stopTime" | "stop_time" => Ok(GeneratedField::StopTime), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = RunsAndTimeRange; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct sift.exports.v1.RunsAndTimeRange") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut run_ids__ = None; + let mut start_time__ = None; + let mut stop_time__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::RunIds => { + if run_ids__.is_some() { + return Err(serde::de::Error::duplicate_field("runIds")); + } + run_ids__ = Some(map_.next_value()?); + } + GeneratedField::StartTime => { + if start_time__.is_some() { + return Err(serde::de::Error::duplicate_field("startTime")); + } + start_time__ = map_.next_value()?; + } + GeneratedField::StopTime => { + if stop_time__.is_some() { + return Err(serde::de::Error::duplicate_field("stopTime")); + } + stop_time__ = map_.next_value()?; + } + } + } + Ok(RunsAndTimeRange { + run_ids: run_ids__.unwrap_or_default(), + start_time: start_time__, + stop_time: stop_time__, + }) + } + } + deserializer.deserialize_struct("sift.exports.v1.RunsAndTimeRange", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for TimeRange { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.start_time.is_some() { + len += 1; + } + if self.stop_time.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("sift.exports.v1.TimeRange", len)?; + if let Some(v) = self.start_time.as_ref() { + struct_ser.serialize_field("startTime", v)?; + } + if let Some(v) = self.stop_time.as_ref() { + struct_ser.serialize_field("stopTime", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for TimeRange { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "start_time", + "startTime", + "stop_time", + "stopTime", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + StartTime, + StopTime, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "startTime" | "start_time" => Ok(GeneratedField::StartTime), + "stopTime" | "stop_time" => Ok(GeneratedField::StopTime), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = TimeRange; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct sift.exports.v1.TimeRange") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut start_time__ = None; + let mut stop_time__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::StartTime => { + if start_time__.is_some() { + return Err(serde::de::Error::duplicate_field("startTime")); + } + start_time__ = map_.next_value()?; + } + GeneratedField::StopTime => { + if stop_time__.is_some() { + return Err(serde::de::Error::duplicate_field("stopTime")); + } + stop_time__ = map_.next_value()?; + } + } + } + Ok(TimeRange { + start_time: start_time__, + stop_time: stop_time__, + }) + } + } + deserializer.deserialize_struct("sift.exports.v1.TimeRange", FIELDS, GeneratedVisitor) + } +} diff --git a/rust/crates/sift_rs/src/gen/sift.exports.v1.tonic.rs b/rust/crates/sift_rs/src/gen/sift.exports.v1.tonic.rs new file mode 100644 index 000000000..69c795bfe --- /dev/null +++ b/rust/crates/sift_rs/src/gen/sift.exports.v1.tonic.rs @@ -0,0 +1,375 @@ +// @generated +/// Generated client implementations. +pub mod export_service_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + #[derive(Debug, Clone)] + pub struct ExportServiceClient { + inner: tonic::client::Grpc, + } + impl ExportServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl ExportServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> ExportServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + ExportServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + pub async fn export_data( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/sift.exports.v1.ExportService/ExportData", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("sift.exports.v1.ExportService", "ExportData")); + self.inner.unary(req, path, codec).await + } + pub async fn get_download_url( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/sift.exports.v1.ExportService/GetDownloadUrl", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("sift.exports.v1.ExportService", "GetDownloadUrl"), + ); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +pub mod export_service_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with ExportServiceServer. + #[async_trait] + pub trait ExportService: Send + Sync + 'static { + async fn export_data( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn get_download_url( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + #[derive(Debug)] + pub struct ExportServiceServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl ExportServiceServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + let inner = _Inner(inner); + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for ExportServiceServer + where + T: ExportService, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + let inner = self.inner.clone(); + match req.uri().path() { + "/sift.exports.v1.ExportService/ExportData" => { + #[allow(non_camel_case_types)] + struct ExportDataSvc(pub Arc); + impl< + T: ExportService, + > tonic::server::UnaryService + for ExportDataSvc { + type Response = super::ExportDataResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::export_data(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = ExportDataSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/sift.exports.v1.ExportService/GetDownloadUrl" => { + #[allow(non_camel_case_types)] + struct GetDownloadUrlSvc(pub Arc); + impl< + T: ExportService, + > tonic::server::UnaryService + for GetDownloadUrlSvc { + type Response = super::GetDownloadUrlResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::get_download_url(&inner, request) + .await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetDownloadUrlSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + _ => { + Box::pin(async move { + Ok( + http::Response::builder() + .status(200) + .header("grpc-status", "12") + .header("content-type", "application/grpc") + .body(empty_body()) + .unwrap(), + ) + }) + } + } + } + } + impl Clone for ExportServiceServer { + fn clone(&self) -> Self { + let inner = self.inner.clone(); + Self { + inner, + accept_compression_encodings: self.accept_compression_encodings, + send_compression_encodings: self.send_compression_encodings, + max_decoding_message_size: self.max_decoding_message_size, + max_encoding_message_size: self.max_encoding_message_size, + } + } + } + impl Clone for _Inner { + fn clone(&self) -> Self { + Self(Arc::clone(&self.0)) + } + } + impl std::fmt::Debug for _Inner { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.0) + } + } + impl tonic::server::NamedService for ExportServiceServer { + const NAME: &'static str = "sift.exports.v1.ExportService"; + } +} From befdade5c682d20890bf71eb1d4e2f9ce97e9de8 Mon Sep 17 00:00:00 2001 From: Jon Deng Date: Fri, 12 Sep 2025 14:00:27 -0700 Subject: [PATCH 4/5] rm python gen directory and add to gitignore --- .gitignore | 1 + python/gen/__init__.py | 0 2 files changed, 1 insertion(+) delete mode 100644 python/gen/__init__.py diff --git a/.gitignore b/.gitignore index d2afb3302..5724df87b 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ go/protos/**/* python/protos/**/* python/dependencies/**/* python/dist/**/* +python/gen/**/* .DS_Store python/build diff --git a/python/gen/__init__.py b/python/gen/__init__.py deleted file mode 100644 index e69de29bb..000000000 From eae86c28747f0225916852596886202ca8f3cd83 Mon Sep 17 00:00:00 2001 From: Jon Deng Date: Fri, 12 Sep 2025 14:12:28 -0700 Subject: [PATCH 5/5] rm gen directory after all gen code is copied to python/lib --- scripts/gen.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/gen.sh b/scripts/gen.sh index ef8403eea..f8ae7ad73 100755 --- a/scripts/gen.sh +++ b/scripts/gen.sh @@ -73,6 +73,9 @@ gen_python_modules() { echo "__path__ = __import__('pkgutil').extend_path(__path__, __name__)" >> "$python_lib/google/__init__.py" rm -rf "${python_lib}/__init__.py" + if [[ -d "$python_gen_dir" ]]; then + rm -rf "$python_gen_dir" + fi echo "ok" }