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