github.com/cloudwan/edgelq-sdk@v1.15.4/iam/proto/v1/attestation_domain_service.proto (about) 1 syntax = "proto3"; 2 3 package ntt.iam.v1; 4 5 import "edgelq-sdk/iam/proto/v1/attestation_domain.proto"; 6 import "edgelq-sdk/iam/proto/v1/attestation_domain_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/attestation_domain;attestation_domain_client"; 16 option java_multiple_files = false; 17 option java_outer_classname = "AttestationDomainServiceProto"; 18 option java_package = "com.ntt.iam.pb.v1"; 19 20 // A request message of the GetAttestationDomain method. 21 message GetAttestationDomainRequest { 22 // Name of ntt.iam.v1.AttestationDomain 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 BatchGetAttestationDomains method. 35 message BatchGetAttestationDomainsRequest { 36 // Names of AttestationDomains 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 BatchGetAttestationDomains method. 51 message BatchGetAttestationDomainsResponse { 52 // found AttestationDomains 53 repeated AttestationDomain attestation_domains = 1; 54 55 // list of not found AttestationDomains 56 repeated string missing = 2; 57 } 58 59 // A request message of the ListAttestationDomains method. 60 message ListAttestationDomainsRequest { 61 // Parent name of ntt.iam.v1.AttestationDomain 62 string parent = 1; 63 64 // Requested page size. Server may return fewer AttestationDomains 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 // ListAttestationDomainsResponse.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 ListAttestationDomains method. 102 message ListAttestationDomainsResponse { 103 // The list of AttestationDomains 104 repeated AttestationDomain attestation_domains = 1; 105 106 // A token to retrieve previous page of results. 107 // 108 // Pass this value in the ListAttestationDomainsRequest.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 ListAttestationDomainsRequest.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 AttestationDomains 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 WatchAttestationDomain method. 129 message WatchAttestationDomainRequest { 130 // Name of ntt.iam.v1.AttestationDomain 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 WatchAttestationDomain method. 143 message WatchAttestationDomainResponse { AttestationDomainChange change = 1; } 144 145 // A request message of the WatchAttestationDomains method. 146 message WatchAttestationDomainsRequest { 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.AttestationDomain 152 string parent = 1; 153 154 // Requested page size. Server may return fewer AttestationDomains 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 AttestationDomain that 189 // don't 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 // AttestationDomain that don't affect any of masked fields won't be sent 195 // back. 196 goten.types.View view = 8; 197 198 // Maximum amount of changes in each response message. Query result response 199 // is divided on the server side into chunks with size of a specified amount 200 // to limit memory footprint of each message. Responses will hold information 201 // whether more elements will continue for the actual change. If unspecified, 202 // server will pick an appropriate default. 203 int32 max_chunk_size = 11; 204 } 205 206 // A response message of the WatchAttestationDomains method. 207 message WatchAttestationDomainsResponse { 208 // Changes of AttestationDomains 209 repeated AttestationDomainChange attestation_domain_changes = 2; 210 211 // If request specified max_chunk_size (or this limit was enforced if 212 // stateless watch has been chosen), then responses with "full changeset" will 213 // be divided into chunks. Client should keep receiving messages and, once 214 // is_current has value true, combine this recent message with all previous 215 // ones where is_current is false. If this is the first is_current in a whole 216 // watch stream, then it means that client should have, at this moment, 217 // contain snapshot of the current situation (or more accurately, snapshot of 218 // situation at the moment of request). All AttestationDomains will be of type 219 // Added/Current (depending on watch_type specified in the request). Further 220 // responses will be incremental - however messages may still be chunked and 221 // is_current logic still applies. is_current is always true for stateful 222 // watch if max_chunk_size was left to 0. 223 bool is_current = 4; 224 225 // When present, PageTokens used for page navigation should be updated. 226 // Present only if is_current is true (last chunk). 227 PageTokenChange page_token_change = 3; 228 229 // Token that can be used if current connection drops and client needs to 230 // reconnect. Populated only for stateless watch type. Present only if 231 // is_current is true (last chunk). 232 string resume_token = 5; 233 234 // Server may occasionally send information how many resources should client 235 // have in its state so far (response message without any changes, but with 236 // snapshot_size field specified). If client has different value than the one 237 // sent by the server, then it should be treated by a client as an error and 238 // should reconnect. If value is smaller then 0, then client should ignore 239 // this field as unpopulated. This field should be checked only for stateless 240 // watch. In stateful those kind of errors are handled by the server side. 241 // Will be never sent together with is_current, is_soft_reset and 242 // is_hard_reset flags. 243 int64 snapshot_size = 6; 244 245 // In case of internal issue server may send response message with this flag. 246 // It indicates that client should drop all changes from recent responses 247 // where is_current is false only! If last message had is_current set to true, 248 // client should do nothing and process normally. Resume token received before 249 // is still valid. This field should be checked only for stateless watch. In 250 // stateful those kind of errors are handled by the server side. Will never be 251 // sent along with is_current, is_hard_reset or snapshot_size. 252 bool is_soft_reset = 7; 253 254 // In case of internal issue server may send response message with this flag. 255 // After receiving, client should clear whole state (drop all changes received 256 // so far) as server will send new snapshot (AttestationDomains will contains 257 // changes of type Current only). Any resume tokens should be discarded as 258 // well. This field should be checked only for stateless watch. In stateful 259 // those kind of errors are handled by the server side. Will never be sent 260 // along with is_current, is_soft_reset or snapshot_size. 261 bool is_hard_reset = 8; 262 263 message PageTokenChange { 264 // New token to retrieve previous page of results. 265 string prev_page_token = 1; 266 267 // New token to retrieve next page of results. 268 string next_page_token = 2; 269 } 270 } 271 272 // A request message of the CreateAttestationDomain method. 273 message CreateAttestationDomainRequest { 274 // Parent name of ntt.iam.v1.AttestationDomain 275 string parent = 1; 276 277 // AttestationDomain resource body 278 AttestationDomain attestation_domain = 2; 279 280 // Optional masking applied to response object to reduce message response 281 // size. 282 ResponseMask response_mask = 3; 283 284 // ResponseMask allows client to reduce response message size. 285 message ResponseMask { 286 oneof masking { 287 // If this flag has value true, then response will contain just empty 288 // resource without any fields populated. 289 bool skip_entire_response_body = 1; 290 291 // If this field is populated, then resource in response will contain only 292 // specific fields. 293 google.protobuf.FieldMask body_mask = 2; 294 } 295 } 296 } 297 298 // A request message of the UpdateAttestationDomain method. 299 message UpdateAttestationDomainRequest { 300 // AttestationDomain resource body 301 AttestationDomain attestation_domain = 2; 302 303 // FieldMask applied to request - change will be applied only for fields in 304 // the mask 305 google.protobuf.FieldMask update_mask = 3; 306 307 // Conditional update applied to request if update should be executed only for 308 // specific resource state. If this field is populated, then server will fetch 309 // existing resource, compare with the one stored in the cas field (after 310 // applying field mask) and proceed with update only and only if they match. 311 // Otherwise RPC error Aborted will be returned. 312 CAS cas = 4; 313 314 // If set to true, and the resource is not found, 315 // a new resource will be created. In this situation, 316 // 'field_mask' is ignored. 317 // 318 // https://google.aip.dev/134#create-or-update 319 bool allow_missing = 5; // Optional masking applied to response object to 320 321 // reduce message response size. 322 ResponseMask response_mask = 6; 323 324 // CAS - Compare and Swap. This object is used if user wants to make update 325 // conditional based upon previous resource version. 326 message CAS { 327 // Conditional desired state of a resource before update. 328 AttestationDomain conditional_state = 1; 329 330 // Field paths from conditional state of resource server should check and 331 // compare. 332 google.protobuf.FieldMask field_mask = 2; 333 } 334 335 // ResponseMask allows client to reduce response message size. 336 message ResponseMask { 337 oneof masking { 338 // If this flag has value true, then response will contain just empty 339 // resource without any fields populated. Field body_mask is ignored if 340 // set. 341 bool skip_entire_response_body = 1; 342 343 // Include all fields that were actually updated during processing. Note 344 // this may be larger than update mask if some fields were computed 345 // additionally. Name is added as well. 346 bool updated_fields_only = 2; 347 348 // If this field is populated, then resource in response will contain only 349 // specific fields. If skip_entire_response_body is true, this field is 350 // ignored. 351 google.protobuf.FieldMask body_mask = 3; 352 } 353 } 354 } 355 356 // A request message of the DeleteAttestationDomain method. 357 message DeleteAttestationDomainRequest { 358 // Name of ntt.iam.v1.AttestationDomain 359 string name = 1; 360 361 // If set to true, and the resource is not found, method will be successful 362 // and will not return NotFound error. 363 bool allow_missing = 2; 364 } 365 366 // AttestationDomain service API for IAM 367 service AttestationDomainService { 368 option (google.api.default_host) = "iam.edgelq.com"; 369 option (google.api.oauth_scopes) = "https://apis.edgelq.com"; 370 371 // GetAttestationDomain 372 rpc GetAttestationDomain(GetAttestationDomainRequest) 373 returns (AttestationDomain) { 374 option (google.api.http) = { 375 get : "/v1/{name=projects/*/attestationDomains/*}" 376 }; 377 } 378 379 // BatchGetAttestationDomains 380 rpc BatchGetAttestationDomains(BatchGetAttestationDomainsRequest) 381 returns (BatchGetAttestationDomainsResponse) { 382 option (google.api.http) = { 383 get : "/v1/attestationDomains:batchGet" 384 }; 385 } 386 387 // ListAttestationDomains 388 rpc ListAttestationDomains(ListAttestationDomainsRequest) 389 returns (ListAttestationDomainsResponse) { 390 option (google.api.http) = { 391 get : "/v1/{parent=projects/*}/attestationDomains" 392 }; 393 } 394 395 // WatchAttestationDomain 396 rpc WatchAttestationDomain(WatchAttestationDomainRequest) 397 returns (stream WatchAttestationDomainResponse) { 398 option (google.api.http) = { 399 post : "/v1/{name=projects/*/attestationDomains/*}:watch" 400 }; 401 } 402 403 // WatchAttestationDomains 404 rpc WatchAttestationDomains(WatchAttestationDomainsRequest) 405 returns (stream WatchAttestationDomainsResponse) { 406 option (google.api.http) = { 407 post : "/v1/{parent=projects/*}/attestationDomains:watch" 408 }; 409 } 410 411 // CreateAttestationDomain 412 rpc CreateAttestationDomain(CreateAttestationDomainRequest) 413 returns (AttestationDomain) { 414 option (google.api.http) = { 415 post : "/v1/{parent=projects/*}/attestationDomains" 416 body : "attestation_domain" 417 }; 418 } 419 420 // UpdateAttestationDomain 421 rpc UpdateAttestationDomain(UpdateAttestationDomainRequest) 422 returns (AttestationDomain) { 423 option (google.api.http) = { 424 put : "/v1/{attestation_domain.name=projects/*/attestationDomains/*}" 425 body : "attestation_domain" 426 }; 427 } 428 429 // DeleteAttestationDomain 430 rpc DeleteAttestationDomain(DeleteAttestationDomainRequest) 431 returns (google.protobuf.Empty) { 432 option (google.api.http) = { 433 delete : "/v1/{name=projects/*/attestationDomains/*}" 434 }; 435 } 436 }