Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List alert def exapansion #72

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions com/coralogixapis/alerts/v3/alert_def_list_filter.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
syntax = "proto3";

package com.coralogixapis.alerts.v3;

import "google/protobuf/wrappers.proto";
import "com/coralogixapis/alerts/v3/alert_def_type.proto";
import "com/coralogixapis/alerts/v3/alert_def_priority.proto";


enum FilterMatcher {
FILTER_MATCHER_EQUALS_OR_UNSPECIFIED = 0;
}

enum FilterValuesOperator {
FILTER_VALUES_OPERATOR_OR_OR_UNSPECIFIED = 0;
FILTER_VALUES_OPERATOR_AND = 1;
}

message ListAlertDefFilter {
FilterMatcher matcher = 1; // The filter operator (e.g., "EQUALS", "NOT_EQUALS", "GREATER_THAN")
repeated google.protobuf.StringValue values = 2; // The value to filter by
FilterValuesOperator values_operator = 3; // The operator to apply to the field (e.g., "AND", "OR")
}

message ListAlertDefTypeFilter {
FilterMatcher matcher = 1; // The filter operator (e.g., "EQUALS", "NOT_EQUALS", "GREATER_THAN")
repeated AlertDefType values = 2; // The value to filter by
FilterValuesOperator values_operator = 3; // The operator to apply to the field (e.g., "AND", "OR")
}

message ListAlertDefPriorityFilter {
FilterMatcher matcher = 1; // The filter operator (e.g., "EQUALS", "NOT_EQUALS", "GREATER_THAN")
repeated AlertDefPriority values = 2; // The value to filter by
FilterValuesOperator values_operator = 3; // The operator to apply to the field (e.g., "AND", "OR")
}

message AlertDefListSearch {
google.protobuf.StringValue query = 1; // The search query
}

message AlertDefListFilters {
ListAlertDefTypeFilter type_filter = 1; // The type filter
ListAlertDefPriorityFilter priority_filter = 2; // The priority filter
ListAlertDefFilter deleted_filter = 3; // The deleted filter
AlertDefListSearch search = 4; // The search query
}
25 changes: 20 additions & 5 deletions com/coralogixapis/alerts/v3/alert_defs_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import "google/protobuf/wrappers.proto";
import "google/protobuf/timestamp.proto";
import "com/coralogixapis/alerts/v3/alert_def.proto";
import "com/coralogixapis/alerts/v3/alert_def_type.proto";
import "com/coralogixapis/alerts/v3/alert_def_list_filter.proto";

message AuditLogDescription {
optional string description = 1;
Expand Down Expand Up @@ -112,12 +113,12 @@ enum OrderByDirection {
enum OrderByFields {
ORDER_BY_FIELDS_NAME_OR_UNSPECIFIED = 0;
ORDER_BY_FIELDS_ID = 1;
ORDER_BY_FIELDS_SEVERITY = 2;
ORDER_BY_FIELDS_PRIORITY = 2;
ORDER_BY_FIELDS_CREATED_TIME = 3;
ORDER_BY_FIELDS_UPDATED_TIME = 4;
}

message OrderBy {
message AlertDefOrderBy {
OrderByFields field_name = 1;
OrderByDirection direction = 2;
}
Expand All @@ -130,11 +131,15 @@ message GetAlertDefResponse {
AlertDef alert_def = 1;
}

message ListAlertDefsResponse {
repeated AlertDef alert_defs = 1;
message ListAlertDefsRequest {
AlertDefListFilters filters = 1;
AlertDefPaginationRequest pagination = 2;
repeated AlertDefOrderBy order_bys = 3;
}

message ListAlertDefsRequest {
message ListAlertDefsResponse {
repeated AlertDef alert_defs = 1;
AlertDefPaginationResponse pagination = 2;
}

message DownloadAlertsRequest {
Expand Down Expand Up @@ -215,3 +220,13 @@ message SetActiveRequest{
}
message SetActiveResponse {
}

message AlertDefPaginationRequest {
google.protobuf.UInt32Value page_size = 1;
google.protobuf.StringValue page_token = 2;
}

message AlertDefPaginationResponse {
google.protobuf.UInt32Value total_size = 1;
google.protobuf.StringValue next_page_token = 2;
}