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
//! Version Management Service.
//!
//! This module provides support for ArcGIS Version Management Services, which
//! handle versioned geodatabase operations including:
//!
//! - Edit sessions (startEditing/stopEditing)
//! - Version creation and management
//! - Reconciliation and posting
//! - Branch vs Traditional versioning workflows
//!
//! # Edit Sessions
//!
//! Edit sessions are required when working with branch-versioned geodatabases.
//! They provide write locks and transaction semantics:
//!
//! ```no_run
//! use arcgis::{
//! ArcGISClient, ClientCredentialsAuth, VersionManagementClient, SessionId
//! };
//! use uuid::Uuid;
//!
//! # async fn example() -> arcgis::Result<()> {
//! let auth = ClientCredentialsAuth::new(
//! "client_id".to_string(),
//! "client_secret".to_string(),
//! ).expect("Valid credentials");
//! let client = ArcGISClient::new(auth);
//!
//! let vm_client = VersionManagementClient::new(
//! "https://services.arcgis.com/org/arcgis/rest/services/MyService/VersionManagementServer",
//! &client,
//! );
//!
//! let version_guid = Uuid::parse_str("550e8400-e29b-41d4-a716-446655440000")
//! .expect("Valid UUID");
//! let session_id = SessionId::new();
//!
//! // Start editing
//! vm_client.start_editing(version_guid.into(), session_id).await?;
//!
//! // Perform edits...
//!
//! // Save changes
//! vm_client.stop_editing(version_guid.into(), session_id, true).await?;
//! # Ok(())
//! # }
//! ```
pub use VersionManagementClient;
pub use ;