diff --git a/arangodb-net-standard/GraphApi/GraphApiClient.cs b/arangodb-net-standard/GraphApi/GraphApiClient.cs index 1468456c..ea8a2ba9 100644 --- a/arangodb-net-standard/GraphApi/GraphApiClient.cs +++ b/arangodb-net-standard/GraphApi/GraphApiClient.cs @@ -54,7 +54,7 @@ public GraphApiClient(IApiClientTransport transport, IApiClientSerialization ser /// /// The creation of a graph requires the name of the graph and a definition of its edges. /// - /// The information of the graph to create. + /// The information of the graph to create. Must be an instance of or . /// Optional query parameters of the request. /// public virtual async Task PostGraphAsync( diff --git a/arangodb-net-standard/GraphApi/Models/PostGraphBody.cs b/arangodb-net-standard/GraphApi/Models/PostGraphBody.cs index b0095d88..21dbf5b4 100644 --- a/arangodb-net-standard/GraphApi/Models/PostGraphBody.cs +++ b/arangodb-net-standard/GraphApi/Models/PostGraphBody.cs @@ -6,7 +6,8 @@ namespace ArangoDBNetStandard.GraphApi.Models /// Represents a request body to create a named graph. /// /// - /// The creation of a graph requires the name of the graph and a definition of its edges. + /// The creation of a graph requires the name of the graph + /// and a definition of its edges. /// public class PostGraphBody { @@ -34,9 +35,20 @@ public class PostGraphBody /// public bool? IsSmart { get; set; } + /// + /// (Optional) Whether to create a Disjoint SmartGraph instead + /// of a regular SmartGraph (Enterprise Edition only). + /// + /// + /// (cluster only) + /// + public bool? IsDisjoint { get; set; } + /// /// (Optional) Defines options for creating collections within this graph. + /// Must be an instance of or + /// /// public PostGraphOptions Options { get; set; } } -} +} \ No newline at end of file diff --git a/arangodb-net-standard/GraphApi/Models/PostGraphOptions.cs b/arangodb-net-standard/GraphApi/Models/PostGraphOptions.cs index 76a248af..026bee02 100644 --- a/arangodb-net-standard/GraphApi/Models/PostGraphOptions.cs +++ b/arangodb-net-standard/GraphApi/Models/PostGraphOptions.cs @@ -1,9 +1,11 @@ -namespace ArangoDBNetStandard.GraphApi.Models +using System.Collections.Generic; + +namespace ArangoDBNetStandard.GraphApi.Models { /// /// Defines options for creating collections within a graph. /// - public class PostGraphOptions + public abstract class PostGraphOptions { /// /// The attribute name that is used to smartly shard the vertices of a graph. @@ -18,21 +20,12 @@ public class PostGraphOptions public string SmartGraphAttribute { get; set; } /// - /// The number of shards that is used for every collection within this graph. - /// Cannot be modified later. - /// - /// - /// (cluster only) - /// - public int NumberOfShards { get; set; } - - /// - /// The replication factor used when initially creating collections for this graph - /// (Enterprise Edition only). + /// (Optional) An array of collection names that will be used + /// to create SatelliteCollections for a + /// Hybrid (Disjoint) SmartGraph (Enterprise Edition only). + /// Each array element must be a string and a valid collection name. + /// The collection type cannot be modified later. /// - /// - /// (cluster only) - /// - public int ReplicationFactor { get; set; } + public IEnumerable Satellites { get; set; } } -} +} \ No newline at end of file diff --git a/arangodb-net-standard/GraphApi/Models/PostNonSatelliteGraphOptions.cs b/arangodb-net-standard/GraphApi/Models/PostNonSatelliteGraphOptions.cs new file mode 100644 index 00000000..8bbe080a --- /dev/null +++ b/arangodb-net-standard/GraphApi/Models/PostNonSatelliteGraphOptions.cs @@ -0,0 +1,41 @@ +namespace ArangoDBNetStandard.GraphApi.Models +{ + /// + /// Options to create a non-satellite graph. + /// + public class PostNonSatelliteGraphOptions : PostGraphOptions + { + /// + /// The replication factor used when initially creating collections for this graph + /// (Enterprise Edition only). + /// + /// + /// (cluster only) + /// + public int ReplicationFactor { get; set; } + + /// + /// The number of shards that is used for every collection within this graph. + /// Cannot be modified later. + /// + /// + /// (cluster only) + /// + public int NumberOfShards { get; set; } + + /// + /// Write concern for new collections in the graph. + /// It determines how many copies of each shard are + /// required to be in sync on the different DB-Servers. + /// If there are less then these many copies in the cluster + /// a shard will refuse to write. Writes to shards with + /// enough up-to-date copies will succeed at the same time however. + /// The value of writeConcern can not be larger than + /// . + /// + /// + /// (cluster only) + /// + public int? WriteConcern { get; set; } + } +} \ No newline at end of file diff --git a/arangodb-net-standard/GraphApi/Models/PostSatelliteGraphOptions.cs b/arangodb-net-standard/GraphApi/Models/PostSatelliteGraphOptions.cs new file mode 100644 index 00000000..23cc9142 --- /dev/null +++ b/arangodb-net-standard/GraphApi/Models/PostSatelliteGraphOptions.cs @@ -0,0 +1,14 @@ +namespace ArangoDBNetStandard.GraphApi.Models +{ + /// + /// Options to create a satellite graph. + /// + public class PostSatelliteGraphOptions : PostGraphOptions + { + /// + /// Always set to "satellite" to create + /// a SatelliteGraph (Enterprise Edition only). + /// + public string ReplicationFactor { get; } = "satellite"; + } +} \ No newline at end of file