diff --git a/snippet-service/pb/README.md b/snippet-service/pb/README.md index 34125e6c6..22718bf07 100644 --- a/snippet-service/pb/README.md +++ b/snippet-service/pb/README.md @@ -257,9 +257,9 @@ TODO Naming | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | id_filter | [string](#string) | repeated | | -| configuration_id_filter | [IDFilter](#snippetservice-pb-IDFilter) | repeated | | +| configuration_id_filter | [string](#string) | repeated | | | device_id_filter | [string](#string) | repeated | | -| condition_id_filter | [IDFilter](#snippetservice-pb-IDFilter) | repeated | | +| condition_id_filter | [string](#string) | repeated | | @@ -275,6 +275,7 @@ TODO Naming | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | id_filter | [IDFilter](#snippetservice-pb-IDFilter) | repeated | | +| configuration_id_fitler | [string](#string) | repeated | | diff --git a/snippet-service/pb/doc.html b/snippet-service/pb/doc.html index df35551a9..c23236571 100644 --- a/snippet-service/pb/doc.html +++ b/snippet-service/pb/doc.html @@ -784,7 +784,7 @@

GetAppliedDevic configuration_id_filter - IDFilter + string repeated

@@ -798,7 +798,7 @@

GetAppliedDevic condition_id_filter - IDFilter + string repeated

@@ -827,6 +827,13 @@

GetConditionsRequest

+ + configuration_id_fitler + string + repeated +

+ + diff --git a/snippet-service/pb/service.pb.go b/snippet-service/pb/service.pb.go index 4bba8b7b5..81a816d63 100644 --- a/snippet-service/pb/service.pb.go +++ b/snippet-service/pb/service.pb.go @@ -338,7 +338,8 @@ type GetConditionsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - IdFilter []*IDFilter `protobuf:"bytes,1,rep,name=id_filter,json=idFilter,proto3" json:"id_filter,omitempty"` + IdFilter []*IDFilter `protobuf:"bytes,1,rep,name=id_filter,json=idFilter,proto3" json:"id_filter,omitempty"` + ConfigurationIdFitler []string `protobuf:"bytes,2,rep,name=configuration_id_fitler,json=configurationIdFitler,proto3" json:"configuration_id_fitler,omitempty"` } func (x *GetConditionsRequest) Reset() { @@ -380,6 +381,13 @@ func (x *GetConditionsRequest) GetIdFilter() []*IDFilter { return nil } +func (x *GetConditionsRequest) GetConfigurationIdFitler() []string { + if x != nil { + return x.ConfigurationIdFitler + } + return nil +} + type DeleteConditionsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -926,10 +934,10 @@ type GetAppliedDeviceConfigurationsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - IdFilter []string `protobuf:"bytes,1,rep,name=id_filter,json=idFilter,proto3" json:"id_filter,omitempty"` - ConfigurationIdFilter []*IDFilter `protobuf:"bytes,2,rep,name=configuration_id_filter,json=configurationIdFilter,proto3" json:"configuration_id_filter,omitempty"` - DeviceIdFilter []string `protobuf:"bytes,3,rep,name=device_id_filter,json=deviceIdFilter,proto3" json:"device_id_filter,omitempty"` - ConditionIdFilter []*IDFilter `protobuf:"bytes,4,rep,name=condition_id_filter,json=conditionIdFilter,proto3" json:"condition_id_filter,omitempty"` + IdFilter []string `protobuf:"bytes,1,rep,name=id_filter,json=idFilter,proto3" json:"id_filter,omitempty"` + ConfigurationIdFilter []string `protobuf:"bytes,2,rep,name=configuration_id_filter,json=configurationIdFilter,proto3" json:"configuration_id_filter,omitempty"` + DeviceIdFilter []string `protobuf:"bytes,3,rep,name=device_id_filter,json=deviceIdFilter,proto3" json:"device_id_filter,omitempty"` + ConditionIdFilter []string `protobuf:"bytes,4,rep,name=condition_id_filter,json=conditionIdFilter,proto3" json:"condition_id_filter,omitempty"` } func (x *GetAppliedDeviceConfigurationsRequest) Reset() { @@ -971,7 +979,7 @@ func (x *GetAppliedDeviceConfigurationsRequest) GetIdFilter() []string { return nil } -func (x *GetAppliedDeviceConfigurationsRequest) GetConfigurationIdFilter() []*IDFilter { +func (x *GetAppliedDeviceConfigurationsRequest) GetConfigurationIdFilter() []string { if x != nil { return x.ConfigurationIdFilter } @@ -985,7 +993,7 @@ func (x *GetAppliedDeviceConfigurationsRequest) GetDeviceIdFilter() []string { return nil } -func (x *GetAppliedDeviceConfigurationsRequest) GetConditionIdFilter() []*IDFilter { +func (x *GetAppliedDeviceConfigurationsRequest) GetConditionIdFilter() []string { if x != nil { return x.ConditionIdFilter } @@ -1327,293 +1335,293 @@ var file_snippet_service_pb_service_proto_rawDesc = []byte{ 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x50, 0x0a, 0x14, 0x47, 0x65, - 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x69, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x44, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x52, 0x08, 0x69, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x53, 0x0a, 0x17, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x69, 0x64, 0x5f, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x6e, 0x69, - 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x49, - 0x44, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x08, 0x69, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x22, 0x30, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x88, 0x01, 0x0a, 0x14, 0x47, + 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x69, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x44, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x52, 0x08, 0x69, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x36, 0x0a, + 0x17, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x5f, 0x66, 0x69, 0x74, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x15, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x46, + 0x69, 0x74, 0x6c, 0x65, 0x72, 0x22, 0x53, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x38, 0x0a, 0x09, 0x69, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x44, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x52, 0x08, 0x69, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x30, 0x0a, 0x18, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xc5, 0x02, 0x0a, + 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, + 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x09, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x29, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x1a, 0x79, 0x0a, 0x08, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x72, 0x65, 0x66, 0x12, 0x37, 0x0a, 0x07, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x69, + 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x6f, + 0x4c, 0x69, 0x76, 0x65, 0x22, 0x7e, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x38, 0x0a, 0x09, 0x69, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x44, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x52, 0x08, 0x69, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x0e, 0x68, 0x74, + 0x74, 0x70, 0x5f, 0x69, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0c, 0x68, 0x74, 0x74, 0x70, 0x49, 0x64, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x22, 0x57, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x69, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x44, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x52, 0x08, 0x69, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x34, 0x0a, + 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0xc5, 0x02, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, - 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x1a, 0x79, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x68, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x72, 0x65, 0x66, - 0x12, 0x37, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x61, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0c, 0x74, 0x69, 0x6d, - 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x22, 0x7e, 0x0a, 0x18, 0x47, - 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x69, 0x64, 0x5f, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x6e, 0x69, - 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x49, - 0x44, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x08, 0x69, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x12, 0x28, 0x0a, 0x0e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x69, 0x64, 0x5f, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0c, 0x68, - 0x74, 0x74, 0x70, 0x49, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x57, 0x0a, 0x1b, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x69, 0x64, - 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x75, 0x6e, 0x74, 0x22, 0xd7, 0x06, 0x0a, 0x1a, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x44, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, + 0x63, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x73, 0x6e, 0x69, 0x70, + 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x70, + 0x70, 0x6c, 0x69, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x6f, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x09, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x08, 0x6f, 0x6e, 0x44, 0x65, 0x6d, + 0x61, 0x6e, 0x64, 0x12, 0x5d, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x73, 0x6e, 0x69, 0x70, + 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x70, + 0x70, 0x6c, 0x69, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x6f, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x54, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, + 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1c, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x1a, 0xd7, 0x02, 0x0a, + 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0b, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, + 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, + 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x12, 0x55, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x44, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x50, 0x0a, 0x10, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x52, 0x0f, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x22, 0x38, 0x0a, 0x06, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06, 0x51, 0x55, 0x45, 0x55, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, + 0x08, 0x0a, 0x04, 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x49, 0x4d, + 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x1a, 0x36, 0x0a, 0x0a, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0d, + 0x0a, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x22, 0xa1, 0x01, + 0x0a, 0x1a, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x10, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, + 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x22, 0xd6, 0x01, 0x0a, 0x25, 0x47, 0x65, 0x74, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, + 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x69, + 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, + 0x69, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x5f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x15, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x12, 0x28, 0x0a, 0x10, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x5f, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x49, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x47, 0x0a, 0x28, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x64, 0x5f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x69, 0x64, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x22, 0x41, 0x0a, 0x29, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x70, + 0x6c, 0x69, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xaa, 0x0f, 0x0a, 0x0e, 0x53, 0x6e, 0x69, 0x70, 0x70, + 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x0f, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, - 0x62, 0x2e, 0x49, 0x44, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x08, 0x69, 0x64, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x22, 0x34, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xd7, 0x06, 0x0a, 0x1a, 0x41, - 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x63, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x38, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x09, 0x6f, - 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, - 0x52, 0x08, 0x6f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x5d, 0x0a, 0x0c, 0x63, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x38, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x54, 0x0a, 0x09, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x73, - 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, - 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, - 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x1a, 0xd7, 0x02, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x41, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x72, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x55, 0x0a, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, 0x73, 0x6e, 0x69, - 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x41, - 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x50, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x22, 0x38, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, - 0x06, 0x51, 0x55, 0x45, 0x55, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, - 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x02, - 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x1a, 0x36, 0x0a, - 0x0a, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x64, 0x5f, 0x62, 0x79, 0x22, 0xa1, 0x01, 0x0a, 0x1a, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1b, - 0x0a, 0x09, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x66, - 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, - 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x72, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x90, 0x02, 0x0a, 0x25, 0x47, 0x65, 0x74, - 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x69, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, - 0x53, 0x0a, 0x17, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x44, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x15, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x10, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, - 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, - 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4b, - 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x5f, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x6e, + 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x1c, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, - 0x49, 0x44, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x47, 0x0a, 0x28, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x64, 0x5f, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x69, 0x64, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x22, 0x41, 0x0a, 0x29, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, - 0x70, 0x6c, 0x69, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xaa, 0x0f, 0x0a, 0x0e, 0x53, 0x6e, 0x69, 0x70, - 0x70, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x0f, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3c, 0x92, 0x41, 0x0c, 0x0a, 0x0a, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, + 0x3a, 0x01, 0x2a, 0x22, 0x22, 0x2f, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x2d, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x93, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x2e, 0x73, 0x6e, 0x69, 0x70, + 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x39, 0x92, 0x41, 0x0c, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, + 0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x30, 0x01, 0x12, 0xa6, 0x01, + 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x2a, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x1c, 0x2e, 0x73, - 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, - 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3c, 0x92, 0x41, 0x0c, 0x0a, - 0x0a, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x27, 0x3a, 0x01, 0x2a, 0x22, 0x22, 0x2f, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x2d, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x93, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x2e, 0x73, 0x6e, 0x69, - 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x47, - 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x39, 0x92, 0x41, 0x0c, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x73, 0x6e, 0x69, 0x70, 0x70, - 0x65, 0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x30, 0x01, 0x12, 0xa6, - 0x01, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x2a, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2b, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x92, 0x41, - 0x0c, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x24, 0x2a, 0x22, 0x2f, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x2d, 0x73, 0x65, + 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x92, 0x41, 0x0c, + 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x24, 0x2a, 0x22, 0x2f, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x2d, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x90, 0x01, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x2e, 0x73, 0x6e, 0x69, + 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x1c, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, + 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x41, 0x92, 0x41, 0x0c, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x3a, 0x01, 0x2a, + 0x1a, 0x27, 0x2f, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9f, 0x01, 0x0a, 0x13, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x20, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x44, 0x92, 0x41, 0x10, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, + 0x3a, 0x01, 0x2a, 0x22, 0x26, 0x2f, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x90, 0x01, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x2e, 0x73, 0x6e, - 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x1c, 0x2e, 0x73, 0x6e, 0x69, 0x70, - 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x41, 0x92, 0x41, 0x0c, 0x0a, 0x0a, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x3a, 0x01, - 0x2a, 0x1a, 0x27, 0x2f, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9f, 0x01, 0x0a, 0x13, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x44, 0x92, 0x41, 0x10, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x2b, 0x3a, 0x01, 0x2a, 0x22, 0x26, 0x2f, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x2d, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xa7, 0x01, 0x0a, - 0x11, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x2b, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x20, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x41, 0x92, 0x41, 0x10, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x73, - 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x30, 0x01, 0x12, 0xba, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x2e, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2f, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xa7, 0x01, 0x0a, 0x11, + 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x2b, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, + 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x41, 0x92, 0x41, 0x10, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x2a, 0x26, 0x2f, 0x73, 0x6e, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0xa4, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x73, 0x6e, - 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x2e, - 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, - 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x49, 0x92, 0x41, 0x10, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x01, 0x2a, 0x1a, 0x2b, 0x2f, + 0x6f, 0x6e, 0x73, 0x30, 0x01, 0x12, 0xba, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2e, + 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, + 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x41, 0x92, 0x41, 0x10, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x2a, 0x26, 0x2f, 0x73, 0x6e, 0x69, + 0x70, 0x70, 0x65, 0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0xa4, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x73, 0x6e, 0x69, + 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x2e, 0x73, + 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, + 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x49, + 0x92, 0x41, 0x10, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x01, 0x2a, 0x1a, 0x2b, 0x2f, 0x73, + 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xce, 0x01, 0x0a, 0x13, 0x49, 0x6e, + 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x2d, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2d, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x57, 0x92, 0x41, 0x10, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x3a, 0x01, 0x2a, 0x22, 0x39, 0x2f, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xce, 0x01, 0x0a, 0x13, 0x49, - 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x2d, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x30, 0x01, 0x12, 0xd0, 0x01, 0x0a, 0x18, 0x47, + 0x65, 0x74, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, + 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x41, + 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x57, 0x92, 0x41, 0x10, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x3a, 0x01, 0x2a, 0x22, 0x39, - 0x2f, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x30, 0x01, 0x12, 0xd0, 0x01, 0x0a, 0x18, - 0x47, 0x65, 0x74, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, - 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, - 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x49, 0x92, 0x41, 0x10, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x73, - 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x30, 0x01, 0x12, 0xe3, - 0x01, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3b, - 0x2e, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x73, 0x6e, - 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x49, 0x92, 0x41, 0x10, 0x0a, 0x0e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x30, 0x2a, 0x2e, 0x2f, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x2d, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x70, 0x70, - 0x6c, 0x69, 0x65, 0x64, 0x42, 0xd5, 0x02, 0x92, 0x41, 0x9f, 0x02, 0x12, 0xc7, 0x01, 0x0a, 0x14, - 0x50, 0x4c, 0x47, 0x44, 0x20, 0x52, 0x75, 0x6c, 0x65, 0x20, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, - 0x20, 0x41, 0x50, 0x49, 0x12, 0x27, 0x41, 0x50, 0x49, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x20, 0x65, - 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x50, 0x4c, 0x47, 0x44, 0x22, 0x3a, 0x0a, - 0x08, 0x70, 0x6c, 0x67, 0x64, 0x2e, 0x64, 0x65, 0x76, 0x12, 0x1f, 0x68, 0x74, 0x74, 0x70, 0x73, - 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6c, - 0x67, 0x64, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x68, 0x75, 0x62, 0x1a, 0x0d, 0x69, 0x6e, 0x66, 0x6f, - 0x40, 0x70, 0x6c, 0x67, 0x64, 0x2e, 0x64, 0x65, 0x76, 0x2a, 0x45, 0x0a, 0x12, 0x41, 0x70, 0x61, - 0x63, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x32, 0x2e, 0x30, 0x12, - 0x2f, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6c, 0x67, 0x64, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x68, 0x75, 0x62, - 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x76, 0x32, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, - 0x32, 0x03, 0x31, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x15, 0x61, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6a, 0x73, 0x6f, - 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, - 0x73, 0x6f, 0x6e, 0x3a, 0x15, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6a, 0x73, 0x6f, 0x6e, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6c, 0x67, 0x64, 0x2d, 0x64, 0x65, 0x76, 0x2f, - 0x68, 0x75, 0x62, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x2d, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0x49, 0x92, 0x41, 0x10, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x73, 0x6e, + 0x69, 0x70, 0x70, 0x65, 0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x30, 0x01, 0x12, 0xe3, 0x01, + 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3b, 0x2e, + 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, + 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x44, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x73, 0x6e, 0x69, + 0x70, 0x70, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x49, 0x92, 0x41, 0x10, 0x0a, 0x0e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x30, 0x2a, 0x2e, 0x2f, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x2d, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x6c, + 0x69, 0x65, 0x64, 0x42, 0xd5, 0x02, 0x92, 0x41, 0x9f, 0x02, 0x12, 0xc7, 0x01, 0x0a, 0x14, 0x50, + 0x4c, 0x47, 0x44, 0x20, 0x52, 0x75, 0x6c, 0x65, 0x20, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x20, + 0x41, 0x50, 0x49, 0x12, 0x27, 0x41, 0x50, 0x49, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x20, 0x65, 0x6e, + 0x67, 0x69, 0x6e, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x50, 0x4c, 0x47, 0x44, 0x22, 0x3a, 0x0a, 0x08, + 0x70, 0x6c, 0x67, 0x64, 0x2e, 0x64, 0x65, 0x76, 0x12, 0x1f, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, + 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6c, 0x67, + 0x64, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x68, 0x75, 0x62, 0x1a, 0x0d, 0x69, 0x6e, 0x66, 0x6f, 0x40, + 0x70, 0x6c, 0x67, 0x64, 0x2e, 0x64, 0x65, 0x76, 0x2a, 0x45, 0x0a, 0x12, 0x41, 0x70, 0x61, 0x63, + 0x68, 0x65, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x32, 0x2e, 0x30, 0x12, 0x2f, + 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x70, 0x6c, 0x67, 0x64, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x68, 0x75, 0x62, 0x2f, + 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x76, 0x32, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, + 0x03, 0x31, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x15, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6a, 0x73, 0x6f, 0x6e, + 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, + 0x6f, 0x6e, 0x3a, 0x15, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6a, 0x73, 0x6f, 0x6e, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6c, 0x67, 0x64, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x68, + 0x75, 0x62, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x2d, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1662,39 +1670,37 @@ var file_snippet_service_pb_service_proto_depIdxs = []int32{ 17, // 5: snippetservice.pb.AppliedDeviceConfiguration.configuration_id:type_name -> snippetservice.pb.AppliedDeviceConfiguration.RelationTo 17, // 6: snippetservice.pb.AppliedDeviceConfiguration.condition_id:type_name -> snippetservice.pb.AppliedDeviceConfiguration.RelationTo 16, // 7: snippetservice.pb.AppliedDeviceConfiguration.resources:type_name -> snippetservice.pb.AppliedDeviceConfiguration.Resource - 1, // 8: snippetservice.pb.GetAppliedDeviceConfigurationsRequest.configuration_id_filter:type_name -> snippetservice.pb.IDFilter - 1, // 9: snippetservice.pb.GetAppliedDeviceConfigurationsRequest.condition_id_filter:type_name -> snippetservice.pb.IDFilter - 18, // 10: snippetservice.pb.Configuration.Resource.content:type_name -> resourceaggregate.pb.Content - 19, // 11: snippetservice.pb.AppliedDeviceConfiguration.Resource.resource_id:type_name -> resourceaggregate.pb.ResourceId - 0, // 12: snippetservice.pb.AppliedDeviceConfiguration.Resource.status:type_name -> snippetservice.pb.AppliedDeviceConfiguration.Resource.Status - 20, // 13: snippetservice.pb.AppliedDeviceConfiguration.Resource.resource_updated:type_name -> resourceaggregate.pb.ResourceUpdated - 2, // 14: snippetservice.pb.SnippetService.CreateCondition:input_type -> snippetservice.pb.Condition - 3, // 15: snippetservice.pb.SnippetService.GetConditions:input_type -> snippetservice.pb.GetConditionsRequest - 4, // 16: snippetservice.pb.SnippetService.DeleteConditions:input_type -> snippetservice.pb.DeleteConditionsRequest - 2, // 17: snippetservice.pb.SnippetService.UpdateCondition:input_type -> snippetservice.pb.Condition - 6, // 18: snippetservice.pb.SnippetService.CreateConfiguration:input_type -> snippetservice.pb.Configuration - 7, // 19: snippetservice.pb.SnippetService.GetConfigurations:input_type -> snippetservice.pb.GetConfigurationsRequest - 8, // 20: snippetservice.pb.SnippetService.DeleteConfigurations:input_type -> snippetservice.pb.DeleteConfigurationsRequest - 6, // 21: snippetservice.pb.SnippetService.UpdateConfiguration:input_type -> snippetservice.pb.Configuration - 11, // 22: snippetservice.pb.SnippetService.InvokeConfiguration:input_type -> snippetservice.pb.InvokeConfigurationRequest - 12, // 23: snippetservice.pb.SnippetService.GetAppliedConfigurations:input_type -> snippetservice.pb.GetAppliedDeviceConfigurationsRequest - 13, // 24: snippetservice.pb.SnippetService.DeleteAppliedConfigurations:input_type -> snippetservice.pb.DeleteAppliedDeviceConfigurationsRequest - 2, // 25: snippetservice.pb.SnippetService.CreateCondition:output_type -> snippetservice.pb.Condition - 2, // 26: snippetservice.pb.SnippetService.GetConditions:output_type -> snippetservice.pb.Condition - 5, // 27: snippetservice.pb.SnippetService.DeleteConditions:output_type -> snippetservice.pb.DeleteConditionsResponse - 2, // 28: snippetservice.pb.SnippetService.UpdateCondition:output_type -> snippetservice.pb.Condition - 6, // 29: snippetservice.pb.SnippetService.CreateConfiguration:output_type -> snippetservice.pb.Configuration - 6, // 30: snippetservice.pb.SnippetService.GetConfigurations:output_type -> snippetservice.pb.Configuration - 9, // 31: snippetservice.pb.SnippetService.DeleteConfigurations:output_type -> snippetservice.pb.DeleteConfigurationsResponse - 6, // 32: snippetservice.pb.SnippetService.UpdateConfiguration:output_type -> snippetservice.pb.Configuration - 10, // 33: snippetservice.pb.SnippetService.InvokeConfiguration:output_type -> snippetservice.pb.AppliedDeviceConfiguration - 10, // 34: snippetservice.pb.SnippetService.GetAppliedConfigurations:output_type -> snippetservice.pb.AppliedDeviceConfiguration - 14, // 35: snippetservice.pb.SnippetService.DeleteAppliedConfigurations:output_type -> snippetservice.pb.DeleteAppliedDeviceConfigurationsResponse - 25, // [25:36] is the sub-list for method output_type - 14, // [14:25] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name + 18, // 8: snippetservice.pb.Configuration.Resource.content:type_name -> resourceaggregate.pb.Content + 19, // 9: snippetservice.pb.AppliedDeviceConfiguration.Resource.resource_id:type_name -> resourceaggregate.pb.ResourceId + 0, // 10: snippetservice.pb.AppliedDeviceConfiguration.Resource.status:type_name -> snippetservice.pb.AppliedDeviceConfiguration.Resource.Status + 20, // 11: snippetservice.pb.AppliedDeviceConfiguration.Resource.resource_updated:type_name -> resourceaggregate.pb.ResourceUpdated + 2, // 12: snippetservice.pb.SnippetService.CreateCondition:input_type -> snippetservice.pb.Condition + 3, // 13: snippetservice.pb.SnippetService.GetConditions:input_type -> snippetservice.pb.GetConditionsRequest + 4, // 14: snippetservice.pb.SnippetService.DeleteConditions:input_type -> snippetservice.pb.DeleteConditionsRequest + 2, // 15: snippetservice.pb.SnippetService.UpdateCondition:input_type -> snippetservice.pb.Condition + 6, // 16: snippetservice.pb.SnippetService.CreateConfiguration:input_type -> snippetservice.pb.Configuration + 7, // 17: snippetservice.pb.SnippetService.GetConfigurations:input_type -> snippetservice.pb.GetConfigurationsRequest + 8, // 18: snippetservice.pb.SnippetService.DeleteConfigurations:input_type -> snippetservice.pb.DeleteConfigurationsRequest + 6, // 19: snippetservice.pb.SnippetService.UpdateConfiguration:input_type -> snippetservice.pb.Configuration + 11, // 20: snippetservice.pb.SnippetService.InvokeConfiguration:input_type -> snippetservice.pb.InvokeConfigurationRequest + 12, // 21: snippetservice.pb.SnippetService.GetAppliedConfigurations:input_type -> snippetservice.pb.GetAppliedDeviceConfigurationsRequest + 13, // 22: snippetservice.pb.SnippetService.DeleteAppliedConfigurations:input_type -> snippetservice.pb.DeleteAppliedDeviceConfigurationsRequest + 2, // 23: snippetservice.pb.SnippetService.CreateCondition:output_type -> snippetservice.pb.Condition + 2, // 24: snippetservice.pb.SnippetService.GetConditions:output_type -> snippetservice.pb.Condition + 5, // 25: snippetservice.pb.SnippetService.DeleteConditions:output_type -> snippetservice.pb.DeleteConditionsResponse + 2, // 26: snippetservice.pb.SnippetService.UpdateCondition:output_type -> snippetservice.pb.Condition + 6, // 27: snippetservice.pb.SnippetService.CreateConfiguration:output_type -> snippetservice.pb.Configuration + 6, // 28: snippetservice.pb.SnippetService.GetConfigurations:output_type -> snippetservice.pb.Configuration + 9, // 29: snippetservice.pb.SnippetService.DeleteConfigurations:output_type -> snippetservice.pb.DeleteConfigurationsResponse + 6, // 30: snippetservice.pb.SnippetService.UpdateConfiguration:output_type -> snippetservice.pb.Configuration + 10, // 31: snippetservice.pb.SnippetService.InvokeConfiguration:output_type -> snippetservice.pb.AppliedDeviceConfiguration + 10, // 32: snippetservice.pb.SnippetService.GetAppliedConfigurations:output_type -> snippetservice.pb.AppliedDeviceConfiguration + 14, // 33: snippetservice.pb.SnippetService.DeleteAppliedConfigurations:output_type -> snippetservice.pb.DeleteAppliedDeviceConfigurationsResponse + 23, // [23:34] is the sub-list for method output_type + 12, // [12:23] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name } func init() { file_snippet_service_pb_service_proto_init() } diff --git a/snippet-service/pb/service.swagger.json b/snippet-service/pb/service.swagger.json index 819f601ee..f26643b38 100644 --- a/snippet-service/pb/service.swagger.json +++ b/snippet-service/pb/service.swagger.json @@ -57,6 +57,18 @@ } } }, + "parameters": [ + { + "name": "configurationIdFitler", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + } + ], "tags": [ "Conditions" ] @@ -282,6 +294,16 @@ }, "collectionFormat": "multi" }, + { + "name": "configurationIdFilter", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, { "name": "deviceIdFilter", "in": "query", @@ -291,6 +313,16 @@ "type": "string" }, "collectionFormat": "multi" + }, + { + "name": "conditionIdFilter", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" } ], "tags": [ diff --git a/snippet-service/service/grpc/server.go b/snippet-service/service/grpc/server.go index 039da57ba..87cd1d1af 100644 --- a/snippet-service/service/grpc/server.go +++ b/snippet-service/service/grpc/server.go @@ -95,10 +95,26 @@ func errCannotGetConfigurations(err error) error { func sendConfigurations(ctx context.Context, srv pb.SnippetService_GetConfigurationsServer, iter store.Iterator[store.Configuration]) error { storedCfg := store.Configuration{} for iter.Next(ctx, &storedCfg) { + var lastVersion *store.ConfigurationVersion for i := range storedCfg.Versions { - errS := srv.Send(storedCfg.GetConfiguration(i)) - if errS != nil { - return errS + err := srv.Send(storedCfg.GetConfiguration(i)) + if err != nil { + return err + } + lastVersion = &storedCfg.Versions[i] + } + if storedCfg.Latest != nil { + latest, err := storedCfg.GetLatest() + if err != nil { + return err + } + if lastVersion != nil && lastVersion.Version == latest.GetVersion() { + // already sent when iterating over versions array + continue + } + err = srv.Send(latest) + if err != nil { + return err } } } diff --git a/snippet-service/service/http/getConditions_test.go b/snippet-service/service/http/getConditions_test.go index 505d9018e..7143fd62d 100644 --- a/snippet-service/service/http/getConditions_test.go +++ b/snippet-service/service/http/getConditions_test.go @@ -24,7 +24,7 @@ import ( ) func TestRequestHandlerGetConditions(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), config.TEST_TIMEOUT*100) + ctx, cancel := context.WithTimeout(context.Background(), config.TEST_TIMEOUT) defer cancel() shutDown := service.SetUpServices(context.Background(), t, service.SetUpServicesOAuth) diff --git a/snippet-service/service/http/updateConfiguration_test.go b/snippet-service/service/http/updateConfiguration_test.go index 110ebc85a..6dbef68ac 100644 --- a/snippet-service/service/http/updateConfiguration_test.go +++ b/snippet-service/service/http/updateConfiguration_test.go @@ -74,6 +74,7 @@ func TestRequestHandlerUpdateConfiguration(t *testing.T) { id: conf.GetId(), conf: &snippetPb.Configuration{ Version: 1, + Name: "updated1", Resources: []*snippetPb.Configuration_Resource{ makeTestResource(t, "/test/1", 42), makeTestResource(t, "/test/2", 52), @@ -90,6 +91,7 @@ func TestRequestHandlerUpdateConfiguration(t *testing.T) { conf: &snippetPb.Configuration{ Version: 2, Owner: oauthService.DeviceUserID, + Name: "updated2", Resources: []*snippetPb.Configuration_Resource{ makeTestResource(t, "/test/3", 62), }, @@ -105,6 +107,7 @@ func TestRequestHandlerUpdateConfiguration(t *testing.T) { conf: &snippetPb.Configuration{ Id: uuid.NewString(), // this ID will get overwritten by the ID in the query Version: 3, + Name: "updated3", Resources: []*snippetPb.Configuration_Resource{ makeTestResource(t, "/test/4", 72), makeTestResource(t, "/test/5", 82), diff --git a/snippet-service/store/configuration.go b/snippet-service/store/configuration.go index 2f9523b36..66d4978be 100644 --- a/snippet-service/store/configuration.go +++ b/snippet-service/store/configuration.go @@ -34,45 +34,93 @@ func ValidateAndNormalizeConfiguration(c *pb.Configuration, isUpdate bool) error } type ConfigurationVersion struct { + Name string `bson:"name,omitempty"` Version uint64 `bson:"version"` Resources []*pb.Configuration_Resource `bson:"resources"` + Timestamp int64 `bson:"timestamp"` +} + +func (cv *ConfigurationVersion) Copy() ConfigurationVersion { + c := ConfigurationVersion{ + Name: cv.Name, + Version: cv.Version, + Timestamp: cv.Timestamp, + } + for _, r := range cv.Resources { + c.Resources = append(c.Resources, r.Clone()) + } + return c +} + +func MakeConfigurationVersion2(c *pb.Configuration) ConfigurationVersion { + return ConfigurationVersion{ + Name: c.GetName(), + Version: c.GetVersion(), + Resources: c.GetResources(), + Timestamp: c.GetTimestamp(), + } } type Configuration struct { - Id string `bson:"_id"` - Name string `bson:"name,omitempty"` - Owner string `bson:"owner"` - Timestamp int64 `bson:"timestamp"` - Versions []ConfigurationVersion `bson:"versions,omitempty"` + Id string `bson:"_id"` + Owner string `bson:"owner"` + Latest *ConfigurationVersion `bson:"latest,omitempty"` + Versions []ConfigurationVersion `bson:"versions,omitempty"` } -func MakeConfiguration(c *pb.Configuration) Configuration { - return Configuration{ - Id: c.GetId(), +func MakeFirstConfiguration2(c *pb.Configuration) Configuration { + version := ConfigurationVersion{ Name: c.GetName(), - Owner: c.GetOwner(), - Timestamp: GetTimestampOrNow(c.GetTimestamp()), - Versions: []ConfigurationVersion{{Version: c.GetVersion(), Resources: c.GetResources()}}, + Version: c.GetVersion(), + Resources: c.GetResources(), + Timestamp: c.GetTimestamp(), + } + + return Configuration{ + Id: c.GetId(), + Owner: c.GetOwner(), + Latest: &version, + Versions: []ConfigurationVersion{version}, } } -func (c *Configuration) Clone() *Configuration { - return &Configuration{ +func (c *Configuration) GetLatest() (*pb.Configuration, error) { + if c.Latest == nil { + return nil, errors.New("latest configuration not set") + } + return &pb.Configuration{ Id: c.Id, - Name: c.Name, Owner: c.Owner, - Timestamp: c.Timestamp, - Versions: slices.Clone(c.Versions), - } + Version: c.Latest.Version, + Name: c.Latest.Name, + Resources: c.Latest.Resources, + Timestamp: c.Latest.Timestamp, + }, nil } -func (c *Configuration) GetConfiguration(version int) *pb.Configuration { +func (c *Configuration) GetConfiguration(index int) *pb.Configuration { return &pb.Configuration{ Id: c.Id, - Name: c.Name, Owner: c.Owner, - Timestamp: c.Timestamp, - Version: c.Versions[version].Version, - Resources: c.Versions[version].Resources, + Name: c.Versions[index].Name, + Timestamp: c.Versions[index].Timestamp, + Version: c.Versions[index].Version, + Resources: c.Versions[index].Resources, + } +} + +func (c *Configuration) Clone() *Configuration { + c2 := &Configuration{ + Id: c.Id, + Owner: c.Owner, + } + if c.Latest != nil { + latest := c.Latest.Copy() + c2.Latest = &latest + } + + for _, v := range c.Versions { + c2.Versions = append(c2.Versions, v.Copy()) } + return c2 } diff --git a/snippet-service/store/cqldb/configuration.go b/snippet-service/store/cqldb/configuration.go index 92910bc47..46943123b 100644 --- a/snippet-service/store/cqldb/configuration.go +++ b/snippet-service/store/cqldb/configuration.go @@ -11,14 +11,14 @@ func (s *Store) CreateConfiguration(context.Context, *pb.Configuration) (*pb.Con return nil, store.ErrNotSupported } -func (s *Store) DeleteConfigurations(context.Context, string, *pb.DeleteConfigurationsRequest) (int64, error) { - return 0, store.ErrNotSupported +func (s *Store) UpdateConfiguration(context.Context, *pb.Configuration) (*pb.Configuration, error) { + return nil, store.ErrNotSupported } func (s *Store) GetConfigurations(context.Context, string, *pb.GetConfigurationsRequest, store.ProcessConfigurations) error { return store.ErrNotSupported } -func (s *Store) UpdateConfiguration(context.Context, *pb.Configuration) (*pb.Configuration, error) { - return nil, store.ErrNotSupported +func (s *Store) DeleteConfigurations(context.Context, string, *pb.DeleteConfigurationsRequest) (int64, error) { + return 0, store.ErrNotSupported } diff --git a/snippet-service/store/mongodb/condition.go b/snippet-service/store/mongodb/condition.go index 437b98996..ec529da82 100644 --- a/snippet-service/store/mongodb/condition.go +++ b/snippet-service/store/mongodb/condition.go @@ -193,7 +193,7 @@ func (s *Store) getConditionsByFind(ctx context.Context, owner string, idfAlls [ func (s *Store) getConditionsByAggregation(ctx context.Context, owner, id string, vf pb.VersionFilter, p store.ProcessConditions) error { pl := mongo.Pipeline{bson.D{{Key: "$match", Value: addMatchCondition(owner, id)}}} - pl = getVersionsPipeline(pl, vf, false) + pl = getVersionsPipelineObsolete(pl, vf, false) cur, err := s.Collection(conditionsCol).Aggregate(ctx, pl) if err != nil { return err @@ -218,5 +218,5 @@ func (s *Store) GetConditions(ctx context.Context, owner string, query *pb.GetCo } func (s *Store) DeleteConditions(ctx context.Context, owner string, query *pb.DeleteConditionsRequest) (int64, error) { - return s.delete(ctx, conditionsCol, owner, query.GetIdFilter()) + return s.deleteObsolete(ctx, conditionsCol, owner, query.GetIdFilter()) } diff --git a/snippet-service/store/mongodb/configuration.go b/snippet-service/store/mongodb/configuration.go index d26e2e18d..c7456650b 100644 --- a/snippet-service/store/mongodb/configuration.go +++ b/snippet-service/store/mongodb/configuration.go @@ -10,22 +10,9 @@ import ( "github.com/plgd-dev/hub/v2/snippet-service/store" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" ) -func toConfiguration(c *store.Configuration) *pb.Configuration { - conf := &pb.Configuration{ - Id: c.Id, - Name: c.Name, - Owner: c.Owner, - Timestamp: c.Timestamp, - } - if len(c.Versions) > 0 { - conf.Version = c.Versions[0].Version - conf.Resources = c.Versions[0].Resources - } - return conf -} - func (s *Store) CreateConfiguration(ctx context.Context, conf *pb.Configuration) (*pb.Configuration, error) { if err := store.ValidateAndNormalizeConfiguration(conf, false); err != nil { return nil, err @@ -35,12 +22,12 @@ func (s *Store) CreateConfiguration(ctx context.Context, conf *pb.Configuration) newConf.Id = uuid.NewString() } newConf.Timestamp = time.Now().UnixNano() - storeConf := store.MakeConfiguration(newConf) + storeConf := store.MakeFirstConfiguration2(newConf) _, err := s.Collection(configurationsCol).InsertOne(ctx, storeConf) if err != nil { return nil, err } - return toConfiguration(&storeConf), nil + return storeConf.GetLatest() } func (s *Store) UpdateConfiguration(ctx context.Context, conf *pb.Configuration) (*pb.Configuration, error) { @@ -50,32 +37,79 @@ func (s *Store) UpdateConfiguration(ctx context.Context, conf *pb.Configuration) filter := bson.M{ store.IDKey: conf.GetId(), store.OwnerKey: conf.GetOwner(), - store.VersionsKey + "." + store.VersionKey: bson.M{"$ne": conf.GetVersion()}, } + // if version is not set -> set it to latest + 1 + insertVersion := conf.GetVersion() == 0 + if !insertVersion { + // if is set -> it must be higher than the latest.version + filter[store.LatestKey+"."+store.VersionKey] = bson.M{"$lt": conf.GetVersion()} + } + ts := time.Now().UnixNano() - set := bson.M{ + latest := bson.M{ + store.VersionKey: conf.GetVersion(), + store.ResourcesKey: conf.GetResources(), store.TimestampKey: ts, } - update := bson.M{ - "$push": bson.M{ - "versions": store.ConfigurationVersion{ - Version: conf.GetVersion(), - Resources: conf.GetResources(), + if conf.GetName() != "" { + latest[store.NameKey] = conf.GetName() + } + if insertVersion { + // if version is not set -> set it to latest + 1 + latest[store.VersionKey] = bson.M{ + "$add": bson.A{ + bson.M{"$ifNull": bson.A{"$" + store.LatestKey + "." + store.VersionKey, 0}}, + 1, + }, + } + } + + setVersions := bson.M{ + "$concatArrays": bson.A{ + bson.M{ + "$ifNull": bson.A{ + "$versions", + bson.A{}, + }, + }, + bson.A{ + bson.M{ + store.NameKey: "$latest.name", + store.VersionKey: "$latest.version", + store.ResourcesKey: "$latest.resources", + store.TimestampKey: "$latest.timestamp", + }, }, }, - "$set": set, } - upd, err := s.Collection(configurationsCol).UpdateOne(ctx, filter, update) + + update := mongo.Pipeline{ + bson.D{{Key: "$set", Value: bson.M{ + store.LatestKey: latest, + }}}, + bson.D{{Key: "$set", Value: bson.M{ + store.VersionsKey: setVersions, + }}}, + } + + opts := options.FindOneAndUpdate().SetReturnDocument(options.After).SetProjection( + bson.M{store.VersionsKey: false}, + ) + result := s.Collection(configurationsCol).FindOneAndUpdate(ctx, filter, update, opts) + if result.Err() != nil { + return nil, result.Err() + } + + updatedCfg := &store.Configuration{} + err := result.Decode(&updatedCfg) if err != nil { return nil, err } - if upd.MatchedCount == 0 { - return nil, store.ErrNotFound - } - return conf, nil + return updatedCfg.GetLatest() } func (s *Store) getConfigurationsByFind(ctx context.Context, owner string, idfAlls []string, p store.ProcessConfigurations) error { + // opts := options.Find().SetProjection(bson.M{store.LatestKey: false}) cur, err := s.Collection(configurationsCol).Find(ctx, toIdFilterQuery(owner, idfAlls)) if err != nil { return err @@ -83,9 +117,44 @@ func (s *Store) getConfigurationsByFind(ctx context.Context, owner string, idfAl return processCursor(ctx, cur, p) } +func getVersionsPipeline(pl mongo.Pipeline, vf pb.VersionFilter, exclude bool) mongo.Pipeline { + versions := make([]interface{}, 0, len(vf.Versions())+1) + for _, version := range vf.Versions() { + versions = append(versions, version) + } + if vf.Latest() { + versions = append(versions, "$latest.version") + } + cond := bson.M{"$in": bson.A{"$$version.version", versions}} + if exclude { + cond = bson.M{"$not": cond} + } + pl = append(pl, bson.D{{Key: "$addFields", Value: bson.M{ + "versions": bson.M{ + "$filter": bson.M{ + "input": "$versions", + "as": "version", + "cond": cond, + }, + }, + }}}) + return pl +} + func (s *Store) getConfigurationsByAggregation(ctx context.Context, owner, id string, vf pb.VersionFilter, p store.ProcessConfigurations) error { pl := mongo.Pipeline{bson.D{{Key: "$match", Value: addMatchCondition(owner, id)}}} - pl = getVersionsPipeline(pl, vf, false) + project := bson.M{} + if len(vf.Versions()) == 0 { + project[store.VersionsKey] = false + } else { + pl = getVersionsPipeline(pl, vf, false) + } + if !vf.Latest() { + project[store.LatestKey] = false + } + if len(project) > 0 { + pl = append(pl, bson.D{{Key: "$project", Value: project}}) + } cur, err := s.Collection(configurationsCol).Aggregate(ctx, pl) if err != nil { return err @@ -112,3 +181,51 @@ func (s *Store) GetConfigurations(ctx context.Context, owner string, query *pb.G func (s *Store) DeleteConfigurations(ctx context.Context, owner string, query *pb.DeleteConfigurationsRequest) (int64, error) { return s.delete(ctx, configurationsCol, owner, query.GetIdFilter()) } + +func (s *Store) deleteVersion(ctx context.Context, collection, owner string, id string, vf pb.VersionFilter) error { + pl := getVersionsPipeline(mongo.Pipeline{}, vf, true) + // unset latest + pl = append(pl, bson.D{{Key: "$unset", Value: store.LatestKey}}) + // take last element from versions array as latest (if it exists) + pl = append(pl, bson.D{{Key: "$set", Value: bson.M{ + store.LatestKey: bson.D{{ + Key: "$arrayElemAt", + Value: bson.A{"$versions", -1}, + }}, + }}}) + _, err := s.Collection(collection).UpdateMany(ctx, addMatchCondition(owner, id), pl) + // TODO: delete document if no versions remain in the array + return err +} + +func (s *Store) deleteDocument(ctx context.Context, collection, owner string, idfAlls []string) error { + _, err := s.Collection(collection).DeleteMany(ctx, toIdFilterQuery(owner, idfAlls)) + return err +} + +func (s *Store) delete(ctx context.Context, collection, owner string, filter []*pb.IDFilter) (int64, error) { + success := false + idVersionAll, idVersions := pb.PartitionIDFilter(filter) + var errors *multierror.Error + if len(idVersionAll) > 0 || len(idVersions) == 0 { + err := s.deleteDocument(ctx, collection, owner, idVersionAll) + if err == nil { + success = true + } + errors = multierror.Append(errors, err) + } + if len(idVersions) > 0 { + for id, vf := range idVersions { + err := s.deleteVersion(ctx, collection, owner, id, vf) + if err == nil { + success = true + } + errors = multierror.Append(errors, err) + } + } + return toDeleteResult(errors.ErrorOrNil(), success) +} + +func (s *Store) DeleteConfigurations2(ctx context.Context, owner string, query *pb.DeleteConfigurationsRequest) (int64, error) { + return s.delete(ctx, configurationsCol, owner, query.GetIdFilter()) +} diff --git a/snippet-service/store/mongodb/createConfiguration_test.go b/snippet-service/store/mongodb/createConfiguration_test.go index 1562688ec..18f73ea98 100644 --- a/snippet-service/store/mongodb/createConfiguration_test.go +++ b/snippet-service/store/mongodb/createConfiguration_test.go @@ -32,7 +32,7 @@ func TestStoreCreateConfiguration(t *testing.T) { s, cleanUpStore := test.NewMongoStore(t) defer cleanUpStore() - ctx, cancel := context.WithTimeout(context.Background(), config.TEST_TIMEOUT*100) + ctx, cancel := context.WithTimeout(context.Background(), config.TEST_TIMEOUT) defer cancel() confID := uuid.NewString() @@ -94,7 +94,6 @@ func TestStoreCreateConfiguration(t *testing.T) { Id: confID, Name: "valid", Owner: owner, - Version: 0, Resources: resources, }, }, @@ -103,7 +102,6 @@ func TestStoreCreateConfiguration(t *testing.T) { Id: confID, Name: "valid", Owner: owner, - Version: 0, Resources: resources, } test.CmpConfiguration(t, wantCfg, got, true) @@ -115,7 +113,7 @@ func TestStoreCreateConfiguration(t *testing.T) { create: &pb.Configuration{ Name: "valid", Owner: owner, - Version: 0, + Version: 37, Resources: resources, }, }, @@ -124,7 +122,7 @@ func TestStoreCreateConfiguration(t *testing.T) { Id: got.GetId(), Name: "valid", Owner: owner, - Version: 0, + Version: 37, Resources: resources, } test.CmpConfiguration(t, wantCfg, got, true) diff --git a/snippet-service/store/mongodb/deleteConfigurations_test.go b/snippet-service/store/mongodb/deleteConfigurations_test.go index 38d251a96..5a1b347c1 100644 --- a/snippet-service/store/mongodb/deleteConfigurations_test.go +++ b/snippet-service/store/mongodb/deleteConfigurations_test.go @@ -3,17 +3,17 @@ package mongodb_test import ( "context" "testing" + "time" "github.com/plgd-dev/hub/v2/snippet-service/pb" "github.com/plgd-dev/hub/v2/snippet-service/store" "github.com/plgd-dev/hub/v2/snippet-service/store/mongodb" "github.com/plgd-dev/hub/v2/snippet-service/test" - "github.com/plgd-dev/hub/v2/test/config" "github.com/stretchr/testify/require" ) func TestStoreDeleteConfigurations(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), config.TEST_TIMEOUT) + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() getConfigurations := func(t *testing.T, s *mongodb.Store, owner string, query *pb.GetConfigurationsRequest) []*store.Configuration { @@ -29,6 +29,15 @@ func TestStoreDeleteConfigurations(t *testing.T) { return configurations } + getConfigurationsMap := func(t *testing.T, s *mongodb.Store, owner string, query *pb.GetConfigurationsRequest) map[string]store.Configuration { + confs := getConfigurations(t, s, owner, query) + confsMap := make(map[string]store.Configuration) + for _, conf := range confs { + confsMap[conf.Id] = *conf + } + return confsMap + } + type args struct { owner string query *pb.DeleteConfigurationsRequest @@ -171,20 +180,15 @@ func TestStoreDeleteConfigurations(t *testing.T) { }, }, want: func(t *testing.T, s *mongodb.Store, stored map[string]store.Configuration) { - storedLatest := make(map[string]store.ConfigurationVersion) - storedCount := 0 - for _, conf := range stored { - storedLatest[conf.Id] = conf.Versions[len(conf.Versions)-1] - storedCount += len(conf.Versions) + for id, conf := range stored { + conf.Versions = conf.Versions[:len(conf.Versions)-1] + latest := conf.Versions[len(conf.Versions)-1].Copy() + conf.Latest = &latest + stored[id] = conf } - confs := getConfigurations(t, s, "", nil) - require.NotEmpty(t, confs) - count := 0 - for _, conf := range confs { - require.NotEqual(t, storedLatest[conf.Id], conf.Versions[len(conf.Versions)-1]) - count += len(conf.Versions) - } - require.Equal(t, storedCount-len(storedLatest), count) + confsMap := getConfigurationsMap(t, s, "", nil) + require.NotEmpty(t, confsMap) + test.CmpStoredConfigurationMaps(t, stored, confsMap) }, }, { @@ -213,26 +217,18 @@ func TestStoreDeleteConfigurations(t *testing.T) { }, }, want: func(t *testing.T, s *mongodb.Store, stored map[string]store.Configuration) { - storedLatest := make(map[string]store.ConfigurationVersion) - storedCount := 0 - for _, conf := range stored { - storedLatest[conf.Id] = conf.Versions[len(conf.Versions)-1] - storedCount += len(conf.Versions) - } - confs := getConfigurations(t, s, "", nil) - require.NotEmpty(t, confs) - count := 0 - removed := 0 - for _, conf := range confs { - if conf.Owner == test.Owner(1) { - require.NotEqual(t, storedLatest[conf.Id], conf.Versions[len(conf.Versions)-1]) - removed++ - } else { - require.Equal(t, storedLatest[conf.Id], conf.Versions[len(conf.Versions)-1]) + for id, conf := range stored { + if conf.Owner != test.Owner(1) { + continue } - count += len(conf.Versions) + conf.Versions = conf.Versions[:len(conf.Versions)-1] + latest := conf.Versions[len(conf.Versions)-1].Copy() + conf.Latest = &latest + stored[id] = conf } - require.Equal(t, storedCount-removed, count) + confsMap := getConfigurationsMap(t, s, "", nil) + require.NotEmpty(t, confsMap) + test.CmpStoredConfigurationMaps(t, stored, confsMap) }, }, { @@ -251,11 +247,7 @@ func TestStoreDeleteConfigurations(t *testing.T) { }, }, want: func(t *testing.T, s *mongodb.Store, stored map[string]store.Configuration) { - confs := getConfigurations(t, s, "", nil) - confsMap := make(map[string]store.Configuration) - for _, conf := range confs { - confsMap[conf.Id] = *conf - } + confsMap := getConfigurationsMap(t, s, "", nil) test.CmpStoredConfigurationMaps(t, stored, confsMap) }, }, @@ -274,11 +266,7 @@ func TestStoreDeleteConfigurations(t *testing.T) { }, }, want: func(t *testing.T, s *mongodb.Store, stored map[string]store.Configuration) { - confs := getConfigurations(t, s, "", nil) - confsMap := make(map[string]store.Configuration) - for _, conf := range confs { - confsMap[conf.Id] = *conf - } + confsMap := getConfigurationsMap(t, s, "", nil) for _, conf := range stored { versions := make([]store.ConfigurationVersion, 0) for _, version := range conf.Versions { @@ -317,11 +305,7 @@ func TestStoreDeleteConfigurations(t *testing.T) { }, }, want: func(t *testing.T, s *mongodb.Store, stored map[string]store.Configuration) { - confs := getConfigurations(t, s, "", nil) - confsMap := make(map[string]store.Configuration) - for _, conf := range confs { - confsMap[conf.Id] = *conf - } + confsMap := getConfigurationsMap(t, s, "", nil) for _, conf := range stored { if conf.Owner == test.Owner(2) { versions := make([]store.ConfigurationVersion, 0) @@ -349,7 +333,7 @@ func TestStoreDeleteConfigurations(t *testing.T) { inserted := test.AddConfigurationsToStore(ctx, t, s, 500, func(iteration int) uint64 { return uint64(iteration * 100) }) - _, err := s.DeleteConfigurations(ctx, tt.args.owner, tt.args.query) + _, err := s.DeleteConfigurations2(ctx, tt.args.owner, tt.args.query) if tt.wantErr { require.Error(t, err) return diff --git a/snippet-service/store/mongodb/getConfigurations_test.go b/snippet-service/store/mongodb/getConfigurations_test.go index 8d23c9500..23a95d474 100644 --- a/snippet-service/store/mongodb/getConfigurations_test.go +++ b/snippet-service/store/mongodb/getConfigurations_test.go @@ -39,6 +39,11 @@ func TestStoreGetConfigurations(t *testing.T) { }, want: func(t *testing.T, configurations []*store.Configuration) { require.Len(t, configurations, len(confs)) + for _, c := range configurations { + conf, ok := confs[c.Id] + require.True(t, ok) + test.CmpStoredConfiguration(t, &conf, c, true, true) + } }, }, { @@ -53,7 +58,7 @@ func TestStoreGetConfigurations(t *testing.T) { require.Equal(t, test.Owner(0), c.Owner) conf, ok := confs[c.Id] require.True(t, ok) - test.CmpStoredConfiguration(t, &conf, c, true) + test.CmpStoredConfiguration(t, &conf, c, true, true) } }, }, @@ -77,7 +82,7 @@ func TestStoreGetConfigurations(t *testing.T) { c := configurations[0] conf, ok := confs[c.Id] require.True(t, ok) - test.CmpStoredConfiguration(t, &conf, c, true) + test.CmpStoredConfiguration(t, &conf, c, true, true) }, }, { @@ -102,7 +107,7 @@ func TestStoreGetConfigurations(t *testing.T) { require.True(t, ok) require.Equal(t, test.ConfigurationID(2), conf.Id) require.Equal(t, test.Owner(2), conf.Owner) - test.CmpStoredConfiguration(t, &conf, c, true) + test.CmpStoredConfiguration(t, &conf, c, true, true) }, }, { @@ -121,9 +126,12 @@ func TestStoreGetConfigurations(t *testing.T) { want: func(t *testing.T, configurations []*store.Configuration) { require.Len(t, configurations, test.RuntimeConfig.NumConfigurations) for _, c := range configurations { - _, ok := confs[c.Id] + conf, ok := confs[c.Id] require.True(t, ok) - require.Len(t, c.Versions, 1) + require.Equal(t, conf.Id, c.Id) + require.Equal(t, conf.Owner, c.Owner) + require.Empty(t, c.Versions) + test.CmpJSON(t, conf.Latest, c.Latest) } }, }, @@ -147,7 +155,8 @@ func TestStoreGetConfigurations(t *testing.T) { conf, ok := confs[c.Id] require.True(t, ok) require.Equal(t, test.Owner(1), conf.Owner) - require.Len(t, c.Versions, 1) + require.Empty(t, c.Versions) + test.CmpJSON(t, conf.Latest, c.Latest) } }, }, @@ -171,7 +180,7 @@ func TestStoreGetConfigurations(t *testing.T) { }, }, { - name: "owner2{latest, id2/latest, id5/latest} - non-matching owner", args: args{ + name: "owner2{latest, id2/latest, id5/latest}", args: args{ owner: test.Owner(2), query: &pb.GetConfigurationsRequest{ IdFilter: []*pb.IDFilter{ @@ -201,12 +210,14 @@ func TestStoreGetConfigurations(t *testing.T) { conf, ok := confs[c.Id] require.True(t, ok) require.Equal(t, test.Owner(2), conf.Owner) - require.Len(t, c.Versions, 1) + require.Empty(t, c.Versions) + test.CmpJSON(t, conf.Latest, c.Latest) } }, }, { - name: "version/42", args: args{ + name: "version/42", + args: args{ query: &pb.GetConfigurationsRequest{ IdFilter: []*pb.IDFilter{ { @@ -278,6 +289,41 @@ func TestStoreGetConfigurations(t *testing.T) { } }, }, + { + name: "id0/version/{1..max} + latest", + args: args{ + query: &pb.GetConfigurationsRequest{ + IdFilter: func() []*pb.IDFilter { + var idFilters []*pb.IDFilter + c := confs[test.ConfigurationID(0)] + for _, v := range c.Versions { + idFilters = append(idFilters, &pb.IDFilter{ + Id: test.ConfigurationID(0), + Version: &pb.IDFilter_Value{ + Value: v.Version, + }, + }) + } + idFilters = append(idFilters, &pb.IDFilter{ + Id: test.ConfigurationID(0), + Version: &pb.IDFilter_Latest{ + Latest: true, + }, + }) + return idFilters + }(), + }, + }, + want: func(t *testing.T, configurations []*store.Configuration) { + require.Len(t, configurations, 1) + for _, c := range configurations { + conf, ok := confs[c.Id] + require.True(t, ok) + require.Equal(t, test.ConfigurationID(0), conf.Id) + test.CmpStoredConfiguration(t, &conf, c, true, false) + } + }, + }, } for _, tt := range tests { diff --git a/snippet-service/store/mongodb/store.go b/snippet-service/store/mongodb/store.go index 6a5ecea22..04bfee2d3 100644 --- a/snippet-service/store/mongodb/store.go +++ b/snippet-service/store/mongodb/store.go @@ -22,7 +22,7 @@ type Store struct { const ( conditionsCol = "conditions" - configurationsCol = "configurations" + configurationsCol = "configurations2" ) var idVersionUniqueIndex = mongo.IndexModel{ @@ -41,7 +41,7 @@ func New(ctx context.Context, cfg *Config, fileWatcher *fsnotify.Watcher, logger m, err := pkgMongo.NewStoreWithCollections(ctx, &cfg.Mongo, certManager.GetTLSConfig(), tracerProvider, map[string][]mongo.IndexModel{ conditionsCol: {idVersionUniqueIndex}, - configurationsCol: {idVersionUniqueIndex}, + configurationsCol: nil, }) if err != nil { certManager.Close() diff --git a/snippet-service/store/mongodb/updateConfiguration_test.go b/snippet-service/store/mongodb/updateConfiguration_test.go index 95c65c034..669b97d7c 100644 --- a/snippet-service/store/mongodb/updateConfiguration_test.go +++ b/snippet-service/store/mongodb/updateConfiguration_test.go @@ -18,16 +18,16 @@ func TestStoreUpdateConfiguration(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), config.TEST_TIMEOUT) defer cancel() - confID := uuid.New().String() + confID := uuid.NewString() const owner = "owner1" resources := []*pb.Configuration_Resource{ makeLightResourceConfiguration(t, "1", 1, 1337), } - _, err := s.CreateConfiguration(ctx, &pb.Configuration{ + conf, err := s.CreateConfiguration(ctx, &pb.Configuration{ Id: confID, Name: "valid", Owner: owner, - Version: 0, + Version: 13, Resources: resources, }) require.NoError(t, err) @@ -45,7 +45,7 @@ func TestStoreUpdateConfiguration(t *testing.T) { name: "non-matching owner", args: args{ update: &pb.Configuration{ - Id: confID, + Id: conf.GetId(), Owner: "invalid", Version: 0, Resources: resources, @@ -57,9 +57,21 @@ func TestStoreUpdateConfiguration(t *testing.T) { name: "duplicit version", args: args{ update: &pb.Configuration{ - Id: confID, - Owner: owner, - Version: 0, + Id: conf.GetId(), + Owner: conf.GetOwner(), + Version: 13, + Resources: resources, + }, + }, + wantErr: true, + }, + { + name: "invalid version", + args: args{ + update: &pb.Configuration{ + Id: conf.GetId(), + Owner: conf.GetOwner(), + Version: conf.GetVersion() - 1, // version must be higher than the latest one Resources: resources, }, }, @@ -69,7 +81,7 @@ func TestStoreUpdateConfiguration(t *testing.T) { name: "missing ID", args: args{ update: &pb.Configuration{ - Owner: owner, + Owner: conf.GetOwner(), Version: 1, Resources: resources, }, @@ -80,16 +92,17 @@ func TestStoreUpdateConfiguration(t *testing.T) { name: "valid", args: args{ update: &pb.Configuration{ - Id: confID, - Owner: owner, - Version: 1, + Id: conf.GetId(), + Owner: conf.GetOwner(), Resources: []*pb.Configuration_Resource{ makeLightResourceConfiguration(t, "2", 2, 42), }, }, }, - want: func(*testing.T, *pb.Configuration) { - // TODO: check the updated configuration + want: func(t *testing.T, updatedConf *pb.Configuration) { + require.Equal(t, conf.GetId(), updatedConf.GetId()) + require.Equal(t, conf.GetOwner(), updatedConf.GetOwner()) + require.Equal(t, conf.GetVersion()+1, updatedConf.GetVersion()) }, }, } diff --git a/snippet-service/store/mongodb/utility.go b/snippet-service/store/mongodb/utility.go index a5490b993..40feaef87 100644 --- a/snippet-service/store/mongodb/utility.go +++ b/snippet-service/store/mongodb/utility.go @@ -39,7 +39,7 @@ func addLatestVersionField() bson.D { }}} } -func getVersionsPipeline(pl mongo.Pipeline, vf pb.VersionFilter, exclude bool) mongo.Pipeline { +func getVersionsPipelineObsolete(pl mongo.Pipeline, vf pb.VersionFilter, exclude bool) mongo.Pipeline { versions := make([]interface{}, 0, len(vf.Versions())+1) for _, version := range vf.Versions() { versions = append(versions, version) @@ -120,7 +120,7 @@ func toDeleteResult(err error, partialSuccess bool) (int64, error) { return DeleteSuccess, nil } -func (s *Store) deleteVersion(ctx context.Context, collection, owner string, id string, vf pb.VersionFilter) error { +func (s *Store) deleteVersionObsolete(ctx context.Context, collection, owner string, id string, vf pb.VersionFilter) error { pl := getVersionsPipeline(mongo.Pipeline{}, vf, true) if vf.Latest() { pl = append(pl, bson.D{{Key: "$unset", Value: "latestVersion"}}) @@ -130,17 +130,17 @@ func (s *Store) deleteVersion(ctx context.Context, collection, owner string, id return err } -func (s *Store) deleteDocument(ctx context.Context, collection, owner string, idfAlls []string) error { +func (s *Store) deleteDocumentObsolete(ctx context.Context, collection, owner string, idfAlls []string) error { _, err := s.Collection(collection).DeleteMany(ctx, toIdFilterQuery(owner, idfAlls)) return err } -func (s *Store) delete(ctx context.Context, collection, owner string, filter []*pb.IDFilter) (int64, error) { +func (s *Store) deleteObsolete(ctx context.Context, collection, owner string, filter []*pb.IDFilter) (int64, error) { success := false idVersionAll, idVersions := pb.PartitionIDFilter(filter) var errors *multierror.Error if len(idVersionAll) > 0 || len(idVersions) == 0 { - err := s.deleteDocument(ctx, collection, owner, idVersionAll) + err := s.deleteDocumentObsolete(ctx, collection, owner, idVersionAll) if err == nil { success = true } @@ -148,7 +148,7 @@ func (s *Store) delete(ctx context.Context, collection, owner string, filter []* } if len(idVersions) > 0 { for id, vf := range idVersions { - err := s.deleteVersion(ctx, collection, owner, id, vf) + err := s.deleteVersionObsolete(ctx, collection, owner, id, vf) if err == nil { success = true } diff --git a/snippet-service/store/store.go b/snippet-service/store/store.go index a26581791..82d92fdac 100644 --- a/snippet-service/store/store.go +++ b/snippet-service/store/store.go @@ -11,11 +11,13 @@ import ( const ( IDKey = "_id" // must match with Id field tag + OwnerKey = "owner" // must match with Owner field tag + LatestKey = "latest" // must match with Latest field tag + NameKey = "name" // must match with Name field tag VersionKey = "version" // must match with Version field tag VersionsKey = "versions" // must match with Versions field tag - OwnerKey = "owner" // must match with Owner field tag + ResourcesKey = "resources" // must match with Resources field tag ConfigurationIDKey = "configurationId" // must match with ConfigurationId field tag - NameKey = "name" // must match with Name field tag EnabledKey = "enabled" // must match with Enabled field tag TimestampKey = "timestamp" // must match with Timestamp field tag ApiAccessTokenKey = "apiAccessToken" // must match with ApiAccessToken field tag diff --git a/snippet-service/test/configuration.go b/snippet-service/test/configuration.go index 37809df59..530ccb033 100644 --- a/snippet-service/test/configuration.go +++ b/snippet-service/test/configuration.go @@ -94,17 +94,18 @@ func addConfigurations(ctx context.Context, t *testing.T, n int, calcVersion cal configuration, ok := configurations[conf.GetId()] if !ok { - configuration = store.Configuration{ - Id: conf.GetId(), - Owner: conf.GetOwner(), - Name: conf.GetName(), - } + configuration = store.MakeFirstConfiguration2(conf) configurations[conf.GetId()] = configuration + continue } - configuration.Versions = append(configuration.Versions, store.ConfigurationVersion{ + latest := store.ConfigurationVersion{ + Name: conf.GetName(), Version: conf.GetVersion(), Resources: conf.GetResources(), - }) + Timestamp: conf.GetTimestamp(), + } + configuration.Latest = &latest + configuration.Versions = append(configuration.Versions, latest) configurations[conf.GetId()] = configuration } return configurations diff --git a/snippet-service/test/test.go b/snippet-service/test/test.go index e86205d79..4b3ccba38 100644 --- a/snippet-service/test/test.go +++ b/snippet-service/test/test.go @@ -85,18 +85,9 @@ func CmpConfiguration(t *testing.T, want, got *pb.Configuration, ignoreTimestamp CmpJSON(t, want, got) } -func CmpStoredConfiguration(t *testing.T, want, got *store.Configuration, ignoreTimestamp bool) { - want = want.Clone() - if ignoreTimestamp { - want.Timestamp = got.Timestamp - } - CmpJSON(t, want, got) -} - func ConfigurationContains(t *testing.T, storeConf store.Configuration, conf *pb.Configuration) { require.Equal(t, storeConf.Id, conf.GetId()) require.Equal(t, storeConf.Owner, conf.GetOwner()) - require.Equal(t, storeConf.Name, conf.GetName()) for _, v := range storeConf.Versions { if v.Version != conf.GetVersion() { continue @@ -107,12 +98,32 @@ func ConfigurationContains(t *testing.T, storeConf store.Configuration, conf *pb require.Fail(t, "version not found") } +func CmpStoredConfiguration(t *testing.T, want, got *store.Configuration, ignoreTimestamp, ignoreLatest bool) { + require.Len(t, got.Versions, len(want.Versions)) + if ignoreTimestamp || ignoreLatest { + want = want.Clone() + got = got.Clone() + } + if ignoreTimestamp { + if want.Latest != nil && got.Latest != nil { + want.Latest.Timestamp = got.Latest.Timestamp + } + for i := range want.Versions { + want.Versions[i].Timestamp = got.Versions[i].Timestamp + } + } + if ignoreLatest { + want.Latest = got.Latest + } + CmpJSON(t, want, got) +} + func CmpStoredConfigurationMaps(t *testing.T, want, got map[string]store.Configuration) { require.Len(t, got, len(want)) for _, v := range want { gotV, ok := got[v.Id] require.True(t, ok) - CmpStoredConfiguration(t, &v, &gotV, true) + CmpStoredConfiguration(t, &v, &gotV, true, false) } }