From 10d0195998243b286e0ba3b6a0124ec328e60995 Mon Sep 17 00:00:00 2001 From: Benji Nguyen <45523555+solidiquis@users.noreply.github.com> Date: Sun, 19 May 2024 19:09:13 -0700 Subject: [PATCH] Add protos for ingestion with config (#23) --- .../channel_schemas/v1/channel_schemas.pb.go | 517 ++++ .../v1/channel_schemas.pb.gw.go | 256 ++ .../v1/channel_schemas_vtproto.pb.go | 2164 +++++++++++++ go/gen/protos/go/sift/ingest/v1/ingest.pb.go | 561 ++++ .../go/sift/ingest/v1/ingest_vtproto.pb.go | 2745 +++++++++++++++++ .../v1/ingestion_configs.pb.go | 2 +- protos/buf.lock | 4 +- .../channel_schemas/v1/channel_schemas.proto | 77 + protos/sift/ingest/v1/ingest.proto | 47 + .../v1/ingestion_configs.proto | 2 +- python/gen/sift/channel_schemas/__init__.py | 0 .../gen/sift/channel_schemas/v1/__init__.py | 0 .../channel_schemas/v1/channel_schemas_pb2.py | 69 + .../v1/channel_schemas_pb2.pyi | 50 + .../v1/channel_schemas_pb2_grpc.py | 101 + python/gen/sift/ingest/__init__.py | 0 python/gen/sift/ingest/v1/__init__.py | 0 python/gen/sift/ingest/v1/ingest_pb2.py | 35 + python/gen/sift/ingest/v1/ingest_pb2.pyi | 56 + python/gen/sift/ingest/v1/ingest_pb2_grpc.py | 66 + rust/src/gen/mod.rs | 14 + rust/src/gen/sift.channel_schemas.v1.rs | 54 + rust/src/gen/sift.channel_schemas.v1.tonic.rs | 397 +++ rust/src/gen/sift.ingest.v1.rs | 67 + rust/src/gen/sift.ingest.v1.tonic.rs | 310 ++ rust/src/gen/sift.ingestion_configs.v1.rs | 2 +- 26 files changed, 7591 insertions(+), 5 deletions(-) create mode 100644 go/gen/protos/go/sift/channel_schemas/v1/channel_schemas.pb.go create mode 100644 go/gen/protos/go/sift/channel_schemas/v1/channel_schemas.pb.gw.go create mode 100644 go/gen/protos/go/sift/channel_schemas/v1/channel_schemas_vtproto.pb.go create mode 100644 go/gen/protos/go/sift/ingest/v1/ingest.pb.go create mode 100644 go/gen/protos/go/sift/ingest/v1/ingest_vtproto.pb.go create mode 100644 protos/sift/channel_schemas/v1/channel_schemas.proto create mode 100644 protos/sift/ingest/v1/ingest.proto create mode 100644 python/gen/sift/channel_schemas/__init__.py create mode 100644 python/gen/sift/channel_schemas/v1/__init__.py create mode 100644 python/gen/sift/channel_schemas/v1/channel_schemas_pb2.py create mode 100644 python/gen/sift/channel_schemas/v1/channel_schemas_pb2.pyi create mode 100644 python/gen/sift/channel_schemas/v1/channel_schemas_pb2_grpc.py create mode 100644 python/gen/sift/ingest/__init__.py create mode 100644 python/gen/sift/ingest/v1/__init__.py create mode 100644 python/gen/sift/ingest/v1/ingest_pb2.py create mode 100644 python/gen/sift/ingest/v1/ingest_pb2.pyi create mode 100644 python/gen/sift/ingest/v1/ingest_pb2_grpc.py create mode 100644 rust/src/gen/sift.channel_schemas.v1.rs create mode 100644 rust/src/gen/sift.channel_schemas.v1.tonic.rs create mode 100644 rust/src/gen/sift.ingest.v1.rs create mode 100644 rust/src/gen/sift.ingest.v1.tonic.rs diff --git a/go/gen/protos/go/sift/channel_schemas/v1/channel_schemas.pb.go b/go/gen/protos/go/sift/channel_schemas/v1/channel_schemas.pb.go new file mode 100644 index 00000000..2b413a00 --- /dev/null +++ b/go/gen/protos/go/sift/channel_schemas/v1/channel_schemas.pb.go @@ -0,0 +1,517 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: sift/channel_schemas/v1/channel_schemas.proto + +package channel_schemasv1 + +import ( + _ "github.com/sift-stack/sift/go/gen/protos/go/google/api" + _ "github.com/sift-stack/sift/go/gen/protos/go/protoc-gen-openapiv2/options" + v1 "github.com/sift-stack/sift/go/gen/protos/go/sift/common/type/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + 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) +) + +// The request for a call to `ChannelSchemaService_CreateChannelSchema`. +type CreateChannelSchemaRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the component (case-insensitive). + Component string `protobuf:"bytes,1,opt,name=component,proto3" json:"component,omitempty"` + // The name of the channel (case-insensitive). + Channel string `protobuf:"bytes,2,opt,name=channel,proto3" json:"channel,omitempty"` + Unit string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"` + DataType v1.ChannelDataType `protobuf:"varint,4,opt,name=data_type,json=dataType,proto3,enum=sift.common.type.v1.ChannelDataType" json:"data_type,omitempty"` + EnumTypes []*v1.ChannelEnumType `protobuf:"bytes,5,rep,name=enum_types,json=enumTypes,proto3" json:"enum_types,omitempty"` + BitFieldElements []*v1.ChannelBitFieldElement `protobuf:"bytes,6,rep,name=bit_field_elements,json=bitFieldElements,proto3" json:"bit_field_elements,omitempty"` + // The name of the asset (case-insensitive). + AssetName string `protobuf:"bytes,7,opt,name=asset_name,json=assetName,proto3" json:"asset_name,omitempty"` + // This field is optional if the caller belongs to a single organization. + OrganizationId string `protobuf:"bytes,8,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` +} + +func (x *CreateChannelSchemaRequest) Reset() { + *x = CreateChannelSchemaRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sift_channel_schemas_v1_channel_schemas_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateChannelSchemaRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateChannelSchemaRequest) ProtoMessage() {} + +func (x *CreateChannelSchemaRequest) ProtoReflect() protoreflect.Message { + mi := &file_sift_channel_schemas_v1_channel_schemas_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 CreateChannelSchemaRequest.ProtoReflect.Descriptor instead. +func (*CreateChannelSchemaRequest) Descriptor() ([]byte, []int) { + return file_sift_channel_schemas_v1_channel_schemas_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateChannelSchemaRequest) GetComponent() string { + if x != nil { + return x.Component + } + return "" +} + +func (x *CreateChannelSchemaRequest) GetChannel() string { + if x != nil { + return x.Channel + } + return "" +} + +func (x *CreateChannelSchemaRequest) GetUnit() string { + if x != nil { + return x.Unit + } + return "" +} + +func (x *CreateChannelSchemaRequest) GetDataType() v1.ChannelDataType { + if x != nil { + return x.DataType + } + return v1.ChannelDataType(0) +} + +func (x *CreateChannelSchemaRequest) GetEnumTypes() []*v1.ChannelEnumType { + if x != nil { + return x.EnumTypes + } + return nil +} + +func (x *CreateChannelSchemaRequest) GetBitFieldElements() []*v1.ChannelBitFieldElement { + if x != nil { + return x.BitFieldElements + } + return nil +} + +func (x *CreateChannelSchemaRequest) GetAssetName() string { + if x != nil { + return x.AssetName + } + return "" +} + +func (x *CreateChannelSchemaRequest) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +// The response of a call to `ChannelSchemaService_CreateChannelSchema`. +type CreateChannelSchemaResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CreateChannelSchemaResponse) Reset() { + *x = CreateChannelSchemaResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sift_channel_schemas_v1_channel_schemas_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateChannelSchemaResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateChannelSchemaResponse) ProtoMessage() {} + +func (x *CreateChannelSchemaResponse) ProtoReflect() protoreflect.Message { + mi := &file_sift_channel_schemas_v1_channel_schemas_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 CreateChannelSchemaResponse.ProtoReflect.Descriptor instead. +func (*CreateChannelSchemaResponse) Descriptor() ([]byte, []int) { + return file_sift_channel_schemas_v1_channel_schemas_proto_rawDescGZIP(), []int{1} +} + +// The request for a call to `ChannelSchemaService_BatchCreateChannelSchemas`. +type BatchCreateChannelSchemasRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Requests []*CreateChannelSchemaRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` + // The asset to which the channel schemas belong (case-insensitive). + // If this field, and any of the child requests specify an asset, the assets must match. + AssetName string `protobuf:"bytes,2,opt,name=asset_name,json=assetName,proto3" json:"asset_name,omitempty"` + // The organization to which the channel schemas belong. + // If this field, and any of the child requests specify an organization_id, the organization_ids must match. + // This field is optional if the caller belongs to a single organization. + OrganizationId string `protobuf:"bytes,3,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` +} + +func (x *BatchCreateChannelSchemasRequest) Reset() { + *x = BatchCreateChannelSchemasRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sift_channel_schemas_v1_channel_schemas_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchCreateChannelSchemasRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchCreateChannelSchemasRequest) ProtoMessage() {} + +func (x *BatchCreateChannelSchemasRequest) ProtoReflect() protoreflect.Message { + mi := &file_sift_channel_schemas_v1_channel_schemas_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 BatchCreateChannelSchemasRequest.ProtoReflect.Descriptor instead. +func (*BatchCreateChannelSchemasRequest) Descriptor() ([]byte, []int) { + return file_sift_channel_schemas_v1_channel_schemas_proto_rawDescGZIP(), []int{2} +} + +func (x *BatchCreateChannelSchemasRequest) GetRequests() []*CreateChannelSchemaRequest { + if x != nil { + return x.Requests + } + return nil +} + +func (x *BatchCreateChannelSchemasRequest) GetAssetName() string { + if x != nil { + return x.AssetName + } + return "" +} + +func (x *BatchCreateChannelSchemasRequest) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +// The response of a call to `ChannelSchemaService_BatchCreateChannelSchemas`. +type BatchCreateChannelSchemasResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BatchCreateChannelSchemasResponse) Reset() { + *x = BatchCreateChannelSchemasResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sift_channel_schemas_v1_channel_schemas_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchCreateChannelSchemasResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchCreateChannelSchemasResponse) ProtoMessage() {} + +func (x *BatchCreateChannelSchemasResponse) ProtoReflect() protoreflect.Message { + mi := &file_sift_channel_schemas_v1_channel_schemas_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 BatchCreateChannelSchemasResponse.ProtoReflect.Descriptor instead. +func (*BatchCreateChannelSchemasResponse) Descriptor() ([]byte, []int) { + return file_sift_channel_schemas_v1_channel_schemas_proto_rawDescGZIP(), []int{3} +} + +var File_sift_channel_schemas_v1_channel_schemas_proto protoreflect.FileDescriptor + +var file_sift_channel_schemas_v1_channel_schemas_proto_rawDesc = []byte{ + 0x0a, 0x2d, 0x73, 0x69, 0x66, 0x74, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x17, 0x73, 0x69, 0x66, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 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, 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, 0x33, 0x73, 0x69, 0x66, 0x74, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x68, 0x61, + 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x65, + 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x73, 0x69, + 0x66, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, + 0x31, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x73, 0x69, 0x66, 0x74, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, + 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbb, 0x03, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, + 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, + 0x12, 0x46, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x73, 0x69, 0x66, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, + 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x48, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, + 0x69, 0x66, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, + 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x12, 0x5e, 0x0a, 0x12, 0x62, 0x69, 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, + 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, + 0x2e, 0x73, 0x69, 0x66, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x69, 0x74, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x10, 0x62, 0x69, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x22, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x1d, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, + 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0xca, 0x01, 0x0a, 0x20, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x54, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x73, 0x69, 0x66, + 0x74, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, + 0x65, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x22, + 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x22, 0x23, 0x0a, 0x21, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, + 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb5, 0x04, 0x0a, 0x14, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xd5, + 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x33, 0x2e, 0x73, 0x69, 0x66, 0x74, 0x2e, 0x63, 0x68, + 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x73, 0x69, + 0x66, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x53, 0x92, 0x41, 0x2e, 0x12, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, + 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x1a, 0x17, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x20, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2d, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x84, 0x02, 0x0a, 0x19, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x73, 0x12, 0x39, 0x2e, 0x73, 0x69, 0x66, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, + 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x3a, 0x2e, 0x73, 0x69, 0x66, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x70, 0x92, 0x41, 0x3e, + 0x12, 0x19, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, + 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x1a, 0x21, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x62, 0x61, 0x74, 0x63, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x63, + 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, + 0x3a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x1a, 0x3e, 0x92, + 0x41, 0x3b, 0x12, 0x39, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x70, + 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x63, 0x68, + 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x42, 0xa0, 0x02, + 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x66, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, + 0x65, 0x6c, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x13, 0x43, + 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x55, 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, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x67, + 0x6f, 0x2f, 0x73, 0x69, 0x66, 0x74, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x43, + 0x58, 0xaa, 0x02, 0x16, 0x53, 0x69, 0x66, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x16, 0x53, 0x69, 0x66, + 0x74, 0x5c, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x22, 0x53, 0x69, 0x66, 0x74, 0x5c, 0x43, 0x68, 0x61, 0x6e, 0x6e, + 0x65, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x53, 0x69, 0x66, 0x74, 0x3a, + 0x3a, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x3a, + 0x3a, 0x56, 0x31, 0x92, 0x41, 0x1a, 0x12, 0x18, 0x0a, 0x16, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x20, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sift_channel_schemas_v1_channel_schemas_proto_rawDescOnce sync.Once + file_sift_channel_schemas_v1_channel_schemas_proto_rawDescData = file_sift_channel_schemas_v1_channel_schemas_proto_rawDesc +) + +func file_sift_channel_schemas_v1_channel_schemas_proto_rawDescGZIP() []byte { + file_sift_channel_schemas_v1_channel_schemas_proto_rawDescOnce.Do(func() { + file_sift_channel_schemas_v1_channel_schemas_proto_rawDescData = protoimpl.X.CompressGZIP(file_sift_channel_schemas_v1_channel_schemas_proto_rawDescData) + }) + return file_sift_channel_schemas_v1_channel_schemas_proto_rawDescData +} + +var file_sift_channel_schemas_v1_channel_schemas_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_sift_channel_schemas_v1_channel_schemas_proto_goTypes = []interface{}{ + (*CreateChannelSchemaRequest)(nil), // 0: sift.channel_schemas.v1.CreateChannelSchemaRequest + (*CreateChannelSchemaResponse)(nil), // 1: sift.channel_schemas.v1.CreateChannelSchemaResponse + (*BatchCreateChannelSchemasRequest)(nil), // 2: sift.channel_schemas.v1.BatchCreateChannelSchemasRequest + (*BatchCreateChannelSchemasResponse)(nil), // 3: sift.channel_schemas.v1.BatchCreateChannelSchemasResponse + (v1.ChannelDataType)(0), // 4: sift.common.type.v1.ChannelDataType + (*v1.ChannelEnumType)(nil), // 5: sift.common.type.v1.ChannelEnumType + (*v1.ChannelBitFieldElement)(nil), // 6: sift.common.type.v1.ChannelBitFieldElement +} +var file_sift_channel_schemas_v1_channel_schemas_proto_depIdxs = []int32{ + 4, // 0: sift.channel_schemas.v1.CreateChannelSchemaRequest.data_type:type_name -> sift.common.type.v1.ChannelDataType + 5, // 1: sift.channel_schemas.v1.CreateChannelSchemaRequest.enum_types:type_name -> sift.common.type.v1.ChannelEnumType + 6, // 2: sift.channel_schemas.v1.CreateChannelSchemaRequest.bit_field_elements:type_name -> sift.common.type.v1.ChannelBitFieldElement + 0, // 3: sift.channel_schemas.v1.BatchCreateChannelSchemasRequest.requests:type_name -> sift.channel_schemas.v1.CreateChannelSchemaRequest + 0, // 4: sift.channel_schemas.v1.ChannelSchemaService.CreateChannelSchema:input_type -> sift.channel_schemas.v1.CreateChannelSchemaRequest + 2, // 5: sift.channel_schemas.v1.ChannelSchemaService.BatchCreateChannelSchemas:input_type -> sift.channel_schemas.v1.BatchCreateChannelSchemasRequest + 1, // 6: sift.channel_schemas.v1.ChannelSchemaService.CreateChannelSchema:output_type -> sift.channel_schemas.v1.CreateChannelSchemaResponse + 3, // 7: sift.channel_schemas.v1.ChannelSchemaService.BatchCreateChannelSchemas:output_type -> sift.channel_schemas.v1.BatchCreateChannelSchemasResponse + 6, // [6:8] is the sub-list for method output_type + 4, // [4:6] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_sift_channel_schemas_v1_channel_schemas_proto_init() } +func file_sift_channel_schemas_v1_channel_schemas_proto_init() { + if File_sift_channel_schemas_v1_channel_schemas_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sift_channel_schemas_v1_channel_schemas_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateChannelSchemaRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sift_channel_schemas_v1_channel_schemas_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateChannelSchemaResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sift_channel_schemas_v1_channel_schemas_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchCreateChannelSchemasRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sift_channel_schemas_v1_channel_schemas_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchCreateChannelSchemasResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_sift_channel_schemas_v1_channel_schemas_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_sift_channel_schemas_v1_channel_schemas_proto_goTypes, + DependencyIndexes: file_sift_channel_schemas_v1_channel_schemas_proto_depIdxs, + MessageInfos: file_sift_channel_schemas_v1_channel_schemas_proto_msgTypes, + }.Build() + File_sift_channel_schemas_v1_channel_schemas_proto = out.File + file_sift_channel_schemas_v1_channel_schemas_proto_rawDesc = nil + file_sift_channel_schemas_v1_channel_schemas_proto_goTypes = nil + file_sift_channel_schemas_v1_channel_schemas_proto_depIdxs = nil +} diff --git a/go/gen/protos/go/sift/channel_schemas/v1/channel_schemas.pb.gw.go b/go/gen/protos/go/sift/channel_schemas/v1/channel_schemas.pb.gw.go new file mode 100644 index 00000000..f5bcc0e2 --- /dev/null +++ b/go/gen/protos/go/sift/channel_schemas/v1/channel_schemas.pb.gw.go @@ -0,0 +1,256 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: sift/channel_schemas/v1/channel_schemas.proto + +/* +Package channel_schemasv1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package channel_schemasv1 + +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_ChannelSchemaService_CreateChannelSchema_0(ctx context.Context, marshaler runtime.Marshaler, client ChannelSchemaServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateChannelSchemaRequest + 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.CreateChannelSchema(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ChannelSchemaService_CreateChannelSchema_0(ctx context.Context, marshaler runtime.Marshaler, server ChannelSchemaServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateChannelSchemaRequest + 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.CreateChannelSchema(ctx, &protoReq) + return msg, metadata, err + +} + +func request_ChannelSchemaService_BatchCreateChannelSchemas_0(ctx context.Context, marshaler runtime.Marshaler, client ChannelSchemaServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq BatchCreateChannelSchemasRequest + 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.BatchCreateChannelSchemas(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ChannelSchemaService_BatchCreateChannelSchemas_0(ctx context.Context, marshaler runtime.Marshaler, server ChannelSchemaServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq BatchCreateChannelSchemasRequest + 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.BatchCreateChannelSchemas(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterChannelSchemaServiceHandlerServer registers the http handlers for service ChannelSchemaService to "mux". +// UnaryRPC :call ChannelSchemaServiceServer 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 RegisterChannelSchemaServiceHandlerFromEndpoint instead. +func RegisterChannelSchemaServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ChannelSchemaServiceServer) error { + + mux.Handle("POST", pattern_ChannelSchemaService_CreateChannelSchema_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.channel_schemas.v1.ChannelSchemaService/CreateChannelSchema", runtime.WithHTTPPathPattern("/api/v1/channel-schemas")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ChannelSchemaService_CreateChannelSchema_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_ChannelSchemaService_CreateChannelSchema_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ChannelSchemaService_BatchCreateChannelSchemas_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.channel_schemas.v1.ChannelSchemaService/BatchCreateChannelSchemas", runtime.WithHTTPPathPattern("/api/v1/channel-schemas:batch-create")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ChannelSchemaService_BatchCreateChannelSchemas_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_ChannelSchemaService_BatchCreateChannelSchemas_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterChannelSchemaServiceHandlerFromEndpoint is same as RegisterChannelSchemaServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterChannelSchemaServiceHandlerFromEndpoint(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 RegisterChannelSchemaServiceHandler(ctx, mux, conn) +} + +// RegisterChannelSchemaServiceHandler registers the http handlers for service ChannelSchemaService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterChannelSchemaServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterChannelSchemaServiceHandlerClient(ctx, mux, NewChannelSchemaServiceClient(conn)) +} + +// RegisterChannelSchemaServiceHandlerClient registers the http handlers for service ChannelSchemaService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ChannelSchemaServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ChannelSchemaServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "ChannelSchemaServiceClient" to call the correct interceptors. +func RegisterChannelSchemaServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ChannelSchemaServiceClient) error { + + mux.Handle("POST", pattern_ChannelSchemaService_CreateChannelSchema_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.channel_schemas.v1.ChannelSchemaService/CreateChannelSchema", runtime.WithHTTPPathPattern("/api/v1/channel-schemas")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ChannelSchemaService_CreateChannelSchema_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ChannelSchemaService_CreateChannelSchema_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ChannelSchemaService_BatchCreateChannelSchemas_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.channel_schemas.v1.ChannelSchemaService/BatchCreateChannelSchemas", runtime.WithHTTPPathPattern("/api/v1/channel-schemas:batch-create")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ChannelSchemaService_BatchCreateChannelSchemas_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ChannelSchemaService_BatchCreateChannelSchemas_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_ChannelSchemaService_CreateChannelSchema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "channel-schemas"}, "")) + + pattern_ChannelSchemaService_BatchCreateChannelSchemas_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "channel-schemas"}, "batch-create")) +) + +var ( + forward_ChannelSchemaService_CreateChannelSchema_0 = runtime.ForwardResponseMessage + + forward_ChannelSchemaService_BatchCreateChannelSchemas_0 = runtime.ForwardResponseMessage +) diff --git a/go/gen/protos/go/sift/channel_schemas/v1/channel_schemas_vtproto.pb.go b/go/gen/protos/go/sift/channel_schemas/v1/channel_schemas_vtproto.pb.go new file mode 100644 index 00000000..882a6ab6 --- /dev/null +++ b/go/gen/protos/go/sift/channel_schemas/v1/channel_schemas_vtproto.pb.go @@ -0,0 +1,2164 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: v0.6.0 +// source: sift/channel_schemas/v1/channel_schemas.proto + +package channel_schemasv1 + +import ( + context "context" + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + v1 "github.com/sift-stack/sift/go/gen/protos/go/sift/common/type/v1" + 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" + 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 *CreateChannelSchemaRequest) CloneVT() *CreateChannelSchemaRequest { + if m == nil { + return (*CreateChannelSchemaRequest)(nil) + } + r := new(CreateChannelSchemaRequest) + r.Component = m.Component + r.Channel = m.Channel + r.Unit = m.Unit + r.DataType = m.DataType + r.AssetName = m.AssetName + r.OrganizationId = m.OrganizationId + if rhs := m.EnumTypes; rhs != nil { + tmpContainer := make([]*v1.ChannelEnumType, len(rhs)) + for k, v := range rhs { + if vtpb, ok := interface{}(v).(interface{ CloneVT() *v1.ChannelEnumType }); ok { + tmpContainer[k] = vtpb.CloneVT() + } else { + tmpContainer[k] = proto.Clone(v).(*v1.ChannelEnumType) + } + } + r.EnumTypes = tmpContainer + } + if rhs := m.BitFieldElements; rhs != nil { + tmpContainer := make([]*v1.ChannelBitFieldElement, len(rhs)) + for k, v := range rhs { + if vtpb, ok := interface{}(v).(interface { + CloneVT() *v1.ChannelBitFieldElement + }); ok { + tmpContainer[k] = vtpb.CloneVT() + } else { + tmpContainer[k] = proto.Clone(v).(*v1.ChannelBitFieldElement) + } + } + r.BitFieldElements = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *CreateChannelSchemaRequest) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *CreateChannelSchemaResponse) CloneVT() *CreateChannelSchemaResponse { + if m == nil { + return (*CreateChannelSchemaResponse)(nil) + } + r := new(CreateChannelSchemaResponse) + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *CreateChannelSchemaResponse) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *BatchCreateChannelSchemasRequest) CloneVT() *BatchCreateChannelSchemasRequest { + if m == nil { + return (*BatchCreateChannelSchemasRequest)(nil) + } + r := new(BatchCreateChannelSchemasRequest) + r.AssetName = m.AssetName + r.OrganizationId = m.OrganizationId + if rhs := m.Requests; rhs != nil { + tmpContainer := make([]*CreateChannelSchemaRequest, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Requests = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *BatchCreateChannelSchemasRequest) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *BatchCreateChannelSchemasResponse) CloneVT() *BatchCreateChannelSchemasResponse { + if m == nil { + return (*BatchCreateChannelSchemasResponse)(nil) + } + r := new(BatchCreateChannelSchemasResponse) + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *BatchCreateChannelSchemasResponse) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (this *CreateChannelSchemaRequest) EqualVT(that *CreateChannelSchemaRequest) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Component != that.Component { + return false + } + if this.Channel != that.Channel { + return false + } + if this.Unit != that.Unit { + return false + } + if this.DataType != that.DataType { + return false + } + if len(this.EnumTypes) != len(that.EnumTypes) { + return false + } + for i, vx := range this.EnumTypes { + vy := that.EnumTypes[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &v1.ChannelEnumType{} + } + if q == nil { + q = &v1.ChannelEnumType{} + } + if equal, ok := interface{}(p).(interface { + EqualVT(*v1.ChannelEnumType) bool + }); ok { + if !equal.EqualVT(q) { + return false + } + } else if !proto.Equal(p, q) { + return false + } + } + } + if len(this.BitFieldElements) != len(that.BitFieldElements) { + return false + } + for i, vx := range this.BitFieldElements { + vy := that.BitFieldElements[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &v1.ChannelBitFieldElement{} + } + if q == nil { + q = &v1.ChannelBitFieldElement{} + } + if equal, ok := interface{}(p).(interface { + EqualVT(*v1.ChannelBitFieldElement) bool + }); ok { + if !equal.EqualVT(q) { + return false + } + } else if !proto.Equal(p, q) { + return false + } + } + } + if this.AssetName != that.AssetName { + return false + } + if this.OrganizationId != that.OrganizationId { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *CreateChannelSchemaRequest) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*CreateChannelSchemaRequest) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *CreateChannelSchemaResponse) EqualVT(that *CreateChannelSchemaResponse) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *CreateChannelSchemaResponse) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*CreateChannelSchemaResponse) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *BatchCreateChannelSchemasRequest) EqualVT(that *BatchCreateChannelSchemasRequest) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if len(this.Requests) != len(that.Requests) { + return false + } + for i, vx := range this.Requests { + vy := that.Requests[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &CreateChannelSchemaRequest{} + } + if q == nil { + q = &CreateChannelSchemaRequest{} + } + if !p.EqualVT(q) { + return false + } + } + } + if this.AssetName != that.AssetName { + return false + } + if this.OrganizationId != that.OrganizationId { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *BatchCreateChannelSchemasRequest) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*BatchCreateChannelSchemasRequest) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *BatchCreateChannelSchemasResponse) EqualVT(that *BatchCreateChannelSchemasResponse) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *BatchCreateChannelSchemasResponse) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*BatchCreateChannelSchemasResponse) + 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 + +// ChannelSchemaServiceClient is the client API for ChannelSchemaService 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 ChannelSchemaServiceClient interface { + // Create a channel schema + CreateChannelSchema(ctx context.Context, in *CreateChannelSchemaRequest, opts ...grpc.CallOption) (*CreateChannelSchemaResponse, error) + // Create a batch of channel schemas + BatchCreateChannelSchemas(ctx context.Context, in *BatchCreateChannelSchemasRequest, opts ...grpc.CallOption) (*BatchCreateChannelSchemasResponse, error) +} + +type channelSchemaServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewChannelSchemaServiceClient(cc grpc.ClientConnInterface) ChannelSchemaServiceClient { + return &channelSchemaServiceClient{cc} +} + +func (c *channelSchemaServiceClient) CreateChannelSchema(ctx context.Context, in *CreateChannelSchemaRequest, opts ...grpc.CallOption) (*CreateChannelSchemaResponse, error) { + out := new(CreateChannelSchemaResponse) + err := c.cc.Invoke(ctx, "/sift.channel_schemas.v1.ChannelSchemaService/CreateChannelSchema", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *channelSchemaServiceClient) BatchCreateChannelSchemas(ctx context.Context, in *BatchCreateChannelSchemasRequest, opts ...grpc.CallOption) (*BatchCreateChannelSchemasResponse, error) { + out := new(BatchCreateChannelSchemasResponse) + err := c.cc.Invoke(ctx, "/sift.channel_schemas.v1.ChannelSchemaService/BatchCreateChannelSchemas", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ChannelSchemaServiceServer is the server API for ChannelSchemaService service. +// All implementations must embed UnimplementedChannelSchemaServiceServer +// for forward compatibility +type ChannelSchemaServiceServer interface { + // Create a channel schema + CreateChannelSchema(context.Context, *CreateChannelSchemaRequest) (*CreateChannelSchemaResponse, error) + // Create a batch of channel schemas + BatchCreateChannelSchemas(context.Context, *BatchCreateChannelSchemasRequest) (*BatchCreateChannelSchemasResponse, error) + mustEmbedUnimplementedChannelSchemaServiceServer() +} + +// UnimplementedChannelSchemaServiceServer must be embedded to have forward compatible implementations. +type UnimplementedChannelSchemaServiceServer struct { +} + +func (UnimplementedChannelSchemaServiceServer) CreateChannelSchema(context.Context, *CreateChannelSchemaRequest) (*CreateChannelSchemaResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateChannelSchema not implemented") +} +func (UnimplementedChannelSchemaServiceServer) BatchCreateChannelSchemas(context.Context, *BatchCreateChannelSchemasRequest) (*BatchCreateChannelSchemasResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchCreateChannelSchemas not implemented") +} +func (UnimplementedChannelSchemaServiceServer) mustEmbedUnimplementedChannelSchemaServiceServer() {} + +// UnsafeChannelSchemaServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ChannelSchemaServiceServer will +// result in compilation errors. +type UnsafeChannelSchemaServiceServer interface { + mustEmbedUnimplementedChannelSchemaServiceServer() +} + +func RegisterChannelSchemaServiceServer(s grpc.ServiceRegistrar, srv ChannelSchemaServiceServer) { + s.RegisterService(&ChannelSchemaService_ServiceDesc, srv) +} + +func _ChannelSchemaService_CreateChannelSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateChannelSchemaRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChannelSchemaServiceServer).CreateChannelSchema(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sift.channel_schemas.v1.ChannelSchemaService/CreateChannelSchema", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChannelSchemaServiceServer).CreateChannelSchema(ctx, req.(*CreateChannelSchemaRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ChannelSchemaService_BatchCreateChannelSchemas_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BatchCreateChannelSchemasRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChannelSchemaServiceServer).BatchCreateChannelSchemas(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sift.channel_schemas.v1.ChannelSchemaService/BatchCreateChannelSchemas", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChannelSchemaServiceServer).BatchCreateChannelSchemas(ctx, req.(*BatchCreateChannelSchemasRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ChannelSchemaService_ServiceDesc is the grpc.ServiceDesc for ChannelSchemaService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ChannelSchemaService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "sift.channel_schemas.v1.ChannelSchemaService", + HandlerType: (*ChannelSchemaServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateChannelSchema", + Handler: _ChannelSchemaService_CreateChannelSchema_Handler, + }, + { + MethodName: "BatchCreateChannelSchemas", + Handler: _ChannelSchemaService_BatchCreateChannelSchemas_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "sift/channel_schemas/v1/channel_schemas.proto", +} + +func (m *CreateChannelSchemaRequest) 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 *CreateChannelSchemaRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *CreateChannelSchemaRequest) 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.OrganizationId) > 0 { + i -= len(m.OrganizationId) + copy(dAtA[i:], m.OrganizationId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OrganizationId))) + i-- + dAtA[i] = 0x42 + } + if len(m.AssetName) > 0 { + i -= len(m.AssetName) + copy(dAtA[i:], m.AssetName) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AssetName))) + i-- + dAtA[i] = 0x3a + } + if len(m.BitFieldElements) > 0 { + for iNdEx := len(m.BitFieldElements) - 1; iNdEx >= 0; iNdEx-- { + if vtmsg, ok := interface{}(m.BitFieldElements[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.BitFieldElements[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] = 0x32 + } + } + if len(m.EnumTypes) > 0 { + for iNdEx := len(m.EnumTypes) - 1; iNdEx >= 0; iNdEx-- { + if vtmsg, ok := interface{}(m.EnumTypes[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.EnumTypes[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] = 0x2a + } + } + if m.DataType != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DataType)) + i-- + dAtA[i] = 0x20 + } + if len(m.Unit) > 0 { + i -= len(m.Unit) + copy(dAtA[i:], m.Unit) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Unit))) + i-- + dAtA[i] = 0x1a + } + if len(m.Channel) > 0 { + i -= len(m.Channel) + copy(dAtA[i:], m.Channel) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Channel))) + i-- + dAtA[i] = 0x12 + } + if len(m.Component) > 0 { + i -= len(m.Component) + copy(dAtA[i:], m.Component) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Component))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CreateChannelSchemaResponse) 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 *CreateChannelSchemaResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *CreateChannelSchemaResponse) 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) + } + return len(dAtA) - i, nil +} + +func (m *BatchCreateChannelSchemasRequest) 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 *BatchCreateChannelSchemasRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *BatchCreateChannelSchemasRequest) 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.OrganizationId) > 0 { + i -= len(m.OrganizationId) + copy(dAtA[i:], m.OrganizationId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OrganizationId))) + i-- + dAtA[i] = 0x1a + } + if len(m.AssetName) > 0 { + i -= len(m.AssetName) + copy(dAtA[i:], m.AssetName) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AssetName))) + i-- + dAtA[i] = 0x12 + } + if len(m.Requests) > 0 { + for iNdEx := len(m.Requests) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Requests[iNdEx].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 *BatchCreateChannelSchemasResponse) 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 *BatchCreateChannelSchemasResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *BatchCreateChannelSchemasResponse) 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) + } + return len(dAtA) - i, nil +} + +func (m *CreateChannelSchemaRequest) 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 *CreateChannelSchemaRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *CreateChannelSchemaRequest) 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.OrganizationId) > 0 { + i -= len(m.OrganizationId) + copy(dAtA[i:], m.OrganizationId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OrganizationId))) + i-- + dAtA[i] = 0x42 + } + if len(m.AssetName) > 0 { + i -= len(m.AssetName) + copy(dAtA[i:], m.AssetName) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AssetName))) + i-- + dAtA[i] = 0x3a + } + if len(m.BitFieldElements) > 0 { + for iNdEx := len(m.BitFieldElements) - 1; iNdEx >= 0; iNdEx-- { + if vtmsg, ok := interface{}(m.BitFieldElements[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.BitFieldElements[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] = 0x32 + } + } + if len(m.EnumTypes) > 0 { + for iNdEx := len(m.EnumTypes) - 1; iNdEx >= 0; iNdEx-- { + if vtmsg, ok := interface{}(m.EnumTypes[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.EnumTypes[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] = 0x2a + } + } + if m.DataType != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DataType)) + i-- + dAtA[i] = 0x20 + } + if len(m.Unit) > 0 { + i -= len(m.Unit) + copy(dAtA[i:], m.Unit) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Unit))) + i-- + dAtA[i] = 0x1a + } + if len(m.Channel) > 0 { + i -= len(m.Channel) + copy(dAtA[i:], m.Channel) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Channel))) + i-- + dAtA[i] = 0x12 + } + if len(m.Component) > 0 { + i -= len(m.Component) + copy(dAtA[i:], m.Component) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Component))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CreateChannelSchemaResponse) 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 *CreateChannelSchemaResponse) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *CreateChannelSchemaResponse) 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) + } + return len(dAtA) - i, nil +} + +func (m *BatchCreateChannelSchemasRequest) 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 *BatchCreateChannelSchemasRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *BatchCreateChannelSchemasRequest) 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.OrganizationId) > 0 { + i -= len(m.OrganizationId) + copy(dAtA[i:], m.OrganizationId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OrganizationId))) + i-- + dAtA[i] = 0x1a + } + if len(m.AssetName) > 0 { + i -= len(m.AssetName) + copy(dAtA[i:], m.AssetName) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AssetName))) + i-- + dAtA[i] = 0x12 + } + if len(m.Requests) > 0 { + for iNdEx := len(m.Requests) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Requests[iNdEx].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 *BatchCreateChannelSchemasResponse) 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 *BatchCreateChannelSchemasResponse) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *BatchCreateChannelSchemasResponse) 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) + } + return len(dAtA) - i, nil +} + +func (m *CreateChannelSchemaRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Component) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Channel) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Unit) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.DataType != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.DataType)) + } + if len(m.EnumTypes) > 0 { + for _, e := range m.EnumTypes { + 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 len(m.BitFieldElements) > 0 { + for _, e := range m.BitFieldElements { + if size, ok := interface{}(e).(interface { + SizeVT() int + }); ok { + l = size.SizeVT() + } else { + l = proto.Size(e) + } + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.AssetName) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.OrganizationId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *CreateChannelSchemaResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *BatchCreateChannelSchemasRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Requests) > 0 { + for _, e := range m.Requests { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.AssetName) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.OrganizationId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *BatchCreateChannelSchemasResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *CreateChannelSchemaRequest) 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: CreateChannelSchemaRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateChannelSchemaRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Component", 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.Component = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Channel", 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.Channel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Unit", 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.Unit = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DataType", wireType) + } + m.DataType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DataType |= v1.ChannelDataType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EnumTypes", 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.EnumTypes = append(m.EnumTypes, &v1.ChannelEnumType{}) + if unmarshal, ok := interface{}(m.EnumTypes[len(m.EnumTypes)-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.EnumTypes[len(m.EnumTypes)-1]); err != nil { + return err + } + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BitFieldElements", 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.BitFieldElements = append(m.BitFieldElements, &v1.ChannelBitFieldElement{}) + if unmarshal, ok := interface{}(m.BitFieldElements[len(m.BitFieldElements)-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.BitFieldElements[len(m.BitFieldElements)-1]); err != nil { + return err + } + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AssetName", 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.AssetName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrganizationId", 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.OrganizationId = 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 *CreateChannelSchemaResponse) 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: CreateChannelSchemaResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateChannelSchemaResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 *BatchCreateChannelSchemasRequest) 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: BatchCreateChannelSchemasRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchCreateChannelSchemasRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Requests", 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.Requests = append(m.Requests, &CreateChannelSchemaRequest{}) + if err := m.Requests[len(m.Requests)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AssetName", 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.AssetName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrganizationId", 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.OrganizationId = 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 *BatchCreateChannelSchemasResponse) 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: BatchCreateChannelSchemasResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchCreateChannelSchemasResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 *CreateChannelSchemaRequest) 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: CreateChannelSchemaRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateChannelSchemaRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Component", 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.Component = stringValue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Channel", 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.Channel = stringValue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Unit", 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.Unit = stringValue + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DataType", wireType) + } + m.DataType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DataType |= v1.ChannelDataType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EnumTypes", 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.EnumTypes = append(m.EnumTypes, &v1.ChannelEnumType{}) + if unmarshal, ok := interface{}(m.EnumTypes[len(m.EnumTypes)-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.EnumTypes[len(m.EnumTypes)-1]); err != nil { + return err + } + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BitFieldElements", 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.BitFieldElements = append(m.BitFieldElements, &v1.ChannelBitFieldElement{}) + if unmarshal, ok := interface{}(m.BitFieldElements[len(m.BitFieldElements)-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.BitFieldElements[len(m.BitFieldElements)-1]); err != nil { + return err + } + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AssetName", 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.AssetName = stringValue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrganizationId", 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.OrganizationId = 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 *CreateChannelSchemaResponse) 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: CreateChannelSchemaResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateChannelSchemaResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 *BatchCreateChannelSchemasRequest) 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: BatchCreateChannelSchemasRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchCreateChannelSchemasRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Requests", 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.Requests = append(m.Requests, &CreateChannelSchemaRequest{}) + if err := m.Requests[len(m.Requests)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AssetName", 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.AssetName = stringValue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrganizationId", 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.OrganizationId = 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 *BatchCreateChannelSchemasResponse) 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: BatchCreateChannelSchemasResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchCreateChannelSchemasResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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/go/gen/protos/go/sift/ingest/v1/ingest.pb.go b/go/gen/protos/go/sift/ingest/v1/ingest.pb.go new file mode 100644 index 00000000..1de2a258 --- /dev/null +++ b/go/gen/protos/go/sift/ingest/v1/ingest.pb.go @@ -0,0 +1,561 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: sift/ingest/v1/ingest.proto + +package ingestv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + 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 IngestWithConfigDataStreamRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IngestionConfigId string `protobuf:"bytes,1,opt,name=ingestion_config_id,json=ingestionConfigId,proto3" json:"ingestion_config_id,omitempty"` + Flow string `protobuf:"bytes,2,opt,name=flow,proto3" json:"flow,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + ChannelValues []*IngestWithConfigDataChannelValue `protobuf:"bytes,4,rep,name=channel_values,json=channelValues,proto3" json:"channel_values,omitempty"` + // The run_id MUST be included if this data is part of a run. + RunId string `protobuf:"bytes,5,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` + // By default, if this request contains any channel values that do not match + // the supplied ingestion config, the request is stored in an error queue and + // the stream continues to accept data. This ensures all data is saved, but + // only valid data is fully ingested. If this is set to `true`, any validation + // errors end the stream and return the error to the client. + EndStreamOnValidationError bool `protobuf:"varint,6,opt,name=end_stream_on_validation_error,json=endStreamOnValidationError,proto3" json:"end_stream_on_validation_error,omitempty"` + OrganizationId string `protobuf:"bytes,7,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` +} + +func (x *IngestWithConfigDataStreamRequest) Reset() { + *x = IngestWithConfigDataStreamRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sift_ingest_v1_ingest_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IngestWithConfigDataStreamRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IngestWithConfigDataStreamRequest) ProtoMessage() {} + +func (x *IngestWithConfigDataStreamRequest) ProtoReflect() protoreflect.Message { + mi := &file_sift_ingest_v1_ingest_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 IngestWithConfigDataStreamRequest.ProtoReflect.Descriptor instead. +func (*IngestWithConfigDataStreamRequest) Descriptor() ([]byte, []int) { + return file_sift_ingest_v1_ingest_proto_rawDescGZIP(), []int{0} +} + +func (x *IngestWithConfigDataStreamRequest) GetIngestionConfigId() string { + if x != nil { + return x.IngestionConfigId + } + return "" +} + +func (x *IngestWithConfigDataStreamRequest) GetFlow() string { + if x != nil { + return x.Flow + } + return "" +} + +func (x *IngestWithConfigDataStreamRequest) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *IngestWithConfigDataStreamRequest) GetChannelValues() []*IngestWithConfigDataChannelValue { + if x != nil { + return x.ChannelValues + } + return nil +} + +func (x *IngestWithConfigDataStreamRequest) GetRunId() string { + if x != nil { + return x.RunId + } + return "" +} + +func (x *IngestWithConfigDataStreamRequest) GetEndStreamOnValidationError() bool { + if x != nil { + return x.EndStreamOnValidationError + } + return false +} + +func (x *IngestWithConfigDataStreamRequest) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +type IngestWithConfigDataStreamResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *IngestWithConfigDataStreamResponse) Reset() { + *x = IngestWithConfigDataStreamResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sift_ingest_v1_ingest_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IngestWithConfigDataStreamResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IngestWithConfigDataStreamResponse) ProtoMessage() {} + +func (x *IngestWithConfigDataStreamResponse) ProtoReflect() protoreflect.Message { + mi := &file_sift_ingest_v1_ingest_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 IngestWithConfigDataStreamResponse.ProtoReflect.Descriptor instead. +func (*IngestWithConfigDataStreamResponse) Descriptor() ([]byte, []int) { + return file_sift_ingest_v1_ingest_proto_rawDescGZIP(), []int{1} +} + +type IngestWithConfigDataChannelValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: + // + // *IngestWithConfigDataChannelValue_String_ + // *IngestWithConfigDataChannelValue_Double + // *IngestWithConfigDataChannelValue_Float + // *IngestWithConfigDataChannelValue_Bool + // *IngestWithConfigDataChannelValue_Int32 + // *IngestWithConfigDataChannelValue_Uint32 + // *IngestWithConfigDataChannelValue_Int64 + // *IngestWithConfigDataChannelValue_Uint64 + // *IngestWithConfigDataChannelValue_BitField + // *IngestWithConfigDataChannelValue_Enum + // *IngestWithConfigDataChannelValue_Empty + Type isIngestWithConfigDataChannelValue_Type `protobuf_oneof:"type"` +} + +func (x *IngestWithConfigDataChannelValue) Reset() { + *x = IngestWithConfigDataChannelValue{} + if protoimpl.UnsafeEnabled { + mi := &file_sift_ingest_v1_ingest_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IngestWithConfigDataChannelValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IngestWithConfigDataChannelValue) ProtoMessage() {} + +func (x *IngestWithConfigDataChannelValue) ProtoReflect() protoreflect.Message { + mi := &file_sift_ingest_v1_ingest_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 IngestWithConfigDataChannelValue.ProtoReflect.Descriptor instead. +func (*IngestWithConfigDataChannelValue) Descriptor() ([]byte, []int) { + return file_sift_ingest_v1_ingest_proto_rawDescGZIP(), []int{2} +} + +func (m *IngestWithConfigDataChannelValue) GetType() isIngestWithConfigDataChannelValue_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *IngestWithConfigDataChannelValue) GetString_() string { + if x, ok := x.GetType().(*IngestWithConfigDataChannelValue_String_); ok { + return x.String_ + } + return "" +} + +func (x *IngestWithConfigDataChannelValue) GetDouble() float64 { + if x, ok := x.GetType().(*IngestWithConfigDataChannelValue_Double); ok { + return x.Double + } + return 0 +} + +func (x *IngestWithConfigDataChannelValue) GetFloat() float32 { + if x, ok := x.GetType().(*IngestWithConfigDataChannelValue_Float); ok { + return x.Float + } + return 0 +} + +func (x *IngestWithConfigDataChannelValue) GetBool() bool { + if x, ok := x.GetType().(*IngestWithConfigDataChannelValue_Bool); ok { + return x.Bool + } + return false +} + +func (x *IngestWithConfigDataChannelValue) GetInt32() int32 { + if x, ok := x.GetType().(*IngestWithConfigDataChannelValue_Int32); ok { + return x.Int32 + } + return 0 +} + +func (x *IngestWithConfigDataChannelValue) GetUint32() uint32 { + if x, ok := x.GetType().(*IngestWithConfigDataChannelValue_Uint32); ok { + return x.Uint32 + } + return 0 +} + +func (x *IngestWithConfigDataChannelValue) GetInt64() int64 { + if x, ok := x.GetType().(*IngestWithConfigDataChannelValue_Int64); ok { + return x.Int64 + } + return 0 +} + +func (x *IngestWithConfigDataChannelValue) GetUint64() uint64 { + if x, ok := x.GetType().(*IngestWithConfigDataChannelValue_Uint64); ok { + return x.Uint64 + } + return 0 +} + +func (x *IngestWithConfigDataChannelValue) GetBitField() []byte { + if x, ok := x.GetType().(*IngestWithConfigDataChannelValue_BitField); ok { + return x.BitField + } + return nil +} + +func (x *IngestWithConfigDataChannelValue) GetEnum() uint32 { + if x, ok := x.GetType().(*IngestWithConfigDataChannelValue_Enum); ok { + return x.Enum + } + return 0 +} + +func (x *IngestWithConfigDataChannelValue) GetEmpty() *emptypb.Empty { + if x, ok := x.GetType().(*IngestWithConfigDataChannelValue_Empty); ok { + return x.Empty + } + return nil +} + +type isIngestWithConfigDataChannelValue_Type interface { + isIngestWithConfigDataChannelValue_Type() +} + +type IngestWithConfigDataChannelValue_String_ struct { + String_ string `protobuf:"bytes,1,opt,name=string,proto3,oneof"` +} + +type IngestWithConfigDataChannelValue_Double struct { + Double float64 `protobuf:"fixed64,2,opt,name=double,proto3,oneof"` +} + +type IngestWithConfigDataChannelValue_Float struct { + Float float32 `protobuf:"fixed32,3,opt,name=float,proto3,oneof"` +} + +type IngestWithConfigDataChannelValue_Bool struct { + Bool bool `protobuf:"varint,4,opt,name=bool,proto3,oneof"` +} + +type IngestWithConfigDataChannelValue_Int32 struct { + Int32 int32 `protobuf:"varint,5,opt,name=int32,proto3,oneof"` +} + +type IngestWithConfigDataChannelValue_Uint32 struct { + Uint32 uint32 `protobuf:"varint,6,opt,name=uint32,proto3,oneof"` +} + +type IngestWithConfigDataChannelValue_Int64 struct { + Int64 int64 `protobuf:"varint,7,opt,name=int64,proto3,oneof"` +} + +type IngestWithConfigDataChannelValue_Uint64 struct { + Uint64 uint64 `protobuf:"varint,8,opt,name=uint64,proto3,oneof"` +} + +type IngestWithConfigDataChannelValue_BitField struct { + BitField []byte `protobuf:"bytes,9,opt,name=bit_field,json=bitField,proto3,oneof"` +} + +type IngestWithConfigDataChannelValue_Enum struct { + Enum uint32 `protobuf:"varint,10,opt,name=enum,proto3,oneof"` +} + +type IngestWithConfigDataChannelValue_Empty struct { + // If there's not a new data point for a channel at the given timestamp, pass empty to skip it + Empty *emptypb.Empty `protobuf:"bytes,11,opt,name=empty,proto3,oneof"` +} + +func (*IngestWithConfigDataChannelValue_String_) isIngestWithConfigDataChannelValue_Type() {} + +func (*IngestWithConfigDataChannelValue_Double) isIngestWithConfigDataChannelValue_Type() {} + +func (*IngestWithConfigDataChannelValue_Float) isIngestWithConfigDataChannelValue_Type() {} + +func (*IngestWithConfigDataChannelValue_Bool) isIngestWithConfigDataChannelValue_Type() {} + +func (*IngestWithConfigDataChannelValue_Int32) isIngestWithConfigDataChannelValue_Type() {} + +func (*IngestWithConfigDataChannelValue_Uint32) isIngestWithConfigDataChannelValue_Type() {} + +func (*IngestWithConfigDataChannelValue_Int64) isIngestWithConfigDataChannelValue_Type() {} + +func (*IngestWithConfigDataChannelValue_Uint64) isIngestWithConfigDataChannelValue_Type() {} + +func (*IngestWithConfigDataChannelValue_BitField) isIngestWithConfigDataChannelValue_Type() {} + +func (*IngestWithConfigDataChannelValue_Enum) isIngestWithConfigDataChannelValue_Type() {} + +func (*IngestWithConfigDataChannelValue_Empty) isIngestWithConfigDataChannelValue_Type() {} + +var File_sift_ingest_v1_ingest_proto protoreflect.FileDescriptor + +var file_sift_ingest_v1_ingest_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x73, 0x69, 0x66, 0x74, 0x2f, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x2f, 0x76, 0x31, + 0x2f, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x73, + 0x69, 0x66, 0x74, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, + 0x6d, 0x70, 0x74, 0x79, 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, 0x22, 0xfe, 0x02, 0x0a, 0x21, + 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, + 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 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, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, + 0x57, 0x0a, 0x0e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x73, 0x69, 0x66, 0x74, 0x2e, 0x69, + 0x6e, 0x67, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x57, + 0x69, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x61, 0x74, 0x61, 0x43, 0x68, 0x61, + 0x6e, 0x6e, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x6e, + 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x12, + 0x42, 0x0a, 0x1e, 0x65, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x6f, 0x6e, + 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x4f, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x24, 0x0a, 0x22, + 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xd5, 0x02, 0x0a, 0x20, 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, + 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x61, 0x74, 0x61, 0x43, 0x68, 0x61, 0x6e, 0x6e, + 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x12, 0x18, 0x0a, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x01, 0x48, 0x00, 0x52, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x05, 0x66, + 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x48, 0x00, 0x52, 0x05, 0x66, 0x6c, + 0x6f, 0x61, 0x74, 0x12, 0x14, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x12, 0x16, 0x0a, 0x05, 0x69, 0x6e, 0x74, + 0x33, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, 0x74, 0x33, + 0x32, 0x12, 0x18, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x00, 0x52, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x16, 0x0a, 0x05, 0x69, + 0x6e, 0x74, 0x36, 0x34, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, + 0x74, 0x36, 0x34, 0x12, 0x18, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x1d, 0x0a, + 0x09, 0x62, 0x69, 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, + 0x48, 0x00, 0x52, 0x08, 0x62, 0x69, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x14, 0x0a, 0x04, + 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, + 0x75, 0x6d, 0x12, 0x2e, 0x0a, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x70, + 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x32, 0x97, 0x01, 0x0a, 0x0d, 0x49, + 0x6e, 0x67, 0x65, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x85, 0x01, 0x0a, + 0x1a, 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x31, 0x2e, 0x73, 0x69, + 0x66, 0x74, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x67, + 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x61, 0x74, + 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, + 0x2e, 0x73, 0x69, 0x66, 0x74, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x28, 0x01, 0x42, 0xc0, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x66, + 0x74, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x49, 0x6e, 0x67, + 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 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, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x73, 0x69, 0x66, 0x74, 0x2f, 0x69, 0x6e, 0x67, + 0x65, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x53, 0x49, 0x58, 0xaa, 0x02, 0x0e, 0x53, 0x69, 0x66, 0x74, 0x2e, 0x49, 0x6e, 0x67, + 0x65, 0x73, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0e, 0x53, 0x69, 0x66, 0x74, 0x5c, 0x49, 0x6e, + 0x67, 0x65, 0x73, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1a, 0x53, 0x69, 0x66, 0x74, 0x5c, 0x49, + 0x6e, 0x67, 0x65, 0x73, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x69, 0x66, 0x74, 0x3a, 0x3a, 0x49, 0x6e, 0x67, + 0x65, 0x73, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sift_ingest_v1_ingest_proto_rawDescOnce sync.Once + file_sift_ingest_v1_ingest_proto_rawDescData = file_sift_ingest_v1_ingest_proto_rawDesc +) + +func file_sift_ingest_v1_ingest_proto_rawDescGZIP() []byte { + file_sift_ingest_v1_ingest_proto_rawDescOnce.Do(func() { + file_sift_ingest_v1_ingest_proto_rawDescData = protoimpl.X.CompressGZIP(file_sift_ingest_v1_ingest_proto_rawDescData) + }) + return file_sift_ingest_v1_ingest_proto_rawDescData +} + +var file_sift_ingest_v1_ingest_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_sift_ingest_v1_ingest_proto_goTypes = []interface{}{ + (*IngestWithConfigDataStreamRequest)(nil), // 0: sift.ingest.v1.IngestWithConfigDataStreamRequest + (*IngestWithConfigDataStreamResponse)(nil), // 1: sift.ingest.v1.IngestWithConfigDataStreamResponse + (*IngestWithConfigDataChannelValue)(nil), // 2: sift.ingest.v1.IngestWithConfigDataChannelValue + (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 4: google.protobuf.Empty +} +var file_sift_ingest_v1_ingest_proto_depIdxs = []int32{ + 3, // 0: sift.ingest.v1.IngestWithConfigDataStreamRequest.timestamp:type_name -> google.protobuf.Timestamp + 2, // 1: sift.ingest.v1.IngestWithConfigDataStreamRequest.channel_values:type_name -> sift.ingest.v1.IngestWithConfigDataChannelValue + 4, // 2: sift.ingest.v1.IngestWithConfigDataChannelValue.empty:type_name -> google.protobuf.Empty + 0, // 3: sift.ingest.v1.IngestService.IngestWithConfigDataStream:input_type -> sift.ingest.v1.IngestWithConfigDataStreamRequest + 1, // 4: sift.ingest.v1.IngestService.IngestWithConfigDataStream:output_type -> sift.ingest.v1.IngestWithConfigDataStreamResponse + 4, // [4:5] is the sub-list for method output_type + 3, // [3:4] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_sift_ingest_v1_ingest_proto_init() } +func file_sift_ingest_v1_ingest_proto_init() { + if File_sift_ingest_v1_ingest_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sift_ingest_v1_ingest_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IngestWithConfigDataStreamRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sift_ingest_v1_ingest_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IngestWithConfigDataStreamResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sift_ingest_v1_ingest_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IngestWithConfigDataChannelValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_sift_ingest_v1_ingest_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*IngestWithConfigDataChannelValue_String_)(nil), + (*IngestWithConfigDataChannelValue_Double)(nil), + (*IngestWithConfigDataChannelValue_Float)(nil), + (*IngestWithConfigDataChannelValue_Bool)(nil), + (*IngestWithConfigDataChannelValue_Int32)(nil), + (*IngestWithConfigDataChannelValue_Uint32)(nil), + (*IngestWithConfigDataChannelValue_Int64)(nil), + (*IngestWithConfigDataChannelValue_Uint64)(nil), + (*IngestWithConfigDataChannelValue_BitField)(nil), + (*IngestWithConfigDataChannelValue_Enum)(nil), + (*IngestWithConfigDataChannelValue_Empty)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_sift_ingest_v1_ingest_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_sift_ingest_v1_ingest_proto_goTypes, + DependencyIndexes: file_sift_ingest_v1_ingest_proto_depIdxs, + MessageInfos: file_sift_ingest_v1_ingest_proto_msgTypes, + }.Build() + File_sift_ingest_v1_ingest_proto = out.File + file_sift_ingest_v1_ingest_proto_rawDesc = nil + file_sift_ingest_v1_ingest_proto_goTypes = nil + file_sift_ingest_v1_ingest_proto_depIdxs = nil +} diff --git a/go/gen/protos/go/sift/ingest/v1/ingest_vtproto.pb.go b/go/gen/protos/go/sift/ingest/v1/ingest_vtproto.pb.go new file mode 100644 index 00000000..1d69c70f --- /dev/null +++ b/go/gen/protos/go/sift/ingest/v1/ingest_vtproto.pb.go @@ -0,0 +1,2745 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: v0.6.0 +// source: sift/ingest/v1/ingest.proto + +package ingestv1 + +import ( + context "context" + binary "encoding/binary" + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + emptypb1 "github.com/planetscale/vtprotobuf/types/known/emptypb" + timestamppb1 "github.com/planetscale/vtprotobuf/types/known/timestamppb" + 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" + emptypb "google.golang.org/protobuf/types/known/emptypb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + io "io" + math "math" + 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 *IngestWithConfigDataStreamRequest) CloneVT() *IngestWithConfigDataStreamRequest { + if m == nil { + return (*IngestWithConfigDataStreamRequest)(nil) + } + r := new(IngestWithConfigDataStreamRequest) + r.IngestionConfigId = m.IngestionConfigId + r.Flow = m.Flow + r.Timestamp = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.Timestamp).CloneVT()) + r.RunId = m.RunId + r.EndStreamOnValidationError = m.EndStreamOnValidationError + r.OrganizationId = m.OrganizationId + if rhs := m.ChannelValues; rhs != nil { + tmpContainer := make([]*IngestWithConfigDataChannelValue, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.ChannelValues = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *IngestWithConfigDataStreamRequest) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *IngestWithConfigDataStreamResponse) CloneVT() *IngestWithConfigDataStreamResponse { + if m == nil { + return (*IngestWithConfigDataStreamResponse)(nil) + } + r := new(IngestWithConfigDataStreamResponse) + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *IngestWithConfigDataStreamResponse) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *IngestWithConfigDataChannelValue) CloneVT() *IngestWithConfigDataChannelValue { + if m == nil { + return (*IngestWithConfigDataChannelValue)(nil) + } + r := new(IngestWithConfigDataChannelValue) + if m.Type != nil { + r.Type = m.Type.(interface { + CloneVT() isIngestWithConfigDataChannelValue_Type + }).CloneVT() + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *IngestWithConfigDataChannelValue) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *IngestWithConfigDataChannelValue_String_) CloneVT() isIngestWithConfigDataChannelValue_Type { + if m == nil { + return (*IngestWithConfigDataChannelValue_String_)(nil) + } + r := new(IngestWithConfigDataChannelValue_String_) + r.String_ = m.String_ + return r +} + +func (m *IngestWithConfigDataChannelValue_Double) CloneVT() isIngestWithConfigDataChannelValue_Type { + if m == nil { + return (*IngestWithConfigDataChannelValue_Double)(nil) + } + r := new(IngestWithConfigDataChannelValue_Double) + r.Double = m.Double + return r +} + +func (m *IngestWithConfigDataChannelValue_Float) CloneVT() isIngestWithConfigDataChannelValue_Type { + if m == nil { + return (*IngestWithConfigDataChannelValue_Float)(nil) + } + r := new(IngestWithConfigDataChannelValue_Float) + r.Float = m.Float + return r +} + +func (m *IngestWithConfigDataChannelValue_Bool) CloneVT() isIngestWithConfigDataChannelValue_Type { + if m == nil { + return (*IngestWithConfigDataChannelValue_Bool)(nil) + } + r := new(IngestWithConfigDataChannelValue_Bool) + r.Bool = m.Bool + return r +} + +func (m *IngestWithConfigDataChannelValue_Int32) CloneVT() isIngestWithConfigDataChannelValue_Type { + if m == nil { + return (*IngestWithConfigDataChannelValue_Int32)(nil) + } + r := new(IngestWithConfigDataChannelValue_Int32) + r.Int32 = m.Int32 + return r +} + +func (m *IngestWithConfigDataChannelValue_Uint32) CloneVT() isIngestWithConfigDataChannelValue_Type { + if m == nil { + return (*IngestWithConfigDataChannelValue_Uint32)(nil) + } + r := new(IngestWithConfigDataChannelValue_Uint32) + r.Uint32 = m.Uint32 + return r +} + +func (m *IngestWithConfigDataChannelValue_Int64) CloneVT() isIngestWithConfigDataChannelValue_Type { + if m == nil { + return (*IngestWithConfigDataChannelValue_Int64)(nil) + } + r := new(IngestWithConfigDataChannelValue_Int64) + r.Int64 = m.Int64 + return r +} + +func (m *IngestWithConfigDataChannelValue_Uint64) CloneVT() isIngestWithConfigDataChannelValue_Type { + if m == nil { + return (*IngestWithConfigDataChannelValue_Uint64)(nil) + } + r := new(IngestWithConfigDataChannelValue_Uint64) + r.Uint64 = m.Uint64 + return r +} + +func (m *IngestWithConfigDataChannelValue_BitField) CloneVT() isIngestWithConfigDataChannelValue_Type { + if m == nil { + return (*IngestWithConfigDataChannelValue_BitField)(nil) + } + r := new(IngestWithConfigDataChannelValue_BitField) + if rhs := m.BitField; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.BitField = tmpBytes + } + return r +} + +func (m *IngestWithConfigDataChannelValue_Enum) CloneVT() isIngestWithConfigDataChannelValue_Type { + if m == nil { + return (*IngestWithConfigDataChannelValue_Enum)(nil) + } + r := new(IngestWithConfigDataChannelValue_Enum) + r.Enum = m.Enum + return r +} + +func (m *IngestWithConfigDataChannelValue_Empty) CloneVT() isIngestWithConfigDataChannelValue_Type { + if m == nil { + return (*IngestWithConfigDataChannelValue_Empty)(nil) + } + r := new(IngestWithConfigDataChannelValue_Empty) + r.Empty = (*emptypb.Empty)((*emptypb1.Empty)(m.Empty).CloneVT()) + return r +} + +func (this *IngestWithConfigDataStreamRequest) EqualVT(that *IngestWithConfigDataStreamRequest) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.IngestionConfigId != that.IngestionConfigId { + return false + } + if this.Flow != that.Flow { + return false + } + if !(*timestamppb1.Timestamp)(this.Timestamp).EqualVT((*timestamppb1.Timestamp)(that.Timestamp)) { + return false + } + if len(this.ChannelValues) != len(that.ChannelValues) { + return false + } + for i, vx := range this.ChannelValues { + vy := that.ChannelValues[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &IngestWithConfigDataChannelValue{} + } + if q == nil { + q = &IngestWithConfigDataChannelValue{} + } + if !p.EqualVT(q) { + return false + } + } + } + if this.RunId != that.RunId { + return false + } + if this.EndStreamOnValidationError != that.EndStreamOnValidationError { + return false + } + if this.OrganizationId != that.OrganizationId { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *IngestWithConfigDataStreamRequest) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*IngestWithConfigDataStreamRequest) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *IngestWithConfigDataStreamResponse) EqualVT(that *IngestWithConfigDataStreamResponse) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *IngestWithConfigDataStreamResponse) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*IngestWithConfigDataStreamResponse) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *IngestWithConfigDataChannelValue) EqualVT(that *IngestWithConfigDataChannelValue) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Type == nil && that.Type != nil { + return false + } else if this.Type != nil { + if that.Type == nil { + return false + } + if !this.Type.(interface { + EqualVT(isIngestWithConfigDataChannelValue_Type) bool + }).EqualVT(that.Type) { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *IngestWithConfigDataChannelValue) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*IngestWithConfigDataChannelValue) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *IngestWithConfigDataChannelValue_String_) EqualVT(thatIface isIngestWithConfigDataChannelValue_Type) bool { + that, ok := thatIface.(*IngestWithConfigDataChannelValue_String_) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if this.String_ != that.String_ { + return false + } + return true +} + +func (this *IngestWithConfigDataChannelValue_Double) EqualVT(thatIface isIngestWithConfigDataChannelValue_Type) bool { + that, ok := thatIface.(*IngestWithConfigDataChannelValue_Double) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if this.Double != that.Double { + return false + } + return true +} + +func (this *IngestWithConfigDataChannelValue_Float) EqualVT(thatIface isIngestWithConfigDataChannelValue_Type) bool { + that, ok := thatIface.(*IngestWithConfigDataChannelValue_Float) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if this.Float != that.Float { + return false + } + return true +} + +func (this *IngestWithConfigDataChannelValue_Bool) EqualVT(thatIface isIngestWithConfigDataChannelValue_Type) bool { + that, ok := thatIface.(*IngestWithConfigDataChannelValue_Bool) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if this.Bool != that.Bool { + return false + } + return true +} + +func (this *IngestWithConfigDataChannelValue_Int32) EqualVT(thatIface isIngestWithConfigDataChannelValue_Type) bool { + that, ok := thatIface.(*IngestWithConfigDataChannelValue_Int32) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if this.Int32 != that.Int32 { + return false + } + return true +} + +func (this *IngestWithConfigDataChannelValue_Uint32) EqualVT(thatIface isIngestWithConfigDataChannelValue_Type) bool { + that, ok := thatIface.(*IngestWithConfigDataChannelValue_Uint32) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if this.Uint32 != that.Uint32 { + return false + } + return true +} + +func (this *IngestWithConfigDataChannelValue_Int64) EqualVT(thatIface isIngestWithConfigDataChannelValue_Type) bool { + that, ok := thatIface.(*IngestWithConfigDataChannelValue_Int64) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if this.Int64 != that.Int64 { + return false + } + return true +} + +func (this *IngestWithConfigDataChannelValue_Uint64) EqualVT(thatIface isIngestWithConfigDataChannelValue_Type) bool { + that, ok := thatIface.(*IngestWithConfigDataChannelValue_Uint64) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if this.Uint64 != that.Uint64 { + return false + } + return true +} + +func (this *IngestWithConfigDataChannelValue_BitField) EqualVT(thatIface isIngestWithConfigDataChannelValue_Type) bool { + that, ok := thatIface.(*IngestWithConfigDataChannelValue_BitField) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if string(this.BitField) != string(that.BitField) { + return false + } + return true +} + +func (this *IngestWithConfigDataChannelValue_Enum) EqualVT(thatIface isIngestWithConfigDataChannelValue_Type) bool { + that, ok := thatIface.(*IngestWithConfigDataChannelValue_Enum) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if this.Enum != that.Enum { + return false + } + return true +} + +func (this *IngestWithConfigDataChannelValue_Empty) EqualVT(thatIface isIngestWithConfigDataChannelValue_Type) bool { + that, ok := thatIface.(*IngestWithConfigDataChannelValue_Empty) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.Empty, that.Empty; p != q { + if p == nil { + p = &emptypb.Empty{} + } + if q == nil { + q = &emptypb.Empty{} + } + if !(*emptypb1.Empty)(p).EqualVT((*emptypb1.Empty)(q)) { + return false + } + } + return true +} + +// 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 + +// IngestServiceClient is the client API for IngestService 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 IngestServiceClient interface { + IngestWithConfigDataStream(ctx context.Context, opts ...grpc.CallOption) (IngestService_IngestWithConfigDataStreamClient, error) +} + +type ingestServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewIngestServiceClient(cc grpc.ClientConnInterface) IngestServiceClient { + return &ingestServiceClient{cc} +} + +func (c *ingestServiceClient) IngestWithConfigDataStream(ctx context.Context, opts ...grpc.CallOption) (IngestService_IngestWithConfigDataStreamClient, error) { + stream, err := c.cc.NewStream(ctx, &IngestService_ServiceDesc.Streams[0], "/sift.ingest.v1.IngestService/IngestWithConfigDataStream", opts...) + if err != nil { + return nil, err + } + x := &ingestServiceIngestWithConfigDataStreamClient{stream} + return x, nil +} + +type IngestService_IngestWithConfigDataStreamClient interface { + Send(*IngestWithConfigDataStreamRequest) error + CloseAndRecv() (*IngestWithConfigDataStreamResponse, error) + grpc.ClientStream +} + +type ingestServiceIngestWithConfigDataStreamClient struct { + grpc.ClientStream +} + +func (x *ingestServiceIngestWithConfigDataStreamClient) Send(m *IngestWithConfigDataStreamRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *ingestServiceIngestWithConfigDataStreamClient) CloseAndRecv() (*IngestWithConfigDataStreamResponse, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(IngestWithConfigDataStreamResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// IngestServiceServer is the server API for IngestService service. +// All implementations must embed UnimplementedIngestServiceServer +// for forward compatibility +type IngestServiceServer interface { + IngestWithConfigDataStream(IngestService_IngestWithConfigDataStreamServer) error + mustEmbedUnimplementedIngestServiceServer() +} + +// UnimplementedIngestServiceServer must be embedded to have forward compatible implementations. +type UnimplementedIngestServiceServer struct { +} + +func (UnimplementedIngestServiceServer) IngestWithConfigDataStream(IngestService_IngestWithConfigDataStreamServer) error { + return status.Errorf(codes.Unimplemented, "method IngestWithConfigDataStream not implemented") +} +func (UnimplementedIngestServiceServer) mustEmbedUnimplementedIngestServiceServer() {} + +// UnsafeIngestServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to IngestServiceServer will +// result in compilation errors. +type UnsafeIngestServiceServer interface { + mustEmbedUnimplementedIngestServiceServer() +} + +func RegisterIngestServiceServer(s grpc.ServiceRegistrar, srv IngestServiceServer) { + s.RegisterService(&IngestService_ServiceDesc, srv) +} + +func _IngestService_IngestWithConfigDataStream_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(IngestServiceServer).IngestWithConfigDataStream(&ingestServiceIngestWithConfigDataStreamServer{stream}) +} + +type IngestService_IngestWithConfigDataStreamServer interface { + SendAndClose(*IngestWithConfigDataStreamResponse) error + Recv() (*IngestWithConfigDataStreamRequest, error) + grpc.ServerStream +} + +type ingestServiceIngestWithConfigDataStreamServer struct { + grpc.ServerStream +} + +func (x *ingestServiceIngestWithConfigDataStreamServer) SendAndClose(m *IngestWithConfigDataStreamResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *ingestServiceIngestWithConfigDataStreamServer) Recv() (*IngestWithConfigDataStreamRequest, error) { + m := new(IngestWithConfigDataStreamRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// IngestService_ServiceDesc is the grpc.ServiceDesc for IngestService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var IngestService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "sift.ingest.v1.IngestService", + HandlerType: (*IngestServiceServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "IngestWithConfigDataStream", + Handler: _IngestService_IngestWithConfigDataStream_Handler, + ClientStreams: true, + }, + }, + Metadata: "sift/ingest/v1/ingest.proto", +} + +func (m *IngestWithConfigDataStreamRequest) 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 *IngestWithConfigDataStreamRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *IngestWithConfigDataStreamRequest) 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.OrganizationId) > 0 { + i -= len(m.OrganizationId) + copy(dAtA[i:], m.OrganizationId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OrganizationId))) + i-- + dAtA[i] = 0x3a + } + if m.EndStreamOnValidationError { + i-- + if m.EndStreamOnValidationError { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if len(m.RunId) > 0 { + i -= len(m.RunId) + copy(dAtA[i:], m.RunId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RunId))) + i-- + dAtA[i] = 0x2a + } + if len(m.ChannelValues) > 0 { + for iNdEx := len(m.ChannelValues) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.ChannelValues[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + } + if m.Timestamp != nil { + size, err := (*timestamppb1.Timestamp)(m.Timestamp).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if len(m.Flow) > 0 { + i -= len(m.Flow) + copy(dAtA[i:], m.Flow) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Flow))) + i-- + dAtA[i] = 0x12 + } + if len(m.IngestionConfigId) > 0 { + i -= len(m.IngestionConfigId) + copy(dAtA[i:], m.IngestionConfigId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.IngestionConfigId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *IngestWithConfigDataStreamResponse) 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 *IngestWithConfigDataStreamResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *IngestWithConfigDataStreamResponse) 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) + } + return len(dAtA) - i, nil +} + +func (m *IngestWithConfigDataChannelValue) 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 *IngestWithConfigDataChannelValue) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue) 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.Type.(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + return len(dAtA) - i, nil +} + +func (m *IngestWithConfigDataChannelValue_String_) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue_String_) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.String_) + copy(dAtA[i:], m.String_) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.String_))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} +func (m *IngestWithConfigDataChannelValue_Double) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue_Double) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Double)))) + i-- + dAtA[i] = 0x11 + return len(dAtA) - i, nil +} +func (m *IngestWithConfigDataChannelValue_Float) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue_Float) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Float)))) + i-- + dAtA[i] = 0x1d + return len(dAtA) - i, nil +} +func (m *IngestWithConfigDataChannelValue_Bool) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue_Bool) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + i-- + if m.Bool { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + return len(dAtA) - i, nil +} +func (m *IngestWithConfigDataChannelValue_Int32) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue_Int32) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Int32)) + i-- + dAtA[i] = 0x28 + return len(dAtA) - i, nil +} +func (m *IngestWithConfigDataChannelValue_Uint32) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue_Uint32) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Uint32)) + i-- + dAtA[i] = 0x30 + return len(dAtA) - i, nil +} +func (m *IngestWithConfigDataChannelValue_Int64) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue_Int64) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Int64)) + i-- + dAtA[i] = 0x38 + return len(dAtA) - i, nil +} +func (m *IngestWithConfigDataChannelValue_Uint64) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue_Uint64) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Uint64)) + i-- + dAtA[i] = 0x40 + return len(dAtA) - i, nil +} +func (m *IngestWithConfigDataChannelValue_BitField) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue_BitField) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.BitField) + copy(dAtA[i:], m.BitField) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.BitField))) + i-- + dAtA[i] = 0x4a + return len(dAtA) - i, nil +} +func (m *IngestWithConfigDataChannelValue_Enum) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue_Enum) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Enum)) + i-- + dAtA[i] = 0x50 + return len(dAtA) - i, nil +} +func (m *IngestWithConfigDataChannelValue_Empty) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue_Empty) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Empty != nil { + size, err := (*emptypb1.Empty)(m.Empty).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x5a + } + return len(dAtA) - i, nil +} +func (m *IngestWithConfigDataStreamRequest) 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 *IngestWithConfigDataStreamRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *IngestWithConfigDataStreamRequest) 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.OrganizationId) > 0 { + i -= len(m.OrganizationId) + copy(dAtA[i:], m.OrganizationId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OrganizationId))) + i-- + dAtA[i] = 0x3a + } + if m.EndStreamOnValidationError { + i-- + if m.EndStreamOnValidationError { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if len(m.RunId) > 0 { + i -= len(m.RunId) + copy(dAtA[i:], m.RunId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RunId))) + i-- + dAtA[i] = 0x2a + } + if len(m.ChannelValues) > 0 { + for iNdEx := len(m.ChannelValues) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.ChannelValues[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + } + if m.Timestamp != nil { + size, err := (*timestamppb1.Timestamp)(m.Timestamp).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if len(m.Flow) > 0 { + i -= len(m.Flow) + copy(dAtA[i:], m.Flow) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Flow))) + i-- + dAtA[i] = 0x12 + } + if len(m.IngestionConfigId) > 0 { + i -= len(m.IngestionConfigId) + copy(dAtA[i:], m.IngestionConfigId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.IngestionConfigId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *IngestWithConfigDataStreamResponse) 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 *IngestWithConfigDataStreamResponse) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *IngestWithConfigDataStreamResponse) 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) + } + return len(dAtA) - i, nil +} + +func (m *IngestWithConfigDataChannelValue) 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 *IngestWithConfigDataChannelValue) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue) 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 msg, ok := m.Type.(*IngestWithConfigDataChannelValue_Empty); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Type.(*IngestWithConfigDataChannelValue_Enum); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Type.(*IngestWithConfigDataChannelValue_BitField); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Type.(*IngestWithConfigDataChannelValue_Uint64); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Type.(*IngestWithConfigDataChannelValue_Int64); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Type.(*IngestWithConfigDataChannelValue_Uint32); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Type.(*IngestWithConfigDataChannelValue_Int32); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Type.(*IngestWithConfigDataChannelValue_Bool); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Type.(*IngestWithConfigDataChannelValue_Float); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Type.(*IngestWithConfigDataChannelValue_Double); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Type.(*IngestWithConfigDataChannelValue_String_); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + return len(dAtA) - i, nil +} + +func (m *IngestWithConfigDataChannelValue_String_) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue_String_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.String_) + copy(dAtA[i:], m.String_) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.String_))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} +func (m *IngestWithConfigDataChannelValue_Double) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue_Double) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Double)))) + i-- + dAtA[i] = 0x11 + return len(dAtA) - i, nil +} +func (m *IngestWithConfigDataChannelValue_Float) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue_Float) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Float)))) + i-- + dAtA[i] = 0x1d + return len(dAtA) - i, nil +} +func (m *IngestWithConfigDataChannelValue_Bool) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue_Bool) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + i-- + if m.Bool { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + return len(dAtA) - i, nil +} +func (m *IngestWithConfigDataChannelValue_Int32) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue_Int32) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Int32)) + i-- + dAtA[i] = 0x28 + return len(dAtA) - i, nil +} +func (m *IngestWithConfigDataChannelValue_Uint32) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue_Uint32) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Uint32)) + i-- + dAtA[i] = 0x30 + return len(dAtA) - i, nil +} +func (m *IngestWithConfigDataChannelValue_Int64) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue_Int64) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Int64)) + i-- + dAtA[i] = 0x38 + return len(dAtA) - i, nil +} +func (m *IngestWithConfigDataChannelValue_Uint64) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue_Uint64) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Uint64)) + i-- + dAtA[i] = 0x40 + return len(dAtA) - i, nil +} +func (m *IngestWithConfigDataChannelValue_BitField) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue_BitField) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.BitField) + copy(dAtA[i:], m.BitField) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.BitField))) + i-- + dAtA[i] = 0x4a + return len(dAtA) - i, nil +} +func (m *IngestWithConfigDataChannelValue_Enum) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue_Enum) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Enum)) + i-- + dAtA[i] = 0x50 + return len(dAtA) - i, nil +} +func (m *IngestWithConfigDataChannelValue_Empty) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *IngestWithConfigDataChannelValue_Empty) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Empty != nil { + size, err := (*emptypb1.Empty)(m.Empty).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x5a + } + return len(dAtA) - i, nil +} +func (m *IngestWithConfigDataStreamRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.IngestionConfigId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Flow) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Timestamp != nil { + l = (*timestamppb1.Timestamp)(m.Timestamp).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.ChannelValues) > 0 { + for _, e := range m.ChannelValues { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.RunId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.EndStreamOnValidationError { + n += 2 + } + l = len(m.OrganizationId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *IngestWithConfigDataStreamResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *IngestWithConfigDataChannelValue) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if vtmsg, ok := m.Type.(interface{ SizeVT() int }); ok { + n += vtmsg.SizeVT() + } + n += len(m.unknownFields) + return n +} + +func (m *IngestWithConfigDataChannelValue_String_) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.String_) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + return n +} +func (m *IngestWithConfigDataChannelValue_Double) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *IngestWithConfigDataChannelValue_Float) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *IngestWithConfigDataChannelValue_Bool) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + return n +} +func (m *IngestWithConfigDataChannelValue_Int32) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + protohelpers.SizeOfVarint(uint64(m.Int32)) + return n +} +func (m *IngestWithConfigDataChannelValue_Uint32) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + protohelpers.SizeOfVarint(uint64(m.Uint32)) + return n +} +func (m *IngestWithConfigDataChannelValue_Int64) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + protohelpers.SizeOfVarint(uint64(m.Int64)) + return n +} +func (m *IngestWithConfigDataChannelValue_Uint64) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + protohelpers.SizeOfVarint(uint64(m.Uint64)) + return n +} +func (m *IngestWithConfigDataChannelValue_BitField) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.BitField) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + return n +} +func (m *IngestWithConfigDataChannelValue_Enum) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + protohelpers.SizeOfVarint(uint64(m.Enum)) + return n +} +func (m *IngestWithConfigDataChannelValue_Empty) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Empty != nil { + l = (*emptypb1.Empty)(m.Empty).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *IngestWithConfigDataStreamRequest) 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: IngestWithConfigDataStreamRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IngestWithConfigDataStreamRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IngestionConfigId", 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.IngestionConfigId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Flow", 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.Flow = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", 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.Timestamp == nil { + m.Timestamp = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.Timestamp).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelValues", 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.ChannelValues = append(m.ChannelValues, &IngestWithConfigDataChannelValue{}) + if err := m.ChannelValues[len(m.ChannelValues)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RunId", 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.RunId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EndStreamOnValidationError", 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.EndStreamOnValidationError = bool(v != 0) + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrganizationId", 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.OrganizationId = 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 *IngestWithConfigDataStreamResponse) 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: IngestWithConfigDataStreamResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IngestWithConfigDataStreamResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 *IngestWithConfigDataChannelValue) 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: IngestWithConfigDataChannelValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IngestWithConfigDataChannelValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", 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.Type = &IngestWithConfigDataChannelValue_String_{String_: string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Double", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Type = &IngestWithConfigDataChannelValue_Double{Double: float64(math.Float64frombits(v))} + case 3: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Float", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Type = &IngestWithConfigDataChannelValue_Float{Float: float32(math.Float32frombits(v))} + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Bool", 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 + } + } + b := bool(v != 0) + m.Type = &IngestWithConfigDataChannelValue_Bool{Bool: b} + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &IngestWithConfigDataChannelValue_Int32{Int32: v} + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &IngestWithConfigDataChannelValue_Uint32{Uint32: v} + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &IngestWithConfigDataChannelValue_Int64{Int64: v} + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &IngestWithConfigDataChannelValue_Uint64{Uint64: v} + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BitField", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + m.Type = &IngestWithConfigDataChannelValue_BitField{BitField: v} + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Enum", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &IngestWithConfigDataChannelValue_Enum{Enum: v} + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Empty", 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.Type.(*IngestWithConfigDataChannelValue_Empty); ok { + if err := (*emptypb1.Empty)(oneof.Empty).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &emptypb.Empty{} + if err := (*emptypb1.Empty)(v).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Type = &IngestWithConfigDataChannelValue_Empty{Empty: v} + } + 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 *IngestWithConfigDataStreamRequest) 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: IngestWithConfigDataStreamRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IngestWithConfigDataStreamRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IngestionConfigId", 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.IngestionConfigId = stringValue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Flow", 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.Flow = stringValue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", 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.Timestamp == nil { + m.Timestamp = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.Timestamp).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelValues", 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.ChannelValues = append(m.ChannelValues, &IngestWithConfigDataChannelValue{}) + if err := m.ChannelValues[len(m.ChannelValues)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RunId", 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.RunId = stringValue + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EndStreamOnValidationError", 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.EndStreamOnValidationError = bool(v != 0) + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrganizationId", 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.OrganizationId = 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 *IngestWithConfigDataStreamResponse) 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: IngestWithConfigDataStreamResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IngestWithConfigDataStreamResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 *IngestWithConfigDataChannelValue) 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: IngestWithConfigDataChannelValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IngestWithConfigDataChannelValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", 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.Type = &IngestWithConfigDataChannelValue_String_{String_: stringValue} + iNdEx = postIndex + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Double", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Type = &IngestWithConfigDataChannelValue_Double{Double: float64(math.Float64frombits(v))} + case 3: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Float", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Type = &IngestWithConfigDataChannelValue_Float{Float: float32(math.Float32frombits(v))} + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Bool", 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 + } + } + b := bool(v != 0) + m.Type = &IngestWithConfigDataChannelValue_Bool{Bool: b} + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &IngestWithConfigDataChannelValue_Int32{Int32: v} + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &IngestWithConfigDataChannelValue_Uint32{Uint32: v} + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &IngestWithConfigDataChannelValue_Int64{Int64: v} + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &IngestWithConfigDataChannelValue_Uint64{Uint64: v} + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BitField", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := dAtA[iNdEx:postIndex] + m.Type = &IngestWithConfigDataChannelValue_BitField{BitField: v} + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Enum", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &IngestWithConfigDataChannelValue_Enum{Enum: v} + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Empty", 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.Type.(*IngestWithConfigDataChannelValue_Empty); ok { + if err := (*emptypb1.Empty)(oneof.Empty).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &emptypb.Empty{} + if err := (*emptypb1.Empty)(v).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Type = &IngestWithConfigDataChannelValue_Empty{Empty: v} + } + 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/go/gen/protos/go/sift/ingestion_configs/v1/ingestion_configs.pb.go b/go/gen/protos/go/sift/ingestion_configs/v1/ingestion_configs.pb.go index 300a4f90..6d71cc7e 100644 --- a/go/gen/protos/go/sift/ingestion_configs/v1/ingestion_configs.pb.go +++ b/go/gen/protos/go/sift/ingestion_configs/v1/ingestion_configs.pb.go @@ -474,7 +474,7 @@ type ListIngestionConfigsRequest struct { // A [Common Expression Language (CEL)](https://github.com/google/cel-spec) filter string. // Available fields to filter by are `ingestion_config_id`, `client_key`, `asset_id`, `created_date`, and `modified_date`. // For further information about how to use CELs, please refer to [this guide](https://github.com/google/cel-spec/blob/master/doc/langdef.md#standard-definitions). - // For more information about the fields used for filtering, please refer to [this definition](/ingestion/api#sift_ingestion_configs_v1-proto). Optional. + // For more information about the fields used for filtering, please refer to [this definition](/protocol-buffers/documentation#ingestionconfigservice). Optional. Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` } diff --git a/protos/buf.lock b/protos/buf.lock index 4a13f960..e8e456f6 100644 --- a/protos/buf.lock +++ b/protos/buf.lock @@ -4,10 +4,10 @@ deps: - remote: buf.build owner: googleapis repository: googleapis - commit: 7ed55ddc0cf949369a2f6b31eb62e454 + commit: b70d5bc6e99147928d9d4455fd60fc7a digest: shake256:de26a277fc28b8b411ecf58729d78d32fcf15090ffd998a4469225b17889bfb51442eaab04bb7a8d88d203ecdf0a9febd4ffd52c18ed1c2229160c7bd353ca95 - remote: buf.build owner: grpc-ecosystem repository: grpc-gateway - commit: 39c2d8800e784142b6a761723d57f1c8 + commit: d78510a336fd41398a15d2f00615548b digest: shake256:67b115260e12cb2d6c5d5ce8dbbf3a095c86f0e52b84f9dbd16dec9433b218f8694bc9aadb1d45eb6fd52f5a7029977d460e2d58afb3208ab6c680e7b21c80e4 diff --git a/protos/sift/channel_schemas/v1/channel_schemas.proto b/protos/sift/channel_schemas/v1/channel_schemas.proto new file mode 100644 index 00000000..2b10135a --- /dev/null +++ b/protos/sift/channel_schemas/v1/channel_schemas.proto @@ -0,0 +1,77 @@ +syntax = "proto3"; + +package sift.channel_schemas.v1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "sift/common/type/v1/channel_bit_field_element.proto"; +import "sift/common/type/v1/channel_data_type.proto"; +import "sift/common/type/v1/channel_enum_type.proto"; + +option go_package = "azimuth/gen/protos/go/sift/channel_schemas/v1;channelschemasv1pb"; +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info: {title: "Channel Schema Service"} +}; + +service ChannelSchemaService { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag) = {description: "Service to programmatically interact with channel schemas"}; + + // Create a channel schema + rpc CreateChannelSchema(CreateChannelSchemaRequest) returns (CreateChannelSchemaResponse) { + option (google.api.http) = { + post: "/api/v1/channel-schemas", + body: "*" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "CreateChannelSchema" + description: "Create a channel schema" + }; + } + + // Create a batch of channel schemas + rpc BatchCreateChannelSchemas(BatchCreateChannelSchemasRequest) returns (BatchCreateChannelSchemasResponse) { + option (google.api.http) = { + post: "/api/v1/channel-schemas:batch-create" + body: "*" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "BatchCreateChannelSchemas" + description: "Create a batch of channel schemas" + }; + } +} + +// The request for a call to `ChannelSchemaService_CreateChannelSchema`. +message CreateChannelSchemaRequest { + // The name of the component (case-insensitive). + string component = 1 [(google.api.field_behavior) = OPTIONAL]; + // The name of the channel (case-insensitive). + string channel = 2 [(google.api.field_behavior) = REQUIRED]; + string unit = 3 [(google.api.field_behavior) = OPTIONAL]; + sift.common.type.v1.ChannelDataType data_type = 4 [(google.api.field_behavior) = REQUIRED]; + repeated sift.common.type.v1.ChannelEnumType enum_types = 5 [(google.api.field_behavior) = OPTIONAL]; + repeated sift.common.type.v1.ChannelBitFieldElement bit_field_elements = 6 [(google.api.field_behavior) = OPTIONAL]; + // The name of the asset (case-insensitive). + string asset_name = 7 [(google.api.field_behavior) = REQUIRED]; + // This field is optional if the caller belongs to a single organization. + string organization_id = 8 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response of a call to `ChannelSchemaService_CreateChannelSchema`. +message CreateChannelSchemaResponse {} + +// The request for a call to `ChannelSchemaService_BatchCreateChannelSchemas`. +message BatchCreateChannelSchemasRequest { + repeated CreateChannelSchemaRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; + // The asset to which the channel schemas belong (case-insensitive). + // If this field, and any of the child requests specify an asset, the assets must match. + string asset_name = 2 [(google.api.field_behavior) = OPTIONAL]; + // The organization to which the channel schemas belong. + // If this field, and any of the child requests specify an organization_id, the organization_ids must match. + // This field is optional if the caller belongs to a single organization. + string organization_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response of a call to `ChannelSchemaService_BatchCreateChannelSchemas`. +message BatchCreateChannelSchemasResponse {} diff --git a/protos/sift/ingest/v1/ingest.proto b/protos/sift/ingest/v1/ingest.proto new file mode 100644 index 00000000..28a3bea0 --- /dev/null +++ b/protos/sift/ingest/v1/ingest.proto @@ -0,0 +1,47 @@ +syntax = "proto3"; + +package sift.ingest.v1; + +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "azimuth/gen/protos/go/sift/ingest/v1;ingestv1pb"; + +service IngestService { + rpc IngestWithConfigDataStream(stream IngestWithConfigDataStreamRequest) returns (IngestWithConfigDataStreamResponse); +} + +message IngestWithConfigDataStreamRequest { + string ingestion_config_id = 1; + string flow = 2; + google.protobuf.Timestamp timestamp = 3; + repeated IngestWithConfigDataChannelValue channel_values = 4; + // The run_id MUST be included if this data is part of a run. + string run_id = 5; + // By default, if this request contains any channel values that do not match + // the supplied ingestion config, the request is stored in an error queue and + // the stream continues to accept data. This ensures all data is saved, but + // only valid data is fully ingested. If this is set to `true`, any validation + // errors end the stream and return the error to the client. + bool end_stream_on_validation_error = 6; + string organization_id = 7; +} + +message IngestWithConfigDataStreamResponse {} + +message IngestWithConfigDataChannelValue { + oneof type { + string string = 1; + double double = 2; + float float = 3; + bool bool = 4; + int32 int32 = 5; + uint32 uint32 = 6; + int64 int64 = 7; + uint64 uint64 = 8; + bytes bit_field = 9; + uint32 enum = 10; + // If there's not a new data point for a channel at the given timestamp, pass empty to skip it + google.protobuf.Empty empty = 11; + } +} diff --git a/protos/sift/ingestion_configs/v1/ingestion_configs.proto b/protos/sift/ingestion_configs/v1/ingestion_configs.proto index e11ca635..288af73c 100644 --- a/protos/sift/ingestion_configs/v1/ingestion_configs.proto +++ b/protos/sift/ingestion_configs/v1/ingestion_configs.proto @@ -136,7 +136,7 @@ message ListIngestionConfigsRequest { // A [Common Expression Language (CEL)](https://github.com/google/cel-spec) filter string. // Available fields to filter by are `ingestion_config_id`, `client_key`, `asset_id`, `created_date`, and `modified_date`. // For further information about how to use CELs, please refer to [this guide](https://github.com/google/cel-spec/blob/master/doc/langdef.md#standard-definitions). - // For more information about the fields used for filtering, please refer to [this definition](/ingestion/api#sift_ingestion_configs_v1-proto). Optional. + // For more information about the fields used for filtering, please refer to [this definition](/protocol-buffers/documentation#ingestionconfigservice). Optional. string filter = 3 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/python/gen/sift/channel_schemas/__init__.py b/python/gen/sift/channel_schemas/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/python/gen/sift/channel_schemas/v1/__init__.py b/python/gen/sift/channel_schemas/v1/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/python/gen/sift/channel_schemas/v1/channel_schemas_pb2.py b/python/gen/sift/channel_schemas/v1/channel_schemas_pb2.py new file mode 100644 index 00000000..c0eaaedc --- /dev/null +++ b/python/gen/sift/channel_schemas/v1/channel_schemas_pb2.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: sift/channel_schemas/v1/channel_schemas.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 protoc_gen_openapiv2.options import annotations_pb2 as protoc__gen__openapiv2_dot_options_dot_annotations__pb2 +from sift.common.type.v1 import channel_bit_field_element_pb2 as sift_dot_common_dot_type_dot_v1_dot_channel__bit__field__element__pb2 +from sift.common.type.v1 import channel_data_type_pb2 as sift_dot_common_dot_type_dot_v1_dot_channel__data__type__pb2 +from sift.common.type.v1 import channel_enum_type_pb2 as sift_dot_common_dot_type_dot_v1_dot_channel__enum__type__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n-sift/channel_schemas/v1/channel_schemas.proto\x12\x17sift.channel_schemas.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\x1a\x33sift/common/type/v1/channel_bit_field_element.proto\x1a+sift/common/type/v1/channel_data_type.proto\x1a+sift/common/type/v1/channel_enum_type.proto\"\xbb\x03\n\x1a\x43reateChannelSchemaRequest\x12!\n\tcomponent\x18\x01 \x01(\tB\x03\xe0\x41\x01R\tcomponent\x12\x1d\n\x07\x63hannel\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x07\x63hannel\x12\x17\n\x04unit\x18\x03 \x01(\tB\x03\xe0\x41\x01R\x04unit\x12\x46\n\tdata_type\x18\x04 \x01(\x0e\x32$.sift.common.type.v1.ChannelDataTypeB\x03\xe0\x41\x02R\x08\x64\x61taType\x12H\n\nenum_types\x18\x05 \x03(\x0b\x32$.sift.common.type.v1.ChannelEnumTypeB\x03\xe0\x41\x01R\tenumTypes\x12^\n\x12\x62it_field_elements\x18\x06 \x03(\x0b\x32+.sift.common.type.v1.ChannelBitFieldElementB\x03\xe0\x41\x01R\x10\x62itFieldElements\x12\"\n\nasset_name\x18\x07 \x01(\tB\x03\xe0\x41\x02R\tassetName\x12,\n\x0forganization_id\x18\x08 \x01(\tB\x03\xe0\x41\x01R\x0eorganizationId\"\x1d\n\x1b\x43reateChannelSchemaResponse\"\xca\x01\n BatchCreateChannelSchemasRequest\x12T\n\x08requests\x18\x01 \x03(\x0b\x32\x33.sift.channel_schemas.v1.CreateChannelSchemaRequestB\x03\xe0\x41\x02R\x08requests\x12\"\n\nasset_name\x18\x02 \x01(\tB\x03\xe0\x41\x01R\tassetName\x12,\n\x0forganization_id\x18\x03 \x01(\tB\x03\xe0\x41\x01R\x0eorganizationId\"#\n!BatchCreateChannelSchemasResponse2\xb5\x04\n\x14\x43hannelSchemaService\x12\xd5\x01\n\x13\x43reateChannelSchema\x12\x33.sift.channel_schemas.v1.CreateChannelSchemaRequest\x1a\x34.sift.channel_schemas.v1.CreateChannelSchemaResponse\"S\x92\x41.\x12\x13\x43reateChannelSchema\x1a\x17\x43reate a channel schema\x82\xd3\xe4\x93\x02\x1c\"\x17/api/v1/channel-schemas:\x01*\x12\x84\x02\n\x19\x42\x61tchCreateChannelSchemas\x12\x39.sift.channel_schemas.v1.BatchCreateChannelSchemasRequest\x1a:.sift.channel_schemas.v1.BatchCreateChannelSchemasResponse\"p\x92\x41>\x12\x19\x42\x61tchCreateChannelSchemas\x1a!Create a batch of channel schemas\x82\xd3\xe4\x93\x02)\"$/api/v1/channel-schemas:batch-create:\x01*\x1a>\x92\x41;\x12\x39Service to programmatically interact with channel schemasB\x8b\x02\n\x1b\x63om.sift.channel_schemas.v1B\x13\x43hannelSchemasProtoP\x01Z@azimuth/gen/protos/go/sift/channel_schemas/v1;channelschemasv1pb\xa2\x02\x03SCX\xaa\x02\x16Sift.ChannelSchemas.V1\xca\x02\x16Sift\\ChannelSchemas\\V1\xe2\x02\"Sift\\ChannelSchemas\\V1\\GPBMetadata\xea\x02\x18Sift::ChannelSchemas::V1\x92\x41\x1a\x12\x18\n\x16\x43hannel Schema Serviceb\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'sift.channel_schemas.v1.channel_schemas_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\033com.sift.channel_schemas.v1B\023ChannelSchemasProtoP\001Z@azimuth/gen/protos/go/sift/channel_schemas/v1;channelschemasv1pb\242\002\003SCX\252\002\026Sift.ChannelSchemas.V1\312\002\026Sift\\ChannelSchemas\\V1\342\002\"Sift\\ChannelSchemas\\V1\\GPBMetadata\352\002\030Sift::ChannelSchemas::V1\222A\032\022\030\n\026Channel Schema Service' + _globals['_CREATECHANNELSCHEMAREQUEST'].fields_by_name['component']._loaded_options = None + _globals['_CREATECHANNELSCHEMAREQUEST'].fields_by_name['component']._serialized_options = b'\340A\001' + _globals['_CREATECHANNELSCHEMAREQUEST'].fields_by_name['channel']._loaded_options = None + _globals['_CREATECHANNELSCHEMAREQUEST'].fields_by_name['channel']._serialized_options = b'\340A\002' + _globals['_CREATECHANNELSCHEMAREQUEST'].fields_by_name['unit']._loaded_options = None + _globals['_CREATECHANNELSCHEMAREQUEST'].fields_by_name['unit']._serialized_options = b'\340A\001' + _globals['_CREATECHANNELSCHEMAREQUEST'].fields_by_name['data_type']._loaded_options = None + _globals['_CREATECHANNELSCHEMAREQUEST'].fields_by_name['data_type']._serialized_options = b'\340A\002' + _globals['_CREATECHANNELSCHEMAREQUEST'].fields_by_name['enum_types']._loaded_options = None + _globals['_CREATECHANNELSCHEMAREQUEST'].fields_by_name['enum_types']._serialized_options = b'\340A\001' + _globals['_CREATECHANNELSCHEMAREQUEST'].fields_by_name['bit_field_elements']._loaded_options = None + _globals['_CREATECHANNELSCHEMAREQUEST'].fields_by_name['bit_field_elements']._serialized_options = b'\340A\001' + _globals['_CREATECHANNELSCHEMAREQUEST'].fields_by_name['asset_name']._loaded_options = None + _globals['_CREATECHANNELSCHEMAREQUEST'].fields_by_name['asset_name']._serialized_options = b'\340A\002' + _globals['_CREATECHANNELSCHEMAREQUEST'].fields_by_name['organization_id']._loaded_options = None + _globals['_CREATECHANNELSCHEMAREQUEST'].fields_by_name['organization_id']._serialized_options = b'\340A\001' + _globals['_BATCHCREATECHANNELSCHEMASREQUEST'].fields_by_name['requests']._loaded_options = None + _globals['_BATCHCREATECHANNELSCHEMASREQUEST'].fields_by_name['requests']._serialized_options = b'\340A\002' + _globals['_BATCHCREATECHANNELSCHEMASREQUEST'].fields_by_name['asset_name']._loaded_options = None + _globals['_BATCHCREATECHANNELSCHEMASREQUEST'].fields_by_name['asset_name']._serialized_options = b'\340A\001' + _globals['_BATCHCREATECHANNELSCHEMASREQUEST'].fields_by_name['organization_id']._loaded_options = None + _globals['_BATCHCREATECHANNELSCHEMASREQUEST'].fields_by_name['organization_id']._serialized_options = b'\340A\001' + _globals['_CHANNELSCHEMASERVICE']._loaded_options = None + _globals['_CHANNELSCHEMASERVICE']._serialized_options = b'\222A;\0229Service to programmatically interact with channel schemas' + _globals['_CHANNELSCHEMASERVICE'].methods_by_name['CreateChannelSchema']._loaded_options = None + _globals['_CHANNELSCHEMASERVICE'].methods_by_name['CreateChannelSchema']._serialized_options = b'\222A.\022\023CreateChannelSchema\032\027Create a channel schema\202\323\344\223\002\034\"\027/api/v1/channel-schemas:\001*' + _globals['_CHANNELSCHEMASERVICE'].methods_by_name['BatchCreateChannelSchemas']._loaded_options = None + _globals['_CHANNELSCHEMASERVICE'].methods_by_name['BatchCreateChannelSchemas']._serialized_options = b'\222A>\022\031BatchCreateChannelSchemas\032!Create a batch of channel schemas\202\323\344\223\002)\"$/api/v1/channel-schemas:batch-create:\001*' + _globals['_CREATECHANNELSCHEMAREQUEST']._serialized_start=329 + _globals['_CREATECHANNELSCHEMAREQUEST']._serialized_end=772 + _globals['_CREATECHANNELSCHEMARESPONSE']._serialized_start=774 + _globals['_CREATECHANNELSCHEMARESPONSE']._serialized_end=803 + _globals['_BATCHCREATECHANNELSCHEMASREQUEST']._serialized_start=806 + _globals['_BATCHCREATECHANNELSCHEMASREQUEST']._serialized_end=1008 + _globals['_BATCHCREATECHANNELSCHEMASRESPONSE']._serialized_start=1010 + _globals['_BATCHCREATECHANNELSCHEMASRESPONSE']._serialized_end=1045 + _globals['_CHANNELSCHEMASERVICE']._serialized_start=1048 + _globals['_CHANNELSCHEMASERVICE']._serialized_end=1613 +# @@protoc_insertion_point(module_scope) diff --git a/python/gen/sift/channel_schemas/v1/channel_schemas_pb2.pyi b/python/gen/sift/channel_schemas/v1/channel_schemas_pb2.pyi new file mode 100644 index 00000000..79f202b8 --- /dev/null +++ b/python/gen/sift/channel_schemas/v1/channel_schemas_pb2.pyi @@ -0,0 +1,50 @@ +from google.api import annotations_pb2 as _annotations_pb2 +from google.api import field_behavior_pb2 as _field_behavior_pb2 +from protoc_gen_openapiv2.options import annotations_pb2 as _annotations_pb2_1 +from sift.common.type.v1 import channel_bit_field_element_pb2 as _channel_bit_field_element_pb2 +from sift.common.type.v1 import channel_data_type_pb2 as _channel_data_type_pb2 +from sift.common.type.v1 import channel_enum_type_pb2 as _channel_enum_type_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CreateChannelSchemaRequest(_message.Message): + __slots__ = ("component", "channel", "unit", "data_type", "enum_types", "bit_field_elements", "asset_name", "organization_id") + COMPONENT_FIELD_NUMBER: _ClassVar[int] + CHANNEL_FIELD_NUMBER: _ClassVar[int] + UNIT_FIELD_NUMBER: _ClassVar[int] + DATA_TYPE_FIELD_NUMBER: _ClassVar[int] + ENUM_TYPES_FIELD_NUMBER: _ClassVar[int] + BIT_FIELD_ELEMENTS_FIELD_NUMBER: _ClassVar[int] + ASSET_NAME_FIELD_NUMBER: _ClassVar[int] + ORGANIZATION_ID_FIELD_NUMBER: _ClassVar[int] + component: str + channel: str + unit: str + data_type: _channel_data_type_pb2.ChannelDataType + enum_types: _containers.RepeatedCompositeFieldContainer[_channel_enum_type_pb2.ChannelEnumType] + bit_field_elements: _containers.RepeatedCompositeFieldContainer[_channel_bit_field_element_pb2.ChannelBitFieldElement] + asset_name: str + organization_id: str + def __init__(self, component: _Optional[str] = ..., channel: _Optional[str] = ..., unit: _Optional[str] = ..., data_type: _Optional[_Union[_channel_data_type_pb2.ChannelDataType, str]] = ..., enum_types: _Optional[_Iterable[_Union[_channel_enum_type_pb2.ChannelEnumType, _Mapping]]] = ..., bit_field_elements: _Optional[_Iterable[_Union[_channel_bit_field_element_pb2.ChannelBitFieldElement, _Mapping]]] = ..., asset_name: _Optional[str] = ..., organization_id: _Optional[str] = ...) -> None: ... + +class CreateChannelSchemaResponse(_message.Message): + __slots__ = () + def __init__(self) -> None: ... + +class BatchCreateChannelSchemasRequest(_message.Message): + __slots__ = ("requests", "asset_name", "organization_id") + REQUESTS_FIELD_NUMBER: _ClassVar[int] + ASSET_NAME_FIELD_NUMBER: _ClassVar[int] + ORGANIZATION_ID_FIELD_NUMBER: _ClassVar[int] + requests: _containers.RepeatedCompositeFieldContainer[CreateChannelSchemaRequest] + asset_name: str + organization_id: str + def __init__(self, requests: _Optional[_Iterable[_Union[CreateChannelSchemaRequest, _Mapping]]] = ..., asset_name: _Optional[str] = ..., organization_id: _Optional[str] = ...) -> None: ... + +class BatchCreateChannelSchemasResponse(_message.Message): + __slots__ = () + def __init__(self) -> None: ... diff --git a/python/gen/sift/channel_schemas/v1/channel_schemas_pb2_grpc.py b/python/gen/sift/channel_schemas/v1/channel_schemas_pb2_grpc.py new file mode 100644 index 00000000..c6c72194 --- /dev/null +++ b/python/gen/sift/channel_schemas/v1/channel_schemas_pb2_grpc.py @@ -0,0 +1,101 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from sift.channel_schemas.v1 import channel_schemas_pb2 as sift_dot_channel__schemas_dot_v1_dot_channel__schemas__pb2 + + +class ChannelSchemaServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.CreateChannelSchema = channel.unary_unary( + '/sift.channel_schemas.v1.ChannelSchemaService/CreateChannelSchema', + request_serializer=sift_dot_channel__schemas_dot_v1_dot_channel__schemas__pb2.CreateChannelSchemaRequest.SerializeToString, + response_deserializer=sift_dot_channel__schemas_dot_v1_dot_channel__schemas__pb2.CreateChannelSchemaResponse.FromString, + ) + self.BatchCreateChannelSchemas = channel.unary_unary( + '/sift.channel_schemas.v1.ChannelSchemaService/BatchCreateChannelSchemas', + request_serializer=sift_dot_channel__schemas_dot_v1_dot_channel__schemas__pb2.BatchCreateChannelSchemasRequest.SerializeToString, + response_deserializer=sift_dot_channel__schemas_dot_v1_dot_channel__schemas__pb2.BatchCreateChannelSchemasResponse.FromString, + ) + + +class ChannelSchemaServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def CreateChannelSchema(self, request, context): + """Create a channel schema + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def BatchCreateChannelSchemas(self, request, context): + """Create a batch of channel schemas + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ChannelSchemaServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'CreateChannelSchema': grpc.unary_unary_rpc_method_handler( + servicer.CreateChannelSchema, + request_deserializer=sift_dot_channel__schemas_dot_v1_dot_channel__schemas__pb2.CreateChannelSchemaRequest.FromString, + response_serializer=sift_dot_channel__schemas_dot_v1_dot_channel__schemas__pb2.CreateChannelSchemaResponse.SerializeToString, + ), + 'BatchCreateChannelSchemas': grpc.unary_unary_rpc_method_handler( + servicer.BatchCreateChannelSchemas, + request_deserializer=sift_dot_channel__schemas_dot_v1_dot_channel__schemas__pb2.BatchCreateChannelSchemasRequest.FromString, + response_serializer=sift_dot_channel__schemas_dot_v1_dot_channel__schemas__pb2.BatchCreateChannelSchemasResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'sift.channel_schemas.v1.ChannelSchemaService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ChannelSchemaService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def CreateChannelSchema(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.channel_schemas.v1.ChannelSchemaService/CreateChannelSchema', + sift_dot_channel__schemas_dot_v1_dot_channel__schemas__pb2.CreateChannelSchemaRequest.SerializeToString, + sift_dot_channel__schemas_dot_v1_dot_channel__schemas__pb2.CreateChannelSchemaResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def BatchCreateChannelSchemas(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.channel_schemas.v1.ChannelSchemaService/BatchCreateChannelSchemas', + sift_dot_channel__schemas_dot_v1_dot_channel__schemas__pb2.BatchCreateChannelSchemasRequest.SerializeToString, + sift_dot_channel__schemas_dot_v1_dot_channel__schemas__pb2.BatchCreateChannelSchemasResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/python/gen/sift/ingest/__init__.py b/python/gen/sift/ingest/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/python/gen/sift/ingest/v1/__init__.py b/python/gen/sift/ingest/v1/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/python/gen/sift/ingest/v1/ingest_pb2.py b/python/gen/sift/ingest/v1/ingest_pb2.py new file mode 100644 index 00000000..b1deaac9 --- /dev/null +++ b/python/gen/sift/ingest/v1/ingest_pb2.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: sift/ingest/v1/ingest.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.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bsift/ingest/v1/ingest.proto\x12\x0esift.ingest.v1\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfe\x02\n!IngestWithConfigDataStreamRequest\x12.\n\x13ingestion_config_id\x18\x01 \x01(\tR\x11ingestionConfigId\x12\x12\n\x04\x66low\x18\x02 \x01(\tR\x04\x66low\x12\x38\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\x12W\n\x0e\x63hannel_values\x18\x04 \x03(\x0b\x32\x30.sift.ingest.v1.IngestWithConfigDataChannelValueR\rchannelValues\x12\x15\n\x06run_id\x18\x05 \x01(\tR\x05runId\x12\x42\n\x1e\x65nd_stream_on_validation_error\x18\x06 \x01(\x08R\x1a\x65ndStreamOnValidationError\x12\'\n\x0forganization_id\x18\x07 \x01(\tR\x0eorganizationId\"$\n\"IngestWithConfigDataStreamResponse\"\xd5\x02\n IngestWithConfigDataChannelValue\x12\x18\n\x06string\x18\x01 \x01(\tH\x00R\x06string\x12\x18\n\x06\x64ouble\x18\x02 \x01(\x01H\x00R\x06\x64ouble\x12\x16\n\x05\x66loat\x18\x03 \x01(\x02H\x00R\x05\x66loat\x12\x14\n\x04\x62ool\x18\x04 \x01(\x08H\x00R\x04\x62ool\x12\x16\n\x05int32\x18\x05 \x01(\x05H\x00R\x05int32\x12\x18\n\x06uint32\x18\x06 \x01(\rH\x00R\x06uint32\x12\x16\n\x05int64\x18\x07 \x01(\x03H\x00R\x05int64\x12\x18\n\x06uint64\x18\x08 \x01(\x04H\x00R\x06uint64\x12\x1d\n\tbit_field\x18\t \x01(\x0cH\x00R\x08\x62itField\x12\x14\n\x04\x65num\x18\n \x01(\rH\x00R\x04\x65num\x12.\n\x05\x65mpty\x18\x0b \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00R\x05\x65mptyB\x06\n\x04type2\x97\x01\n\rIngestService\x12\x85\x01\n\x1aIngestWithConfigDataStream\x12\x31.sift.ingest.v1.IngestWithConfigDataStreamRequest\x1a\x32.sift.ingest.v1.IngestWithConfigDataStreamResponse(\x01\x42\xac\x01\n\x12\x63om.sift.ingest.v1B\x0bIngestProtoP\x01Z/azimuth/gen/protos/go/sift/ingest/v1;ingestv1pb\xa2\x02\x03SIX\xaa\x02\x0eSift.Ingest.V1\xca\x02\x0eSift\\Ingest\\V1\xe2\x02\x1aSift\\Ingest\\V1\\GPBMetadata\xea\x02\x10Sift::Ingest::V1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'sift.ingest.v1.ingest_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\022com.sift.ingest.v1B\013IngestProtoP\001Z/azimuth/gen/protos/go/sift/ingest/v1;ingestv1pb\242\002\003SIX\252\002\016Sift.Ingest.V1\312\002\016Sift\\Ingest\\V1\342\002\032Sift\\Ingest\\V1\\GPBMetadata\352\002\020Sift::Ingest::V1' + _globals['_INGESTWITHCONFIGDATASTREAMREQUEST']._serialized_start=110 + _globals['_INGESTWITHCONFIGDATASTREAMREQUEST']._serialized_end=492 + _globals['_INGESTWITHCONFIGDATASTREAMRESPONSE']._serialized_start=494 + _globals['_INGESTWITHCONFIGDATASTREAMRESPONSE']._serialized_end=530 + _globals['_INGESTWITHCONFIGDATACHANNELVALUE']._serialized_start=533 + _globals['_INGESTWITHCONFIGDATACHANNELVALUE']._serialized_end=874 + _globals['_INGESTSERVICE']._serialized_start=877 + _globals['_INGESTSERVICE']._serialized_end=1028 +# @@protoc_insertion_point(module_scope) diff --git a/python/gen/sift/ingest/v1/ingest_pb2.pyi b/python/gen/sift/ingest/v1/ingest_pb2.pyi new file mode 100644 index 00000000..76ef6405 --- /dev/null +++ b/python/gen/sift/ingest/v1/ingest_pb2.pyi @@ -0,0 +1,56 @@ +from google.protobuf import empty_pb2 as _empty_pb2 +from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class IngestWithConfigDataStreamRequest(_message.Message): + __slots__ = ("ingestion_config_id", "flow", "timestamp", "channel_values", "run_id", "end_stream_on_validation_error", "organization_id") + INGESTION_CONFIG_ID_FIELD_NUMBER: _ClassVar[int] + FLOW_FIELD_NUMBER: _ClassVar[int] + TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + CHANNEL_VALUES_FIELD_NUMBER: _ClassVar[int] + RUN_ID_FIELD_NUMBER: _ClassVar[int] + END_STREAM_ON_VALIDATION_ERROR_FIELD_NUMBER: _ClassVar[int] + ORGANIZATION_ID_FIELD_NUMBER: _ClassVar[int] + ingestion_config_id: str + flow: str + timestamp: _timestamp_pb2.Timestamp + channel_values: _containers.RepeatedCompositeFieldContainer[IngestWithConfigDataChannelValue] + run_id: str + end_stream_on_validation_error: bool + organization_id: str + def __init__(self, ingestion_config_id: _Optional[str] = ..., flow: _Optional[str] = ..., timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., channel_values: _Optional[_Iterable[_Union[IngestWithConfigDataChannelValue, _Mapping]]] = ..., run_id: _Optional[str] = ..., end_stream_on_validation_error: bool = ..., organization_id: _Optional[str] = ...) -> None: ... + +class IngestWithConfigDataStreamResponse(_message.Message): + __slots__ = () + def __init__(self) -> None: ... + +class IngestWithConfigDataChannelValue(_message.Message): + __slots__ = ("string", "double", "float", "bool", "int32", "uint32", "int64", "uint64", "bit_field", "enum", "empty") + STRING_FIELD_NUMBER: _ClassVar[int] + DOUBLE_FIELD_NUMBER: _ClassVar[int] + FLOAT_FIELD_NUMBER: _ClassVar[int] + BOOL_FIELD_NUMBER: _ClassVar[int] + INT32_FIELD_NUMBER: _ClassVar[int] + UINT32_FIELD_NUMBER: _ClassVar[int] + INT64_FIELD_NUMBER: _ClassVar[int] + UINT64_FIELD_NUMBER: _ClassVar[int] + BIT_FIELD_FIELD_NUMBER: _ClassVar[int] + ENUM_FIELD_NUMBER: _ClassVar[int] + EMPTY_FIELD_NUMBER: _ClassVar[int] + string: str + double: float + float: float + bool: bool + int32: int + uint32: int + int64: int + uint64: int + bit_field: bytes + enum: int + empty: _empty_pb2.Empty + def __init__(self, string: _Optional[str] = ..., double: _Optional[float] = ..., float: _Optional[float] = ..., bool: bool = ..., int32: _Optional[int] = ..., uint32: _Optional[int] = ..., int64: _Optional[int] = ..., uint64: _Optional[int] = ..., bit_field: _Optional[bytes] = ..., enum: _Optional[int] = ..., empty: _Optional[_Union[_empty_pb2.Empty, _Mapping]] = ...) -> None: ... diff --git a/python/gen/sift/ingest/v1/ingest_pb2_grpc.py b/python/gen/sift/ingest/v1/ingest_pb2_grpc.py new file mode 100644 index 00000000..79545e8b --- /dev/null +++ b/python/gen/sift/ingest/v1/ingest_pb2_grpc.py @@ -0,0 +1,66 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from sift.ingest.v1 import ingest_pb2 as sift_dot_ingest_dot_v1_dot_ingest__pb2 + + +class IngestServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.IngestWithConfigDataStream = channel.stream_unary( + '/sift.ingest.v1.IngestService/IngestWithConfigDataStream', + request_serializer=sift_dot_ingest_dot_v1_dot_ingest__pb2.IngestWithConfigDataStreamRequest.SerializeToString, + response_deserializer=sift_dot_ingest_dot_v1_dot_ingest__pb2.IngestWithConfigDataStreamResponse.FromString, + ) + + +class IngestServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def IngestWithConfigDataStream(self, request_iterator, 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_IngestServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'IngestWithConfigDataStream': grpc.stream_unary_rpc_method_handler( + servicer.IngestWithConfigDataStream, + request_deserializer=sift_dot_ingest_dot_v1_dot_ingest__pb2.IngestWithConfigDataStreamRequest.FromString, + response_serializer=sift_dot_ingest_dot_v1_dot_ingest__pb2.IngestWithConfigDataStreamResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'sift.ingest.v1.IngestService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class IngestService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def IngestWithConfigDataStream(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_unary(request_iterator, target, '/sift.ingest.v1.IngestService/IngestWithConfigDataStream', + sift_dot_ingest_dot_v1_dot_ingest__pb2.IngestWithConfigDataStreamRequest.SerializeToString, + sift_dot_ingest_dot_v1_dot_ingest__pb2.IngestWithConfigDataStreamResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/rust/src/gen/mod.rs b/rust/src/gen/mod.rs index 6dd63696..10669c13 100644 --- a/rust/src/gen/mod.rs +++ b/rust/src/gen/mod.rs @@ -46,6 +46,13 @@ pub mod sift { // @@protoc_insertion_point(sift.calculated_channels.v1) } } + pub mod channel_schemas { + // @@protoc_insertion_point(attribute:sift.channel_schemas.v1) + pub mod v1 { + include!("sift.channel_schemas.v1.rs"); + // @@protoc_insertion_point(sift.channel_schemas.v1) + } + } pub mod channels { // @@protoc_insertion_point(attribute:sift.channels.v2) pub mod v2 { @@ -69,6 +76,13 @@ pub mod sift { // @@protoc_insertion_point(sift.data.v1) } } + pub mod ingest { + // @@protoc_insertion_point(attribute:sift.ingest.v1) + pub mod v1 { + include!("sift.ingest.v1.rs"); + // @@protoc_insertion_point(sift.ingest.v1) + } + } pub mod ingestion_configs { // @@protoc_insertion_point(attribute:sift.ingestion_configs.v1) pub mod v1 { diff --git a/rust/src/gen/sift.channel_schemas.v1.rs b/rust/src/gen/sift.channel_schemas.v1.rs new file mode 100644 index 00000000..544b35b1 --- /dev/null +++ b/rust/src/gen/sift.channel_schemas.v1.rs @@ -0,0 +1,54 @@ +// @generated +/// The request for a call to `ChannelSchemaService_CreateChannelSchema`. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateChannelSchemaRequest { + /// The name of the component (case-insensitive). + #[prost(string, tag="1")] + pub component: ::prost::alloc::string::String, + /// The name of the channel (case-insensitive). + #[prost(string, tag="2")] + pub channel: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub unit: ::prost::alloc::string::String, + #[prost(enumeration="super::super::common::r#type::v1::ChannelDataType", tag="4")] + pub data_type: i32, + #[prost(message, repeated, tag="5")] + pub enum_types: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="6")] + pub bit_field_elements: ::prost::alloc::vec::Vec, + /// The name of the asset (case-insensitive). + #[prost(string, tag="7")] + pub asset_name: ::prost::alloc::string::String, + /// This field is optional if the caller belongs to a single organization. + #[prost(string, tag="8")] + pub organization_id: ::prost::alloc::string::String, +} +/// The response of a call to `ChannelSchemaService_CreateChannelSchema`. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateChannelSchemaResponse { +} +/// The request for a call to `ChannelSchemaService_BatchCreateChannelSchemas`. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BatchCreateChannelSchemasRequest { + #[prost(message, repeated, tag="1")] + pub requests: ::prost::alloc::vec::Vec, + /// The asset to which the channel schemas belong (case-insensitive). + /// If this field, and any of the child requests specify an asset, the assets must match. + #[prost(string, tag="2")] + pub asset_name: ::prost::alloc::string::String, + /// The organization to which the channel schemas belong. + /// If this field, and any of the child requests specify an organization_id, the organization_ids must match. + /// This field is optional if the caller belongs to a single organization. + #[prost(string, tag="3")] + pub organization_id: ::prost::alloc::string::String, +} +/// The response of a call to `ChannelSchemaService_BatchCreateChannelSchemas`. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BatchCreateChannelSchemasResponse { +} +include!("sift.channel_schemas.v1.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/rust/src/gen/sift.channel_schemas.v1.tonic.rs b/rust/src/gen/sift.channel_schemas.v1.tonic.rs new file mode 100644 index 00000000..873b591f --- /dev/null +++ b/rust/src/gen/sift.channel_schemas.v1.tonic.rs @@ -0,0 +1,397 @@ +// @generated +/// Generated client implementations. +pub mod channel_schema_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 ChannelSchemaServiceClient { + inner: tonic::client::Grpc, + } + impl ChannelSchemaServiceClient { + /// 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 ChannelSchemaServiceClient + 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, + ) -> ChannelSchemaServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + ChannelSchemaServiceClient::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 create_channel_schema( + &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.channel_schemas.v1.ChannelSchemaService/CreateChannelSchema", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "sift.channel_schemas.v1.ChannelSchemaService", + "CreateChannelSchema", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn batch_create_channel_schemas( + &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.channel_schemas.v1.ChannelSchemaService/BatchCreateChannelSchemas", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "sift.channel_schemas.v1.ChannelSchemaService", + "BatchCreateChannelSchemas", + ), + ); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +pub mod channel_schema_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 ChannelSchemaServiceServer. + #[async_trait] + pub trait ChannelSchemaService: Send + Sync + 'static { + async fn create_channel_schema( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn batch_create_channel_schemas( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + #[derive(Debug)] + pub struct ChannelSchemaServiceServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl ChannelSchemaServiceServer { + 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 ChannelSchemaServiceServer + where + T: ChannelSchemaService, + 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.channel_schemas.v1.ChannelSchemaService/CreateChannelSchema" => { + #[allow(non_camel_case_types)] + struct CreateChannelSchemaSvc(pub Arc); + impl< + T: ChannelSchemaService, + > tonic::server::UnaryService + for CreateChannelSchemaSvc { + type Response = super::CreateChannelSchemaResponse; + 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 { + ::create_channel_schema( + &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 = CreateChannelSchemaSvc(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.channel_schemas.v1.ChannelSchemaService/BatchCreateChannelSchemas" => { + #[allow(non_camel_case_types)] + struct BatchCreateChannelSchemasSvc( + pub Arc, + ); + impl< + T: ChannelSchemaService, + > tonic::server::UnaryService< + super::BatchCreateChannelSchemasRequest, + > for BatchCreateChannelSchemasSvc { + type Response = super::BatchCreateChannelSchemasResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request< + super::BatchCreateChannelSchemasRequest, + >, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::batch_create_channel_schemas( + &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 = BatchCreateChannelSchemasSvc(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 ChannelSchemaServiceServer { + 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 ChannelSchemaServiceServer { + const NAME: &'static str = "sift.channel_schemas.v1.ChannelSchemaService"; + } +} diff --git a/rust/src/gen/sift.ingest.v1.rs b/rust/src/gen/sift.ingest.v1.rs new file mode 100644 index 00000000..90bf461b --- /dev/null +++ b/rust/src/gen/sift.ingest.v1.rs @@ -0,0 +1,67 @@ +// @generated +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IngestWithConfigDataStreamRequest { + #[prost(string, tag="1")] + pub ingestion_config_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub flow: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub timestamp: ::core::option::Option<::prost_types::Timestamp>, + #[prost(message, repeated, tag="4")] + pub channel_values: ::prost::alloc::vec::Vec, + /// The run_id MUST be included if this data is part of a run. + #[prost(string, tag="5")] + pub run_id: ::prost::alloc::string::String, + /// By default, if this request contains any channel values that do not match + /// the supplied ingestion config, the request is stored in an error queue and + /// the stream continues to accept data. This ensures all data is saved, but + /// only valid data is fully ingested. If this is set to `true`, any validation + /// errors end the stream and return the error to the client. + #[prost(bool, tag="6")] + pub end_stream_on_validation_error: bool, + #[prost(string, tag="7")] + pub organization_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IngestWithConfigDataStreamResponse { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IngestWithConfigDataChannelValue { + #[prost(oneof="ingest_with_config_data_channel_value::Type", tags="1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11")] + pub r#type: ::core::option::Option, +} +/// Nested message and enum types in `IngestWithConfigDataChannelValue`. +pub mod ingest_with_config_data_channel_value { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Type { + #[prost(string, tag="1")] + String(::prost::alloc::string::String), + #[prost(double, tag="2")] + Double(f64), + #[prost(float, tag="3")] + Float(f32), + #[prost(bool, tag="4")] + Bool(bool), + #[prost(int32, tag="5")] + Int32(i32), + #[prost(uint32, tag="6")] + Uint32(u32), + #[prost(int64, tag="7")] + Int64(i64), + #[prost(uint64, tag="8")] + Uint64(u64), + #[prost(bytes, tag="9")] + BitField(::prost::alloc::vec::Vec), + #[prost(uint32, tag="10")] + Enum(u32), + /// If there's not a new data point for a channel at the given timestamp, pass empty to skip it + #[prost(message, tag="11")] + Empty(()), + } +} +include!("sift.ingest.v1.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/rust/src/gen/sift.ingest.v1.tonic.rs b/rust/src/gen/sift.ingest.v1.tonic.rs new file mode 100644 index 00000000..6c73964e --- /dev/null +++ b/rust/src/gen/sift.ingest.v1.tonic.rs @@ -0,0 +1,310 @@ +// @generated +/// Generated client implementations. +pub mod ingest_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 IngestServiceClient { + inner: tonic::client::Grpc, + } + impl IngestServiceClient { + /// 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 IngestServiceClient + 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, + ) -> IngestServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + IngestServiceClient::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 ingest_with_config_data_stream( + &mut self, + request: impl tonic::IntoStreamingRequest< + Message = super::IngestWithConfigDataStreamRequest, + >, + ) -> 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.ingest.v1.IngestService/IngestWithConfigDataStream", + ); + let mut req = request.into_streaming_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "sift.ingest.v1.IngestService", + "IngestWithConfigDataStream", + ), + ); + self.inner.client_streaming(req, path, codec).await + } + } +} +/// Generated server implementations. +pub mod ingest_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 IngestServiceServer. + #[async_trait] + pub trait IngestService: Send + Sync + 'static { + async fn ingest_with_config_data_stream( + &self, + request: tonic::Request< + tonic::Streaming, + >, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + #[derive(Debug)] + pub struct IngestServiceServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl IngestServiceServer { + 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 IngestServiceServer + where + T: IngestService, + 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.ingest.v1.IngestService/IngestWithConfigDataStream" => { + #[allow(non_camel_case_types)] + struct IngestWithConfigDataStreamSvc(pub Arc); + impl< + T: IngestService, + > tonic::server::ClientStreamingService< + super::IngestWithConfigDataStreamRequest, + > for IngestWithConfigDataStreamSvc { + type Response = super::IngestWithConfigDataStreamResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request< + tonic::Streaming, + >, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::ingest_with_config_data_stream( + &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 = IngestWithConfigDataStreamSvc(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.client_streaming(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 IngestServiceServer { + 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 IngestServiceServer { + const NAME: &'static str = "sift.ingest.v1.IngestService"; + } +} diff --git a/rust/src/gen/sift.ingestion_configs.v1.rs b/rust/src/gen/sift.ingestion_configs.v1.rs index ba461a5c..21fe30de 100644 --- a/rust/src/gen/sift.ingestion_configs.v1.rs +++ b/rust/src/gen/sift.ingestion_configs.v1.rs @@ -91,7 +91,7 @@ pub struct ListIngestionConfigsRequest { /// A [Common Expression Language (CEL)]() filter string. /// Available fields to filter by are `ingestion_config_id`, `client_key`, `asset_id`, `created_date`, and `modified_date`. /// For further information about how to use CELs, please refer to [this guide](). - /// For more information about the fields used for filtering, please refer to [this definition](/ingestion/api#sift_ingestion_configs_v1-proto). Optional. + /// For more information about the fields used for filtering, please refer to [this definition](/protocol-buffers/documentation#ingestionconfigservice). Optional. #[prost(string, tag="3")] pub filter: ::prost::alloc::string::String, }