github.com/cloudwan/edgelq-sdk@v1.15.4/devices/proto/v1alpha2/provisioning_approval_request_service.proto (about) 1 syntax = "proto3"; 2 3 package ntt.devices.v1alpha2; 4 5 import "edgelq-sdk/devices/proto/v1alpha2/provisioning_approval_request.proto"; 6 import "edgelq-sdk/devices/proto/v1alpha2/provisioning_approval_request_change.proto"; 7 import "edgelq-sdk/devices/proto/v1alpha2/provisioning_approval_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/devices/client/v1alpha2/provisioning_approval_request;provisioning_approval_request_client"; 17 option java_multiple_files = false; 18 option java_outer_classname = "ProvisioningApprovalRequestServiceProto"; 19 option java_package = "com.ntt.devices.pb.v1alpha2"; 20 21 // A request message of the GetProvisioningApprovalRequest method. 22 message GetProvisioningApprovalRequestRequest { 23 // Name of ntt.devices.v1alpha2.ProvisioningApprovalRequest 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 BatchGetProvisioningApprovalRequests method. 36 message BatchGetProvisioningApprovalRequestsRequest { 37 // Names of ProvisioningApprovalRequests 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 BatchGetProvisioningApprovalRequests method. 52 message BatchGetProvisioningApprovalRequestsResponse { 53 // found ProvisioningApprovalRequests 54 repeated ProvisioningApprovalRequest provisioning_approval_requests = 1; 55 56 // list of not found ProvisioningApprovalRequests 57 repeated string missing = 2; 58 } 59 60 // A request message of the ListProvisioningApprovalRequests method. 61 message ListProvisioningApprovalRequestsRequest { 62 // Parent name of ntt.devices.v1alpha2.ProvisioningApprovalRequest 63 string parent = 1; 64 65 // Requested page size. Server may return fewer ProvisioningApprovalRequests 66 // than 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 // ListProvisioningApprovalRequestsResponse.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 ListProvisioningApprovalRequests method. 103 message ListProvisioningApprovalRequestsResponse { 104 // The list of ProvisioningApprovalRequests 105 repeated ProvisioningApprovalRequest provisioning_approval_requests = 1; 106 107 // A token to retrieve previous page of results. 108 // 109 // Pass this value in the ListProvisioningApprovalRequestsRequest.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 ListProvisioningApprovalRequestsRequest.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 ProvisioningApprovalRequests across all pages or 0, if 124 // there are no items, paging info was not requested or there was an error 125 // while trying to get it. 126 int32 total_results_count = 6; 127 } 128 129 // A request message of the WatchProvisioningApprovalRequest method. 130 message WatchProvisioningApprovalRequestRequest { 131 // Name of ntt.devices.v1alpha2.ProvisioningApprovalRequest 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 WatchProvisioningApprovalRequest method. 144 message WatchProvisioningApprovalRequestResponse { 145 ProvisioningApprovalRequestChange change = 1; 146 } 147 148 // A request message of the WatchProvisioningApprovalRequests method. 149 message WatchProvisioningApprovalRequestsRequest { 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.devices.v1alpha2.ProvisioningApprovalRequest 155 string parent = 1; 156 157 // Requested page size. Server may return fewer ProvisioningApprovalRequests 158 // than requested. If unspecified, server will pick an appropriate default. 159 // Can be 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 ProvisioningApprovalRequest 192 // that 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 // ProvisioningApprovalRequest that don't affect any of masked fields won't be 198 // sent 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 WatchProvisioningApprovalRequests method. 210 message WatchProvisioningApprovalRequestsResponse { 211 // Changes of ProvisioningApprovalRequests 212 repeated ProvisioningApprovalRequestChange 213 provisioning_approval_request_changes = 2; 214 215 // If request specified max_chunk_size (or this limit was enforced if 216 // stateless watch has been chosen), then responses with "full changeset" will 217 // be divided into chunks. Client should keep receiving messages and, once 218 // is_current has value true, combine this recent message with all previous 219 // ones where is_current is false. If this is the first is_current in a whole 220 // watch stream, then it means that client should have, at this moment, 221 // contain snapshot of the current situation (or more accurately, snapshot of 222 // situation at the moment of request). All ProvisioningApprovalRequests will 223 // be of type Added/Current (depending on watch_type specified in the 224 // request). Further responses will be incremental - however messages may 225 // still be chunked and is_current logic still applies. is_current is always 226 // true for stateful watch if max_chunk_size was left to 0. 227 bool is_current = 4; 228 229 // When present, PageTokens used for page navigation should be updated. 230 // Present only if is_current is true (last chunk). 231 PageTokenChange page_token_change = 3; 232 233 // Token that can be used if current connection drops and client needs to 234 // reconnect. Populated only for stateless watch type. Present only if 235 // is_current is true (last chunk). 236 string resume_token = 5; 237 238 // Server may occasionally send information how many resources should client 239 // have in its state so far (response message without any changes, but with 240 // snapshot_size field specified). If client has different value than the one 241 // sent by the server, then it should be treated by a client as an error and 242 // should reconnect. If value is smaller then 0, then client should ignore 243 // this field as unpopulated. This field should be checked only for stateless 244 // watch. In stateful those kind of errors are handled by the server side. 245 // Will be never sent together with is_current, is_soft_reset and 246 // is_hard_reset flags. 247 int64 snapshot_size = 6; 248 249 // In case of internal issue server may send response message with this flag. 250 // It indicates that client should drop all changes from recent responses 251 // where is_current is false only! If last message had is_current set to true, 252 // client should do nothing and process normally. Resume token received before 253 // is still valid. This field should be checked only for stateless watch. In 254 // stateful those kind of errors are handled by the server side. Will never be 255 // sent along with is_current, is_hard_reset or snapshot_size. 256 bool is_soft_reset = 7; 257 258 // In case of internal issue server may send response message with this flag. 259 // After receiving, client should clear whole state (drop all changes received 260 // so far) as server will send new snapshot (ProvisioningApprovalRequests will 261 // contains changes of type Current only). Any resume tokens should be 262 // discarded as well. This field should be checked only for stateless watch. 263 // In stateful those kind of errors are handled by the server side. Will never 264 // be sent along with is_current, is_soft_reset or snapshot_size. 265 bool is_hard_reset = 8; 266 267 message PageTokenChange { 268 // New token to retrieve previous page of results. 269 string prev_page_token = 1; 270 271 // New token to retrieve next page of results. 272 string next_page_token = 2; 273 } 274 } 275 276 // A request message of the CreateProvisioningApprovalRequest method. 277 message CreateProvisioningApprovalRequestRequest { 278 // Parent name of ntt.devices.v1alpha2.ProvisioningApprovalRequest 279 string parent = 1; 280 281 // ProvisioningApprovalRequest resource body 282 ProvisioningApprovalRequest provisioning_approval_request = 2; 283 284 // Optional masking applied to response object to reduce message response 285 // size. 286 ResponseMask response_mask = 3; 287 288 // ResponseMask allows client to reduce response message size. 289 message ResponseMask { 290 oneof masking { 291 // If this flag has value true, then response will contain just empty 292 // resource without any fields populated. 293 bool skip_entire_response_body = 1; 294 295 // If this field is populated, then resource in response will contain only 296 // specific fields. 297 google.protobuf.FieldMask body_mask = 2; 298 } 299 } 300 } 301 302 // A request message of the UpdateProvisioningApprovalRequest method. 303 message UpdateProvisioningApprovalRequestRequest { 304 // ProvisioningApprovalRequest resource body 305 ProvisioningApprovalRequest provisioning_approval_request = 2; 306 307 // FieldMask applied to request - change will be applied only for fields in 308 // the mask 309 google.protobuf.FieldMask update_mask = 3; 310 311 // Conditional update applied to request if update should be executed only for 312 // specific resource state. If this field is populated, then server will fetch 313 // existing resource, compare with the one stored in the cas field (after 314 // applying field mask) and proceed with update only and only if they match. 315 // Otherwise RPC error Aborted will be returned. 316 CAS cas = 4; 317 318 // If set to true, and the resource is not found, 319 // a new resource will be created. In this situation, 320 // 'field_mask' is ignored. 321 // 322 // https://google.aip.dev/134#create-or-update 323 bool allow_missing = 5; // Optional masking applied to response object to 324 325 // reduce message response size. 326 ResponseMask response_mask = 6; 327 328 // CAS - Compare and Swap. This object is used if user wants to make update 329 // conditional based upon previous resource version. 330 message CAS { 331 // Conditional desired state of a resource before update. 332 ProvisioningApprovalRequest conditional_state = 1; 333 334 // Field paths from conditional state of resource server should check and 335 // compare. 336 google.protobuf.FieldMask field_mask = 2; 337 } 338 339 // ResponseMask allows client to reduce response message size. 340 message ResponseMask { 341 oneof masking { 342 // If this flag has value true, then response will contain just empty 343 // resource without any fields populated. Field body_mask is ignored if 344 // set. 345 bool skip_entire_response_body = 1; 346 347 // Include all fields that were actually updated during processing. Note 348 // this may be larger than update mask if some fields were computed 349 // additionally. Name is added as well. 350 bool updated_fields_only = 2; 351 352 // If this field is populated, then resource in response will contain only 353 // specific fields. If skip_entire_response_body is true, this field is 354 // ignored. 355 google.protobuf.FieldMask body_mask = 3; 356 } 357 } 358 } 359 360 // A request message of the DeleteProvisioningApprovalRequest method. 361 message DeleteProvisioningApprovalRequestRequest { 362 // Name of ntt.devices.v1alpha2.ProvisioningApprovalRequest 363 string name = 1; 364 365 // If set to true, and the resource is not found, method will be successful 366 // and will not return NotFound error. 367 bool allow_missing = 2; 368 } 369 370 // ProvisioningApprovalRequest service API for Devices 371 service ProvisioningApprovalRequestService { 372 option (google.api.default_host) = "devices.edgelq.com"; 373 option (google.api.oauth_scopes) = "https://apis.edgelq.com"; 374 375 // GetProvisioningApprovalRequest 376 rpc GetProvisioningApprovalRequest(GetProvisioningApprovalRequestRequest) 377 returns (ProvisioningApprovalRequest) { 378 option (google.api.http) = { 379 get : "/v1alpha2/{name=projects/*/regions/*/provisioningPolicies/*/" 380 "provisioningApprovalRequests/*}" 381 }; 382 } 383 384 // BatchGetProvisioningApprovalRequests 385 rpc BatchGetProvisioningApprovalRequests( 386 BatchGetProvisioningApprovalRequestsRequest) 387 returns (BatchGetProvisioningApprovalRequestsResponse) { 388 option (google.api.http) = { 389 get : "/v1alpha2/provisioningApprovalRequests:batchGet" 390 }; 391 } 392 393 // ListProvisioningApprovalRequests 394 rpc ListProvisioningApprovalRequests(ListProvisioningApprovalRequestsRequest) 395 returns (ListProvisioningApprovalRequestsResponse) { 396 option (google.api.http) = { 397 get : "/v1alpha2/{parent=projects/*/regions/*/provisioningPolicies/*}/" 398 "provisioningApprovalRequests" 399 }; 400 } 401 402 // WatchProvisioningApprovalRequest 403 rpc WatchProvisioningApprovalRequest(WatchProvisioningApprovalRequestRequest) 404 returns (stream WatchProvisioningApprovalRequestResponse) { 405 option (google.api.http) = { 406 post : "/v1alpha2/{name=projects/*/regions/*/provisioningPolicies/*/" 407 "provisioningApprovalRequests/*}:watch" 408 }; 409 } 410 411 // WatchProvisioningApprovalRequests 412 rpc WatchProvisioningApprovalRequests( 413 WatchProvisioningApprovalRequestsRequest) 414 returns (stream WatchProvisioningApprovalRequestsResponse) { 415 option (google.api.http) = { 416 post : "/v1alpha2/{parent=projects/*/regions/*/provisioningPolicies/*}/" 417 "provisioningApprovalRequests:watch" 418 }; 419 } 420 421 // CreateProvisioningApprovalRequest 422 rpc CreateProvisioningApprovalRequest( 423 CreateProvisioningApprovalRequestRequest) 424 returns (ProvisioningApprovalRequest) { 425 option (google.api.http) = { 426 post : "/v1alpha2/{parent=projects/*/regions/*/provisioningPolicies/*}/" 427 "provisioningApprovalRequests" 428 body : "provisioning_approval_request" 429 }; 430 } 431 432 // UpdateProvisioningApprovalRequest 433 rpc UpdateProvisioningApprovalRequest( 434 UpdateProvisioningApprovalRequestRequest) 435 returns (ProvisioningApprovalRequest) { 436 option (google.api.http) = { 437 put : "/v1alpha2/{provisioning_approval_request.name=projects/*/regions/" 438 "*/provisioningPolicies/*/provisioningApprovalRequests/*}" 439 body : "provisioning_approval_request" 440 }; 441 } 442 443 // DeleteProvisioningApprovalRequest 444 rpc DeleteProvisioningApprovalRequest( 445 DeleteProvisioningApprovalRequestRequest) 446 returns (google.protobuf.Empty) { 447 option (google.api.http) = { 448 delete : "/v1alpha2/{name=projects/*/regions/*/provisioningPolicies/*/" 449 "provisioningApprovalRequests/*}" 450 }; 451 } 452 453 // ProvisionDeviceForApprovedRequest 454 rpc ProvisionDeviceForApprovedRequest( 455 ProvisionDeviceForApprovedRequestRequest) 456 returns (ProvisionDeviceForApprovedRequestResponse) { 457 option (google.api.http) = { 458 post : "/v1alpha2/{name=projects/*/regions/*/provisioningPolicies/*/" 459 "provisioningApprovalRequests/*}:provisionDeviceForApprovedRequest" 460 }; 461 } 462 }