github.com/cloudwan/edgelq-sdk@v1.15.4/alerting/proto/v1/ts_condition_template_service.proto (about) 1 syntax = "proto3"; 2 3 package ntt.alerting.v1; 4 5 import "edgelq-sdk/alerting/proto/v1/ts_condition_template.proto"; 6 import "edgelq-sdk/alerting/proto/v1/ts_condition_template_change.proto"; 7 import "google/api/annotations.proto"; 8 import "google/api/client.proto"; 9 import "google/protobuf/empty.proto"; 10 import "google/protobuf/field_mask.proto"; 11 import "google/protobuf/timestamp.proto"; 12 import "goten-sdk/types/view.proto"; 13 import "goten-sdk/types/watch_type.proto"; 14 15 option go_package = "github.com/cloudwan/edgelq-sdk/alerting/client/v1/ts_condition_template;ts_condition_template_client"; 16 option java_multiple_files = false; 17 option java_outer_classname = "TsConditionTemplateServiceProto"; 18 option java_package = "com.ntt.alerting.pb.v1"; 19 20 // A request message of the GetTsConditionTemplate method. 21 message GetTsConditionTemplateRequest { 22 // Name of ntt.alerting.v1.TsConditionTemplate 23 string name = 1; 24 25 // A list of extra fields to be obtained for each response item on top of 26 // fields defined by request field view 27 google.protobuf.FieldMask field_mask = 3; 28 29 // View defines list of standard response fields present in response items. 30 // Additional fields can be amended by request field field_mask 31 goten.types.View view = 4; 32 } 33 34 // A request message of the BatchGetTsConditionTemplates method. 35 message BatchGetTsConditionTemplatesRequest { 36 // Names of TsConditionTemplates 37 repeated string names = 2; 38 39 // A list of extra fields to be obtained for each response item on top of 40 // fields defined by request field view 41 google.protobuf.FieldMask field_mask = 3; 42 43 // View defines list of standard response fields present in response items. 44 // Additional fields can be amended by request field field_mask 45 goten.types.View view = 4; 46 47 reserved 1; 48 } 49 50 // A response message of the BatchGetTsConditionTemplates method. 51 message BatchGetTsConditionTemplatesResponse { 52 // found TsConditionTemplates 53 repeated TsConditionTemplate ts_condition_templates = 1; 54 55 // list of not found TsConditionTemplates 56 repeated string missing = 2; 57 } 58 59 // A request message of the ListTsConditionTemplates method. 60 message ListTsConditionTemplatesRequest { 61 // Parent name of ntt.alerting.v1.TsConditionTemplate 62 string parent = 1; 63 64 // Requested page size. Server may return fewer TsConditionTemplates than 65 // requested. If unspecified, server will pick an appropriate default. 66 int32 page_size = 2; 67 68 // A token identifying a page of results the server should return. 69 // Typically, this is the value of 70 // ListTsConditionTemplatesResponse.next_page_token. 71 string page_token = 3; 72 73 // Order By - 74 // https://cloud.google.com/apis/design/design_patterns#list_pagination list 75 // of field path with order directive, either 'asc' or 'desc'. If direction is 76 // not provided, 'asc' is assumed. e.g. "state.nested_field asc, 77 // state.something.else desc, theme" 78 string order_by = 4; 79 80 // Filter - filter results by field criteria. Simplified SQL-like syntax with 81 // following operators: 82 // <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS 83 // [NOT] NULL | NaN . Combine conditions with OR | AND example: 'meta.labels 84 // CONTAINS "severity:important" OR (state.last_error_time > 85 // "2018-11-15T10:00:00Z" AND state.status = "ERROR")' 86 string filter = 5; 87 88 // A list of extra fields to be obtained for each response item on top of 89 // fields defined by request field view 90 google.protobuf.FieldMask field_mask = 6; 91 92 // View defines list of standard response fields present in response items. 93 // Additional fields can be amended by request field field_mask 94 goten.types.View view = 7; 95 96 // Indicates if list response should contain total count and offset (fields 97 // current_offset and total_results_count). 98 bool include_paging_info = 8; 99 } 100 101 // A response message of the ListTsConditionTemplates method. 102 message ListTsConditionTemplatesResponse { 103 // The list of TsConditionTemplates 104 repeated TsConditionTemplate ts_condition_templates = 1; 105 106 // A token to retrieve previous page of results. 107 // 108 // Pass this value in the ListTsConditionTemplatesRequest.page_token. 109 string prev_page_token = 3; 110 111 // A token to retrieve next page of results. 112 // 113 // Pass this value in the ListTsConditionTemplatesRequest.page_token. 114 string next_page_token = 4; 115 116 // Current offset from the first page or 0 if no page tokens were given, 117 // paging info was not requested or there was an error while trying to get 118 // it). Page index can be computed from offset and limit provided in a 119 // request. 120 int32 current_offset = 5; 121 122 // Number of total TsConditionTemplates across all pages or 0, if there are no 123 // items, paging info was not requested or there was an error while trying to 124 // get it. 125 int32 total_results_count = 6; 126 } 127 128 // A request message of the WatchTsConditionTemplate method. 129 message WatchTsConditionTemplateRequest { 130 // Name of ntt.alerting.v1.TsConditionTemplate 131 string name = 1; 132 133 // A list of extra fields to be obtained for each response item on top of 134 // fields defined by request field view 135 google.protobuf.FieldMask field_mask = 2; 136 137 // View defines list of standard response fields present in response items. 138 // Additional fields can be amended by request field field_mask 139 goten.types.View view = 4; 140 } 141 142 // A response message of the WatchTsConditionTemplate method. 143 message WatchTsConditionTemplateResponse { 144 TsConditionTemplateChange change = 1; 145 } 146 147 // A request message of the WatchTsConditionTemplates method. 148 message WatchTsConditionTemplatesRequest { 149 // Type of a watch. Identifies how server stream data to a client, which 150 // fields in a request are allowed and which fields in response are relevant. 151 goten.types.WatchType type = 9; 152 153 // Parent name of ntt.alerting.v1.TsConditionTemplate 154 string parent = 1; 155 156 // Requested page size. Server may return fewer TsConditionTemplates than 157 // requested. If unspecified, server will pick an appropriate default. Can be 158 // populated only for stateful watch type. 159 int32 page_size = 2; 160 161 // A token identifying a page of results the server should return. 162 // Can be populated only for stateful watch type. 163 string page_token = 3; 164 165 // Order By - 166 // https://cloud.google.com/apis/design/design_patterns#list_pagination Can be 167 // populated only for stateful watch type. 168 string order_by = 4; 169 170 // A token identifying watch resume point from previous session. 171 // Can be populated only for stateless watch type. 172 string resume_token = 10; 173 174 // Point in the time from which we want to start getting updates. This field 175 // can be populated only for stateless watch type and if resume token is not 176 // known yet. If specified, initial snapshot will NOT be provided. It is 177 // assumed client can obtain it using separate means. Watch responses will 178 // contain resume tokens which should be used to resume broken connection. 179 google.protobuf.Timestamp starting_time = 12; 180 181 // Filter - filter results by field criteria. Simplified SQL-like syntax with 182 // following operators: 183 // <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS 184 // [NOT] NULL | NaN . Combine conditions with OR | AND example: 'meta.labels 185 // CONTAINS "severity:important" OR (state.last_error_time > 186 // "2018-11-15T10:00:00Z" AND state.status = "ERROR")' 187 string filter = 5; 188 189 // A list of extra fields to be obtained for each response item on top of 190 // fields defined by request field view Changes to TsConditionTemplate that 191 // don't affect any of masked fields won't be sent back. 192 google.protobuf.FieldMask field_mask = 6; 193 194 // View defines list of standard response fields present in response items. 195 // Additional fields can be amended by request field field_mask Changes to 196 // TsConditionTemplate that don't affect any of masked fields won't be sent 197 // back. 198 goten.types.View view = 8; 199 200 // Maximum amount of changes in each response message. Query result response 201 // is divided on the server side into chunks with size of a specified amount 202 // to limit memory footprint of each message. Responses will hold information 203 // whether more elements will continue for the actual change. If unspecified, 204 // server will pick an appropriate default. 205 int32 max_chunk_size = 11; 206 } 207 208 // A response message of the WatchTsConditionTemplates method. 209 message WatchTsConditionTemplatesResponse { 210 // Changes of TsConditionTemplates 211 repeated TsConditionTemplateChange ts_condition_template_changes = 2; 212 213 // If request specified max_chunk_size (or this limit was enforced if 214 // stateless watch has been chosen), then responses with "full changeset" will 215 // be divided into chunks. Client should keep receiving messages and, once 216 // is_current has value true, combine this recent message with all previous 217 // ones where is_current is false. If this is the first is_current in a whole 218 // watch stream, then it means that client should have, at this moment, 219 // contain snapshot of the current situation (or more accurately, snapshot of 220 // situation at the moment of request). All TsConditionTemplates will be of 221 // type Added/Current (depending on watch_type specified in the request). 222 // Further responses will be incremental - however messages may still be 223 // chunked and is_current logic still applies. is_current is always true for 224 // stateful watch if max_chunk_size was left to 0. 225 bool is_current = 4; 226 227 // When present, PageTokens used for page navigation should be updated. 228 // Present only if is_current is true (last chunk). 229 PageTokenChange page_token_change = 3; 230 231 // Token that can be used if current connection drops and client needs to 232 // reconnect. Populated only for stateless watch type. Present only if 233 // is_current is true (last chunk). 234 string resume_token = 5; 235 236 // Server may occasionally send information how many resources should client 237 // have in its state so far (response message without any changes, but with 238 // snapshot_size field specified). If client has different value than the one 239 // sent by the server, then it should be treated by a client as an error and 240 // should reconnect. If value is smaller then 0, then client should ignore 241 // this field as unpopulated. This field should be checked only for stateless 242 // watch. In stateful those kind of errors are handled by the server side. 243 // Will be never sent together with is_current, is_soft_reset and 244 // is_hard_reset flags. 245 int64 snapshot_size = 6; 246 247 // In case of internal issue server may send response message with this flag. 248 // It indicates that client should drop all changes from recent responses 249 // where is_current is false only! If last message had is_current set to true, 250 // client should do nothing and process normally. Resume token received before 251 // is still valid. This field should be checked only for stateless watch. In 252 // stateful those kind of errors are handled by the server side. Will never be 253 // sent along with is_current, is_hard_reset or snapshot_size. 254 bool is_soft_reset = 7; 255 256 // In case of internal issue server may send response message with this flag. 257 // After receiving, client should clear whole state (drop all changes received 258 // so far) as server will send new snapshot (TsConditionTemplates will 259 // contains changes of type Current only). Any resume tokens should be 260 // discarded as well. This field should be checked only for stateless watch. 261 // In stateful those kind of errors are handled by the server side. Will never 262 // be sent along with is_current, is_soft_reset or snapshot_size. 263 bool is_hard_reset = 8; 264 265 message PageTokenChange { 266 // New token to retrieve previous page of results. 267 string prev_page_token = 1; 268 269 // New token to retrieve next page of results. 270 string next_page_token = 2; 271 } 272 } 273 274 // A request message of the CreateTsConditionTemplate method. 275 message CreateTsConditionTemplateRequest { 276 // Parent name of ntt.alerting.v1.TsConditionTemplate 277 string parent = 1; 278 279 // TsConditionTemplate resource body 280 TsConditionTemplate ts_condition_template = 2; 281 282 // Optional masking applied to response object to reduce message response 283 // size. 284 ResponseMask response_mask = 3; 285 286 // ResponseMask allows client to reduce response message size. 287 message ResponseMask { 288 oneof masking { 289 // If this flag has value true, then response will contain just empty 290 // resource without any fields populated. 291 bool skip_entire_response_body = 1; 292 293 // If this field is populated, then resource in response will contain only 294 // specific fields. 295 google.protobuf.FieldMask body_mask = 2; 296 } 297 } 298 } 299 300 // A request message of the UpdateTsConditionTemplate method. 301 message UpdateTsConditionTemplateRequest { 302 // TsConditionTemplate resource body 303 TsConditionTemplate ts_condition_template = 2; 304 305 // FieldMask applied to request - change will be applied only for fields in 306 // the mask 307 google.protobuf.FieldMask update_mask = 3; 308 309 // Conditional update applied to request if update should be executed only for 310 // specific resource state. If this field is populated, then server will fetch 311 // existing resource, compare with the one stored in the cas field (after 312 // applying field mask) and proceed with update only and only if they match. 313 // Otherwise RPC error Aborted will be returned. 314 CAS cas = 4; 315 316 // If set to true, and the resource is not found, 317 // a new resource will be created. In this situation, 318 // 'field_mask' is ignored. 319 // 320 // https://google.aip.dev/134#create-or-update 321 bool allow_missing = 5; // Optional masking applied to response object to 322 323 // reduce message response size. 324 ResponseMask response_mask = 6; 325 326 // CAS - Compare and Swap. This object is used if user wants to make update 327 // conditional based upon previous resource version. 328 message CAS { 329 // Conditional desired state of a resource before update. 330 TsConditionTemplate conditional_state = 1; 331 332 // Field paths from conditional state of resource server should check and 333 // compare. 334 google.protobuf.FieldMask field_mask = 2; 335 } 336 337 // ResponseMask allows client to reduce response message size. 338 message ResponseMask { 339 oneof masking { 340 // If this flag has value true, then response will contain just empty 341 // resource without any fields populated. Field body_mask is ignored if 342 // set. 343 bool skip_entire_response_body = 1; 344 345 // Include all fields that were actually updated during processing. Note 346 // this may be larger than update mask if some fields were computed 347 // additionally. Name is added as well. 348 bool updated_fields_only = 2; 349 350 // If this field is populated, then resource in response will contain only 351 // specific fields. If skip_entire_response_body is true, this field is 352 // ignored. 353 google.protobuf.FieldMask body_mask = 3; 354 } 355 } 356 } 357 358 // A request message of the DeleteTsConditionTemplate method. 359 message DeleteTsConditionTemplateRequest { 360 // Name of ntt.alerting.v1.TsConditionTemplate 361 string name = 1; 362 363 // If set to true, and the resource is not found, method will be successful 364 // and will not return NotFound error. 365 bool allow_missing = 2; 366 } 367 368 // A request message of the SearchTsConditionTemplates method. 369 message SearchTsConditionTemplatesRequest { 370 // Parent name of ntt.alerting.v1.TsConditionTemplate 371 string parent = 1; 372 373 // Requested page size. Server may return fewer TsConditionTemplates than 374 // requested. If unspecified, server will pick an appropriate default. 375 int32 page_size = 2; 376 377 // A token identifying a page of results the server should return. 378 // Typically, this is the value of 379 // SearchTsConditionTemplatesResponse.next_page_token. 380 string page_token = 3; 381 382 // Order By - 383 // https://cloud.google.com/apis/design/design_patterns#list_pagination list 384 // of field path with order directive, either 'asc' or 'desc'. If direction is 385 // not provided, 'asc' is assumed. e.g. "state.nested_field asc, 386 // state.something.else desc, theme" 387 string order_by = 4; 388 389 // Filter - filter results by field criteria. Simplified SQL-like syntax with 390 // following operators: 391 // <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS 392 // [NOT] NULL | NaN . Combine conditions with OR | AND example: 'meta.labels 393 // CONTAINS "severity:important" OR (state.last_error_time > 394 // "2018-11-15T10:00:00Z" AND state.status = "ERROR")' 395 string filter = 5; 396 397 // A list of extra fields to be obtained for each response item on top of 398 // fields defined by request field view 399 google.protobuf.FieldMask field_mask = 6; 400 401 // View defines list of standard response fields present in response items. 402 // Additional fields can be amended by request field field_mask 403 goten.types.View view = 7; 404 405 // Optional search phrase used to further filter results. 406 string phrase = 8; 407 } 408 409 // A response message of the SearchTsConditionTemplates method. 410 message SearchTsConditionTemplatesResponse { 411 // The list of TsConditionTemplates 412 repeated TsConditionTemplate ts_condition_templates = 1; 413 414 // A token to retrieve previous page of results. 415 // 416 // Pass this value in the SearchTsConditionTemplatesRequest.page_token. 417 string prev_page_token = 3; 418 419 // A token to retrieve next page of results. 420 // 421 // Pass this value in the SearchTsConditionTemplatesRequest.page_token. 422 string next_page_token = 4; 423 424 // Current offset from the first page (0 if no page tokens were given). Page 425 // index can be computed from offset and limit provided in a request 426 int32 current_offset = 5; 427 428 // Number of total TsConditionTemplates across all pages. 429 int32 total_results_count = 6; 430 } 431 432 // TsConditionTemplate service API for Alerting 433 service TsConditionTemplateService { 434 option (google.api.default_host) = "alerting.edgelq.com"; 435 option (google.api.oauth_scopes) = "https://apis.edgelq.com"; 436 437 // GetTsConditionTemplate 438 rpc GetTsConditionTemplate(GetTsConditionTemplateRequest) 439 returns (TsConditionTemplate) { 440 option (google.api.http) = { 441 get : "/v1/{name=projects/*/policyTemplates/*/tsConditionTemplates/*}" 442 }; 443 } 444 445 // BatchGetTsConditionTemplates 446 rpc BatchGetTsConditionTemplates(BatchGetTsConditionTemplatesRequest) 447 returns (BatchGetTsConditionTemplatesResponse) { 448 option (google.api.http) = { 449 get : "/v1/tsConditionTemplates:batchGet" 450 }; 451 } 452 453 // ListTsConditionTemplates 454 rpc ListTsConditionTemplates(ListTsConditionTemplatesRequest) 455 returns (ListTsConditionTemplatesResponse) { 456 option (google.api.http) = { 457 get : "/v1/{parent=projects/*/policyTemplates/*}/tsConditionTemplates" 458 }; 459 } 460 461 // WatchTsConditionTemplate 462 rpc WatchTsConditionTemplate(WatchTsConditionTemplateRequest) 463 returns (stream WatchTsConditionTemplateResponse) { 464 option (google.api.http) = { 465 post : "/v1/{name=projects/*/policyTemplates/*/tsConditionTemplates/" 466 "*}:watch" 467 }; 468 } 469 470 // WatchTsConditionTemplates 471 rpc WatchTsConditionTemplates(WatchTsConditionTemplatesRequest) 472 returns (stream WatchTsConditionTemplatesResponse) { 473 option (google.api.http) = { 474 post : "/v1/{parent=projects/*/policyTemplates/*}/" 475 "tsConditionTemplates:watch" 476 }; 477 } 478 479 // CreateTsConditionTemplate 480 rpc CreateTsConditionTemplate(CreateTsConditionTemplateRequest) 481 returns (TsConditionTemplate) { 482 option (google.api.http) = { 483 post : "/v1/{parent=projects/*/policyTemplates/*}/tsConditionTemplates" 484 body : "ts_condition_template" 485 }; 486 } 487 488 // UpdateTsConditionTemplate 489 rpc UpdateTsConditionTemplate(UpdateTsConditionTemplateRequest) 490 returns (TsConditionTemplate) { 491 option (google.api.http) = { 492 put : "/v1/{ts_condition_template.name=projects/*/policyTemplates/*/" 493 "tsConditionTemplates/*}" 494 body : "ts_condition_template" 495 }; 496 } 497 498 // DeleteTsConditionTemplate 499 rpc DeleteTsConditionTemplate(DeleteTsConditionTemplateRequest) 500 returns (google.protobuf.Empty) { 501 option (google.api.http) = { 502 delete : "/v1/{name=projects/*/policyTemplates/*/tsConditionTemplates/*}" 503 }; 504 } 505 506 // SearchTsConditionTemplates 507 rpc SearchTsConditionTemplates(SearchTsConditionTemplatesRequest) 508 returns (SearchTsConditionTemplatesResponse) { 509 option (google.api.http) = { 510 get : "/v1/{parent=projects/*/policyTemplates/*}/" 511 "tsConditionTemplates:search" 512 }; 513 } 514 }