|
| 1 | +syntax = "proto3"; |
| 2 | + |
| 3 | +package aserto.directory.common.v4; |
| 4 | + |
| 5 | +import "google/api/field_behavior.proto"; |
| 6 | +import "google/protobuf/struct.proto"; |
| 7 | +import "google/protobuf/timestamp.proto"; |
| 8 | + |
| 9 | +option go_package = "github.com/aserto-dev/go-directory/aserto/directory/common/v4;common"; |
| 10 | + |
| 11 | +// Manifest |
| 12 | +message Manifest { |
| 13 | + // manifest payload |
| 14 | + bytes body = 1; |
| 15 | + // last updated timestamp (UTC) |
| 16 | + google.protobuf.Timestamp updated_at = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 17 | + // manifest instance etag |
| 18 | + string etag = 23 [(google.api.field_behavior) = OPTIONAL]; |
| 19 | +} |
| 20 | + |
| 21 | +// Model |
| 22 | +message Model { |
| 23 | + // model representation of manifest |
| 24 | + google.protobuf.Struct model = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 25 | + // last updated timestamp (UTC) |
| 26 | + google.protobuf.Timestamp updated_at = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 27 | + // manifest instance etag |
| 28 | + string etag = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 29 | +} |
| 30 | + |
| 31 | +// Object |
| 32 | +message Object { |
| 33 | + // object type name |
| 34 | + string object_type = 1 [(google.api.field_behavior) = REQUIRED]; |
| 35 | + // external object identifier (cs-string, no spaces or tabs) |
| 36 | + string object_id = 2 [(google.api.field_behavior) = REQUIRED]; |
| 37 | + // property bag |
| 38 | + google.protobuf.Struct properties = 4 [(google.api.field_behavior) = OPTIONAL]; |
| 39 | + // last updated timestamp (UTC) |
| 40 | + google.protobuf.Timestamp updated_at = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 41 | + // object instance etag |
| 42 | + string etag = 23 [(google.api.field_behavior) = OPTIONAL]; |
| 43 | +} |
| 44 | + |
| 45 | +// Relation |
| 46 | +message Relation { |
| 47 | + // object type |
| 48 | + string object_type = 1 [(google.api.field_behavior) = REQUIRED]; |
| 49 | + // object identifier |
| 50 | + string object_id = 2 [(google.api.field_behavior) = REQUIRED]; |
| 51 | + // object relation name |
| 52 | + string relation = 3 [(google.api.field_behavior) = REQUIRED]; |
| 53 | + // subject type |
| 54 | + string subject_type = 4 [(google.api.field_behavior) = REQUIRED]; |
| 55 | + // subject identifier |
| 56 | + string subject_id = 5 [(google.api.field_behavior) = REQUIRED]; |
| 57 | + // optional subject relation name |
| 58 | + string subject_relation = 6 [(google.api.field_behavior) = OPTIONAL]; |
| 59 | + // last updated timestamp (UTC) |
| 60 | + google.protobuf.Timestamp updated_at = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 61 | + // object instance etag |
| 62 | + string etag = 23 [(google.api.field_behavior) = OPTIONAL]; |
| 63 | +} |
| 64 | + |
| 65 | +// Object identifier |
| 66 | +message ObjectIdentifier { |
| 67 | + // object type (lc-string) |
| 68 | + string object_type = 1 [(google.api.field_behavior) = REQUIRED]; |
| 69 | + // object identifier (cs-string) |
| 70 | + string object_id = 2 [(google.api.field_behavior) = REQUIRED]; |
| 71 | +} |
| 72 | + |
| 73 | +// Relation identifier |
| 74 | +message RelationIdentifier { |
| 75 | + // object type |
| 76 | + string object_type = 1 [(google.api.field_behavior) = REQUIRED]; |
| 77 | + // object identifier |
| 78 | + string object_id = 2 [(google.api.field_behavior) = REQUIRED]; |
| 79 | + // object relation name |
| 80 | + string relation = 3 [(google.api.field_behavior) = REQUIRED]; |
| 81 | + // subject type |
| 82 | + string subject_type = 4 [(google.api.field_behavior) = REQUIRED]; |
| 83 | + // subject identifier |
| 84 | + string subject_id = 5 [(google.api.field_behavior) = REQUIRED]; |
| 85 | + // optional subject relation name |
| 86 | + string subject_relation = 6 [(google.api.field_behavior) = OPTIONAL]; |
| 87 | +} |
| 88 | + |
| 89 | +// Pagination request |
| 90 | +message PaginationRequest { |
| 91 | + // requested page size, valid value between 1-100 rows (default 100) |
| 92 | + int32 size = 1 [(google.api.field_behavior) = OPTIONAL]; |
| 93 | + // pagination start token, default "" |
| 94 | + string token = 2 [(google.api.field_behavior) = OPTIONAL]; |
| 95 | +} |
| 96 | + |
| 97 | +// Pagination response |
| 98 | +message PaginationResponse { |
| 99 | + // next page token, when empty there are no more pages to fetch |
| 100 | + string next_token = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 101 | +} |
0 commit comments