-
Notifications
You must be signed in to change notification settings - Fork 2
/
ApplyEditsRequest.proto
132 lines (106 loc) · 4.54 KB
/
ApplyEditsRequest.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/* Copyright 2023 Esri
*
* Licensed under the Apache License Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
syntax = "proto3";
package esriPBuffer.graph;
option java_package = "com.esri.arcgis.protobuf.graph";
option optimize_for = LITE_RUNTIME;
option cc_enable_arenas = true;
import "esriPBuffer/EsriTypes.proto";
import "esriPBuffer/graph/EsriGraphTypes.proto";
import "esriPBuffer/graph/GraphObjectIdentifierSet.proto";
//
// GraphApplyEdits - Request messages
// ../KnowledgeGraphServer/graph/applyedits
//
message NamedObjectAdd {
reserved 1; // Used prior to 11.1 for map-based `KeyValuePair` representation.
// `arcgisManagedData`: `true` services will generate the objectid when not included in the `properties` map.
repeated KeyValuePair properties = 2;
// When the unique id value is not provided, the system will generate the unique identifier value using the id generation hint in
// `idMappingInfo` of the service as described in the data model. If the system is unable to generate a unique id, the ApplyEdits request will fail.
AnyValue id = 3;
}
message EntityAdd {
NamedObjectAdd entity = 1;
}
message RelationshipAdd {
NamedObjectAdd relationship = 1;
AnyValue origin_id = 2;
AnyValue dest_id = 3;
}
message EntityAdds {
repeated EntityAdd entity_adds = 1;
}
message RelationshipAdds {
repeated RelationshipAdd relationship_adds = 1;
}
message Adds {
// Entity adds grouped by entity type name.
map<string, EntityAdds> entities = 1;
// Relationship adds grouped by relationship type name.
map<string, RelationshipAdds> relationships = 2;
}
message NamedObjectUpdate {
reserved 1, 2, 3; // Used before 11.1
reserved "oid", "globalid";
// Unique ID of the `NamedObject`. This could be either globalid, database native ID or user defined unique ID.
oneof id {
AnyValue update_id = 4;
}
// Properties map does not need to include identifiers (i.e unique identifier, objectid, globalid).
repeated KeyValuePair properties = 5;
}
message NamedObjectUpdates {
repeated NamedObjectUpdate namedObjectUpdates = 1;
}
message Updates {
// Entity updates grouped by entity type name.
map<string, NamedObjectUpdates> entities = 1;
// Relationship updates grouped by relationship type name.
map<string, NamedObjectUpdates> relationships = 2;
}
message Deletes {
// Entity ID arrays grouped by entity type name.
map<string, GraphObjectIdentifierSet> deleted_entity_ids = 1;
// Relationship ID arrays grouped by relationship type name.
map<string, GraphObjectIdentifierSet> deleted_relationship_ids = 2;
}
message GraphApplyEditsHeader {
// Notes: We are removing OID support from ApplyEdits in 11.1. The following contracts have changed:
// 1. ApplyEdits response no longer return OIDs.
// 2. ApplyEdits does not support `Updates` using OID.
// 3. ApplyEdits does not support `Deletes` using OID.
// 4. `useGlobalIDs` is no longer required in the ApplyEdits request.
reserved 2;
reserved "useGlobalIDs";
EsriTypes.SpatialReference spatialReference = 1;
// Set `cascade_delete` to `true` to automatically delete all relationships connected to an entity prior to deleting the entity.
// Set `cascade_delete` to `false` to enforce clients provide both entities and their connected relationships for deletion.
// When connected relationships are not provided, the ApplyEdits operation will fail.
// default value of `cascade_delete` is `false`.
bool cascade_delete = 3;
// Only applies to geometries sent by the client to the server.
Transform input_transform = 4;
// Set `cascade_delete_provenance` to `true` to automatically delete all provenance records associated to deleted entities, relationships or property values.
// Set `cascade_delete_provenance` to `false` to enforce clients to provide provenance records associated to deleted entities, relationships or property values.
// When associated provenance records are not provided, the ApplyEdits operation will fail.
// The default value of `cascade_delete_provenance` is `false`.
bool cascade_delete_provenance = 5;
}
message GraphApplyEditsFrame {
graph.Adds adds = 1;
graph.Updates updates = 2;
graph.Deletes deletes = 3;
}