github.com/cloudwan/edgelq-sdk@v1.15.4/iam/proto/v1/member_assignment_service.proto (about) 1 syntax = "proto3"; 2 3 package ntt.iam.v1; 4 5 import "edgelq-sdk/iam/proto/v1/member_assignment.proto"; 6 import "edgelq-sdk/iam/proto/v1/member_assignment_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/iam/client/v1/member_assignment;member_assignment_client"; 16 option java_multiple_files = false; 17 option java_outer_classname = "MemberAssignmentServiceProto"; 18 option java_package = "com.ntt.iam.pb.v1"; 19 20 // A request message of the GetMemberAssignment method. 21 message GetMemberAssignmentRequest { 22 // Name of ntt.iam.v1.MemberAssignment 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 BatchGetMemberAssignments method. 35 message BatchGetMemberAssignmentsRequest { 36 // Names of MemberAssignments 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 BatchGetMemberAssignments method. 51 message BatchGetMemberAssignmentsResponse { 52 // found MemberAssignments 53 repeated MemberAssignment member_assignments = 1; 54 55 // list of not found MemberAssignments 56 repeated string missing = 2; 57 } 58 59 // A request message of the ListMemberAssignments method. 60 message ListMemberAssignmentsRequest { 61 // Parent name of ntt.iam.v1.MemberAssignment 62 string parent = 1; 63 64 // Requested page size. Server may return fewer MemberAssignments 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 // ListMemberAssignmentsResponse.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 ListMemberAssignments method. 102 message ListMemberAssignmentsResponse { 103 // The list of MemberAssignments 104 repeated MemberAssignment member_assignments = 1; 105 106 // A token to retrieve previous page of results. 107 // 108 // Pass this value in the ListMemberAssignmentsRequest.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 ListMemberAssignmentsRequest.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 MemberAssignments 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 WatchMemberAssignment method. 129 message WatchMemberAssignmentRequest { 130 // Name of ntt.iam.v1.MemberAssignment 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 WatchMemberAssignment method. 143 message WatchMemberAssignmentResponse { MemberAssignmentChange change = 1; } 144 145 // A request message of the WatchMemberAssignments method. 146 message WatchMemberAssignmentsRequest { 147 // Type of a watch. Identifies how server stream data to a client, which 148 // fields in a request are allowed and which fields in response are relevant. 149 goten.types.WatchType type = 9; 150 151 // Parent name of ntt.iam.v1.MemberAssignment 152 string parent = 1; 153 154 // Requested page size. Server may return fewer MemberAssignments than 155 // requested. If unspecified, server will pick an appropriate default. Can be 156 // populated only for stateful watch type. 157 int32 page_size = 2; 158 159 // A token identifying a page of results the server should return. 160 // Can be populated only for stateful watch type. 161 string page_token = 3; 162 163 // Order By - 164 // https://cloud.google.com/apis/design/design_patterns#list_pagination Can be 165 // populated only for stateful watch type. 166 string order_by = 4; 167 168 // A token identifying watch resume point from previous session. 169 // Can be populated only for stateless watch type. 170 string resume_token = 10; 171 172 // Point in the time from which we want to start getting updates. This field 173 // can be populated only for stateless watch type and if resume token is not 174 // known yet. If specified, initial snapshot will NOT be provided. It is 175 // assumed client can obtain it using separate means. Watch responses will 176 // contain resume tokens which should be used to resume broken connection. 177 google.protobuf.Timestamp starting_time = 12; 178 179 // Filter - filter results by field criteria. Simplified SQL-like syntax with 180 // following operators: 181 // <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS 182 // [NOT] NULL | NaN . Combine conditions with OR | AND example: 'meta.labels 183 // CONTAINS "severity:important" OR (state.last_error_time > 184 // "2018-11-15T10:00:00Z" AND state.status = "ERROR")' 185 string filter = 5; 186 187 // A list of extra fields to be obtained for each response item on top of 188 // fields defined by request field view Changes to MemberAssignment that don't 189 // affect any of masked fields won't be sent back. 190 google.protobuf.FieldMask field_mask = 6; 191 192 // View defines list of standard response fields present in response items. 193 // Additional fields can be amended by request field field_mask Changes to 194 // MemberAssignment that don't affect any of masked fields won't be sent back. 195 goten.types.View view = 8; 196 197 // Maximum amount of changes in each response message. Query result response 198 // is divided on the server side into chunks with size of a specified amount 199 // to limit memory footprint of each message. Responses will hold information 200 // whether more elements will continue for the actual change. If unspecified, 201 // server will pick an appropriate default. 202 int32 max_chunk_size = 11; 203 } 204 205 // A response message of the WatchMemberAssignments method. 206 message WatchMemberAssignmentsResponse { 207 // Changes of MemberAssignments 208 repeated MemberAssignmentChange member_assignment_changes = 2; 209 210 // If request specified max_chunk_size (or this limit was enforced if 211 // stateless watch has been chosen), then responses with "full changeset" will 212 // be divided into chunks. Client should keep receiving messages and, once 213 // is_current has value true, combine this recent message with all previous 214 // ones where is_current is false. If this is the first is_current in a whole 215 // watch stream, then it means that client should have, at this moment, 216 // contain snapshot of the current situation (or more accurately, snapshot of 217 // situation at the moment of request). All MemberAssignments will be of type 218 // Added/Current (depending on watch_type specified in the request). Further 219 // responses will be incremental - however messages may still be chunked and 220 // is_current logic still applies. is_current is always true for stateful 221 // watch if max_chunk_size was left to 0. 222 bool is_current = 4; 223 224 // When present, PageTokens used for page navigation should be updated. 225 // Present only if is_current is true (last chunk). 226 PageTokenChange page_token_change = 3; 227 228 // Token that can be used if current connection drops and client needs to 229 // reconnect. Populated only for stateless watch type. Present only if 230 // is_current is true (last chunk). 231 string resume_token = 5; 232 233 // Server may occasionally send information how many resources should client 234 // have in its state so far (response message without any changes, but with 235 // snapshot_size field specified). If client has different value than the one 236 // sent by the server, then it should be treated by a client as an error and 237 // should reconnect. If value is smaller then 0, then client should ignore 238 // this field as unpopulated. This field should be checked only for stateless 239 // watch. In stateful those kind of errors are handled by the server side. 240 // Will be never sent together with is_current, is_soft_reset and 241 // is_hard_reset flags. 242 int64 snapshot_size = 6; 243 244 // In case of internal issue server may send response message with this flag. 245 // It indicates that client should drop all changes from recent responses 246 // where is_current is false only! If last message had is_current set to true, 247 // client should do nothing and process normally. Resume token received before 248 // is still valid. This field should be checked only for stateless watch. In 249 // stateful those kind of errors are handled by the server side. Will never be 250 // sent along with is_current, is_hard_reset or snapshot_size. 251 bool is_soft_reset = 7; 252 253 // In case of internal issue server may send response message with this flag. 254 // After receiving, client should clear whole state (drop all changes received 255 // so far) as server will send new snapshot (MemberAssignments will contains 256 // changes of type Current only). Any resume tokens should be discarded as 257 // well. This field should be checked only for stateless watch. In stateful 258 // those kind of errors are handled by the server side. Will never be sent 259 // along with is_current, is_soft_reset or snapshot_size. 260 bool is_hard_reset = 8; 261 262 message PageTokenChange { 263 // New token to retrieve previous page of results. 264 string prev_page_token = 1; 265 266 // New token to retrieve next page of results. 267 string next_page_token = 2; 268 } 269 } 270 271 // A request message of the UpdateMemberAssignment method. 272 message UpdateMemberAssignmentRequest { 273 // MemberAssignment resource body 274 MemberAssignment member_assignment = 2; 275 276 // FieldMask applied to request - change will be applied only for fields in 277 // the mask 278 google.protobuf.FieldMask update_mask = 3; 279 280 // Conditional update applied to request if update should be executed only for 281 // specific resource state. If this field is populated, then server will fetch 282 // existing resource, compare with the one stored in the cas field (after 283 // applying field mask) and proceed with update only and only if they match. 284 // Otherwise RPC error Aborted will be returned. 285 CAS cas = 4; 286 287 // Optional masking applied to response object to reduce message response 288 // size. 289 ResponseMask response_mask = 6; 290 291 // CAS - Compare and Swap. This object is used if user wants to make update 292 // conditional based upon previous resource version. 293 message CAS { 294 // Conditional desired state of a resource before update. 295 MemberAssignment conditional_state = 1; 296 297 // Field paths from conditional state of resource server should check and 298 // compare. 299 google.protobuf.FieldMask field_mask = 2; 300 } 301 302 // ResponseMask allows client to reduce response message size. 303 message ResponseMask { 304 oneof masking { 305 // If this flag has value true, then response will contain just empty 306 // resource without any fields populated. Field body_mask is ignored if 307 // set. 308 bool skip_entire_response_body = 1; 309 310 // Include all fields that were actually updated during processing. Note 311 // this may be larger than update mask if some fields were computed 312 // additionally. Name is added as well. 313 bool updated_fields_only = 2; 314 315 // If this field is populated, then resource in response will contain only 316 // specific fields. If skip_entire_response_body is true, this field is 317 // ignored. 318 google.protobuf.FieldMask body_mask = 3; 319 } 320 } 321 } 322 323 // A request message of the DeleteMemberAssignment method. 324 message DeleteMemberAssignmentRequest { 325 // Name of ntt.iam.v1.MemberAssignment 326 string name = 1; 327 328 // If set to true, and the resource is not found, method will be successful 329 // and will not return NotFound error. 330 bool allow_missing = 2; 331 } 332 333 // A request message of the SearchMemberAssignments method. 334 message SearchMemberAssignmentsRequest { 335 // Parent name of ntt.iam.v1.MemberAssignment 336 string parent = 1; 337 338 // Requested page size. Server may return fewer MemberAssignments than 339 // requested. If unspecified, server will pick an appropriate default. 340 int32 page_size = 2; 341 342 // A token identifying a page of results the server should return. 343 // Typically, this is the value of 344 // SearchMemberAssignmentsResponse.next_page_token. 345 string page_token = 3; 346 347 // Order By - 348 // https://cloud.google.com/apis/design/design_patterns#list_pagination list 349 // of field path with order directive, either 'asc' or 'desc'. If direction is 350 // not provided, 'asc' is assumed. e.g. "state.nested_field asc, 351 // state.something.else desc, theme" 352 string order_by = 4; 353 354 // Filter - filter results by field criteria. Simplified SQL-like syntax with 355 // following operators: 356 // <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS 357 // [NOT] NULL | NaN . Combine conditions with OR | AND example: 'meta.labels 358 // CONTAINS "severity:important" OR (state.last_error_time > 359 // "2018-11-15T10:00:00Z" AND state.status = "ERROR")' 360 string filter = 5; 361 362 // A list of extra fields to be obtained for each response item on top of 363 // fields defined by request field view 364 google.protobuf.FieldMask field_mask = 6; 365 366 // View defines list of standard response fields present in response items. 367 // Additional fields can be amended by request field field_mask 368 goten.types.View view = 7; 369 370 // Optional search phrase used to further filter results. 371 string phrase = 8; 372 } 373 374 // A response message of the SearchMemberAssignments method. 375 message SearchMemberAssignmentsResponse { 376 // The list of MemberAssignments 377 repeated MemberAssignment member_assignments = 1; 378 379 // A token to retrieve previous page of results. 380 // 381 // Pass this value in the SearchMemberAssignmentsRequest.page_token. 382 string prev_page_token = 3; 383 384 // A token to retrieve next page of results. 385 // 386 // Pass this value in the SearchMemberAssignmentsRequest.page_token. 387 string next_page_token = 4; 388 389 // Current offset from the first page (0 if no page tokens were given). Page 390 // index can be computed from offset and limit provided in a request 391 int32 current_offset = 5; 392 393 // Number of total MemberAssignments across all pages. 394 int32 total_results_count = 6; 395 } 396 397 // MemberAssignment service API for IAM 398 service MemberAssignmentService { 399 option (google.api.default_host) = "iam.edgelq.com"; 400 option (google.api.oauth_scopes) = "https://apis.edgelq.com"; 401 402 // GetMemberAssignment 403 rpc GetMemberAssignment(GetMemberAssignmentRequest) 404 returns (MemberAssignment) { 405 option (google.api.http) = { 406 get : "/v1/{name=regions/*/memberAssignments/*}" 407 }; 408 } 409 410 // BatchGetMemberAssignments 411 rpc BatchGetMemberAssignments(BatchGetMemberAssignmentsRequest) 412 returns (BatchGetMemberAssignmentsResponse) { 413 option (google.api.http) = { 414 get : "/v1/memberAssignments:batchGet" 415 }; 416 } 417 418 // ListMemberAssignments 419 rpc ListMemberAssignments(ListMemberAssignmentsRequest) 420 returns (ListMemberAssignmentsResponse) { 421 option (google.api.http) = { 422 get : "/v1/{parent=regions/*}/memberAssignments" 423 }; 424 } 425 426 // WatchMemberAssignment 427 rpc WatchMemberAssignment(WatchMemberAssignmentRequest) 428 returns (stream WatchMemberAssignmentResponse) { 429 option (google.api.http) = { 430 post : "/v1/{name=regions/*/memberAssignments/*}:watch" 431 }; 432 } 433 434 // WatchMemberAssignments 435 rpc WatchMemberAssignments(WatchMemberAssignmentsRequest) 436 returns (stream WatchMemberAssignmentsResponse) { 437 option (google.api.http) = { 438 post : "/v1/{parent=regions/*}/memberAssignments:watch" 439 }; 440 } 441 442 // UpdateMemberAssignment 443 rpc UpdateMemberAssignment(UpdateMemberAssignmentRequest) 444 returns (MemberAssignment) { 445 option (google.api.http) = { 446 put : "/v1/{member_assignment.name=regions/*/memberAssignments/*}" 447 body : "member_assignment" 448 }; 449 } 450 451 // DeleteMemberAssignment 452 rpc DeleteMemberAssignment(DeleteMemberAssignmentRequest) 453 returns (google.protobuf.Empty) { 454 option (google.api.http) = { 455 delete : "/v1/{name=regions/*/memberAssignments/*}" 456 }; 457 } 458 459 // SearchMemberAssignments 460 rpc SearchMemberAssignments(SearchMemberAssignmentsRequest) 461 returns (SearchMemberAssignmentsResponse) { 462 option (google.api.http) = { 463 get : "/v1/{parent=regions/*}/memberAssignments:search" 464 }; 465 } 466 }