Skip to content

Commit b6e83cb

Browse files
authored
rust(feat): update protocol buffers (#311)
1 parent 7b54866 commit b6e83cb

35 files changed

Lines changed: 6009 additions & 481 deletions

rust/crates/sift_rs/src/gen/sift.annotations.v1.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@ pub struct Annotation {
4343
pub report_rule_version_id: ::core::option::Option<::prost::alloc::string::String>,
4444
#[prost(bool, tag="20")]
4545
pub pending: bool,
46+
#[prost(message, optional, tag="21")]
47+
pub assigned_to_user: ::core::option::Option<super::super::common::r#type::v1::User>,
48+
#[prost(message, optional, tag="22")]
49+
pub deleted_date: ::core::option::Option<::pbjson_types::Timestamp>,
50+
#[prost(message, repeated, tag="23")]
51+
pub linked_channels: ::prost::alloc::vec::Vec<AnnotationLinkedChannel>,
52+
#[prost(string, repeated, tag="24")]
53+
pub asset_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
54+
#[prost(message, repeated, tag="25")]
55+
pub metadata: ::prost::alloc::vec::Vec<super::super::metadata::v1::MetadataValue>,
4656
}
4757
#[allow(clippy::derive_partial_eq_without_eq)]
4858
#[derive(Clone, PartialEq, ::prost::Message)]
@@ -108,6 +118,8 @@ pub struct CreateAnnotationRequest {
108118
pub legend_config: ::core::option::Option<::prost::alloc::string::String>,
109119
#[prost(string, optional, tag="15")]
110120
pub created_by_rule_condition_version_id: ::core::option::Option<::prost::alloc::string::String>,
121+
#[prost(message, repeated, tag="16")]
122+
pub metadata: ::prost::alloc::vec::Vec<super::super::metadata::v1::MetadataValue>,
111123
}
112124
#[allow(clippy::derive_partial_eq_without_eq)]
113125
#[derive(Clone, PartialEq, ::prost::Message)]

rust/crates/sift_rs/src/gen/sift.annotations.v1.serde.rs

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,21 @@ impl serde::Serialize for Annotation {
6767
if self.pending {
6868
len += 1;
6969
}
70+
if self.assigned_to_user.is_some() {
71+
len += 1;
72+
}
73+
if self.deleted_date.is_some() {
74+
len += 1;
75+
}
76+
if !self.linked_channels.is_empty() {
77+
len += 1;
78+
}
79+
if !self.asset_ids.is_empty() {
80+
len += 1;
81+
}
82+
if !self.metadata.is_empty() {
83+
len += 1;
84+
}
7085
let mut struct_ser = serializer.serialize_struct("sift.annotations.v1.Annotation", len)?;
7186
if !self.annotation_id.is_empty() {
7287
struct_ser.serialize_field("annotationId", &self.annotation_id)?;
@@ -132,6 +147,21 @@ impl serde::Serialize for Annotation {
132147
if self.pending {
133148
struct_ser.serialize_field("pending", &self.pending)?;
134149
}
150+
if let Some(v) = self.assigned_to_user.as_ref() {
151+
struct_ser.serialize_field("assignedToUser", v)?;
152+
}
153+
if let Some(v) = self.deleted_date.as_ref() {
154+
struct_ser.serialize_field("deletedDate", v)?;
155+
}
156+
if !self.linked_channels.is_empty() {
157+
struct_ser.serialize_field("linkedChannels", &self.linked_channels)?;
158+
}
159+
if !self.asset_ids.is_empty() {
160+
struct_ser.serialize_field("assetIds", &self.asset_ids)?;
161+
}
162+
if !self.metadata.is_empty() {
163+
struct_ser.serialize_field("metadata", &self.metadata)?;
164+
}
135165
struct_ser.end()
136166
}
137167
}
@@ -177,6 +207,15 @@ impl<'de> serde::Deserialize<'de> for Annotation {
177207
"report_rule_version_id",
178208
"reportRuleVersionId",
179209
"pending",
210+
"assigned_to_user",
211+
"assignedToUser",
212+
"deleted_date",
213+
"deletedDate",
214+
"linked_channels",
215+
"linkedChannels",
216+
"asset_ids",
217+
"assetIds",
218+
"metadata",
180219
];
181220

182221
#[allow(clippy::enum_variant_names)]
@@ -201,6 +240,11 @@ impl<'de> serde::Deserialize<'de> for Annotation {
201240
CreatedByRuleConditionVersionId,
202241
ReportRuleVersionId,
203242
Pending,
243+
AssignedToUser,
244+
DeletedDate,
245+
LinkedChannels,
246+
AssetIds,
247+
Metadata,
204248
}
205249
impl<'de> serde::Deserialize<'de> for GeneratedField {
206250
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
@@ -242,6 +286,11 @@ impl<'de> serde::Deserialize<'de> for Annotation {
242286
"createdByRuleConditionVersionId" | "created_by_rule_condition_version_id" => Ok(GeneratedField::CreatedByRuleConditionVersionId),
243287
"reportRuleVersionId" | "report_rule_version_id" => Ok(GeneratedField::ReportRuleVersionId),
244288
"pending" => Ok(GeneratedField::Pending),
289+
"assignedToUser" | "assigned_to_user" => Ok(GeneratedField::AssignedToUser),
290+
"deletedDate" | "deleted_date" => Ok(GeneratedField::DeletedDate),
291+
"linkedChannels" | "linked_channels" => Ok(GeneratedField::LinkedChannels),
292+
"assetIds" | "asset_ids" => Ok(GeneratedField::AssetIds),
293+
"metadata" => Ok(GeneratedField::Metadata),
245294
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
246295
}
247296
}
@@ -281,6 +330,11 @@ impl<'de> serde::Deserialize<'de> for Annotation {
281330
let mut created_by_rule_condition_version_id__ = None;
282331
let mut report_rule_version_id__ = None;
283332
let mut pending__ = None;
333+
let mut assigned_to_user__ = None;
334+
let mut deleted_date__ = None;
335+
let mut linked_channels__ = None;
336+
let mut asset_ids__ = None;
337+
let mut metadata__ = None;
284338
while let Some(k) = map_.next_key()? {
285339
match k {
286340
GeneratedField::AnnotationId => {
@@ -403,6 +457,36 @@ impl<'de> serde::Deserialize<'de> for Annotation {
403457
}
404458
pending__ = Some(map_.next_value()?);
405459
}
460+
GeneratedField::AssignedToUser => {
461+
if assigned_to_user__.is_some() {
462+
return Err(serde::de::Error::duplicate_field("assignedToUser"));
463+
}
464+
assigned_to_user__ = map_.next_value()?;
465+
}
466+
GeneratedField::DeletedDate => {
467+
if deleted_date__.is_some() {
468+
return Err(serde::de::Error::duplicate_field("deletedDate"));
469+
}
470+
deleted_date__ = map_.next_value()?;
471+
}
472+
GeneratedField::LinkedChannels => {
473+
if linked_channels__.is_some() {
474+
return Err(serde::de::Error::duplicate_field("linkedChannels"));
475+
}
476+
linked_channels__ = Some(map_.next_value()?);
477+
}
478+
GeneratedField::AssetIds => {
479+
if asset_ids__.is_some() {
480+
return Err(serde::de::Error::duplicate_field("assetIds"));
481+
}
482+
asset_ids__ = Some(map_.next_value()?);
483+
}
484+
GeneratedField::Metadata => {
485+
if metadata__.is_some() {
486+
return Err(serde::de::Error::duplicate_field("metadata"));
487+
}
488+
metadata__ = Some(map_.next_value()?);
489+
}
406490
}
407491
}
408492
Ok(Annotation {
@@ -426,6 +510,11 @@ impl<'de> serde::Deserialize<'de> for Annotation {
426510
created_by_rule_condition_version_id: created_by_rule_condition_version_id__,
427511
report_rule_version_id: report_rule_version_id__,
428512
pending: pending__.unwrap_or_default(),
513+
assigned_to_user: assigned_to_user__,
514+
deleted_date: deleted_date__,
515+
linked_channels: linked_channels__.unwrap_or_default(),
516+
asset_ids: asset_ids__.unwrap_or_default(),
517+
metadata: metadata__.unwrap_or_default(),
429518
})
430519
}
431520
}
@@ -1111,6 +1200,9 @@ impl serde::Serialize for CreateAnnotationRequest {
11111200
if self.created_by_rule_condition_version_id.is_some() {
11121201
len += 1;
11131202
}
1203+
if !self.metadata.is_empty() {
1204+
len += 1;
1205+
}
11141206
let mut struct_ser = serializer.serialize_struct("sift.annotations.v1.CreateAnnotationRequest", len)?;
11151207
if !self.name.is_empty() {
11161208
struct_ser.serialize_field("name", &self.name)?;
@@ -1161,6 +1253,9 @@ impl serde::Serialize for CreateAnnotationRequest {
11611253
if let Some(v) = self.created_by_rule_condition_version_id.as_ref() {
11621254
struct_ser.serialize_field("createdByRuleConditionVersionId", v)?;
11631255
}
1256+
if !self.metadata.is_empty() {
1257+
struct_ser.serialize_field("metadata", &self.metadata)?;
1258+
}
11641259
struct_ser.end()
11651260
}
11661261
}
@@ -1196,6 +1291,7 @@ impl<'de> serde::Deserialize<'de> for CreateAnnotationRequest {
11961291
"legendConfig",
11971292
"created_by_rule_condition_version_id",
11981293
"createdByRuleConditionVersionId",
1294+
"metadata",
11991295
];
12001296

12011297
#[allow(clippy::enum_variant_names)]
@@ -1215,6 +1311,7 @@ impl<'de> serde::Deserialize<'de> for CreateAnnotationRequest {
12151311
CreatedByConditionId,
12161312
LegendConfig,
12171313
CreatedByRuleConditionVersionId,
1314+
Metadata,
12181315
}
12191316
impl<'de> serde::Deserialize<'de> for GeneratedField {
12201317
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
@@ -1251,6 +1348,7 @@ impl<'de> serde::Deserialize<'de> for CreateAnnotationRequest {
12511348
"createdByConditionId" | "created_by_condition_id" => Ok(GeneratedField::CreatedByConditionId),
12521349
"legendConfig" | "legend_config" => Ok(GeneratedField::LegendConfig),
12531350
"createdByRuleConditionVersionId" | "created_by_rule_condition_version_id" => Ok(GeneratedField::CreatedByRuleConditionVersionId),
1351+
"metadata" => Ok(GeneratedField::Metadata),
12541352
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
12551353
}
12561354
}
@@ -1285,6 +1383,7 @@ impl<'de> serde::Deserialize<'de> for CreateAnnotationRequest {
12851383
let mut created_by_condition_id__ = None;
12861384
let mut legend_config__ = None;
12871385
let mut created_by_rule_condition_version_id__ = None;
1386+
let mut metadata__ = None;
12881387
while let Some(k) = map_.next_key()? {
12891388
match k {
12901389
GeneratedField::Name => {
@@ -1377,6 +1476,12 @@ impl<'de> serde::Deserialize<'de> for CreateAnnotationRequest {
13771476
}
13781477
created_by_rule_condition_version_id__ = map_.next_value()?;
13791478
}
1479+
GeneratedField::Metadata => {
1480+
if metadata__.is_some() {
1481+
return Err(serde::de::Error::duplicate_field("metadata"));
1482+
}
1483+
metadata__ = Some(map_.next_value()?);
1484+
}
13801485
}
13811486
}
13821487
Ok(CreateAnnotationRequest {
@@ -1395,6 +1500,7 @@ impl<'de> serde::Deserialize<'de> for CreateAnnotationRequest {
13951500
created_by_condition_id: created_by_condition_id__,
13961501
legend_config: legend_config__,
13971502
created_by_rule_condition_version_id: created_by_rule_condition_version_id__,
1503+
metadata: metadata__.unwrap_or_default(),
13981504
})
13991505
}
14001506
}

rust/crates/sift_rs/src/gen/sift.calculated_channels.v2.rs

Lines changed: 62 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ pub struct CalculatedChannel {
3535
pub created_by_user_id: ::prost::alloc::string::String,
3636
#[prost(string, tag="17")]
3737
pub modified_by_user_id: ::prost::alloc::string::String,
38+
#[prost(message, repeated, tag="19")]
39+
pub function_dependencies: ::prost::alloc::vec::Vec<super::super::common::r#type::v1::FunctionDependency>,
40+
#[prost(message, repeated, tag="20")]
41+
pub metadata: ::prost::alloc::vec::Vec<super::super::metadata::v1::MetadataValue>,
3842
}
3943
#[allow(clippy::derive_partial_eq_without_eq)]
4044
#[derive(Clone, PartialEq, ::prost::Message)]
@@ -143,6 +147,8 @@ pub struct CreateCalculatedChannelRequest {
143147
pub client_key: ::core::option::Option<::prost::alloc::string::String>,
144148
#[prost(message, optional, tag="5")]
145149
pub calculated_channel_configuration: ::core::option::Option<CalculatedChannelConfiguration>,
150+
#[prost(message, repeated, tag="8")]
151+
pub metadata: ::prost::alloc::vec::Vec<super::super::metadata::v1::MetadataValue>,
146152
}
147153
#[allow(clippy::derive_partial_eq_without_eq)]
148154
#[derive(Clone, PartialEq, ::prost::Message)]
@@ -243,34 +249,33 @@ pub mod resolve_calculated_channel_request {
243249
}
244250
#[allow(clippy::derive_partial_eq_without_eq)]
245251
#[derive(Clone, PartialEq, ::prost::Message)]
252+
pub struct ResolvedCalculatedChannel {
253+
#[prost(string, tag="1")]
254+
pub asset_name: ::prost::alloc::string::String,
255+
#[prost(message, optional, tag="2")]
256+
pub expression_request: ::core::option::Option<super::v1::ExpressionRequest>,
257+
#[prost(enumeration="super::super::common::r#type::v1::ChannelDataType", tag="3")]
258+
pub output_data_type: i32,
259+
#[prost(string, tag="4")]
260+
pub asset_id: ::prost::alloc::string::String,
261+
}
262+
#[allow(clippy::derive_partial_eq_without_eq)]
263+
#[derive(Clone, PartialEq, ::prost::Message)]
264+
pub struct UnresolvedCalculatedChannel {
265+
#[prost(string, tag="1")]
266+
pub asset_name: ::prost::alloc::string::String,
267+
#[prost(string, tag="2")]
268+
pub error_message: ::prost::alloc::string::String,
269+
}
270+
#[allow(clippy::derive_partial_eq_without_eq)]
271+
#[derive(Clone, PartialEq, ::prost::Message)]
246272
pub struct ResolveCalculatedChannelResponse {
247273
#[prost(string, optional, tag="1")]
248274
pub calculated_channel_id: ::core::option::Option<::prost::alloc::string::String>,
249275
#[prost(message, repeated, tag="2")]
250-
pub resolved: ::prost::alloc::vec::Vec<resolve_calculated_channel_response::ResolvedCalculatedChannel>,
276+
pub resolved: ::prost::alloc::vec::Vec<ResolvedCalculatedChannel>,
251277
#[prost(message, repeated, tag="3")]
252-
pub unresolved: ::prost::alloc::vec::Vec<resolve_calculated_channel_response::UnresolvedCalculatedChannel>,
253-
}
254-
/// Nested message and enum types in `ResolveCalculatedChannelResponse`.
255-
pub mod resolve_calculated_channel_response {
256-
#[allow(clippy::derive_partial_eq_without_eq)]
257-
#[derive(Clone, PartialEq, ::prost::Message)]
258-
pub struct ResolvedCalculatedChannel {
259-
#[prost(string, tag="1")]
260-
pub asset_name: ::prost::alloc::string::String,
261-
#[prost(message, optional, tag="2")]
262-
pub expression_request: ::core::option::Option<super::super::v1::ExpressionRequest>,
263-
#[prost(enumeration="super::super::super::common::r#type::v1::ChannelDataType", tag="3")]
264-
pub output_data_type: i32,
265-
}
266-
#[allow(clippy::derive_partial_eq_without_eq)]
267-
#[derive(Clone, PartialEq, ::prost::Message)]
268-
pub struct UnresolvedCalculatedChannel {
269-
#[prost(string, tag="1")]
270-
pub asset_name: ::prost::alloc::string::String,
271-
#[prost(string, tag="2")]
272-
pub error_message: ::prost::alloc::string::String,
273-
}
278+
pub unresolved: ::prost::alloc::vec::Vec<UnresolvedCalculatedChannel>,
274279
}
275280
#[allow(clippy::derive_partial_eq_without_eq)]
276281
#[derive(Clone, PartialEq, ::prost::Message)]
@@ -284,6 +289,40 @@ pub struct BatchResolveCalculatedChannelsResponse {
284289
#[prost(message, repeated, tag="1")]
285290
pub responses: ::prost::alloc::vec::Vec<ResolveCalculatedChannelResponse>,
286291
}
292+
#[allow(clippy::derive_partial_eq_without_eq)]
293+
#[derive(Clone, PartialEq, ::prost::Message)]
294+
pub struct ListResolvedCalculatedChannelsRequest {
295+
#[prost(string, tag="1")]
296+
pub asset_id: ::prost::alloc::string::String,
297+
#[prost(string, tag="2")]
298+
pub run_id: ::prost::alloc::string::String,
299+
#[prost(uint32, tag="3")]
300+
pub page_size: u32,
301+
#[prost(string, tag="4")]
302+
pub page_token: ::prost::alloc::string::String,
303+
#[prost(string, tag="5")]
304+
pub filter: ::prost::alloc::string::String,
305+
#[prost(string, tag="6")]
306+
pub order_by: ::prost::alloc::string::String,
307+
}
308+
#[allow(clippy::derive_partial_eq_without_eq)]
309+
#[derive(Clone, PartialEq, ::prost::Message)]
310+
pub struct CalculatedChannelResolution {
311+
#[prost(message, optional, tag="1")]
312+
pub calculated_channel: ::core::option::Option<CalculatedChannel>,
313+
#[prost(message, repeated, tag="2")]
314+
pub resolved: ::prost::alloc::vec::Vec<ResolvedCalculatedChannel>,
315+
#[prost(message, repeated, tag="3")]
316+
pub unresolved: ::prost::alloc::vec::Vec<UnresolvedCalculatedChannel>,
317+
}
318+
#[allow(clippy::derive_partial_eq_without_eq)]
319+
#[derive(Clone, PartialEq, ::prost::Message)]
320+
pub struct ListResolvedCalculatedChannelsResponse {
321+
#[prost(message, repeated, tag="1")]
322+
pub calculated_channel_resolutions: ::prost::alloc::vec::Vec<CalculatedChannelResolution>,
323+
#[prost(string, tag="3")]
324+
pub next_page_token: ::prost::alloc::string::String,
325+
}
287326
include!("sift.calculated_channels.v2.tonic.rs");
288327
include!("sift.calculated_channels.v2.serde.rs");
289328
// @@protoc_insertion_point(module)

0 commit comments

Comments
 (0)