├── .circleci └── config.yml ├── .gitignore ├── ChangeLog.md ├── ErrorEnumGenerator ├── ErrorEnumGenerator.csproj └── Program.cs ├── LICENSE ├── arangodb-net-standard.Test ├── AdminApi │ ├── AdminApiClientTest.cs │ └── AdminApiClientTestFixture.cs ├── AnalyzerApi │ ├── AnalyzerApiClientTest.cs │ └── AnalyzerApiClientTestFixture.cs ├── ApiClientTestFixtureBase.cs ├── AqlFunctionApi │ ├── AqlFunctionApiClientTest.cs │ └── AqlFunctionApiClientTestFixture.cs ├── ArangoDBClientTest.cs ├── ArangoDBNetStandardTest.csproj ├── AuthApi │ ├── AuthApiClientTest.cs │ └── AuthApiClientTestFixture.cs ├── BulkOperationsApi │ ├── BulkOperationsApiClientTest.cs │ └── BulkOperationsApiClientTestFixture.cs ├── CollectionApi │ ├── CollectionApiClientTest.cs │ └── CollectionApiClientTestFixture.cs ├── CursorApi │ ├── CursorApiClientTest.cs │ └── CursorApiClientTestFixture.cs ├── DatabaseApi │ ├── DatabaseApiClientTest.cs │ └── DatabaseApiClientTestFixture.cs ├── Docs │ ├── UsageTest.cs │ └── UsageTestFixture.cs ├── DocumentApi │ ├── DocumentApiClientTest.cs │ ├── DocumentApiClientTestFixture.cs │ └── Models │ │ ├── PatchDocumentMockModel.cs │ │ ├── PatchDocumentsMockModel.cs │ │ ├── PostDocumentMockModel.cs │ │ └── PostDocumentMockModelNew.cs ├── GraphApi │ ├── GraphApiClientTest.cs │ ├── GraphApiClientTestFixture.cs │ └── Models │ │ ├── DeleteGraphEdgeMockModel.cs │ │ ├── DeleteVertexMockModel.cs │ │ ├── GetVertexMockModel.cs │ │ ├── PatchEdgeMockModel.cs │ │ ├── PatchVertexMockModel.cs │ │ └── PutVertexMockModel.cs ├── IndexApi │ ├── IndexApiClientTest.cs │ └── IndexApiClientTestFixture.cs ├── Serialization │ ├── JsonNetApiClientSerializationTest.cs │ └── Models │ │ ├── InnerTestModel.cs │ │ └── TestModel.cs ├── TransactionApi │ ├── TransactionApiClientTest.cs │ └── TransactionApiClientTestFixture.cs ├── Transport │ └── Http │ │ ├── HttpApiTransportTest.cs │ │ └── HttpApiTransportTestFixture.cs ├── UserApi │ ├── UserApiClientTest.cs │ └── UserApiClientTestFixture.cs └── ViewApi │ ├── ViewApiClientTest.cs │ └── ViewApiClientTestFixture.cs ├── arangodb-net-standard.sln ├── arangodb-net-standard ├── AdminApi │ ├── AdminApiClient.cs │ ├── IAdminApiClient.cs │ └── Models │ │ ├── EngineAlias.cs │ │ ├── EngineSupports.cs │ │ ├── GetLicenseResponse.cs │ │ ├── GetLogsQuery.cs │ │ ├── GetLogsResponse.cs │ │ ├── GetServerEngineTypeResponse.cs │ │ ├── GetServerIdResponse.cs │ │ ├── GetServerRoleResponse.cs │ │ ├── GetServerVersionQuery.cs │ │ ├── GetServerVersionResponse.cs │ │ ├── LicenseFeatures.cs │ │ ├── LogLevel.cs │ │ ├── LogMessage.cs │ │ ├── PutLicenseQuery.cs │ │ ├── PutLicenseResponse.cs │ │ └── ResponseBase.cs ├── AnalyzerApi │ ├── AnalyzerApiClient.cs │ ├── IAnalyzerApiClient.cs │ └── Models │ │ ├── Analyzer.cs │ │ ├── AnalyzerFeatures.cs │ │ ├── AnalyzerProperties.cs │ │ ├── DeleteAnalyzerResponse.cs │ │ ├── GeoJSONAnalyzerOptions.cs │ │ ├── GetAllAnalyzersResponse.cs │ │ ├── GetAnalyzerResponse.cs │ │ ├── ResponseBase.cs │ │ └── TextAnalyzerEdgeNgram.cs ├── ApiClientBase.cs ├── ApiErrorException.cs ├── ApiErrorResponse.cs ├── ApiHeaderProperties.cs ├── AqlFunctionApi │ ├── AqlFunctionApiClient.cs │ ├── IAqlFunctionApiClient.cs │ └── Models │ │ ├── AqlFunctionResult.cs │ │ ├── CachedAqlQueryResult.cs │ │ ├── DeleteAqlFunctionQuery.cs │ │ ├── DeleteAqlFunctionResponse.cs │ │ ├── DeleteClearSlowAqlQueriesQuery.cs │ │ ├── DeleteKillRunningAqlQueryQuery.cs │ │ ├── GetAqlFunctionsQuery.cs │ │ ├── GetAqlFunctionsResponse.cs │ │ ├── GetCurrentlyRunningAqlQueriesQuery.cs │ │ ├── GetQueryRule.cs │ │ ├── GetQueryRuleFlags.cs │ │ ├── GetSlowAqlQueriesQuery.cs │ │ ├── PostAqlFunctionBody.cs │ │ ├── PostAqlFunctionResponse.cs │ │ ├── PostExplainAqlQueryBody.cs │ │ ├── PostExplainAqlQueryBodyOptimizer.cs │ │ ├── PostExplainAqlQueryBodyOptions.cs │ │ ├── PostExplainAqlQueryResponse.cs │ │ ├── PostExplainAqlQueryResponseCollection.cs │ │ ├── PostExplainAqlQueryResponseCondition.cs │ │ ├── PostExplainAqlQueryResponseIndex.cs │ │ ├── PostExplainAqlQueryResponseIndexHint.cs │ │ ├── PostExplainAqlQueryResponseNode.cs │ │ ├── PostExplainAqlQueryResponsePlan.cs │ │ ├── PostExplainAqlQueryResponseStats.cs │ │ ├── PostExplainAqlQueryResponseVariable.cs │ │ ├── PostParseAqlQueryBody.cs │ │ ├── PostParseAqlQueryResponse.cs │ │ ├── PostParseAqlQueryResponseAstNode.cs │ │ ├── PutAdjustQueryCacheGlobalPropertiesBody.cs │ │ ├── PutChangeQueryTrackingConfigurationBody.cs │ │ ├── QueryCacheGlobalProperties.cs │ │ ├── QueryTrackingConfiguration.cs │ │ ├── ResponseBase.cs │ │ ├── RunningAqlQuery.cs │ │ └── SlowAqlQuery.cs ├── ArangoDBClient.cs ├── ArangoDBErrors.cs ├── ArangoDBNetStandard.csproj ├── AuthApi │ ├── AuthApiClient.cs │ ├── IAuthApiClient.cs │ └── Models │ │ ├── JwtTokenRequestBody.cs │ │ └── JwtTokenResponse.cs ├── BulkOperationsApi │ ├── BulkOperationsApiClient.cs │ ├── IBulkOperationsApiClient.cs │ └── Models │ │ ├── ImportDocumentArraysBody.cs │ │ ├── ImportDocumentObjectsBody.cs │ │ ├── ImportDocumentsOnDuplicate.cs │ │ ├── ImportDocumentsQuery.cs │ │ └── ImportDocumentsResponse.cs ├── CollectionApi │ ├── CollectionApiClient.cs │ ├── ICollectionApiClient.cs │ └── Models │ │ ├── CollectionHeaderProperties.cs │ │ ├── CollectionKeyOptions.cs │ │ ├── CollectionSchema.cs │ │ ├── CollectionSchemaLevel.cs │ │ ├── CollectionShardsKeyOption.cs │ │ ├── CollectionShardsResponseBase.cs │ │ ├── CollectionType.cs │ │ ├── ComputedValue.cs │ │ ├── DeleteCollectionResponse.cs │ │ ├── Figures │ │ ├── Alive.cs │ │ ├── CompactionStatus.cs │ │ ├── Compactors.cs │ │ ├── DataFiles.cs │ │ ├── Dead.cs │ │ ├── Indexes.cs │ │ ├── Journals.cs │ │ ├── Readcache.cs │ │ └── Revisions.cs │ │ ├── FiguresResult.cs │ │ ├── GetChecksumQuery.cs │ │ ├── GetChecksumResponse.cs │ │ ├── GetCollectionCountResponse.cs │ │ ├── GetCollectionFiguresResponse.cs │ │ ├── GetCollectionPropertiesResponse.cs │ │ ├── GetCollectionResponse.cs │ │ ├── GetCollectionRevisionResponse.cs │ │ ├── GetCollectionShardsDetailedResponse.cs │ │ ├── GetCollectionShardsResponse.cs │ │ ├── GetCollectionsQuery.cs │ │ ├── GetCollectionsResponse.cs │ │ ├── GetCollectionsResponseResult.cs │ │ ├── PostCollectionBody.cs │ │ ├── PostCollectionQuery.cs │ │ ├── PostCollectionResponse.cs │ │ ├── PostCollectionResponseCollectionKeyOptions.cs │ │ ├── PutCollectionPropertyBody.cs │ │ ├── PutCollectionPropertyResponse.cs │ │ ├── PutCompactCollectionDataResponse.cs │ │ ├── PutDocumentShardResponse.cs │ │ ├── PutLoadIndexesIntoMemoryResponse.cs │ │ ├── PutRecalculateCountResponse.cs │ │ ├── RenameCollectionBody.cs │ │ ├── RenameCollectionResponse.cs │ │ ├── ResponseBase.cs │ │ └── TruncateCollectionResponse.cs ├── CursorApi │ ├── CursorApiClient.cs │ ├── ICursorApiClient.cs │ └── Models │ │ ├── CursorHeaderProperties.cs │ │ ├── CursorResponse.cs │ │ ├── CursorResponseBase.cs │ │ ├── CursorResponseExtra.cs │ │ ├── CursorResponsePlan.cs │ │ ├── CursorResponsePlanCollection.cs │ │ ├── CursorResponsePlanVariable.cs │ │ ├── CursorResponseStats.cs │ │ ├── CursorResponseStatsNode.cs │ │ ├── CursorResponseWarning.cs │ │ ├── DeleteCursorResponse.cs │ │ ├── ICursorResponse.cs │ │ ├── PostCursorBody.cs │ │ ├── PostCursorOptions.cs │ │ ├── PostCursorOptionsOptimizer.cs │ │ └── PutCursorResponse.cs ├── CustomHttpHeaders.cs ├── DatabaseApi │ ├── DatabaseApiClient.cs │ ├── IDatabaseApiClient.cs │ └── Models │ │ ├── CurrentDatabaseInfo.cs │ │ ├── DatabaseUser.cs │ │ ├── DeleteDatabaseResponse.cs │ │ ├── GetDatabaseInfoResponse.cs │ │ ├── GetDatabasesResponse.cs │ │ ├── PostDatabaseBody.cs │ │ ├── PostDatabaseOptions.cs │ │ └── PostDatabaseResponse.cs ├── Docs │ └── usage.md ├── DocumentApi │ ├── DocumentApiClient.cs │ ├── IDocumentApiClient.cs │ └── Models │ │ ├── DeleteDocumentQuery.cs │ │ ├── DeleteDocumentResponse.cs │ │ ├── DeleteDocumentsDocumentResponse.cs │ │ ├── DeleteDocumentsQuery.cs │ │ ├── DeleteDocumentsResponse.cs │ │ ├── DocumentBase.cs │ │ ├── DocumentHeaderProperties.cs │ │ ├── HeadDocumentResponse.cs │ │ ├── OverwriteModes.cs │ │ ├── PatchDocumentQuery.cs │ │ ├── PatchDocumentResponse.cs │ │ ├── PatchDocumentsDocumentResponse.cs │ │ ├── PatchDocumentsQuery.cs │ │ ├── PatchDocumentsResponse.cs │ │ ├── PostDocumentResponse.cs │ │ ├── PostDocumentsDocumentResponse.cs │ │ ├── PostDocumentsQuery.cs │ │ ├── PostDocumentsResponse.cs │ │ ├── PutDocumentQuery.cs │ │ ├── PutDocumentResponse.cs │ │ ├── PutDocumentsDocumentResponse.cs │ │ ├── PutDocumentsQuery.cs │ │ └── PutDocumentsResponse.cs ├── DriverConstants.cs ├── GraphApi │ ├── GraphApiClient.cs │ ├── IGraphApiClient.cs │ └── Models │ │ ├── DeleteEdgeDefinitionQuery.cs │ │ ├── DeleteEdgeDefinitionResponse.cs │ │ ├── DeleteEdgeQuery.cs │ │ ├── DeleteEdgeResponse.cs │ │ ├── DeleteGraphQuery.cs │ │ ├── DeleteGraphResponse.cs │ │ ├── DeleteVertexCollectionQuery.cs │ │ ├── DeleteVertexCollectionResponse.cs │ │ ├── DeleteVertexQuery.cs │ │ ├── DeleteVertexResponse.cs │ │ ├── EdgeDefinition.cs │ │ ├── EdgeResult.cs │ │ ├── GetEdgeCollectionsResponse.cs │ │ ├── GetEdgeQuery.cs │ │ ├── GetEdgeResponse.cs │ │ ├── GetGraphResponse.cs │ │ ├── GetGraphsResponse.cs │ │ ├── GetVertexCollectionsResponse.cs │ │ ├── GetVertexQuery.cs │ │ ├── GetVertexResponse.cs │ │ ├── GraphHeaderProperties.cs │ │ ├── GraphResult.cs │ │ ├── PatchEdgeQuery.cs │ │ ├── PatchEdgeResponse.cs │ │ ├── PatchEdgeresult.cs │ │ ├── PatchVertexQuery.cs │ │ ├── PatchVertexResponse.cs │ │ ├── PatchVertexResult.cs │ │ ├── PostEdgeDefinitionBody.cs │ │ ├── PostEdgeDefinitionResponse.cs │ │ ├── PostEdgeQuery.cs │ │ ├── PostEdgeResponse.cs │ │ ├── PostGraphBody.cs │ │ ├── PostGraphOptions.cs │ │ ├── PostGraphQuery.cs │ │ ├── PostGraphResponse.cs │ │ ├── PostNonSatelliteGraphOptions.cs │ │ ├── PostSatelliteGraphOptions.cs │ │ ├── PostVertexCollectionBody.cs │ │ ├── PostVertexCollectionResponse.cs │ │ ├── PostVertexQuery.cs │ │ ├── PostVertexResponse.cs │ │ ├── PostVertexResult.cs │ │ ├── PutEdgeDefinitionBody.cs │ │ ├── PutEdgeDefinitionQuery.cs │ │ ├── PutEdgeDefinitionResponse.cs │ │ ├── PutEdgeQuery.cs │ │ ├── PutEdgeResponse.cs │ │ ├── PutEdgeResult.cs │ │ ├── PutVertexQuery.cs │ │ ├── PutVertexResponse.cs │ │ └── PutVertexResult.cs ├── IArangoDBClient.cs ├── IndexApi │ ├── IIndexApiClient.cs │ ├── IndexApiClient.cs │ └── Models │ │ ├── CompressionTypes.cs │ │ ├── DeleteIndexResponse.cs │ │ ├── GetAllCollectionIndexesQuery.cs │ │ ├── GetAllCollectionIndexesResponse.cs │ │ ├── GetIndexResponse.cs │ │ ├── IIndexResponse.cs │ │ ├── IInvertedIndex.cs │ │ ├── IndexResponseBase.cs │ │ ├── IndexTypes.cs │ │ ├── InvertedIndexConsolidationPolicy.cs │ │ ├── InvertedIndexField.cs │ │ ├── InvertedIndexResponse.cs │ │ ├── InvertedIndexSort.cs │ │ ├── InvertedIndexSortItem.cs │ │ ├── InvertedIndexStoredValue.cs │ │ ├── PostFulltextIndexBody.cs │ │ ├── PostGeoSpatialIndexBody.cs │ │ ├── PostHashIndexBody.cs │ │ ├── PostIndexBody.cs │ │ ├── PostIndexQuery.cs │ │ ├── PostInvertedIndexBody.cs │ │ ├── PostMultiDimensionalIndexBody.cs │ │ ├── PostPersistentIndexBody.cs │ │ ├── PostSkiplistIndexBody.cs │ │ ├── PostTTLIndexBody.cs │ │ └── ResponseBase.cs ├── PregelApi │ ├── IPregelApiClient.cs │ ├── Models │ │ ├── PostStartJobBody.cs │ │ ├── PregelAlgorithms.cs │ │ ├── PregelJobDetail.cs │ │ ├── PregelJobDetailInfo.cs │ │ ├── PregelJobGraphStoreStatus.cs │ │ ├── PregelJobGssStatus.cs │ │ ├── PregelJobGssStatusItem.cs │ │ └── PregelJobStatus.cs │ └── PregelApiClient.cs ├── Serialization │ ├── ApiClientSerialization.cs │ ├── ApiClientSerializationOptions.cs │ ├── CamelCasePropertyNamesExceptDictionaryContractResolver.cs │ ├── DictionaryValueConverter.cs │ ├── IApiClientSerialization.cs │ ├── JsonNetApiClientSerialization.cs │ └── SerializationException.cs ├── TransactionApi │ ├── ITransactionApiClient.cs │ ├── Models │ │ ├── PostTransactionBody.cs │ │ ├── PostTransactionRequestCollections.cs │ │ ├── PostTransactionResponse.cs │ │ ├── StreamTransactionBody.cs │ │ ├── StreamTransactionResponse.cs │ │ ├── StreamTransactionResult.cs │ │ ├── StreamTransactionStatus.cs │ │ ├── StreamTransactions.cs │ │ └── Transaction.cs │ └── TransactionApiClient.cs ├── Transport │ ├── Http │ │ ├── HttpApiClientResponse.cs │ │ ├── HttpApiClientResponseContent.cs │ │ ├── HttpApiTransport.cs │ │ └── HttpContentType.cs │ ├── IApiClientResponse.cs │ ├── IApiClientResponseContent.cs │ └── IApiClientTransport.cs ├── UserApi │ ├── IUserApiClient.cs │ ├── Models │ │ ├── AvailableUser.cs │ │ ├── DeleteAccessLevelResponse.cs │ │ ├── DeleteUserResponse.cs │ │ ├── GetAccessLevelResponse.cs │ │ ├── GetAccessibleDatabasesQuery.cs │ │ ├── GetAccessibleDatabasesResponse.cs │ │ ├── GetUserResponse.cs │ │ ├── GetUsersResponse.cs │ │ ├── PatchUserBody.cs │ │ ├── PatchUserResponse.cs │ │ ├── PostUserBody.cs │ │ ├── PostUserResponse.cs │ │ ├── PutAccessLevelBody.cs │ │ ├── PutAccessLevelResponse.cs │ │ ├── PutUserBody.cs │ │ ├── PutUserResponse.cs │ │ ├── ResponseBase.cs │ │ └── UserResponseBase.cs │ └── UserApiClient.cs └── ViewApi │ ├── IViewsApiClient.cs │ ├── Models │ ├── DeleteViewResponse.cs │ ├── GetAllViewsResponse.cs │ ├── GetViewPropertiesResponse.cs │ ├── GetViewResponse.cs │ ├── LinkProperties.cs │ ├── PutRenameViewBody.cs │ ├── PutRenameViewResponse.cs │ ├── ResponseBase.cs │ ├── SearchAliasIndex.cs │ ├── SearchAliasIndexOperation.cs │ ├── SortCompressionTypes.cs │ ├── ViewConsolidationPolicy.cs │ ├── ViewDetails.cs │ ├── ViewResponse.cs │ ├── ViewSort.cs │ ├── ViewStoredValue.cs │ ├── ViewSummary.cs │ └── ViewTypes.cs │ └── ViewsApiClient.cs ├── contributing.md ├── docs-generator └── arangodb-net-standard-docs.shfbproj ├── project └── roadmap.md └── readme.md /ErrorEnumGenerator/ErrorEnumGenerator.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net8.0 6 | enable 7 | enable 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /arangodb-net-standard.Test/ArangoDBNetStandardTest.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net8.0 5 | 6 | false 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /arangodb-net-standard.Test/AuthApi/AuthApiClientTestFixture.cs: -------------------------------------------------------------------------------- 1 | using ArangoDBNetStandard; 2 | using ArangoDBNetStandard.DatabaseApi.Models; 3 | using System.Collections.Generic; 4 | using System.Threading.Tasks; 5 | 6 | namespace ArangoDBNetStandardTest.AuthApi 7 | { 8 | public class AuthApiClientTestFixture : ApiClientTestFixtureBase 9 | { 10 | public ArangoDBClient ArangoDBClient { get; private set; } 11 | 12 | public static string DbName = nameof(AuthApiClientTest); 13 | 14 | public string Username = "abcxyz"; 15 | public string Password = "abczyx"; 16 | 17 | public override async Task InitializeAsync() 18 | { 19 | await CreateDatabase(DbName, new List 20 | { 21 | new DatabaseUser 22 | { 23 | Username = Username, 24 | Passwd = Password, 25 | Active = true 26 | } 27 | }); 28 | 29 | ArangoDBClient = GetArangoDBClient(DbName); 30 | } 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /arangodb-net-standard.Test/CollectionApi/CollectionApiClientTestFixture.cs: -------------------------------------------------------------------------------- 1 | using ArangoDBNetStandard; 2 | using ArangoDBNetStandard.CollectionApi.Models; 3 | using System; 4 | using System.Threading.Tasks; 5 | 6 | namespace ArangoDBNetStandardTest.CollectionApi 7 | { 8 | public class CollectionApiClientTestFixture : ApiClientTestFixtureBase 9 | { 10 | public ArangoDBClient ArangoDBClient { get; internal set; } 11 | 12 | public string TestCollection { get; } = "TestCollection"; 13 | 14 | public CollectionApiClientTestFixture() 15 | { 16 | } 17 | 18 | public override async Task InitializeAsync() 19 | { 20 | await base.InitializeAsync(); 21 | 22 | string dbName = nameof(CollectionApiClientTestFixture); 23 | 24 | await CreateDatabase(dbName); 25 | 26 | ArangoDBClient = GetArangoDBClient(dbName); 27 | await GetVersionAsync(ArangoDBClient); 28 | try 29 | { 30 | await ArangoDBClient.Collection.PostCollectionAsync( 31 | new PostCollectionBody 32 | { 33 | Name = TestCollection 34 | }); 35 | } 36 | catch (ApiErrorException ex) when (ex.ApiError.ErrorNum == 1207) 37 | { 38 | // The collection must exist already, carry on... 39 | Console.WriteLine(ex.Message); 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /arangodb-net-standard.Test/CursorApi/CursorApiClientTestFixture.cs: -------------------------------------------------------------------------------- 1 | using ArangoDBNetStandard; 2 | using ArangoDBNetStandard.CollectionApi.Models; 3 | using System; 4 | using System.Threading.Tasks; 5 | 6 | namespace ArangoDBNetStandardTest.CursorApi 7 | { 8 | public class CursorApiClientTestFixture : ApiClientTestFixtureBase 9 | { 10 | public ArangoDBClient ArangoDBClient { get; private set; } 11 | 12 | public string TestCollection { get; } = "TestCollection"; 13 | 14 | public CursorApiClientTestFixture() 15 | { 16 | } 17 | 18 | public override async Task InitializeAsync() 19 | { 20 | await base.InitializeAsync(); 21 | 22 | string dbName = nameof(CursorApiClientTest); 23 | 24 | await CreateDatabase(dbName); 25 | 26 | ArangoDBClient = GetArangoDBClient(dbName); 27 | await GetVersionAsync(ArangoDBClient); 28 | 29 | try 30 | { 31 | var response = await ArangoDBClient.Collection.PostCollectionAsync( 32 | new PostCollectionBody 33 | { 34 | Name = TestCollection 35 | }); 36 | } 37 | catch (ApiErrorException ex) when (ex.ApiError.ErrorNum == 1207) 38 | { 39 | // The collection must exist already, carry on... 40 | Console.WriteLine(ex.Message); 41 | } 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /arangodb-net-standard.Test/Docs/UsageTestFixture.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ArangoDBNetStandardTest.Docs 6 | { 7 | public class UsageTestFixture: ApiClientTestFixtureBase 8 | { 9 | 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /arangodb-net-standard.Test/DocumentApi/DocumentApiClientTestFixture.cs: -------------------------------------------------------------------------------- 1 | using ArangoDBNetStandard; 2 | using ArangoDBNetStandard.CollectionApi.Models; 3 | using System; 4 | using System.Threading.Tasks; 5 | 6 | namespace ArangoDBNetStandardTest.DocumentApi 7 | { 8 | public class DocumentApiClientTestFixture : ApiClientTestFixtureBase 9 | { 10 | public ArangoDBClient ArangoDBClient { get; private set; } 11 | 12 | public string TestCollection { get; } = "TestCollection"; 13 | 14 | public DocumentApiClientTestFixture() 15 | { 16 | } 17 | 18 | public override async Task InitializeAsync() 19 | { 20 | await base.InitializeAsync(); 21 | 22 | string dbName = nameof(DocumentApiClientTest); 23 | 24 | await CreateDatabase(dbName); 25 | 26 | ArangoDBClient = GetArangoDBClient(dbName); 27 | await GetVersionAsync(ArangoDBClient); 28 | 29 | try 30 | { 31 | var response = await ArangoDBClient.Collection.PostCollectionAsync( 32 | new PostCollectionBody 33 | { 34 | Name = TestCollection 35 | }); 36 | } 37 | catch (ApiErrorException ex) when (ex.ApiError.ErrorNum == 1207) 38 | { 39 | // The collection must exist already, carry on... 40 | Console.WriteLine(ex.Message); 41 | } 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /arangodb-net-standard.Test/DocumentApi/Models/PatchDocumentMockModel.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandardTest.DocumentApi.Models 2 | { 3 | public class PatchDocumentMockModel 4 | { 5 | public string _key { get; set; } 6 | public int value { get; set; } 7 | 8 | public string name { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /arangodb-net-standard.Test/DocumentApi/Models/PatchDocumentsMockModel.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandardTest.DocumentApi.Models 2 | { 3 | class PatchDocumentsMockModel 4 | { 5 | public string _key { get; set; } 6 | 7 | public int Value { get; set; } 8 | 9 | public string Name { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /arangodb-net-standard.Test/DocumentApi/Models/PostDocumentMockModel.cs: -------------------------------------------------------------------------------- 1 | using ArangoDBNetStandard.DocumentApi.Models; 2 | 3 | namespace ArangoDBNetStandardTest.DocumentApi.Models 4 | { 5 | public class PostDocumentMockModel : DocumentBase 6 | { 7 | public string Message { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /arangodb-net-standard.Test/DocumentApi/Models/PostDocumentMockModelNew.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandardTest.DocumentApi.Models 4 | { 5 | public class PostDocumentMockModelNew 6 | { 7 | public string Message { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /arangodb-net-standard.Test/GraphApi/Models/DeleteGraphEdgeMockModel.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandardTest.GraphApi.Models 2 | { 3 | public class DeleteGraphEdgeMockModel 4 | { 5 | public string myKey { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /arangodb-net-standard.Test/GraphApi/Models/DeleteVertexMockModel.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandardTest.GraphApi.Models 2 | { 3 | public class DeleteVertexMockModel 4 | { 5 | public string Name { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /arangodb-net-standard.Test/GraphApi/Models/GetVertexMockModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ArangoDBNetStandardTest.GraphApi.Models 6 | { 7 | public class GetVertexMockModel 8 | { 9 | public string _id { get; set; } 10 | 11 | public string _key { get; set; } 12 | 13 | public string Name { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /arangodb-net-standard.Test/GraphApi/Models/PatchEdgeMockModel.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandardTest.GraphApi.Models 2 | { 3 | public class PatchEdgeMockModel 4 | { 5 | public string _from { get; set; } 6 | 7 | public string _to { get; set; } 8 | 9 | public int value { get; set; } 10 | 11 | public string myKey { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /arangodb-net-standard.Test/GraphApi/Models/PatchVertexMockModel.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandardTest.GraphApi.Models 2 | { 3 | public class PatchVertexMockModel 4 | { 5 | public string _id { get; set; } 6 | 7 | public string _key { get; set; } 8 | 9 | public string _rev { get; set; } 10 | 11 | public string Name { get; set; } 12 | 13 | public string Value { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /arangodb-net-standard.Test/GraphApi/Models/PutVertexMockModel.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandardTest.GraphApi.Models 2 | { 3 | public class PutVertexMockModel 4 | { 5 | public string _id { get; set; } 6 | 7 | public string _key { get; set; } 8 | 9 | public string _rev { get; set; } 10 | 11 | public string Name { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /arangodb-net-standard.Test/Serialization/Models/InnerTestModel.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandardTest.Serialization.Models 2 | { 3 | public class InnerTestModel 4 | { 5 | public string InnerTestModel_NullProperty { get; set; } 6 | 7 | public string InnerTestModel_PropertyToCheckIfCamelCase { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /arangodb-net-standard.Test/Serialization/Models/TestModel.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System.Collections.Generic; 3 | 4 | namespace ArangoDBNetStandardTest.Serialization.Models 5 | { 6 | public class TestModel 7 | { 8 | public enum Number 9 | { 10 | One = 1, 11 | Two = 2 12 | } 13 | 14 | public string NullProperty { get; set; } 15 | 16 | public string AnotherNullProperty { get; set; } 17 | 18 | public string PropertyToCheckIfCamelCase { get; set; } 19 | 20 | public Number EnumToConvert { get; set; } 21 | 22 | [JsonProperty(PropertyName = "nameFromJsonProperty")] 23 | public string PropertyWithDifferentJsonName { get; set; } 24 | 25 | public Dictionary MyStringDict { get; set; } 26 | 27 | public InnerTestModel PropertyWithClassType { get; set; } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /arangodb-net-standard.Test/TransactionApi/TransactionApiClientTestFixture.cs: -------------------------------------------------------------------------------- 1 | using ArangoDBNetStandard; 2 | using ArangoDBNetStandard.CollectionApi.Models; 3 | using System.Threading.Tasks; 4 | 5 | namespace ArangoDBNetStandardTest.TransactionApi 6 | { 7 | public class TransactionApiClientTestFixture : ApiClientTestFixtureBase 8 | { 9 | public ArangoDBClient ArangoDBClient { get; private set; } 10 | 11 | public string TestCollection1 { get; } = "TestCollection1"; 12 | 13 | public string TestCollection2 { get; } = "TestCollection2"; 14 | 15 | public TransactionApiClientTestFixture() 16 | { 17 | } 18 | 19 | public override async Task InitializeAsync() 20 | { 21 | await base.InitializeAsync(); 22 | 23 | string dbName = nameof(TransactionApiClientTest); 24 | 25 | await CreateDatabase(dbName); 26 | 27 | ArangoDBClient = GetArangoDBClient(dbName); 28 | await GetVersionAsync(ArangoDBClient); 29 | 30 | await Task.WhenAll( 31 | ArangoDBClient.Collection.PostCollectionAsync(new PostCollectionBody 32 | { 33 | Name = TestCollection1 34 | }), 35 | ArangoDBClient.Collection.PostCollectionAsync(new PostCollectionBody 36 | { 37 | Name = TestCollection2 38 | })); 39 | } 40 | 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /arangodb-net-standard.Test/Transport/Http/HttpApiTransportTestFixture.cs: -------------------------------------------------------------------------------- 1 | using ArangoDBNetStandard.DatabaseApi.Models; 2 | using System.Collections.Generic; 3 | using System.Threading.Tasks; 4 | 5 | namespace ArangoDBNetStandardTest.Transport.Http 6 | { 7 | public class HttpApiTransportTestFixture : ApiClientTestFixtureBase 8 | { 9 | public string DatabaseName { get; } = nameof(HttpApiTransportTest); 10 | 11 | public string Username { get; } = "xyzabc"; 12 | public string Password { get; } = "abcxyz"; 13 | 14 | public override async Task InitializeAsync() 15 | { 16 | await base.InitializeAsync(); 17 | await CreateDatabase( 18 | DatabaseName, 19 | new List 20 | { 21 | new DatabaseUser 22 | { 23 | Username = Username, 24 | Passwd = Password 25 | } 26 | }); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /arangodb-net-standard/AdminApi/Models/EngineAlias.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.AdminApi.Models 4 | { 5 | public class EngineAlias 6 | { 7 | /// 8 | /// List of indexes and associated types 9 | /// 10 | public Dictionary Indexes { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AdminApi/Models/EngineSupports.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.AdminApi.Models 4 | { 5 | public class EngineSupports 6 | { 7 | public bool DFDB { get; set; } 8 | public IEnumerable Indexes { get; set; } 9 | public EngineAlias Aliases { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /arangodb-net-standard/AdminApi/Models/GetLicenseResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AdminApi.Models 2 | { 3 | /// 4 | /// Returned by 5 | /// 6 | public class GetLicenseResponse 7 | { 8 | /// 9 | /// Features of the current license 10 | /// 11 | public LicenseFeatures Features { get; set; } 12 | 13 | /// 14 | /// Encrypted and base64-encoded license key 15 | /// 16 | public string License { get; set; } 17 | 18 | /// 19 | /// License version number 20 | /// 21 | public int Version { get; set; } 22 | 23 | /// 24 | /// The status of the license. 25 | /// Possible values for role are: 26 | /// good: The license is valid for more than 2 weeks. 27 | /// expiring: The license is valid for less than 2 weeks. 28 | /// expired: The license has expired. In this situation, no new Enterprise Edition features can be utilized. 29 | /// read-only: The license is expired over 2 weeks. The instance is now restricted to read-only mode. 30 | /// 31 | public string Status { get; set; } 32 | } 33 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AdminApi/Models/GetLogsResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Text; 3 | 4 | namespace ArangoDBNetStandard.AdminApi.Models 5 | { 6 | /// 7 | /// Returned by 8 | /// 9 | public class GetLogsResponse 10 | { 11 | /// 12 | /// The total amount of log entries before pagination 13 | /// 14 | public int Total { get; set; } 15 | 16 | /// 17 | /// List of log messages that matched the criteria 18 | /// 19 | public List Messages { get; set; } 20 | } 21 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AdminApi/Models/GetServerEngineTypeResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AdminApi.Models 2 | { 3 | /// 4 | /// Returned by 5 | /// 6 | public class GetServerEngineTypeResponse 7 | { 8 | /// 9 | /// Type of engine 10 | /// 11 | public string Name { get; set; } 12 | 13 | /// 14 | /// Features supported by the engine 15 | /// 16 | public EngineSupports Supports { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AdminApi/Models/GetServerIdResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AdminApi.Models 2 | { 3 | /// 4 | /// Returned by 5 | /// 6 | public class GetServerIdResponse : ResponseBase 7 | { 8 | /// 9 | /// Id of the server in the cluster. 10 | /// 11 | public string Id { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AdminApi/Models/GetServerRoleResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AdminApi.Models 2 | { 3 | /// 4 | /// Returned by 5 | /// 6 | public class GetServerRoleResponse : ResponseBase 7 | { 8 | /// 9 | /// The server's role. 10 | /// Possible values for role are: 11 | /// SINGLE: the server is a standalone server without clustering. 12 | /// COORDINATOR: the server is a Coordinator in a cluster. 13 | /// PRIMARY: the server is a DB-Server in a cluster. 14 | /// SECONDARY: this role is not used anymore. 15 | /// AGENT: the server is an Agency node in a cluster. 16 | /// UNDEFINED: the server is in a cluster, but its role cannot be determined. 17 | /// 18 | public string Role { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AdminApi/Models/GetServerVersionQuery.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.AdminApi.Models 4 | { 5 | /// 6 | /// Parameters for 7 | /// 8 | public class GetServerVersionQuery 9 | { 10 | /// 11 | /// If set to true, the response will 12 | /// contain a details attribute with 13 | /// additional information about included 14 | /// components and their versions. 15 | /// The attribute names and internals of 16 | /// the details object may vary depending 17 | /// on platform and ArangoDB version. 18 | /// 19 | public bool? Details { get; set; } 20 | 21 | /// 22 | /// Generates the querystring 23 | /// 24 | /// 25 | internal string ToQueryString() 26 | { 27 | var queryParams = new List(); 28 | if (Details != null) 29 | { 30 | queryParams.Add("details=" + Details.ToString()); 31 | } 32 | return string.Join("&", queryParams); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AdminApi/Models/GetServerVersionResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.AdminApi.Models 4 | { 5 | /// 6 | /// Returned by 7 | /// 8 | public class GetServerVersionResponse 9 | { 10 | /// 11 | /// The type of server. 12 | /// 13 | public string Server { get; set; } 14 | 15 | /// 16 | /// The type of license. 17 | /// 18 | public string License { get; set; } 19 | 20 | /// 21 | /// The version of the server. 22 | /// 23 | public string Version { get; set; } 24 | 25 | /// 26 | /// Additional details about the DB server. 27 | /// This is returned only if the 28 | /// query parameter is set to true in 29 | /// the request. 30 | /// 31 | public Dictionary Details {get;set;} 32 | } 33 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AdminApi/Models/LicenseFeatures.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AdminApi.Models 2 | { 3 | /// 4 | /// Defines features of a license 5 | /// 6 | public class LicenseFeatures 7 | { 8 | /// 9 | /// License expiry date. 10 | /// 11 | /// 12 | /// Unix timestamp (seconds since January 1st, 1970 UTC) 13 | /// 14 | public long Expires { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AdminApi/Models/LogLevel.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AdminApi.Models 2 | { 3 | /// 4 | /// Log levels in ArangoDB 5 | /// 6 | public enum LogLevel 7 | { 8 | Fatal = 0, 9 | Error = 1, 10 | Warning = 2, 11 | Info = 3, 12 | Debug = 4 13 | } 14 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AdminApi/Models/LogMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ArangoDBNetStandard.AdminApi.Models 4 | { 5 | /// 6 | /// Represents one log entry in ArangoDB 7 | /// 8 | public class LogMessage 9 | { 10 | /// 11 | /// Unique Id of the log entry. 12 | /// 13 | public int Id { get; set; } 14 | 15 | /// 16 | /// Topic or subject of the log entry. 17 | /// 18 | public string Topic { get; set; } 19 | 20 | /// 21 | /// Level of the log entry. 22 | /// 23 | public string Level { get; set; } 24 | 25 | /// 26 | /// Date and time when the log entry was created. 27 | /// 28 | public DateTime Date { get; set; } 29 | 30 | /// 31 | /// The logged message. 32 | /// 33 | public string Message { get; set; } 34 | } 35 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AdminApi/Models/PutLicenseQuery.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.AdminApi.Models 4 | { 5 | /// 6 | /// Parameters for 7 | /// 8 | public class PutLicenseQuery 9 | { 10 | /// 11 | /// If the new license expires sooner 12 | /// than the current one force an update, 13 | /// do not return an error. 14 | /// 15 | public bool Force { get; set; } 16 | 17 | /// 18 | /// Generates the querystring 19 | /// 20 | /// 21 | internal string ToQueryString() 22 | { 23 | var queryParams = new List(); 24 | queryParams.Add("force=" + Force.ToString()); 25 | return string.Join("&", queryParams); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AdminApi/Models/PutLicenseResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AdminApi.Models 2 | { 3 | /// 4 | /// Returned by 5 | /// 6 | public class PutLicenseResponse 7 | { 8 | /// 9 | /// Result of the license update operation. 10 | /// 11 | public ResponseBase Result { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AdminApi/Models/ResponseBase.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.AdminApi.Models 4 | { 5 | /// 6 | /// Represents a common response class for Admin API operations. 7 | /// 8 | public class ResponseBase 9 | { 10 | /// 11 | /// Always false. 12 | /// 13 | /// 14 | /// To handle errors, catch 15 | /// thrown by API client methods. 16 | /// 17 | public bool Error { get; set; } 18 | 19 | /// 20 | /// The HTTP status code. 21 | /// 22 | public HttpStatusCode Code { get; set; } 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /arangodb-net-standard/AnalyzerApi/Models/DeleteAnalyzerResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AnalyzerApi.Models 2 | { 3 | /// 4 | /// Response from 5 | /// 6 | public class DeleteAnalyzerResponse : ResponseBase 7 | { 8 | public string Name { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /arangodb-net-standard/AnalyzerApi/Models/GeoJSONAnalyzerOptions.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AnalyzerApi.Models 2 | { 3 | /// 4 | /// Options for fine-tuning geo queries. 5 | /// 6 | public class GeoJSONAnalyzerOptions 7 | { 8 | /// 9 | /// Maximum number of S2 cells (default: 20) 10 | /// 11 | public int? MaxCells { get; set; } 12 | 13 | /// 14 | /// The least precise S2 level (default: 4) 15 | /// 16 | public int? MinLevel { get; set; } 17 | 18 | /// 19 | /// The most precise S2 level (default: 23) 20 | /// 21 | public int? MaxLevel { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AnalyzerApi/Models/GetAllAnalyzersResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.AnalyzerApi.Models 4 | { 5 | /// 6 | /// Response from 7 | /// 8 | public class GetAllAnalyzersResponse : ResponseBase 9 | { 10 | /// 11 | /// List of analyzers 12 | /// 13 | public List Result { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /arangodb-net-standard/AnalyzerApi/Models/GetAnalyzerResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.AnalyzerApi.Models 4 | { 5 | /// 6 | /// Response from 7 | /// 8 | public class GetAnalyzerResponse : Analyzer 9 | { 10 | /// 11 | /// Indicates whether an error occurred 12 | /// 13 | /// 14 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 15 | /// client will throw an rather than 16 | /// populating this property. A try/catch block should be used instead 17 | /// for any required error handling. 18 | /// 19 | public bool Error { get; set; } 20 | 21 | /// 22 | /// The HTTP status code. 23 | /// 24 | public HttpStatusCode Code { get; set; } 25 | } 26 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AnalyzerApi/Models/ResponseBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net; 3 | using System.Text; 4 | 5 | namespace ArangoDBNetStandard.AnalyzerApi.Models 6 | { 7 | /// 8 | /// Represents a common response class for Analyzer API operations. 9 | /// 10 | public class ResponseBase 11 | { 12 | /// 13 | /// Indicates whether an error occurred 14 | /// 15 | /// 16 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 17 | /// client will throw an rather than 18 | /// populating this property. A try/catch block should be used instead 19 | /// for any required error handling. 20 | /// 21 | public bool Error { get; set; } 22 | 23 | /// 24 | /// The HTTP status code. 25 | /// 26 | public HttpStatusCode Code { get; set; } 27 | } 28 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AnalyzerApi/Models/TextAnalyzerEdgeNgram.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AnalyzerApi.Models 2 | { 3 | public class TextAnalyzerEdgeNgram 4 | { 5 | /// 6 | /// Minimal n-gram length 7 | /// 8 | public int Min { get; set; } 9 | 10 | /// 11 | /// Maximal n-gram length 12 | /// 13 | public int Max { get; set; } 14 | 15 | /// 16 | /// Whether to include the original token 17 | /// even if its length is less than 18 | /// or greater than 19 | /// 20 | public bool PreserveOriginal { get; set; } 21 | } 22 | } -------------------------------------------------------------------------------- /arangodb-net-standard/ApiErrorException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | 4 | namespace ArangoDBNetStandard 5 | { 6 | [Serializable] 7 | public class ApiErrorException : Exception 8 | { 9 | /// 10 | /// Can be null if ArangoDB returns empty content 11 | /// in the response. 12 | /// 13 | public ApiErrorResponse ApiError { get; set; } 14 | 15 | public ApiErrorException() 16 | { 17 | } 18 | 19 | public ApiErrorException(ApiErrorResponse error) : base(error == null ? string.Empty : error.ErrorMessage) 20 | { 21 | ApiError = error; 22 | } 23 | 24 | public ApiErrorException(string message) : base(message) 25 | { 26 | } 27 | 28 | public ApiErrorException(string message, Exception innerException) : base(message, innerException) 29 | { 30 | } 31 | 32 | protected ApiErrorException(SerializationInfo info, StreamingContext context) : base(info, context) 33 | { 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /arangodb-net-standard/ApiErrorResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard 4 | { 5 | /// 6 | /// ArangoDB API error model 7 | /// 8 | public class ApiErrorResponse 9 | { 10 | /// 11 | /// Whether this is an error response (always true). 12 | /// 13 | public bool Error { get; set; } 14 | 15 | /// 16 | /// Error message. 17 | /// 18 | public string ErrorMessage { get; set; } 19 | 20 | /// 21 | /// ArangoDB error number. 22 | /// See https://www.arangodb.com/docs/stable/appendix-error-codes.html for error numbers and descriptions. 23 | /// 24 | public int ErrorNum { get; set; } 25 | 26 | /// 27 | /// HTTP status code. 28 | /// 29 | public HttpStatusCode Code { get; set; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/AqlFunctionResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 6 | { 7 | /// 8 | /// Represents an AQL user function returned in a response results. 9 | /// 10 | public class AqlFunctionResult 11 | { 12 | /// 13 | /// The fully qualified name of the user function. 14 | /// 15 | public string Name { get; set; } 16 | 17 | /// 18 | /// A string representation of the function body. 19 | /// 20 | public string Code { get; set; } 21 | 22 | /// 23 | /// Whether the function results are fully deterministic 24 | /// (function return value solely depends on the input value 25 | /// and return value is the same for repeated calls with same input). 26 | /// 27 | public bool IsDeterministic { get; set; } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/DeleteAqlFunctionQuery.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 2 | { 3 | /// 4 | /// Represents query parameters used when deleting an AQL user function. 5 | /// 6 | public class DeleteAqlFunctionQuery 7 | { 8 | /// 9 | /// Whether the function name provided is treated as a namespace prefix. 10 | /// If set to true, all functions in the specified namespace will be deleted. 11 | /// The returned number of deleted functions may become 0 if none matches the string. 12 | /// If set to false, the function name provided must be fully qualified, including any namespaces. 13 | /// If none matches the name, HTTP 404 is returned. 14 | /// 15 | public bool? Group { get; set; } 16 | 17 | internal string ToQueryString() 18 | { 19 | if (Group != null) 20 | { 21 | return "group=" + Group.ToString().ToLower(); 22 | } 23 | else 24 | { 25 | return ""; 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/DeleteAqlFunctionResponse.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Net; 4 | using System.Text; 5 | 6 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 7 | { 8 | /// 9 | /// Represents a response containing the number of deleted AQL user functions. 10 | /// 11 | public class DeleteAqlFunctionResponse 12 | { 13 | /// 14 | /// Indicates whether an error occurred (false in this case). 15 | /// 16 | /// 17 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 18 | /// client will throw an rather than 19 | /// populating this property. A try/catch block should be used instead 20 | /// for any required error handling. 21 | /// 22 | public bool Error { get; set; } 23 | 24 | /// 25 | /// The HTTP status code. 26 | /// 27 | public HttpStatusCode Code { get; set; } 28 | 29 | /// 30 | /// The number of deleted user functions, 31 | /// always 1 when is set to false. 32 | /// Any number >= 0 when is set to true. 33 | /// 34 | public int DeletedCount { get; set; } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/DeleteClearSlowAqlQueriesQuery.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 2 | { 3 | /// 4 | /// Generates query string for 5 | /// 6 | /// 7 | public class DeleteClearSlowAqlQueriesQuery 8 | { 9 | /// 10 | /// If set to true, it will clear the slow query history 11 | /// in all databases, not just the selected one. 12 | /// Using the parameter is only allowed in the system 13 | /// database and with superuser privileges. 14 | /// 15 | public bool? All { get; set; } 16 | 17 | internal string ToQueryString() 18 | { 19 | if (All != null) 20 | { 21 | return "all=" + All.ToString().ToLower(); 22 | } 23 | else 24 | { 25 | return ""; 26 | } 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/DeleteKillRunningAqlQueryQuery.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 2 | { 3 | /// 4 | /// Generates query string for 5 | /// 6 | /// 7 | public class DeleteKillRunningAqlQueryQuery 8 | { 9 | /// 10 | /// If set to true, it will attempt to kill the specified 11 | /// query in all databases, not just the selected one. 12 | /// Using the parameter is only allowed in the system 13 | /// database and with superuser privileges. 14 | /// 15 | public bool? All { get; set; } 16 | 17 | internal string ToQueryString() 18 | { 19 | if (All != null) 20 | { 21 | return "all=" + All.ToString().ToLower(); 22 | } 23 | else 24 | { 25 | return ""; 26 | } 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/GetAqlFunctionsQuery.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Net; 4 | using System.Text; 5 | 6 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 7 | { 8 | /// 9 | /// Represents query parameters used when getting all AQL user functions. 10 | /// 11 | public class GetAqlFunctionsQuery 12 | { 13 | /// 14 | /// Returns all registered AQL user functions from this namespace under result. 15 | /// 16 | public string Namespace { get; set; } 17 | 18 | internal string ToQueryString() 19 | { 20 | if (Namespace != null) 21 | { 22 | return "namespace=" + Namespace; 23 | } 24 | else 25 | { 26 | return ""; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/GetAqlFunctionsResponse.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Net; 4 | using System.Text; 5 | 6 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 7 | { 8 | /// 9 | /// Represents a response returned when getting all AQL user functions. 10 | /// 11 | public class GetAqlFunctionsResponse 12 | { 13 | /// 14 | /// Indicates whether an error occurred (false in this case). 15 | /// 16 | /// 17 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 18 | /// client will throw an rather than 19 | /// populating this property. A try/catch block should be used instead 20 | /// for any required error handling. 21 | /// 22 | public bool Error { get; set; } 23 | 24 | /// 25 | /// The HTTP status code. 26 | /// 27 | public HttpStatusCode Code { get; set; } 28 | 29 | /// 30 | /// All functions, or the ones matching 31 | /// the parameter. 32 | /// 33 | public IList Result { get; set; } 34 | } 35 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/GetCurrentlyRunningAqlQueriesQuery.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 2 | { 3 | /// 4 | /// Generates query string for 5 | /// 6 | /// 7 | public class GetCurrentlyRunningAqlQueriesQuery 8 | { 9 | /// 10 | /// If set to true, will return the currently 11 | /// running queries in all databases, not just 12 | /// the selected one. Using the parameter is 13 | /// only allowed in the system database and 14 | /// with superuser privileges. 15 | /// 16 | public bool? All { get; set; } 17 | 18 | internal string ToQueryString() 19 | { 20 | if (All != null) 21 | { 22 | return "all=" + All.ToString().ToLower(); 23 | } 24 | else 25 | { 26 | return ""; 27 | } 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/GetQueryRule.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 4 | { 5 | /// 6 | /// Describes an AQL optimizer rule. 7 | /// This is a response item returned by 8 | /// 9 | /// 10 | public class GetQueryRule 11 | { 12 | /// 13 | /// The name of the optimizer rule as seen in query explain outputs. 14 | /// 15 | public string Name { get; set; } 16 | 17 | /// 18 | /// An object with the properties of the rule. 19 | /// 20 | public GetQueryRuleFlags Flags { get; set; } 21 | } 22 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/GetSlowAqlQueriesQuery.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 2 | { 3 | /// 4 | /// Generates query string for 5 | /// 6 | /// 7 | public class GetSlowAqlQueriesQuery 8 | { 9 | /// 10 | /// If set to true, it will return a list of slow running AQL 11 | /// queries in all databases, not just the selected one. 12 | /// Using the parameter is only allowed in the system database 13 | /// and with superuser privileges. 14 | /// 15 | public bool? All { get; set; } 16 | 17 | internal string ToQueryString() 18 | { 19 | if (All != null) 20 | { 21 | return "all=" + All.ToString().ToLower(); 22 | } 23 | else 24 | { 25 | return ""; 26 | } 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/PostAqlFunctionBody.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 2 | { 3 | /// 4 | /// Represents a request body to create a new AQL user function. 5 | /// 6 | public class PostAqlFunctionBody 7 | { 8 | /// 9 | /// The fully qualified name of the user function. 10 | /// 11 | public string Name { get; set; } 12 | 13 | /// 14 | /// A string representation of the function body. 15 | /// 16 | public string Code { get; set; } 17 | 18 | /// 19 | /// An optional boolean value to indicate whether the function results 20 | /// are fully deterministic (function return value solely depends on 21 | /// the input value and return value is the same for repeated calls with same input). 22 | /// This attribute is currently not used 23 | /// but may be used later for optimizations. 24 | /// 25 | public bool? IsDeterministic { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/PostAqlFunctionResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 4 | { 5 | /// 6 | /// Represents a response returned when creating an AQL user function. 7 | /// 8 | public class PostAqlFunctionResponse 9 | { 10 | /// 11 | /// Indicates whether an error occurred (false in this case). 12 | /// 13 | /// 14 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 15 | /// client will throw an rather than 16 | /// populating this property. A try/catch block should be used instead 17 | /// for any required error handling. 18 | /// 19 | public bool Error { get; set; } 20 | 21 | /// 22 | /// The HTTP status code. 23 | /// 24 | public HttpStatusCode Code { get; set; } 25 | 26 | /// 27 | /// Indicates whether the function was newly created. 28 | /// 29 | public bool IsNewlyCreated { get; set; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/PostExplainAqlQueryBody.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 4 | { 5 | /// 6 | /// Request body for 7 | /// 8 | /// 9 | public class PostExplainAqlQueryBody 10 | { 11 | /// 12 | /// The query which you want explained; If the query references 13 | /// any bind variables, these must also be passed in the 14 | /// property. 15 | /// Additional options for the query can be passed in the 16 | /// property. 17 | /// 18 | public string Query { get; set; } 19 | 20 | /// 21 | /// Dictionary of Key/value pairs containing 22 | /// the bind parameters for the query. 23 | /// 24 | public Dictionary BindVars { get; set; } 25 | 26 | /// 27 | /// Options for the query 28 | /// 29 | public PostExplainAqlQueryBodyOptions Options { get; set; } 30 | } 31 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/PostExplainAqlQueryBodyOptimizer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 4 | { 5 | /// 6 | /// Options related to the query optimizer. 7 | /// 8 | /// 9 | public class PostExplainAqlQueryBodyOptimizer 10 | { 11 | /// 12 | /// A list of to-be-included or to-be-excluded 13 | /// optimizer rules can be put into this attribute, 14 | /// telling the optimizer to include or exclude 15 | /// specific rules. To disable a rule, prefix 16 | /// its name with a -, to enable a rule, 17 | /// prefix it with a +. There is also a pseudo-rule all, 18 | /// which matches all optimizer rules. 19 | /// -all disables all rules. 20 | /// 21 | public IEnumerable Rules { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/PostExplainAqlQueryBodyOptions.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 2 | { 3 | /// 4 | /// Options for a query 5 | /// 6 | /// 7 | public class PostExplainAqlQueryBodyOptions 8 | { 9 | /// 10 | /// If set to true, all possible execution plans 11 | /// will be returned. The default is false, meaning 12 | /// only the optimal plan will be returned. 13 | /// 14 | public bool? AllPlans { get; set; } 15 | 16 | /// 17 | /// An optional maximum number of plans that the 18 | /// optimizer is allowed to generate. Setting this 19 | /// attribute to a low value allows to put a cap on 20 | /// the amount of work the optimizer does. 21 | /// 22 | public int? MaxNumberOfPlans { get; set; } 23 | 24 | /// 25 | /// Options related to the query optimizer. 26 | /// 27 | public PostExplainAqlQueryBodyOptimizer Optimizer { get; set; } 28 | } 29 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/PostExplainAqlQueryResponseCollection.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 2 | { 3 | public class PostExplainAqlQueryResponseCollection 4 | { 5 | public string Name { get; set; } 6 | public string Type { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/PostExplainAqlQueryResponseCondition.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 4 | { 5 | public class PostExplainAqlQueryResponseCondition 6 | { 7 | public string Type { get; set; } 8 | public int? TypeId { get; set; } 9 | public string Name { get; set; } 10 | public bool? ExcludesNull { get; set; } 11 | public int? Value { get; set; } 12 | public string VType { get; set; } 13 | public int? VTypeId { get; set; } 14 | public IEnumerable SubNodes { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/PostExplainAqlQueryResponseIndexHint.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 2 | { 3 | public class PostExplainAqlQueryResponseIndexHint 4 | { 5 | public bool? Forced { get; set; } 6 | public string Type { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/PostExplainAqlQueryResponseStats.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 2 | { 3 | /// 4 | /// Statistics for Explain Query 5 | /// 6 | public class PostExplainAqlQueryResponseStats 7 | { 8 | /// 9 | /// Number of rules that were executed. 10 | /// 11 | public int? RulesExecuted { get; set; } 12 | 13 | /// 14 | /// Number of rules that were skipped. 15 | /// 16 | public int? RulesSkipped { get; set; } 17 | 18 | /// 19 | /// Number of plans that were created. 20 | /// 21 | public int? PlansCreated { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/PostExplainAqlQueryResponseVariable.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 2 | { 3 | public class PostExplainAqlQueryResponseVariable 4 | { 5 | public int? Id { get; set; } 6 | public string Name { get; set; } 7 | public bool? IsDataFromCollection { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/PostParseAqlQueryBody.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 2 | { 3 | /// 4 | /// Request body for 5 | /// 6 | /// 7 | public class PostParseAqlQueryBody 8 | { 9 | /// 10 | /// Query string to parse and validate. This query will not be executed. 11 | /// 12 | public string Query { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/PostParseAqlQueryResponseAstNode.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 4 | { 5 | /// 6 | /// Data node providing information about a parsed query 7 | /// See https://www.arangodb.com/docs/stable/http/aql-query.html#parse-an-aql-query 8 | /// 9 | public class PostParseAqlQueryResponseAstNode 10 | { 11 | public int? Id { get; set; } 12 | public string Type { get; set; } 13 | public string Name { get; set; } 14 | public string Value { get; set; } 15 | public IEnumerable SubNodes { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/PutAdjustQueryCacheGlobalPropertiesBody.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 2 | { 3 | /// 4 | /// Parameter to 5 | /// 6 | /// 7 | public class PutAdjustQueryCacheGlobalPropertiesBody 8 | { 9 | public QueryCacheGlobalProperties Properties { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/PutChangeQueryTrackingConfigurationBody.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 2 | { 3 | /// 4 | /// Parameter to 5 | /// 6 | /// 7 | public class PutChangeQueryTrackingConfigurationBody 8 | { 9 | /// 10 | /// Configuration properties. 11 | /// 12 | public QueryTrackingConfiguration Properties { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /arangodb-net-standard/AqlFunctionApi/Models/ResponseBase.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.AqlFunctionApi.Models 4 | { 5 | /// 6 | /// Represents a common response class for API operations. 7 | /// 8 | public class ResponseBase 9 | { 10 | /// 11 | /// Indicates whether an error occurred 12 | /// 13 | /// 14 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 15 | /// client will throw an rather than 16 | /// populating this property. A try/catch block should be used instead 17 | /// for any required error handling. 18 | /// 19 | public bool Error { get; set; } 20 | 21 | /// 22 | /// The HTTP status code. 23 | /// 24 | public HttpStatusCode Code { get; set; } 25 | } 26 | } -------------------------------------------------------------------------------- /arangodb-net-standard/ArangoDBNetStandard.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | A consistent, comprehensive, minimal interface to enable .NET applications to use the complete range of features exposed by the ArangoDB REST API. 6 | A consistent, comprehensive, minimal interface to enable .NET applications to use the complete range of features exposed by the ArangoDB REST API. 7 | Apache-2.0 8 | https://github.com/ArangoDB-Community/arangodb-net-standard 9 | https://github.com/ArangoDB-Community/arangodb-net-standard 10 | arangodb-net-standard arangodb arango .net c# netstandard multimodel graph document database 11 | 3.1.0 12 | ArangoDB Community 13 | true 14 | ArangoDB Community 15 | 16 | 17 | 18 | 1701;1702;1591 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /arangodb-net-standard/AuthApi/Models/JwtTokenRequestBody.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AuthApi.Models 2 | { 3 | public class JwtTokenRequestBody 4 | { 5 | public string Username { get; set; } 6 | 7 | public string Password { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /arangodb-net-standard/AuthApi/Models/JwtTokenResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.AuthApi.Models 2 | { 3 | public class JwtTokenResponse 4 | { 5 | /// 6 | /// JWT Token 7 | /// 8 | public string Jwt { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /arangodb-net-standard/BulkOperationsApi/Models/ImportDocumentArraysBody.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | 4 | namespace ArangoDBNetStandard.BulkOperationsApi.Models 5 | { 6 | /// 7 | /// Represents a request body to Import documents as JSON-encoded lists 8 | /// 9 | public class ImportDocumentArraysBody 10 | { 11 | /// 12 | /// List containing document attributes that are 13 | /// being imported. 14 | /// 15 | public IEnumerable DocumentAttributes { get; set; } 16 | 17 | /// 18 | /// List containing value arrays to be imported. 19 | /// Each array is a document. Attribute values will 20 | /// be mapped to the attribute names by positions 21 | /// defined in . 22 | /// 23 | public IEnumerable> ValueArrays { get; set; } 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /arangodb-net-standard/BulkOperationsApi/Models/ImportDocumentObjectsBody.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.BulkOperationsApi.Models 4 | { 5 | /// 6 | /// Represents a request body to Import documents from an array of objects 7 | /// 8 | public class ImportDocumentObjectsBody 9 | { 10 | /// 11 | /// List of document objects to import. 12 | /// 13 | public IEnumerable Documents { get; set; } 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /arangodb-net-standard/BulkOperationsApi/Models/ImportDocumentsOnDuplicate.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.BulkOperationsApi.Models 2 | { 3 | /// 4 | /// Enum representing possible actions to carry out 5 | /// in case of a unique key constraint violation. 6 | /// 7 | public enum ImportDocumentsOnDuplicate 8 | { 9 | /// 10 | /// Will not import the current document 11 | /// because of the unique key constraint 12 | /// violation. This is the default setting. 13 | /// 14 | Error, 15 | 16 | /// 17 | /// Will update an existing document in the 18 | /// database with the data specified in the 19 | /// request. Attributes of the existing 20 | /// document that are not present in the 21 | /// request will be preserved. 22 | /// 23 | Update, 24 | 25 | /// 26 | /// Will replace an existing document in the 27 | /// database with the data specified in the 28 | /// request. 29 | /// 30 | Replace, 31 | 32 | /// 33 | /// Will not update an existing document and 34 | /// simply ignore the error caused by the 35 | /// unique key constraint violation. 36 | /// 37 | Ignore 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/CollectionHeaderProperties.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ArangoDBNetStandard.CollectionApi.Models 6 | { 7 | /// 8 | /// Provides functionality for collection-specific headers 9 | /// 10 | public class CollectionHeaderProperties : ApiHeaderProperties 11 | { 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/CollectionKeyOptions.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CollectionApi.Models 2 | { 3 | /// 4 | /// Additional options for key generation of ArangoDB collections. 5 | /// 6 | public class CollectionKeyOptions 7 | { 8 | /// 9 | /// If set to true, then it is allowed to supply own key values 10 | /// in the _key attribute of a document. 11 | /// If set to false, then the key generator will solely be responsible for generating keys 12 | /// and supplying own key values in the _key attribute of documents is considered an error. 13 | /// 14 | public bool AllowUserKeys { get; set; } 15 | 16 | /// 17 | /// Increment value for autoincrement key generator. 18 | /// Not used for other key generator types. 19 | /// 20 | public long? Increment { get; set; } 21 | 22 | /// 23 | /// Initial offset value for autoincrement key generator. 24 | /// Not used for other key generator types. 25 | /// 26 | public long? Offset { get; set; } 27 | 28 | /// 29 | /// Apecifies the type of the key generator. 30 | /// The currently available generators are traditional, autoincrement, uuid and padded. 31 | /// 32 | public string Type { get; set; } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/CollectionSchema.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CollectionApi.Models 2 | { 3 | /// 4 | /// Specifies the collection level schema for documents. 5 | /// 6 | public class CollectionSchema 7 | { 8 | /// 9 | /// Defines the JSON Schema description for schema validation. 10 | /// See https://www.arangodb.com/docs/3.9/data-modeling-documents-schema-validation.html 11 | /// 12 | public object Rule { get; set; } 13 | 14 | /// 15 | /// Controls when the validation will be applied/triggered. 16 | /// For possible values 17 | /// 18 | public string Level { get; set; } 19 | 20 | /// 21 | /// The message that is used when validation fails. 22 | /// If the schema validation for a document fails, then a generic 23 | /// error is raised. The schema validation cannot pin-point which 24 | /// part of a rule made it fail. You may customize the error message 25 | /// via the message attribute to provide a summary of what is expected 26 | /// or point out common mistakes. 27 | /// 28 | public string Message { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/CollectionShardsKeyOption.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CollectionApi.Models 2 | { 3 | 4 | public class CollectionShardsKeyOption 5 | { 6 | public bool? AllowUserKeys { get; set; } 7 | public string Type { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/CollectionShardsResponseBase.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.CollectionApi.Models 4 | { 5 | public class CollectionShardsResponseBase : ResponseBase 6 | { 7 | public bool? WaitForSync { get; set; } 8 | public string ShardingStrategy { get; set; } 9 | public bool? UsesRevisionsAsDocumentIds { get; set; } 10 | public object Schema { get; set; } 11 | public int? WriteConcern { get; set; } 12 | public bool? SyncByRevision { get; set; } 13 | public int? ReplicationFactor { get; set; } 14 | public int? NumberOfShards { get; set; } 15 | public string Id { get; set; } 16 | public string Name { get; set; } 17 | public bool? IsDisjoint { get; set; } 18 | public int? MinReplicationFactor { get; set; } 19 | public int? Status { get; set; } 20 | public int? Type { get; set; } 21 | public string GloballyUniqueId { get; set; } 22 | public bool? IsSmart { get; set; } 23 | public bool? IsSystem { get; set; } 24 | public int? InternalValidatorType { get; set; } 25 | public bool? IsSmartChild { get; set; } 26 | public string StatusString { get; set; } 27 | public bool? CacheEnabled { get; set; } 28 | public List ShardKeys { get; set; } 29 | public CollectionShardsKeyOption KeyOptions { get; set; } 30 | } 31 | } -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/CollectionType.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CollectionApi.Models 2 | { 3 | /// 4 | /// ArangoDB collection type. 5 | /// 6 | public enum CollectionType 7 | { 8 | /// 9 | /// Document collection type. 10 | /// 11 | Document = 2, 12 | /// 13 | /// Edge collection type. 14 | /// 15 | Edge = 3 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/DeleteCollectionResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.CollectionApi.Models 4 | { 5 | public class DeleteCollectionResponse 6 | { 7 | /// 8 | /// Indicates whether an error occurred 9 | /// 10 | /// 11 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 12 | /// client will throw an rather than 13 | /// populating this property. A try/catch block should be used instead 14 | /// for any required error handling. 15 | /// 16 | public bool Error { get; set; } 17 | 18 | public HttpStatusCode Code { get; set; } 19 | 20 | public string Id { get; set; } 21 | } 22 | } -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/Figures/Alive.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CollectionApi.Models.Figures 2 | { 3 | public class Alive 4 | { 5 | public int Size { get; set; } 6 | 7 | public int Count { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/Figures/CompactionStatus.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CollectionApi.Models.Figures 2 | { 3 | public class CompactionStatus 4 | { 5 | public string Message { get; set; } 6 | 7 | public string Time { get; set; } 8 | 9 | public int Count { get; set; } 10 | 11 | public int FilesCombined { get; set; } 12 | 13 | public int BytesRead { get; set; } 14 | 15 | public int BytesWritten { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/Figures/Compactors.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CollectionApi.Models.Figures 2 | { 3 | public class Compactors 4 | { 5 | public int FileSize { get; set; } 6 | 7 | public int Count { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/Figures/DataFiles.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CollectionApi.Models.Figures 2 | { 3 | public class DataFiles 4 | { 5 | public int FileSize { get; set; } 6 | 7 | public int Count { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/Figures/Dead.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CollectionApi.Models.Figures 2 | { 3 | public class Dead 4 | { 5 | public int Deletion { get; set; } 6 | 7 | public int Count { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/Figures/Indexes.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CollectionApi.Models.Figures 2 | { 3 | public class Indexes 4 | { 5 | public int Size { get; set; } 6 | 7 | public int Count { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/Figures/Journals.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CollectionApi.Models.Figures 2 | { 3 | public class Journals 4 | { 5 | public int FileSize { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/Figures/Readcache.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CollectionApi.Models.Figures 2 | { 3 | public class ReadCache 4 | { 5 | public int Size { get; set; } 6 | 7 | public int Count { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/Figures/Revisions.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CollectionApi.Models.Figures 2 | { 3 | public class Revisions 4 | { 5 | public int Size { get; set; } 6 | 7 | public int Count { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/FiguresResult.cs: -------------------------------------------------------------------------------- 1 | using ArangoDBNetStandard.CollectionApi.Models.Figures; 2 | 3 | namespace ArangoDBNetStandard.CollectionApi.Models 4 | { 5 | public class FiguresResult 6 | { 7 | public DataFiles DataFiles { get; set; } 8 | 9 | public int UncollectedLogfileEntries { get; set; } 10 | 11 | public int DocumentReferences { get; set; } 12 | 13 | public CompactionStatus CompactionStatus { get; set; } 14 | 15 | public Compactors Compactors { get; set; } 16 | 17 | public Dead Dead { get; set; } 18 | 19 | public Indexes Indexes { get; set; } 20 | 21 | public ReadCache Readcache { get; set; } 22 | 23 | public string WaitingFor { get; set; } 24 | 25 | public Alive Alive { get; set; } 26 | 27 | public int LastTick { get; set; } 28 | 29 | public Journals Journals { get; set; } 30 | 31 | public Revisions Revisions { get; set; } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/GetCollectionFiguresResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.CollectionApi.Models 4 | { 5 | public class GetCollectionFiguresResponse 6 | { 7 | public FiguresResult Figures { get; set; } 8 | 9 | public CollectionKeyOptions KeyOptions { get; set; } 10 | 11 | public string GloballyUniqueId { get; set; } 12 | 13 | public string StatusString { get; set; } 14 | 15 | public string Id { get; set; } 16 | 17 | [System.Obsolete()] 18 | public int IndexBuckets { get; set; } 19 | 20 | public string Error { get; set; } 21 | 22 | public HttpStatusCode Code { get; set; } 23 | 24 | public CollectionType Type { get; set; } 25 | 26 | public int Status { get; set; } 27 | 28 | [System.Obsolete()] 29 | public int JournalSize { get; set; } 30 | 31 | [System.Obsolete()] 32 | public bool IsVolatile { get; set; } 33 | 34 | public string Name { get; set; } 35 | 36 | [System.Obsolete()] 37 | public bool DoCompact { get; set; } 38 | 39 | public bool IsSystem { get; set; } 40 | 41 | public int Count { get; set; } 42 | 43 | public bool WaitForSync { get; set; } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/GetCollectionShardsDetailedResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.CollectionApi.Models 4 | { 5 | public class GetCollectionShardsDetailedResponse : CollectionShardsResponseBase 6 | { 7 | public Dictionary> Shards { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/GetCollectionShardsResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.CollectionApi.Models 4 | { 5 | public class GetCollectionShardsResponse : CollectionShardsResponseBase 6 | { 7 | public List Shards { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/GetCollectionsQuery.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.CollectionApi.Models 4 | { 5 | public class GetCollectionsQuery 6 | { 7 | public bool? ExcludeSystem { get; set; } 8 | 9 | internal string ToQueryString() 10 | { 11 | List query = new List(); 12 | if (ExcludeSystem != null) 13 | { 14 | query.Add("excludeSystem=" + ExcludeSystem.ToString().ToLower()); 15 | } 16 | return string.Join("&", query); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/GetCollectionsResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Net; 3 | 4 | namespace ArangoDBNetStandard.CollectionApi.Models 5 | { 6 | public class GetCollectionsResponse 7 | { 8 | /// 9 | /// Indicates whether an error occurred 10 | /// 11 | /// 12 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 13 | /// client will throw an rather than 14 | /// populating this property. A try/catch block should be used instead 15 | /// for any required error handling. 16 | /// 17 | public bool Error { get; set; } 18 | 19 | public HttpStatusCode Code { get; set; } 20 | 21 | public List Result { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/GetCollectionsResponseResult.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CollectionApi.Models 2 | { 3 | public class GetCollectionsResponseResult 4 | { 5 | public string Id { get; set; } 6 | 7 | public string Name { get; set; } 8 | 9 | public int Status { get; set; } 10 | 11 | public CollectionType Type { get; set; } 12 | 13 | public bool IsSystem { get; set; } 14 | 15 | public string GloballyUniqueId { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/PostCollectionResponseCollectionKeyOptions.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CollectionApi.Models 2 | { 3 | public class PostCollectionResponseCollectionKeyOptions 4 | { 5 | public bool AllowUserKeys { get; set; } 6 | 7 | public string Type { get; set; } 8 | 9 | public int LastValue { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/PutCompactCollectionDataResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CollectionApi.Models 2 | { 3 | public class PutCompactCollectionDataResponse : ResponseBase 4 | { 5 | public int? Type { get; set; } 6 | public int? Status { get; set; } 7 | public bool? IsSystem { get; set; } 8 | public string Name { get; set; } 9 | public string Id { get; set; } 10 | public string GloballyUniqueId { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/PutDocumentShardResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CollectionApi.Models 2 | { 3 | public class PutDocumentShardResponse : ResponseBase 4 | { 5 | /// 6 | /// The Id of the responsible shard. 7 | /// 8 | public string ShardId { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/PutLoadIndexesIntoMemoryResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.CollectionApi.Models 4 | { 5 | public class PutLoadIndexesIntoMemoryResponse:ResponseBase 6 | { 7 | /// 8 | /// Indicates whether the operation 9 | /// was successful or not. 10 | /// 11 | public bool Result { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/PutRecalculateCountResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CollectionApi.Models 2 | { 3 | public class PutRecalculateCountResponse : ResponseBase 4 | { 5 | /// 6 | /// Indicates if recalculating 7 | /// the document count succeeded. 8 | /// 9 | public bool Result { get; set; } 10 | 11 | /// 12 | /// The number of documents in the 13 | /// collection 14 | /// 15 | public int Count { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/RenameCollectionBody.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CollectionApi.Models 2 | { 3 | public class RenameCollectionBody 4 | { 5 | public string Name { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/RenameCollectionResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.CollectionApi.Models 4 | { 5 | public class RenameCollectionResponse 6 | { 7 | public string Id { get; set; } 8 | 9 | public string Name { get; set; } 10 | 11 | public int Status { get; set; } 12 | 13 | public CollectionType Type { get; set; } 14 | 15 | public bool IsSystem { get; set; } 16 | 17 | public HttpStatusCode Code { get; set; } 18 | 19 | /// 20 | /// Indicates whether an error occurred 21 | /// 22 | /// 23 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 24 | /// client will throw an rather than 25 | /// populating this property. A try/catch block should be used instead 26 | /// for any required error handling. 27 | /// 28 | public bool Error { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/ResponseBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Net; 4 | using System.Text; 5 | 6 | namespace ArangoDBNetStandard.CollectionApi.Models 7 | { 8 | /// 9 | /// Represents a common response class for API operations. 10 | /// 11 | public class ResponseBase 12 | { 13 | /// 14 | /// Indicates whether an error occurred 15 | /// 16 | public bool? Error { get; set; } 17 | 18 | /// 19 | /// The HTTP status code. 20 | /// 21 | public HttpStatusCode Code { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /arangodb-net-standard/CollectionApi/Models/TruncateCollectionResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.CollectionApi.Models 4 | { 5 | public class TruncateCollectionResponse 6 | { 7 | /// 8 | /// Indicates whether an error occurred 9 | /// 10 | /// 11 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 12 | /// client will throw an rather than 13 | /// populating this property. A try/catch block should be used instead 14 | /// for any required error handling. 15 | /// 16 | public bool Error { get; set; } 17 | 18 | public HttpStatusCode Code { get; set; } 19 | 20 | public int Status { get; set; } 21 | 22 | public string Name { get; set; } 23 | 24 | public CollectionType Type { get; set; } 25 | 26 | public bool IsSystem { get; set; } 27 | 28 | public string GloballyUniqueId { get; set; } 29 | 30 | public string Id { get; set; } 31 | } 32 | } -------------------------------------------------------------------------------- /arangodb-net-standard/CursorApi/Models/CursorHeaderProperties.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CursorApi.Models 2 | { 3 | /// 4 | /// Class representing the additional header properties for Cursor Api. 5 | /// 6 | public class CursorHeaderProperties : ApiHeaderProperties 7 | { 8 | 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /arangodb-net-standard/CursorApi/Models/CursorResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.CursorApi.Models 4 | { 5 | /// 6 | /// Response from ArangoDB when creating a new cursor. 7 | /// 8 | /// 9 | public class CursorResponse : CursorResponseBase, ICursorResponse 10 | { 11 | /// 12 | /// Result documents (might be empty if query has no results). 13 | /// 14 | public IEnumerable Result { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /arangodb-net-standard/CursorApi/Models/CursorResponsePlan.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.CursorApi.Models 4 | { 5 | public class CursorResponsePlan 6 | { 7 | public IEnumerable Nodes { get; set; } 8 | 9 | public IEnumerable Rules { get; set; } 10 | 11 | public IEnumerable Collections { get; set; } 12 | 13 | public IEnumerable Variables { get; set; } 14 | 15 | public long EstimatedCost { get; set; } 16 | 17 | public long EstimatedNrItems { get; set; } 18 | 19 | /// 20 | /// This is not available from ArangoDB 3.6 onwards. 21 | /// 22 | public bool? Initialize { get; set; } 23 | 24 | public bool IsModificationQuery { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /arangodb-net-standard/CursorApi/Models/CursorResponsePlanCollection.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CursorApi.Models 2 | { 3 | public class CursorResponsePlanCollection 4 | { 5 | public string Name { get; set; } 6 | 7 | public string Type { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /arangodb-net-standard/CursorApi/Models/CursorResponsePlanVariable.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CursorApi.Models 2 | { 3 | public class CursorResponsePlanVariable 4 | { 5 | public long Id { get; set; } 6 | 7 | public string Name { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /arangodb-net-standard/CursorApi/Models/CursorResponseStatsNode.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CursorApi.Models 2 | { 3 | public class CursorResponseStatsNode 4 | { 5 | public long Id { get; set; } 6 | 7 | public long Calls { get; set; } 8 | 9 | public long Items { get; set; } 10 | 11 | public double Runtime { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /arangodb-net-standard/CursorApi/Models/CursorResponseWarning.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.CursorApi.Models 2 | { 3 | public class CursorResponseWarning 4 | { 5 | /// 6 | /// Error code 7 | /// 8 | public long Code { get; set; } 9 | 10 | /// 11 | /// Error message 12 | /// 13 | public string Message { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /arangodb-net-standard/CursorApi/Models/DeleteCursorResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.CursorApi.Models 4 | { 5 | /// 6 | /// Represents a response returned after deleting a cursor. 7 | /// 8 | public class DeleteCursorResponse 9 | { 10 | /// 11 | /// Indicates whether an error occurred 12 | /// 13 | /// 14 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 15 | /// client will throw an rather than 16 | /// populating this property. A try/catch block should be used instead 17 | /// for any required error handling. 18 | /// 19 | public bool Error { get; set; } 20 | 21 | /// 22 | /// The HTTP status code. 23 | /// 24 | public HttpStatusCode Code { get; set; } 25 | 26 | /// 27 | /// The id of the cursor. 28 | /// 29 | public string Id { get; set; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /arangodb-net-standard/CursorApi/Models/PostCursorOptionsOptimizer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.CursorApi.Models 4 | { 5 | public class PostCursorOptionsOptimizer 6 | { 7 | public IEnumerable Rules { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /arangodb-net-standard/CustomHttpHeaders.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard 2 | { 3 | /// 4 | /// The custom HttpHeaders that may be specified in a client request. 5 | /// 6 | public static class CustomHttpHeaders 7 | { 8 | /// 9 | /// The header string used for Stream Transaction. 10 | /// 11 | public const string StreamTransactionHeader = "x-arango-trx-id"; 12 | /// 13 | /// The header string used for Allowing Read From Followers (dirty-reads) 14 | /// Introduced in ArangoDB 3.10. 15 | /// 16 | public const string ReadFromFollowersHeader = "x-arango-allow-dirty-read"; 17 | /// 18 | /// The header string used for Driver Info Header 19 | /// 20 | public const string DriverInfoHeader = "x-arango-driver"; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /arangodb-net-standard/DatabaseApi/Models/CurrentDatabaseInfo.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.DatabaseApi.Models 2 | { 3 | /// 4 | /// Represents information about the current database. 5 | /// 6 | public class CurrentDatabaseInfo 7 | { 8 | /// 9 | /// The name of the current database. 10 | /// 11 | public string Name { get; set; } 12 | 13 | /// 14 | /// The id of the current database. 15 | /// 16 | public string Id { get; set; } 17 | 18 | /// 19 | /// The filesystem path of the current database. 20 | /// 21 | public string Path { get; set; } 22 | 23 | /// 24 | /// Whether or not the current database is the _system database. 25 | /// 26 | public bool IsSystem { get; set; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /arangodb-net-standard/DatabaseApi/Models/DatabaseUser.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.DatabaseApi.Models 4 | { 5 | public class DatabaseUser 6 | { 7 | public string Username { get; set; } 8 | 9 | public string Passwd { get; set; } 10 | 11 | public bool? Active { get; set; } 12 | 13 | public Dictionary Extra { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /arangodb-net-standard/DatabaseApi/Models/DeleteDatabaseResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.DatabaseApi.Models 4 | { 5 | public class DeleteDatabaseResponse 6 | { 7 | /// 8 | /// HttpStatus 9 | /// 10 | public HttpStatusCode Code { get; set; } 11 | 12 | /// 13 | /// True if the database was deleted, otherwise see 14 | /// 15 | public bool Result { get; set; } 16 | 17 | /// 18 | /// Indicates whether an error occurred 19 | /// 20 | /// 21 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 22 | /// client will throw an rather than 23 | /// populating this property. A try/catch block should be used instead 24 | /// for any required error handling. 25 | /// 26 | public bool Error { get; set; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /arangodb-net-standard/DatabaseApi/Models/GetDatabaseInfoResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.DatabaseApi.Models 4 | { 5 | /// 6 | /// Represents a response containing information about the current database. 7 | /// 8 | public class GetCurrentDatabaseInfoResponse 9 | { 10 | 11 | /// 12 | /// Indicates whether an error occurred 13 | /// 14 | /// 15 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 16 | /// client will throw an rather than 17 | /// populating this property. A try/catch block should be used instead 18 | /// for any required error handling. 19 | /// 20 | public bool Error { get; set; } 21 | 22 | /// 23 | /// The HTTP status code. 24 | /// 25 | public HttpStatusCode Code { get; set; } 26 | 27 | /// 28 | /// The database information. 29 | /// 30 | public CurrentDatabaseInfo Result { get; set; } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /arangodb-net-standard/DatabaseApi/Models/GetDatabasesResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Net; 3 | 4 | namespace ArangoDBNetStandard.DatabaseApi.Models 5 | { 6 | /// 7 | /// Represents the content of the response returned 8 | /// by an endpoint that gets the list of databases. 9 | /// 10 | public class GetDatabasesResponse 11 | { 12 | 13 | /// 14 | /// Indicates whether an error occurred 15 | /// 16 | /// 17 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 18 | /// client will throw an rather than 19 | /// populating this property. A try/catch block should be used instead 20 | /// for any required error handling. 21 | /// 22 | public bool Error { get; set; } 23 | 24 | /// 25 | /// The HTTP status code. 26 | /// 27 | public HttpStatusCode Code { get; set; } 28 | 29 | /// 30 | /// The list of databases. 31 | /// 32 | public IEnumerable Result { get; set; } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /arangodb-net-standard/DatabaseApi/Models/PostDatabaseBody.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.DatabaseApi.Models 4 | { 5 | public class PostDatabaseBody 6 | { 7 | /// 8 | /// A valid database name. The name must conform to the selected 9 | /// naming convention for databases. If the name contains Unicode 10 | /// characters, the name must be NFC-normalized. 11 | /// Non-normalized names will be rejected by arangod. 12 | /// 13 | public string Name { get; set; } 14 | 15 | /// 16 | /// Optional attributes that can be specified for the new database. 17 | /// 18 | public PostDatabaseOptions Options { get; set; } 19 | 20 | /// 21 | /// Users to be created in the new database. The users will be granted 22 | /// Administrate permissions for the new database. If a value is not 23 | /// specified for this property or a zero-length array or list is specified, 24 | /// the default user root will be created. This will ensure that the new 25 | /// database will be accessible after it is created. The root user is 26 | /// created with an empty password. 27 | /// 28 | public IEnumerable Users { get; set; } 29 | } 30 | } -------------------------------------------------------------------------------- /arangodb-net-standard/DatabaseApi/Models/PostDatabaseResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.DatabaseApi.Models 4 | { 5 | /// 6 | /// Represents the content of the response returned 7 | /// by an endpoint that creates a new database. 8 | /// 9 | public class PostDatabaseResponse 10 | { 11 | 12 | /// 13 | /// Indicates whether an error occurred 14 | /// 15 | /// 16 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 17 | /// client will throw an rather than 18 | /// populating this property. A try/catch block should be used instead 19 | /// for any required error handling. 20 | /// 21 | public bool Error { get; set; } 22 | 23 | /// 24 | /// The HTTP status code. 25 | /// 26 | public HttpStatusCode Code { get; set; } 27 | 28 | /// 29 | /// Indicates that the database was created. Always true. 30 | /// 31 | public bool Result { get; set; } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /arangodb-net-standard/DocumentApi/Models/DeleteDocumentResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.DocumentApi.Models 2 | { 3 | public class DeleteDocumentResponse: DocumentBase 4 | { 5 | public T Old { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /arangodb-net-standard/DocumentApi/Models/DeleteDocumentsDocumentResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.DocumentApi.Models 2 | { 3 | /// 4 | /// Represents the response for one document when deleting multiple document. 5 | /// 6 | /// The type of the deserialized old document object when requested. 7 | public class DeleteDocumentsDocumentResponse : DeleteDocumentResponse 8 | { 9 | /// 10 | /// Indicates whether an error occurred 11 | /// 12 | /// 13 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 14 | /// client will throw an rather than 15 | /// populating this property. A try/catch block should be used instead 16 | /// for any required error handling. 17 | /// 18 | public bool Error { get; set; } 19 | 20 | /// 21 | /// ArangoDB error message. 22 | /// 23 | public string ErrorMessage { get; set; } 24 | 25 | /// 26 | /// ArangoDB error number. 27 | /// 28 | public int ErrorNum { get; set; } 29 | } 30 | } -------------------------------------------------------------------------------- /arangodb-net-standard/DocumentApi/Models/DeleteDocumentsResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.DocumentApi.Models 4 | { 5 | /// 6 | /// Represents the response for deleting multiple documents. 7 | /// 8 | /// The type of the deserialized old document object when requested. 9 | public class DeleteDocumentsResponse : List> 10 | { 11 | /// 12 | /// Creates an instance of . 13 | /// 14 | public DeleteDocumentsResponse() 15 | { 16 | } 17 | 18 | private DeleteDocumentsResponse(int capacity) 19 | : base(capacity) 20 | { 21 | } 22 | 23 | /// 24 | /// Creates an empty response. 25 | /// This is used when is true. 26 | /// 27 | /// 28 | public static DeleteDocumentsResponse Empty() 29 | { 30 | return new DeleteDocumentsResponse(0); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /arangodb-net-standard/DocumentApi/Models/DocumentBase.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.DocumentApi.Models 2 | { 3 | /// 4 | /// Base model for POST, PATCH, DELETE document responses. 5 | /// 6 | public class DocumentBase 7 | { 8 | /// 9 | /// ArangoDB document key. 10 | /// 11 | public string _key { get; set; } 12 | 13 | /// 14 | /// ArangoDB document ID. 15 | /// 16 | public string _id { get; set; } 17 | 18 | /// 19 | /// ArangoDB document revision tag. 20 | /// 21 | public string _rev { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /arangodb-net-standard/DocumentApi/Models/DocumentHeaderProperties.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.DocumentApi.Models 4 | { 5 | public class DocumentHeaderProperties:ApiHeaderProperties 6 | { 7 | public string IfMatch { get; set; } 8 | 9 | public string IfNoneMatch { get; set; } 10 | 11 | public new WebHeaderCollection ToWebHeaderCollection() 12 | { 13 | WebHeaderCollection collection = base.ToWebHeaderCollection(); 14 | 15 | if (IfMatch != null) 16 | { 17 | collection.Add(HttpRequestHeader.IfMatch, $"\"{IfMatch}\""); 18 | } 19 | 20 | if (IfNoneMatch != null) 21 | { 22 | collection.Add(HttpRequestHeader.IfNoneMatch, $"\"{IfNoneMatch}\""); 23 | } 24 | 25 | return collection; 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /arangodb-net-standard/DocumentApi/Models/HeadDocumentResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | using System.Net.Http.Headers; 3 | 4 | namespace ArangoDBNetStandard.DocumentApi.Models 5 | { 6 | public class HeadDocumentResponse 7 | { 8 | public HttpStatusCode Code { get; set; } 9 | 10 | public EntityTagHeaderValue Etag { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /arangodb-net-standard/DocumentApi/Models/PatchDocumentResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.DocumentApi.Models 2 | { 3 | /// 4 | /// Represents a response returned when updating a single document. 5 | /// 6 | /// The type of the deserialized new/old document object when requested. 7 | public class PatchDocumentResponse : DocumentBase 8 | { 9 | /// 10 | /// Deserialized copy of the new document object. This will only be present if requested with the 11 | /// option. 12 | /// 13 | public T New { get; set; } 14 | 15 | /// 16 | /// Deserialized copy of the old document object. This will only be present if requested with the 17 | /// option. 18 | /// 19 | public T Old { get; set; } 20 | 21 | /// 22 | /// Contains the revision of the old (now updated) document. 23 | /// 24 | public string _oldRev { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /arangodb-net-standard/DocumentApi/Models/PatchDocumentsDocumentResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.DocumentApi.Models 2 | { 3 | /// 4 | /// Represents the response for one document when updating multiple document. 5 | /// 6 | /// The type of the deserialized new/old document object when requested. 7 | public class PatchDocumentsDocumentResponse : PatchDocumentResponse 8 | { 9 | /// 10 | /// Indicates whether an error occurred 11 | /// 12 | /// 13 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 14 | /// client will throw an rather than 15 | /// populating this property. A try/catch block should be used instead 16 | /// for any required error handling. 17 | /// 18 | public bool Error { get; set; } 19 | 20 | /// 21 | /// ArangoDB error message. 22 | /// 23 | public string ErrorMessage { get; set; } 24 | 25 | /// 26 | /// ArangoDB error number. 27 | /// 28 | public int ErrorNum { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /arangodb-net-standard/DocumentApi/Models/PatchDocumentsResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.DocumentApi.Models 4 | { 5 | /// 6 | /// Represents the response for updating multiple documents. 7 | /// 8 | /// The type of the deserialized new/old document object when requested. 9 | public class PatchDocumentsResponse : List> 10 | { 11 | /// 12 | /// Creates an instance of . 13 | /// 14 | public PatchDocumentsResponse() 15 | { 16 | } 17 | 18 | private PatchDocumentsResponse(int capacity) 19 | : base(capacity) 20 | { 21 | } 22 | 23 | /// 24 | /// Creates an empty response. 25 | /// This is used when is true. 26 | /// 27 | /// 28 | public static PatchDocumentsResponse Empty() 29 | { 30 | return new PatchDocumentsResponse(0); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /arangodb-net-standard/DocumentApi/Models/PostDocumentResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.DocumentApi.Models 2 | { 3 | /// 4 | /// Response after posting a single document 5 | /// 6 | /// 7 | public class PostDocumentResponse : DocumentBase 8 | { 9 | /// 10 | /// Deserialized copy of the new document object. This will only be present if requested with the 11 | /// option. 12 | /// 13 | public T New { get; set; } 14 | 15 | /// 16 | /// Deserialized copy of the old document object. This will only be present if requested with the 17 | /// option. 18 | /// 19 | public T Old { get; set; } 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /arangodb-net-standard/DocumentApi/Models/PostDocumentsDocumentResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.DocumentApi.Models 4 | { 5 | /// 6 | /// Response model for a single POST Document request. 7 | /// 8 | /// 9 | public class PostDocumentsDocumentResponse : PostDocumentResponse 10 | { 11 | /// 12 | /// Indicates whether an error occurred 13 | /// 14 | /// 15 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 16 | /// client will throw an rather than 17 | /// populating this property. A try/catch block should be used instead 18 | /// for any required error handling. 19 | /// 20 | public bool Error { get; set; } 21 | 22 | public string ErrorMessage { get; set; } 23 | 24 | public int ErrorNum { get; set; } 25 | } 26 | } -------------------------------------------------------------------------------- /arangodb-net-standard/DocumentApi/Models/PostDocumentsResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.DocumentApi.Models 4 | { 5 | /// 6 | /// Represents the response for creating multiple documents. 7 | /// 8 | /// The type of the deserialized new/old document object when requested. 9 | public class PostDocumentsResponse : List> 10 | { 11 | /// 12 | /// Creates an instance of . 13 | /// 14 | public PostDocumentsResponse() 15 | { 16 | } 17 | 18 | private PostDocumentsResponse(int capacity) 19 | : base(capacity) 20 | { 21 | } 22 | 23 | /// 24 | /// Creates an empty response. 25 | /// This is used when is true. 26 | /// 27 | /// 28 | public static PostDocumentsResponse Empty() 29 | { 30 | return new PostDocumentsResponse(0); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /arangodb-net-standard/DocumentApi/Models/PutDocumentResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.DocumentApi.Models 2 | { 3 | /// 4 | /// Represents a response returned when replacing a single document. 5 | /// 6 | /// The type of the deserialized new/old document object when requested. 7 | public class PutDocumentResponse : DocumentBase 8 | { 9 | /// 10 | /// Contains the revision of the old (now replaced) document. 11 | /// 12 | public string _oldRev { get; set; } 13 | 14 | /// 15 | /// Deserialized copy of the new document object. This will only be present if requested with the 16 | /// option. 17 | /// 18 | public T New { get; set; } 19 | 20 | /// 21 | /// Deserialized copy of the old document object. This will only be present if requested with the 22 | /// option. 23 | /// 24 | public T Old { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /arangodb-net-standard/DocumentApi/Models/PutDocumentsDocumentResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.DocumentApi.Models 2 | { 3 | /// 4 | /// Represents the response for one document when replacing multiple document. 5 | /// 6 | /// The type of the deserialized new/old document object when requested. 7 | public class PutDocumentsDocumentResponse : PutDocumentResponse 8 | { 9 | /// 10 | /// Indicates whether an error occurred 11 | /// 12 | /// 13 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 14 | /// client will throw an rather than 15 | /// populating this property. A try/catch block should be used instead 16 | /// for any required error handling. 17 | /// 18 | public bool Error { get; set; } 19 | 20 | /// 21 | /// ArangoDB error message. 22 | /// 23 | public string ErrorMessage { get; set; } 24 | 25 | /// 26 | /// ArangoDB error number. 27 | /// 28 | public int ErrorNum { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /arangodb-net-standard/DocumentApi/Models/PutDocumentsResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.DocumentApi.Models 4 | { 5 | /// 6 | /// Represents the response returned when replacing multiple document. 7 | /// 8 | /// The type of the deserialized new/old document object when requested. 9 | public class PutDocumentsResponse : List> 10 | { 11 | /// 12 | /// Creates a new instance of 13 | /// with default values. 14 | /// 15 | public PutDocumentsResponse() 16 | { 17 | } 18 | 19 | private PutDocumentsResponse(int capacity) 20 | : base(capacity) 21 | { 22 | } 23 | 24 | /// 25 | /// Creates an empty response. 26 | /// 27 | /// 28 | public static PutDocumentsResponse Empty() 29 | { 30 | return new PutDocumentsResponse(0); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /arangodb-net-standard/DriverConstants.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ArangoDBNetStandard 6 | { 7 | /// 8 | /// Global constants to be used throughout the driver 9 | /// 10 | public static class DriverConstants 11 | { 12 | /// 13 | /// Name of the driver 14 | /// 15 | public const string DriverName = "arangodb-net-standard"; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/DeleteEdgeDefinitionQuery.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class DeleteEdgeDefinitionQuery 6 | { 7 | public bool? WaitForSync { get; set; } 8 | 9 | public bool? DropCollections { get; set; } 10 | 11 | internal string ToQueryString() 12 | { 13 | List query = new List(); 14 | if (WaitForSync != null) 15 | { 16 | query.Add("waitForSync=" + WaitForSync.ToString().ToLower()); 17 | } 18 | if (DropCollections != null) 19 | { 20 | query.Add("dropCollections=" + DropCollections.ToString().ToLower()); 21 | } 22 | return string.Join("&", query); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/DeleteEdgeDefinitionResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class DeleteEdgeDefinitionResponse 6 | { 7 | public HttpStatusCode Code { get; set; } 8 | 9 | /// 10 | /// Indicates whether an error occurred 11 | /// 12 | /// 13 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 14 | /// client will throw an rather than 15 | /// populating this property. A try/catch block should be used instead 16 | /// for any required error handling. 17 | /// 18 | public bool Error { get; set; } 19 | 20 | public GraphResult Graph { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/DeleteEdgeQuery.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class DeleteEdgeQuery 6 | { 7 | public bool? WaitForSync { get; set; } 8 | 9 | public bool? ReturnOld { get; set; } 10 | 11 | internal string ToQueryString() 12 | { 13 | List query = new List(); 14 | if (ReturnOld != null) 15 | { 16 | query.Add("returnOld=" + ReturnOld.ToString().ToLower()); 17 | } 18 | if (WaitForSync != null) 19 | { 20 | query.Add("waitForSync=" + WaitForSync.ToString().ToLower()); 21 | } 22 | return string.Join("&", query); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/DeleteGraphQuery.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class DeleteGraphQuery 6 | { 7 | public bool? DropCollections { get; set; } 8 | 9 | internal string ToQueryString() 10 | { 11 | List query = new List(); 12 | if (DropCollections != null) 13 | { 14 | query.Add("dropCollections=" + DropCollections.ToString().ToLower()); 15 | } 16 | return string.Join("&", query); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/DeleteGraphResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class DeleteGraphResponse 6 | { 7 | /// 8 | /// Indicates whether an error occurred 9 | /// 10 | /// 11 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 12 | /// client will throw an rather than 13 | /// populating this property. A try/catch block should be used instead 14 | /// for any required error handling. 15 | /// 16 | public bool Error { get; set; } 17 | 18 | public HttpStatusCode Code { get; set; } 19 | 20 | public bool Removed { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/DeleteVertexCollectionQuery.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class DeleteVertexCollectionQuery 6 | { 7 | public bool? DropCollection { get; set; } 8 | 9 | internal string ToQueryString() 10 | { 11 | List query = new List(); 12 | if (DropCollection != null) 13 | { 14 | query.Add("dropCollection=" + DropCollection.ToString().ToLower()); 15 | } 16 | return string.Join("&", query); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/DeleteVertexCollectionResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class DeleteVertexCollectionResponse 6 | { 7 | /// 8 | /// Indicates whether an error occurred 9 | /// 10 | /// 11 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 12 | /// client will throw an rather than 13 | /// populating this property. A try/catch block should be used instead 14 | /// for any required error handling. 15 | /// 16 | public bool Error { get; set; } 17 | 18 | public HttpStatusCode Code { get; set; } 19 | 20 | public GraphResult Graph { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/DeleteVertexQuery.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class DeleteVertexQuery 6 | { 7 | public bool? WaitForSync { get; set; } 8 | 9 | public bool? ReturnOld { get; set; } 10 | 11 | internal string ToQueryString() 12 | { 13 | List query = new List(); 14 | if (WaitForSync != null) 15 | { 16 | query.Add("waitForSync=" + WaitForSync.ToString().ToLower()); 17 | } 18 | if (ReturnOld != null) 19 | { 20 | query.Add("returnOld=" + ReturnOld.ToString().ToLower()); 21 | } 22 | 23 | return string.Join("&", query); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/DeleteVertexResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class DeleteVertexResponse 6 | { 7 | public HttpStatusCode Code { get; set; } 8 | 9 | /// 10 | /// Indicates whether an error occurred 11 | /// 12 | /// 13 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 14 | /// client will throw an rather than 15 | /// populating this property. A try/catch block should be used instead 16 | /// for any required error handling. 17 | /// 18 | public bool Error { get; set; } 19 | 20 | public T Old { get; set; } 21 | 22 | public bool Removed { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/EdgeDefinition.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class EdgeDefinition 6 | { 7 | public IEnumerable To { get; set; } 8 | 9 | public IEnumerable From { get; set; } 10 | 11 | public string Collection { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/EdgeResult.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.GraphApi.Models 2 | { 3 | /// 4 | /// Represents the internal attributes of an edge returned in a response. 5 | /// 6 | public class EdgeResult 7 | { 8 | public string _id { get; set; } 9 | 10 | public string _key { get; set; } 11 | 12 | public string _rev { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/GetEdgeCollectionsResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Net; 3 | 4 | namespace ArangoDBNetStandard.GraphApi.Models 5 | { 6 | public class GetEdgeCollectionsResponse 7 | { 8 | /// 9 | /// Indicates whether an error occurred 10 | /// 11 | /// 12 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 13 | /// client will throw an rather than 14 | /// populating this property. A try/catch block should be used instead 15 | /// for any required error handling. 16 | /// 17 | public bool Error { get; set; } 18 | 19 | public int ErrorNum { get; set; } 20 | 21 | public HttpStatusCode Code { get; set; } 22 | 23 | public IEnumerable Collections { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/GetEdgeQuery.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.GraphApi.Models 2 | { 3 | /// 4 | /// Represents query parameters used when fetching an edge in a graph. 5 | /// 6 | public class GetEdgeQuery 7 | { 8 | /// 9 | /// Must contain a revision. 10 | /// If this is set, a document is only returned if it has exactly this revision. 11 | /// 12 | public string Rev { get; set; } 13 | 14 | internal string ToQueryString() 15 | { 16 | if (Rev != null) 17 | { 18 | return "rev=" + Rev; 19 | } 20 | else 21 | { 22 | return ""; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/GetEdgeResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | /// 6 | /// Represents a response containing an edge in a graph. 7 | /// 8 | /// The type of the edge document. 9 | public class GetEdgeResponse 10 | { 11 | /// 12 | /// Indicates whether an error occurred 13 | /// 14 | /// 15 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 16 | /// client will throw an rather than 17 | /// populating this property. A try/catch block should be used instead 18 | /// for any required error handling. 19 | /// 20 | public bool Error { get; set; } 21 | 22 | /// 23 | /// The HTTP status code. 24 | /// 25 | public HttpStatusCode Code { get; set; } 26 | 27 | /// 28 | /// The complete edge. 29 | /// 30 | public T Edge { get; set; } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/GetGraphResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class GetGraphResponse 6 | { 7 | public GraphResult Graph { get; set; } 8 | 9 | public HttpStatusCode Code { get; set; } 10 | 11 | /// 12 | /// Indicates whether an error occurred 13 | /// 14 | /// 15 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 16 | /// client will throw an rather than 17 | /// populating this property. A try/catch block should be used instead 18 | /// for any required error handling. 19 | /// 20 | public bool Error { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/GetGraphsResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Net; 3 | 4 | namespace ArangoDBNetStandard.GraphApi.Models 5 | { 6 | /// 7 | /// Represents a response containing the list of graph. 8 | /// 9 | public class GetGraphsResponse 10 | { 11 | /// 12 | /// The list of graph. 13 | /// Note: The property is null for in ArangoDB 4.5.2 and below, 14 | /// in which case you can use instead. 15 | /// 16 | public IEnumerable Graphs { get; set; } 17 | 18 | public HttpStatusCode Code { get; set; } 19 | 20 | /// 21 | /// Indicates whether an error occurred 22 | /// 23 | /// 24 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 25 | /// client will throw an rather than 26 | /// populating this property. A try/catch block should be used instead 27 | /// for any required error handling. 28 | /// 29 | public bool Error { get; set; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/GetVertexCollectionsResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Net; 3 | 4 | namespace ArangoDBNetStandard.GraphApi.Models 5 | { 6 | /// 7 | /// Represents a response containing the list of vertex collections within a graph. 8 | /// 9 | public class GetVertexCollectionsResponse 10 | { 11 | /// 12 | /// Indicates whether an error occurred 13 | /// 14 | /// 15 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 16 | /// client will throw an rather than 17 | /// populating this property. A try/catch block should be used instead 18 | /// for any required error handling. 19 | /// 20 | public bool Error { get; set; } 21 | 22 | /// 23 | /// The HTTP status code. 24 | /// 25 | public HttpStatusCode Code { get; set; } 26 | 27 | /// 28 | /// The list of vertex collections. 29 | /// 30 | public IEnumerable Collections { get; set; } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/GetVertexQuery.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class GetVertexQuery 6 | { 7 | public bool? Rev { get; set; } 8 | 9 | internal string ToQueryString() 10 | { 11 | List query = new List(); 12 | if (Rev != null) 13 | { 14 | query.Add("rev=" + Rev.ToString().ToLower()); 15 | } 16 | return string.Join("&", query); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/GetVertexResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class GetVertexResponse 6 | { 7 | public HttpStatusCode Code { get; set; } 8 | 9 | public T Vertex { get; set; } 10 | 11 | /// 12 | /// Indicates whether an error occurred 13 | /// 14 | /// 15 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 16 | /// client will throw an rather than 17 | /// populating this property. A try/catch block should be used instead 18 | /// for any required error handling. 19 | /// 20 | public bool Error { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/GraphHeaderProperties.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ArangoDBNetStandard.GraphApi.Models 6 | { 7 | /// 8 | /// Provides functionality for graph-specific headers 9 | /// 10 | public class GraphHeaderProperties : ApiHeaderProperties 11 | { 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PatchEdgeQuery.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ArangoDBNetStandard.GraphApi.Models 6 | { 7 | public class PatchEdgeQuery 8 | { 9 | public bool? WaitForSync { get; set; } 10 | 11 | public bool? KeepNull { get; set; } 12 | 13 | public bool? ReturnOld { get; set; } 14 | 15 | public bool? ReturnNew { get; set; } 16 | 17 | internal string ToQueryString() 18 | { 19 | List query = new List(); 20 | if (ReturnNew != null) 21 | { 22 | query.Add("returnNew=" + ReturnNew.ToString().ToLower()); 23 | } 24 | if (ReturnOld != null) 25 | { 26 | query.Add("returnOld=" + ReturnOld.ToString().ToLower()); 27 | } 28 | if (KeepNull != null) 29 | { 30 | query.Add("keepNull=" + KeepNull.ToString().ToLower()); 31 | } 32 | if (WaitForSync != null) 33 | { 34 | query.Add("waitForSync=" + WaitForSync.ToString().ToLower()); 35 | } 36 | return string.Join("&", query); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PatchEdgeResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class PatchEdgeResponse 6 | { 7 | public HttpStatusCode Code { get; set; } 8 | 9 | /// 10 | /// Indicates whether an error occurred 11 | /// 12 | /// 13 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 14 | /// client will throw an rather than 15 | /// populating this property. A try/catch block should be used instead 16 | /// for any required error handling. 17 | /// 18 | public bool Error { get; set; } 19 | 20 | public T New { get; set; } 21 | 22 | public T Old { get; set; } 23 | 24 | public PatchEdgeResult Edge { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PatchEdgeresult.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.GraphApi.Models 2 | { 3 | public class PatchEdgeResult 4 | { 5 | public string _id { get; set; } 6 | 7 | public string _key { get; set; } 8 | 9 | public string _rev { get; set; } 10 | 11 | public string _oldRev { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PatchVertexQuery.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class PatchVertexQuery 6 | { 7 | public bool? WaitForSync { get; set; } 8 | 9 | public bool? KeepNull { get; set; } 10 | 11 | public bool? ReturnOld { get; set; } 12 | 13 | public bool? ReturnNew { get; set; } 14 | 15 | internal string ToQueryString() 16 | { 17 | List query = new List(); 18 | if (WaitForSync != null) 19 | { 20 | query.Add("waitForSync=" + WaitForSync.ToString().ToLower()); 21 | } 22 | if (ReturnNew != null) 23 | { 24 | query.Add("returnNew=" + ReturnNew.ToString().ToLower()); 25 | } 26 | if (ReturnOld != null) 27 | { 28 | query.Add("returnOld=" + ReturnOld.ToString().ToLower()); 29 | } 30 | if (KeepNull != null) 31 | { 32 | query.Add("keepNull=" + KeepNull.ToString().ToLower()); 33 | } 34 | return string.Join("&", query); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PatchVertexResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class PatchVertexResponse 6 | { 7 | public T New { get; set; } 8 | 9 | public T Old { get; set; } 10 | 11 | public HttpStatusCode Code { get; set; } 12 | 13 | public PatchVertexResult Vertex { get; set; } 14 | 15 | /// 16 | /// Indicates whether an error occurred 17 | /// 18 | /// 19 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 20 | /// client will throw an rather than 21 | /// populating this property. A try/catch block should be used instead 22 | /// for any required error handling. 23 | /// 24 | public bool Error { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PatchVertexResult.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.GraphApi.Models 2 | { 3 | public class PatchVertexResult 4 | { 5 | public string _key { get; set; } 6 | 7 | public string _id { get; set; } 8 | 9 | public string _rev { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PostEdgeDefinitionBody.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | /// 6 | /// Represents a request body to add an edge definition to a graph. 7 | /// 8 | public class PostEdgeDefinitionBody 9 | { 10 | /// 11 | /// One or many vertex collections that can contain target vertices. 12 | /// 13 | public IEnumerable To { get; set; } 14 | 15 | /// 16 | /// One or many vertex collections that can contain source vertices. 17 | /// 18 | public IEnumerable From { get; set; } 19 | 20 | /// 21 | /// The name of the edge collection to be used. 22 | /// 23 | public string Collection { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PostEdgeDefinitionResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | /// 6 | /// Represents a response containing information about the graph 7 | /// and its new edge definition. 8 | /// 9 | public class PostEdgeDefinitionResponse 10 | { 11 | /// 12 | /// The information about the modified graph. 13 | /// 14 | public GraphResult Graph { get; set; } 15 | 16 | /// 17 | /// The HTTP status code. 18 | /// 19 | public HttpStatusCode Code { get; set; } 20 | 21 | /// 22 | /// Indicates whether an error occurred 23 | /// 24 | /// 25 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 26 | /// client will throw an rather than 27 | /// populating this property. A try/catch block should be used instead 28 | /// for any required error handling. 29 | /// 30 | public bool Error { get; set; } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PostEdgeQuery.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | /// 6 | /// Represents query parameters used when creating a new graph edge. 7 | /// 8 | public class PostEdgeQuery 9 | { 10 | /// 11 | /// Whether the response should contain the complete new version of the document. 12 | /// 13 | public bool? ReturnNew { get; set; } 14 | 15 | /// 16 | /// Whether the request should wait until synced to disk. 17 | /// 18 | public bool? WaitForSync { get; set; } 19 | 20 | internal string ToQueryString() 21 | { 22 | List query = new List(); 23 | if (ReturnNew != null) 24 | { 25 | query.Add("returnNew=" + ReturnNew.ToString().ToLower()); 26 | } 27 | if (WaitForSync != null) 28 | { 29 | query.Add("waitForSync=" + WaitForSync.ToString().ToLower()); 30 | } 31 | return string.Join("&", query); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PostGraphOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | /// 6 | /// Defines options for creating collections within a graph. 7 | /// 8 | public abstract class PostGraphOptions 9 | { 10 | /// 11 | /// The attribute name that is used to smartly shard the vertices of a graph. 12 | /// It is required if creating a SmartGraph. 13 | /// Every vertex in this SmartGraph has to have this attribute. 14 | /// Cannot be modified later. 15 | /// (Enterprise Edition only). 16 | /// 17 | /// 18 | /// (cluster only) 19 | /// 20 | public string SmartGraphAttribute { get; set; } 21 | 22 | /// 23 | /// (Optional) An array of collection names that will be used 24 | /// to create SatelliteCollections for a 25 | /// Hybrid (Disjoint) SmartGraph (Enterprise Edition only). 26 | /// Each array element must be a string and a valid collection name. 27 | /// The collection type cannot be modified later. 28 | /// 29 | public IEnumerable Satellites { get; set; } 30 | } 31 | } -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PostGraphQuery.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.GraphApi.Models 2 | { 3 | /// 4 | /// Represents query parameters used when creating a new graph. 5 | /// 6 | public class PostGraphQuery 7 | { 8 | /// 9 | /// Whether the request should wait until synced to disk. 10 | /// 11 | public bool? WaitForSync { get; set; } 12 | 13 | internal string ToQueryString() 14 | { 15 | if (WaitForSync != null) 16 | { 17 | return "waitForSync=" + WaitForSync.ToString().ToLower(); 18 | } 19 | else 20 | { 21 | return ""; 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PostGraphResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | /// 6 | /// Represents a response containing information about the newly created graph. 7 | /// 8 | public class PostGraphResponse 9 | { 10 | /// 11 | /// Indicates whether an error occurred 12 | /// 13 | /// 14 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 15 | /// client will throw an rather than 16 | /// populating this property. A try/catch block should be used instead 17 | /// for any required error handling. 18 | /// 19 | public bool Error { get; set; } 20 | 21 | /// 22 | /// The HTTP status code. 23 | /// 24 | public HttpStatusCode Code { get; set; } 25 | 26 | /// 27 | /// The information about the newly created graph. 28 | /// 29 | public GraphResult Graph { get; set; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PostSatelliteGraphOptions.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.GraphApi.Models 2 | { 3 | /// 4 | /// Options to create a satellite graph. 5 | /// 6 | public class PostSatelliteGraphOptions : PostGraphOptions 7 | { 8 | /// 9 | /// Always set to "satellite" to create 10 | /// a SatelliteGraph (Enterprise Edition only). 11 | /// 12 | public string ReplicationFactor { get; } = "satellite"; 13 | } 14 | } -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PostVertexCollectionBody.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.GraphApi.Models 2 | { 3 | /// 4 | /// Represents a request body to create a new graph vertex collection. 5 | /// 6 | public class PostVertexCollectionBody 7 | { 8 | /// 9 | /// The name of the vertex collection to create. 10 | /// 11 | public string Collection { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PostVertexCollectionResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | /// 6 | /// Represents a response containing information about the modified graph. 7 | /// 8 | public class PostVertexCollectionResponse 9 | { 10 | /// 11 | /// Indicates whether an error occurred 12 | /// 13 | /// 14 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 15 | /// client will throw an rather than 16 | /// populating this property. A try/catch block should be used instead 17 | /// for any required error handling. 18 | /// 19 | public bool Error { get; set; } 20 | 21 | /// 22 | /// The HTTP status code. 23 | /// 24 | public HttpStatusCode Code { get; set; } 25 | 26 | /// 27 | /// The information about the modified graph. 28 | /// 29 | public GraphResult Graph { get; set; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PostVertexQuery.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class PostVertexQuery 6 | { 7 | public bool? WaitForSync { get; set; } 8 | 9 | public bool? ReturnNew { get; set; } 10 | 11 | internal string ToQueryString() 12 | { 13 | List query = new List(); 14 | if (WaitForSync != null) 15 | { 16 | query.Add("waitForSync=" + WaitForSync.ToString().ToLower()); 17 | } 18 | if (ReturnNew != null) 19 | { 20 | query.Add("returnNew=" + ReturnNew.ToString().ToLower()); 21 | } 22 | 23 | return string.Join("&", query); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PostVertexResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class PostVertexResponse 6 | { 7 | /// 8 | /// The complete newly written vertex document. 9 | /// Includes all written attributes in the request 10 | /// body and all internal attributes generated by ArangoDB. 11 | /// Will only be present if 12 | /// is true. 13 | /// 14 | public T New { get; set; } 15 | 16 | public PostVertexResult Vertex { get; set; } 17 | 18 | public HttpStatusCode Code { get; set; } 19 | 20 | /// 21 | /// Indicates whether an error occurred 22 | /// 23 | /// 24 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 25 | /// client will throw an rather than 26 | /// populating this property. A try/catch block should be used instead 27 | /// for any required error handling. 28 | /// 29 | public bool Error { get; set; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PostVertexResult.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.GraphApi.Models 2 | { 3 | public class PostVertexResult 4 | { 5 | public string _key { get; set; } 6 | 7 | public string _id { get; set; } 8 | 9 | public string _rev { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PutEdgeDefinitionBody.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class PutEdgeDefinitionBody 6 | { 7 | public string Collection { get; set; } 8 | 9 | public IEnumerable From { get; set; } 10 | 11 | public IEnumerable To { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PutEdgeDefinitionQuery.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class PutEdgeDefinitionQuery 6 | { 7 | public bool? WaitForSync { get; set; } 8 | 9 | internal string ToQueryString() 10 | { 11 | List query = new List(); 12 | if (WaitForSync != null) 13 | { 14 | query.Add("waitForSync=" + WaitForSync.ToString().ToLower()); 15 | } 16 | return string.Join("&", query); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PutEdgeDefinitionResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class PutEdgeDefinitionResponse 6 | { 7 | public HttpStatusCode Code { get; set; } 8 | 9 | /// 10 | /// Indicates whether an error occurred 11 | /// 12 | /// 13 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 14 | /// client will throw an rather than 15 | /// populating this property. A try/catch block should be used instead 16 | /// for any required error handling. 17 | /// 18 | public bool Error { get; set; } 19 | 20 | public GraphResult Graph { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PutEdgeQuery.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class PutEdgeQuery 6 | { 7 | public bool? WaitForSync { get; set; } 8 | 9 | public bool? KeepNull { get; set; } 10 | 11 | public bool? ReturnOld { get; set; } 12 | 13 | public bool? ReturnNew { get; set; } 14 | 15 | internal string ToQueryString() 16 | { 17 | List query = new List(); 18 | if (WaitForSync != null) 19 | { 20 | query.Add("waitForSync=" + WaitForSync.ToString().ToLower()); 21 | } 22 | if (ReturnNew != null) 23 | { 24 | query.Add("returnNew=" + ReturnNew.ToString().ToLower()); 25 | } 26 | if (ReturnOld != null) 27 | { 28 | query.Add("returnOld=" + ReturnOld.ToString().ToLower()); 29 | } 30 | if (KeepNull != null) 31 | { 32 | query.Add("keepNull=" + KeepNull.ToString().ToLower()); 33 | } 34 | 35 | return string.Join("&", query); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PutEdgeResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class PutEdgeResponse 6 | { 7 | /// 8 | /// Indicates whether an error occurred 9 | /// 10 | /// 11 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 12 | /// client will throw an rather than 13 | /// populating this property. A try/catch block should be used instead 14 | /// for any required error handling. 15 | /// 16 | public bool Error { get; set; } 17 | 18 | public HttpStatusCode Code { get; set; } 19 | 20 | public T Old { get; set; } 21 | 22 | public T New { get; set; } 23 | 24 | public PutEdgeResult Edge { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PutEdgeResult.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.GraphApi.Models 2 | { 3 | public class PutEdgeResult 4 | { 5 | public string _id { get; set; } 6 | 7 | public string _key { get; set; } 8 | 9 | public string _rev { get; set; } 10 | 11 | public string _oldRev { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PutVertexQuery.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class PutVertexQuery 6 | { 7 | public bool? WaitForSync { get; set; } 8 | 9 | public bool? KeepNull { get; set; } 10 | 11 | public bool? ReturnOld { get; set; } 12 | 13 | public bool? ReturnNew { get; set; } 14 | 15 | internal string ToQueryString() 16 | { 17 | List query = new List(); 18 | if (WaitForSync != null) 19 | { 20 | query.Add("waitForSync=" + WaitForSync.ToString().ToLower()); 21 | } 22 | if (KeepNull != null) 23 | { 24 | query.Add("keepNull=" + KeepNull.ToString().ToLower()); 25 | } 26 | if (ReturnOld != null) 27 | { 28 | query.Add("returnOld=" + ReturnOld.ToString().ToLower()); 29 | } 30 | if (ReturnNew != null) 31 | { 32 | query.Add("returnNew=" + ReturnNew.ToString().ToLower()); 33 | } 34 | return string.Join("&", query); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PutVertexResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.GraphApi.Models 4 | { 5 | public class PutVertexResponse 6 | { 7 | public T New { get; set; } 8 | 9 | public T Old { get; set; } 10 | 11 | public HttpStatusCode Code { get; set; } 12 | 13 | public PutVertexResult Vertex { get; set; } 14 | 15 | /// 16 | /// Indicates whether an error occurred 17 | /// 18 | /// 19 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 20 | /// client will throw an rather than 21 | /// populating this property. A try/catch block should be used instead 22 | /// for any required error handling. 23 | /// 24 | public bool Error { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /arangodb-net-standard/GraphApi/Models/PutVertexResult.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.GraphApi.Models 2 | { 3 | public class PutVertexResult 4 | { 5 | public string _id { get; set; } 6 | 7 | public string _key { get; set; } 8 | 9 | public string _rev { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /arangodb-net-standard/IndexApi/Models/CompressionTypes.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ArangoDBNetStandard.IndexApi.Models 6 | { 7 | /// 8 | /// List of compression types for indexes. 9 | /// 10 | public static class CompressionTypes 11 | { 12 | /// 13 | /// Use LZ4 fast compression. 14 | /// 15 | public const string LZ4 = "lz4"; 16 | 17 | /// 18 | /// Disable compression to trade space for speed. 19 | /// 20 | public const string None = "none"; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /arangodb-net-standard/IndexApi/Models/DeleteIndexResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.IndexApi.Models 2 | { 3 | /// 4 | /// Represents a response returned after deleting an index. 5 | /// 6 | public class DeleteIndexResponse : ResponseBase 7 | { 8 | /// 9 | /// Id of the index 10 | /// 11 | public string Id { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /arangodb-net-standard/IndexApi/Models/GetAllCollectionIndexesQuery.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.IndexApi.Models 2 | { 3 | /// 4 | /// Represents query parameters used when fetching the list of indexes 5 | /// for a collection. 6 | /// 7 | public class GetAllCollectionIndexesQuery 8 | { 9 | /// 10 | /// Name of the collection 11 | /// 12 | public string CollectionName { get; set; } 13 | 14 | internal string ToQueryString() 15 | { 16 | if (!string.IsNullOrEmpty(CollectionName)) 17 | { 18 | return "collection=" + CollectionName; 19 | } 20 | else 21 | { 22 | return ""; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /arangodb-net-standard/IndexApi/Models/GetAllCollectionIndexesResponse.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ArangoDBNetStandard.IndexApi.Models 6 | { 7 | /// 8 | /// Response from 9 | /// 10 | public class GetAllCollectionIndexesResponse : ResponseBase 11 | { 12 | /// 13 | /// The list of all indexes for the collection. 14 | /// 15 | public IEnumerable Indexes { get; set; } 16 | 17 | /// 18 | /// All the indexes for the collection as a dictionary where each key is the index ID. 19 | /// 20 | public Dictionary Identifiers { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /arangodb-net-standard/IndexApi/Models/GetIndexResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.IndexApi.Models 2 | { 3 | /// 4 | /// Response from 5 | /// 6 | public class GetIndexResponse : IndexResponseBase 7 | { 8 | 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /arangodb-net-standard/IndexApi/Models/InvertedIndexSort.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.IndexApi.Models 4 | { 5 | public class InvertedIndexSort 6 | { 7 | public IEnumerable Fields { get; set; } 8 | 9 | /// 10 | /// Optional. Defines how to compress the 11 | /// primary sort data. Possible values: 12 | /// "lz4" (default): use LZ4 fast compression. 13 | /// "none": disable compression to trade space for speed. 14 | /// 15 | public string Compression { get; set; } 16 | 17 | /// 18 | /// Optional. Enable this option to always cache the 19 | /// primary sort columns in memory. This can improve 20 | /// the performance of queries that utilize the primary 21 | /// sort order. 22 | /// Default: false 23 | /// 24 | public bool? Cache { get; set; } 25 | } 26 | } -------------------------------------------------------------------------------- /arangodb-net-standard/IndexApi/Models/InvertedIndexSortItem.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.IndexApi.Models 2 | { 3 | public class InvertedIndexSortItem 4 | { 5 | public string Field { get; set; } 6 | public string Direction { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /arangodb-net-standard/IndexApi/Models/InvertedIndexStoredValue.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.IndexApi.Models 4 | { 5 | /// 6 | /// Stored value for inverted index. 7 | /// 8 | public class InvertedIndexStoredValue 9 | { 10 | /// 11 | /// A list of attribute paths. 12 | /// The . character denotes sub-attributes. 13 | /// 14 | public IEnumerable Fields { get; set; } 15 | 16 | /// 17 | /// Optional. Defines how to compress the 18 | /// attribute values. Possible values: 19 | /// and 20 | /// 21 | /// 22 | public string Compression { get; set; } 23 | 24 | /// 25 | /// Optional. Enable this option to always cache 26 | /// stored values in memory. This can improve the 27 | /// query performance if stored values are involved. 28 | /// Default: false 29 | /// 30 | public bool? Cache { get; set; } 31 | } 32 | } -------------------------------------------------------------------------------- /arangodb-net-standard/IndexApi/Models/PostFulltextIndexBody.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.IndexApi.Models 2 | { 3 | /// 4 | /// Request body to create a Fulltext index 5 | /// 6 | public class PostFulltextIndexBody : PostIndexBody 7 | { 8 | public PostFulltextIndexBody() 9 | { 10 | Type = IndexTypes.Fulltext; 11 | } 12 | 13 | /// 14 | /// Required. Minimum character length of words to 15 | /// index. Will default to a server-defined value 16 | /// if unspecified. It is thus recommended to set 17 | /// this value explicitly when creating the index. 18 | /// 19 | public long MinLength { get; set; } 20 | } 21 | } -------------------------------------------------------------------------------- /arangodb-net-standard/IndexApi/Models/PostHashIndexBody.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.IndexApi.Models 2 | { 3 | /// 4 | /// Request body to create a hash index 5 | /// 6 | public class PostHashIndexBody : PostIndexBody 7 | { 8 | public PostHashIndexBody() 9 | { 10 | Type = IndexTypes.Hash; 11 | } 12 | 13 | /// 14 | /// Set this property to true to create a unique index. 15 | /// Setting it to false or omitting it will create a non-unique index. 16 | /// 17 | public bool? Unique { get; set; } 18 | 19 | /// 20 | /// Can be set to true to create a sparse index. 21 | /// Sparse indexes do not index documents for 22 | /// which any of the index attributes 23 | /// is either not set or is null. 24 | /// 25 | public bool? Sparse { get; set; } 26 | 27 | /// 28 | /// The default value is true. 29 | /// It controls whether inserting duplicate index 30 | /// values from the same document into a unique 31 | /// array index will lead to a unique constraint 32 | /// error or not. 33 | /// 34 | public bool? Deduplicate { get; set; } 35 | } 36 | 37 | 38 | 39 | 40 | 41 | } 42 | -------------------------------------------------------------------------------- /arangodb-net-standard/IndexApi/Models/PostIndexBody.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ArangoDBNetStandard.IndexApi.Models 6 | { 7 | /// 8 | /// Base class for the request body for creating an index for a collection. 9 | /// 10 | public class PostIndexBody 11 | { 12 | /// 13 | /// The name of the new index. If you do not specify a name, one will be auto-generated. 14 | /// 15 | public string Name { get; set; } 16 | 17 | /// 18 | /// The type of index to create. 19 | /// Supported index types can be found in . 20 | /// 21 | public string Type { get; set; } 22 | 23 | /// 24 | /// The attributes to be indexed. 25 | /// Depending on the index type, a single attribute or multiple attributes can be indexed. 26 | /// 27 | public IEnumerable Fields { get; set; } 28 | 29 | /// 30 | /// Optional. Can be set to true to create the index in the background, 31 | /// which will not write-lock the underlying collection for 32 | /// as long as if the index is built in the foreground. 33 | /// The default value is false. 34 | /// 35 | public bool? InBackground { get; set; } 36 | } 37 | } -------------------------------------------------------------------------------- /arangodb-net-standard/IndexApi/Models/PostIndexQuery.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.IndexApi.Models 2 | { 3 | /// 4 | /// Represents query parameters used when creating a new index 5 | /// for a collection. 6 | /// 7 | public class PostIndexQuery 8 | { 9 | /// 10 | /// Name of the collection 11 | /// 12 | public string CollectionName { get; set; } 13 | 14 | internal string ToQueryString() 15 | { 16 | if (!string.IsNullOrEmpty(CollectionName)) 17 | { 18 | return "collection=" + CollectionName; 19 | } 20 | else 21 | { 22 | return ""; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /arangodb-net-standard/IndexApi/Models/PostMultiDimensionalIndexBody.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.IndexApi.Models 2 | { 3 | /// 4 | /// Request body to create a Multi-Dimensional index 5 | /// 6 | public class PostMultiDimensionalIndexBody : PostIndexBody 7 | { 8 | public PostMultiDimensionalIndexBody() 9 | { 10 | Type = IndexTypes.MultiDimensional; 11 | FieldValueTypes = "double"; 12 | } 13 | 14 | /// 15 | /// Required. Always initialized to the value "double". 16 | /// Currently only doubles are supported as values. 17 | /// 18 | public string FieldValueTypes { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /arangodb-net-standard/IndexApi/Models/PostSkiplistIndexBody.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.IndexApi.Models 2 | { 3 | /// 4 | /// Request body to create a skiplist index 5 | /// 6 | public class PostSkiplistIndexBody : PostIndexBody 7 | { 8 | public PostSkiplistIndexBody() 9 | { 10 | Type = IndexTypes.Skiplist; 11 | } 12 | 13 | /// 14 | /// Set this property to true to create a unique index. 15 | /// Setting it to false or omitting it will create a non-unique index. 16 | /// 17 | public bool? Unique { get; set; } 18 | 19 | /// 20 | /// Can be set to true to create a sparse index. 21 | /// Sparse indexes do not index documents for 22 | /// which any of the index attributes 23 | /// is either not set or is null. 24 | /// 25 | public bool? Sparse { get; set; } 26 | 27 | /// 28 | /// The default value is true. 29 | /// It controls whether inserting duplicate index 30 | /// values from the same document into a unique 31 | /// array index will lead to a unique constraint 32 | /// error or not. 33 | /// 34 | public bool? Deduplicate { get; set; } 35 | } 36 | } -------------------------------------------------------------------------------- /arangodb-net-standard/IndexApi/Models/PostTTLIndexBody.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.IndexApi.Models 2 | { 3 | /// 4 | /// Request body to create a TTL (time-to-live) index 5 | /// 6 | public class PostTTLIndexBody : PostIndexBody 7 | { 8 | public PostTTLIndexBody() 9 | { 10 | Type = IndexTypes.TTL; 11 | } 12 | 13 | /// 14 | /// Required. The time interval (in seconds) from the point 15 | /// in time stored in the fields attribute after 16 | /// which the documents count as expired. Can be 17 | /// set to 0 to let documents expire as soon as 18 | /// the server time passes the point in time stored 19 | /// in the document attribute, or to a higher 20 | /// number to delay the expiration. 21 | /// 22 | public int ExpireAfter { get; set; } 23 | } 24 | } -------------------------------------------------------------------------------- /arangodb-net-standard/IndexApi/Models/ResponseBase.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.IndexApi.Models 4 | { 5 | /// 6 | /// Represents a common response class for Index API operations. 7 | /// 8 | public class ResponseBase 9 | { 10 | /// 11 | /// Always false. 12 | /// 13 | /// 14 | /// To handle errors, catch 15 | /// thrown by API client methods. 16 | /// 17 | public bool Error { get; set; } 18 | 19 | /// 20 | /// The HTTP status code. 21 | /// 22 | public HttpStatusCode Code { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /arangodb-net-standard/PregelApi/Models/PregelJobDetail.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.PregelApi.Models 4 | { 5 | public class PregelJobDetail 6 | { 7 | /// 8 | /// The aggregated details of the full Pregel run. 9 | /// The values are totals of all the DB-Server. 10 | /// 11 | public PregelJobDetailInfo AggregatedStatus { get; set; } 12 | 13 | /// 14 | /// The details of the Pregel for every DB-Server. 15 | /// Each object key is a DB-Server ID, and each 16 | /// value is a nested object similar to the 17 | /// attribute. 18 | /// 19 | public Dictionary WorkerStatus { get; set; } 20 | } 21 | } -------------------------------------------------------------------------------- /arangodb-net-standard/PregelApi/Models/PregelJobDetailInfo.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.PregelApi.Models 2 | { 3 | /// 4 | /// The details of a Pregel run. 5 | /// 6 | public class PregelJobDetailInfo 7 | { 8 | /// 9 | /// The time at which the status was measured. 10 | /// 11 | public string TimeStamp { get; set; } 12 | 13 | /// 14 | /// The status of the in memory graph. 15 | /// 16 | public PregelJobGraphStoreStatus GraphStoreStatus { get; set; } 17 | 18 | /// 19 | /// Information about the global supersteps. 20 | /// 21 | public PregelJobGssStatus AllGssStatus { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /arangodb-net-standard/PregelApi/Models/PregelJobGraphStoreStatus.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.PregelApi.Models 2 | { 3 | /// 4 | /// The status of the in memory graph. 5 | /// 6 | public class PregelJobGraphStoreStatus 7 | { 8 | /// 9 | /// The number of vertices that are loaded 10 | /// from the database into memory. 11 | /// 12 | public int? VerticesLoaded { get; set; } 13 | 14 | /// 15 | /// The number of edges that are loaded 16 | /// from the database into memory. 17 | /// 18 | public int? EdgesLoaded { get; set; } 19 | 20 | /// 21 | /// The number of bytes used in-memory 22 | /// for the loaded graph. 23 | /// 24 | public long? MemoryBytesUsed { get; set; } 25 | 26 | /// 27 | /// The number of vertices that are 28 | /// written back to the database after 29 | /// the Pregel computation finished. 30 | /// It is only set if the store parameter 31 | /// is set to true. 32 | /// 33 | public int? VerticesStored { get; set; } 34 | } 35 | } -------------------------------------------------------------------------------- /arangodb-net-standard/PregelApi/Models/PregelJobGssStatus.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.PregelApi.Models 4 | { 5 | /// 6 | /// Information about the global supersteps. 7 | /// 8 | public class PregelJobGssStatus 9 | { 10 | /// 11 | /// A list of objects with details for each global superstep. 12 | /// 13 | public List Items { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /arangodb-net-standard/PregelApi/Models/PregelJobGssStatusItem.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.PregelApi.Models 2 | { 3 | /// 4 | /// Details for each global superstep. 5 | /// 6 | public class PregelJobGssStatusItem 7 | { 8 | /// 9 | /// The number of vertices that have been 10 | /// processed in this step. 11 | /// 12 | public int? VerticesProcessed { get; set; } 13 | 14 | /// 15 | /// The number of messages sent in this step. 16 | /// 17 | public int? MessagesSent { get; set; } 18 | 19 | /// 20 | /// The number of messages received in this step. 21 | /// 22 | public int? MessagesReceived { get; set; } 23 | 24 | /// 25 | /// The number of bytes used in memory for the 26 | /// messages in this step. 27 | /// 28 | public long? MemoryBytesUsedForMessages { get; set; } 29 | } 30 | } -------------------------------------------------------------------------------- /arangodb-net-standard/Serialization/CamelCasePropertyNamesExceptDictionaryContractResolver.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json.Serialization; 2 | using System; 3 | 4 | namespace ArangoDBNetStandard.Serialization 5 | { 6 | /// 7 | /// Custom implementation designed for special handling of 8 | /// dictionaries where we do not want to camel-case keys or values, nor ignore null values, 9 | /// on serialization. 10 | /// 11 | public class CamelCasePropertyNamesExceptDictionaryContractResolver : DefaultContractResolver 12 | { 13 | private ApiClientSerializationOptions _serializationOptions; 14 | public CamelCasePropertyNamesExceptDictionaryContractResolver(ApiClientSerializationOptions serializationOptions) 15 | { 16 | NamingStrategy = new CamelCaseNamingStrategy(); 17 | _serializationOptions = serializationOptions; 18 | } 19 | 20 | protected override JsonDictionaryContract CreateDictionaryContract(Type objectType) 21 | { 22 | JsonDictionaryContract contract = base.CreateDictionaryContract(objectType); 23 | contract.DictionaryKeyResolver = propertyName => propertyName; 24 | contract.ItemConverter = new DictionaryValueConverter(_serializationOptions); 25 | return contract; 26 | } 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /arangodb-net-standard/Serialization/SerializationException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | 4 | namespace ArangoDBNetStandard.Serialization 5 | { 6 | [Serializable] 7 | public class SerializationException : Exception 8 | { 9 | public SerializationException(string message, Exception innerException) : base(message, innerException) 10 | { 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /arangodb-net-standard/TransactionApi/Models/PostTransactionRequestCollections.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.TransactionApi.Models 4 | { 5 | /// 6 | /// Represents the collections object passed in an ArangoDB transaction request. 7 | /// 8 | public class PostTransactionRequestCollections 9 | { 10 | /// 11 | /// The list of read-only collections involved in a transaction. 12 | /// 13 | public IEnumerable Read { get; set; } 14 | 15 | /// 16 | /// The list of write collection involved in a transaction. 17 | /// 18 | public IEnumerable Write { get; set; } 19 | 20 | /// 21 | /// Collections for which to obtain exclusive locks during a transaction. 22 | /// 23 | public IEnumerable Exclusive { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /arangodb-net-standard/TransactionApi/Models/PostTransactionResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.TransactionApi.Models 4 | { 5 | /// 6 | /// Response from ArangoDB after executing a transaction. 7 | /// 8 | /// Type used to deserialize the returned object from the transaction function. 9 | public class PostTransactionResponse 10 | { 11 | /// 12 | /// Whether the request resulted in error. 13 | /// 14 | /// 15 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 16 | /// client will throw an rather than 17 | /// populating this property. A try/catch block should be used instead 18 | /// for any required error handling. 19 | /// 20 | public bool Error { get; set; } 21 | 22 | /// 23 | /// The ArangoDB result code. 24 | /// 25 | public HttpStatusCode Code { get; set; } 26 | 27 | /// 28 | /// Deserialized result from the transaction function. 29 | /// 30 | public T Result { get; set; } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /arangodb-net-standard/TransactionApi/Models/StreamTransactionResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.TransactionApi.Models 4 | { 5 | /// 6 | /// Response from ArangoDB after executing a stream transaction operation. 7 | /// 8 | public class StreamTransactionResponse 9 | { 10 | /// 11 | /// Gets or sets the Http Status code. 12 | /// 13 | public HttpStatusCode Code { get; set; } 14 | 15 | /// 16 | /// Indicates whether an error occurred 17 | /// 18 | /// 19 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 20 | /// client will throw an rather than 21 | /// populating this property. A try/catch block should be used instead 22 | /// for any required error handling. 23 | /// 24 | public bool Error { get; set; } 25 | 26 | /// 27 | /// Gets or sets the deserialized result from the stream transaction result. 28 | /// 29 | public StreamTransactionResult Result { get; set; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /arangodb-net-standard/TransactionApi/Models/StreamTransactionResult.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.TransactionApi.Models 2 | { 3 | /// 4 | /// Result from ArangoDB after performing a Stream transaction operation. 5 | /// 6 | public class StreamTransactionResult 7 | { 8 | /// 9 | /// Gets or sets the identifier of the transaction. 10 | /// 11 | public string Id { get; set; } 12 | 13 | /// 14 | /// Gets or sets the status of the transaction. 15 | /// 16 | public StreamTransactionStatus Status { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /arangodb-net-standard/TransactionApi/Models/StreamTransactionStatus.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.TransactionApi.Models 2 | { 3 | /// 4 | /// Enum containing the different stream transaction status. 5 | /// 6 | public enum StreamTransactionStatus 7 | { 8 | /// 9 | /// Transaction is running. 10 | /// 11 | Running, 12 | 13 | /// 14 | /// Transaction is committed. 15 | /// 16 | Committed, 17 | 18 | /// 19 | /// Transaction is aborted. 20 | /// 21 | Aborted, 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /arangodb-net-standard/TransactionApi/Models/StreamTransactions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.TransactionApi.Models 4 | { 5 | /// 6 | /// Result from ArangoDB after getting list of all running transactions. 7 | /// 8 | public class StreamTransactions 9 | { 10 | /// 11 | /// Gets or sets list of all Stream Transactions. 12 | /// 13 | public IEnumerable Transactions { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /arangodb-net-standard/TransactionApi/Models/Transaction.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.TransactionApi.Models 2 | { 3 | /// 4 | /// Transaction Properties. 5 | /// 6 | public sealed class Transaction 7 | { 8 | /// 9 | /// Gets or sets the transaction Id. 10 | /// 11 | public string Id { get; set; } 12 | 13 | /// 14 | /// Gets or sets the transaction status. 15 | /// 16 | public StreamTransactionStatus State { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /arangodb-net-standard/Transport/Http/HttpApiClientResponse.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | using System.Net.Http.Headers; 4 | 5 | namespace ArangoDBNetStandard.Transport.Http 6 | { 7 | public class HttpApiClientResponse : IApiClientResponse 8 | { 9 | private readonly HttpResponseMessage response; 10 | 11 | public HttpApiClientResponse(HttpResponseMessage response) 12 | { 13 | this.response = response; 14 | Headers = response.Headers; 15 | Content = new HttpApiClientResponseContent(response.Content); 16 | IsSuccessStatusCode = response.IsSuccessStatusCode; 17 | StatusCode = (int)response.StatusCode; 18 | 19 | } 20 | 21 | public IApiClientResponseContent Content { get; private set; } 22 | 23 | public bool IsSuccessStatusCode { get; private set; } 24 | 25 | public int StatusCode { get; private set; } 26 | 27 | public HttpResponseHeaders Headers { get; set; } 28 | 29 | public void Dispose() 30 | { 31 | response.Dispose(); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /arangodb-net-standard/Transport/Http/HttpApiClientResponseContent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Net.Http; 5 | using System.Net.Http.Headers; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace ArangoDBNetStandard.Transport.Http 10 | { 11 | public class HttpApiClientResponseContent : IApiClientResponseContent 12 | { 13 | private HttpContent content; 14 | 15 | public HttpApiClientResponseContent(HttpContent content) 16 | { 17 | this.content = content; 18 | } 19 | 20 | public HttpContentHeaders Headers => content.Headers; 21 | 22 | public async Task ReadAsStreamAsync() 23 | { 24 | return await content.ReadAsStreamAsync().ConfigureAwait(false); 25 | } 26 | 27 | public async Task ReadAsStringAsync() 28 | { 29 | return await content.ReadAsStringAsync().ConfigureAwait(false); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /arangodb-net-standard/Transport/Http/HttpContentType.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.Transport.Http 2 | { 3 | public enum HttpContentType 4 | { 5 | Json, 6 | VPack 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /arangodb-net-standard/Transport/IApiClientResponse.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http.Headers; 3 | 4 | namespace ArangoDBNetStandard.Transport 5 | { 6 | public interface IApiClientResponse : IDisposable 7 | { 8 | IApiClientResponseContent Content { get; } 9 | 10 | bool IsSuccessStatusCode { get; } 11 | 12 | int StatusCode { get; } 13 | 14 | HttpResponseHeaders Headers { get; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /arangodb-net-standard/Transport/IApiClientResponseContent.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Net.Http.Headers; 3 | using System.Threading.Tasks; 4 | 5 | namespace ArangoDBNetStandard.Transport 6 | { 7 | public interface IApiClientResponseContent 8 | { 9 | HttpContentHeaders Headers { get; } 10 | 11 | Task ReadAsStreamAsync(); 12 | 13 | Task ReadAsStringAsync(); 14 | } 15 | } -------------------------------------------------------------------------------- /arangodb-net-standard/UserApi/Models/AvailableUser.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.UserApi.Models 4 | { 5 | /// 6 | /// Represents information about a user available in ArangoDB. 7 | /// 8 | public class AvailableUser 9 | { 10 | /// 11 | /// The name of the user. 12 | /// 13 | public string User { get; set; } 14 | 15 | /// 16 | /// Whether the user is active. 17 | /// 18 | public bool Active { get; set; } 19 | 20 | /// 21 | /// Object with arbitrary extra data about the user. 22 | /// 23 | public Dictionary Extra { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /arangodb-net-standard/UserApi/Models/DeleteAccessLevelResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.UserApi.Models 2 | { 3 | /// 4 | /// Represents a response returned after clearing 5 | /// a database or collection access level. 6 | /// 7 | public class DeleteAccessLevelResponse : ResponseBase 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /arangodb-net-standard/UserApi/Models/DeleteUserResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.UserApi.Models 2 | { 3 | /// 4 | /// Represents a response returned after deleting a user. 5 | /// 6 | public class DeleteUserResponse : ResponseBase 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /arangodb-net-standard/UserApi/Models/GetAccessLevelResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.UserApi.Models 2 | { 3 | /// 4 | /// Represents a response returned after fetching 5 | /// a database or collection access level. 6 | /// 7 | public class GetAccessLevelResponse : ResponseBase 8 | { 9 | /// 10 | /// The access level for the specified database or collection. 11 | /// 12 | public string Result { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /arangodb-net-standard/UserApi/Models/GetAccessibleDatabasesQuery.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.UserApi.Models 2 | { 3 | /// 4 | /// Represents query parameters used when fetching the list of databases 5 | /// available to a user. 6 | /// 7 | public class GetAccessibleDatabasesQuery 8 | { 9 | /// 10 | /// Whether to return the full set of access levels 11 | /// for all databases and all collections. 12 | /// 13 | public bool? Full { get; set; } 14 | 15 | internal string ToQueryString() 16 | { 17 | if (Full != null) 18 | { 19 | return "full=" + Full.ToString().ToLower(); 20 | } 21 | else 22 | { 23 | return ""; 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /arangodb-net-standard/UserApi/Models/GetAccessibleDatabasesResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.UserApi.Models 4 | { 5 | /// 6 | /// Represents a response returned after listing 7 | /// the databases accesible by a user. 8 | /// 9 | public class GetAccessibleDatabasesResponse : ResponseBase 10 | { 11 | /// 12 | /// Contains the databases names as keys, 13 | /// and the associated privileges for the database as values. 14 | /// In case you specified , 15 | /// it will contain values with the permissions for the databases 16 | /// ('permission') as well as the permissions for the collections ('collections'). 17 | /// 18 | /// 19 | /// The type of the full values will depend on the serializer used. 20 | /// When using the default , 21 | /// values will be . 22 | /// 23 | public Dictionary Result { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /arangodb-net-standard/UserApi/Models/GetUserResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.UserApi.Models 2 | { 3 | /// 4 | /// Represents a response returned after fetching a user. 5 | /// 6 | public class GetUserResponse : UserResponseBase 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /arangodb-net-standard/UserApi/Models/GetUsersResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.UserApi.Models 4 | { 5 | /// 6 | /// Represents a response returned after fetching all users. 7 | /// 8 | public class GetUsersResponse : ResponseBase 9 | { 10 | /// 11 | /// The users that were found. 12 | /// 13 | public IEnumerable Result { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /arangodb-net-standard/UserApi/Models/PatchUserBody.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.UserApi.Models 4 | { 5 | /// 6 | /// Represents a request body to update an existing user. 7 | /// 8 | public class PatchUserBody 9 | { 10 | /// 11 | /// The user password. Specifying a password is mandatory, 12 | /// but the empty string is allowed for passwords. 13 | /// 14 | public string Passwd { get; set; } 15 | 16 | /// 17 | /// An optional flag that specifies whether the user is active. 18 | /// If not specified, this will default to true. 19 | /// 20 | public bool? Active { get; set; } 21 | 22 | /// 23 | /// Optional object with arbitrary extra data about the user. 24 | /// 25 | public Dictionary Extra { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /arangodb-net-standard/UserApi/Models/PatchUserResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.UserApi.Models 4 | { 5 | /// 6 | /// Represents a response returned after updating an existing user. 7 | /// 8 | public class PatchUserResponse : UserResponseBase 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /arangodb-net-standard/UserApi/Models/PostUserBody.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.UserApi.Models 4 | { 5 | /// 6 | /// Represents a request body to create a user. 7 | /// 8 | public class PostUserBody 9 | { 10 | /// 11 | /// The name of the user. 12 | /// 13 | public string User { get; set; } 14 | 15 | /// 16 | /// The user password. 17 | /// If no password is specified, the empty string will be used. 18 | /// If you pass the special value ARANGODB_DEFAULT_ROOT_PASSWORD, 19 | /// then the password will be set the value stored in the environment variable 20 | /// ARANGODB_DEFAULT_ROOT_PASSWORD. 21 | /// This can be used to pass an instance variable into ArangoDB. 22 | /// 23 | public string Passwd { get; set; } 24 | 25 | /// 26 | /// An optional flag that specifies whether the user is active. 27 | /// If not specified, this will default to true. 28 | /// 29 | public bool? Active { get; set; } 30 | 31 | /// 32 | /// Optional object with arbitrary extra data about the user. 33 | /// 34 | public Dictionary Extra { get; set; } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /arangodb-net-standard/UserApi/Models/PostUserResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.UserApi.Models 2 | { 3 | /// 4 | /// Represents a response returned after creating a user. 5 | /// 6 | public class PostUserResponse : UserResponseBase 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /arangodb-net-standard/UserApi/Models/PutAccessLevelBody.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.UserApi.Models 2 | { 3 | /// 4 | /// Represents a request body to set database or collection access level. 5 | /// 6 | public class PutAccessLevelBody 7 | { 8 | /// 9 | /// The access level to set. 10 | /// Use "rw" to set the collection level access to 'Read/Write'. 11 | /// Use "ro" to set the collection level access to 'Read Only'. 12 | /// Use "none" to set the collection level access to 'No access'. 13 | /// 14 | public string Grant { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /arangodb-net-standard/UserApi/Models/PutAccessLevelResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.UserApi.Models 2 | { 3 | /// 4 | /// Represents a response returned after setting 5 | /// a database or collection access level. 6 | /// 7 | public class PutAccessLevelResponse : ResponseBase 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /arangodb-net-standard/UserApi/Models/PutUserBody.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.UserApi.Models 4 | { 5 | /// 6 | /// Represents a request body to replace an existing user. 7 | /// 8 | public class PutUserBody 9 | { 10 | /// 11 | /// The user password. Specifying a password is mandatory, 12 | /// but the empty string is allowed for passwords. 13 | /// 14 | public string Passwd { get; set; } 15 | 16 | /// 17 | /// An optional flag that specifies whether the user is active. 18 | /// If not specified, this will default to true. 19 | /// 20 | public bool? Active { get; set; } 21 | 22 | /// 23 | /// Optional object with arbitrary extra data about the user. 24 | /// 25 | public Dictionary Extra { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /arangodb-net-standard/UserApi/Models/PutUserResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Net; 3 | 4 | namespace ArangoDBNetStandard.UserApi.Models 5 | { 6 | /// 7 | /// Represents a response returned after replacing an existing user. 8 | /// 9 | public class PutUserResponse : UserResponseBase 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /arangodb-net-standard/UserApi/Models/ResponseBase.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.UserApi.Models 4 | { 5 | /// 6 | /// Represents a common response class for user API operations. 7 | /// 8 | public class ResponseBase 9 | { 10 | /// 11 | /// Indicates whether an error occurred 12 | /// 13 | /// 14 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 15 | /// client will throw an rather than 16 | /// populating this property. A try/catch block should be used instead 17 | /// for any required error handling. 18 | /// 19 | public bool Error { get; set; } 20 | 21 | /// 22 | /// The HTTP status code. 23 | /// 24 | public HttpStatusCode Code { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /arangodb-net-standard/UserApi/Models/UserResponseBase.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Net; 3 | 4 | namespace ArangoDBNetStandard.UserApi.Models 5 | { 6 | /// 7 | /// Represents a common response class with user information 8 | /// returned after performing a user operation. 9 | /// 10 | public class UserResponseBase : ResponseBase 11 | { 12 | /// 13 | /// The name of the user. 14 | /// 15 | public string User { get; set; } 16 | 17 | /// 18 | /// Whether the user is active. 19 | /// 20 | public bool Active { get; set; } 21 | 22 | /// 23 | /// Object with arbitrary extra data about the user. 24 | /// 25 | public Dictionary Extra { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /arangodb-net-standard/ViewApi/Models/DeleteViewResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.ViewApi.Models 2 | { 3 | /// 4 | /// Response from 5 | /// 6 | public class DeleteViewResponse :ResponseBase 7 | { 8 | /// 9 | /// Indicates whether the delete 10 | /// operation was successful. 11 | /// 12 | public bool Result { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /arangodb-net-standard/ViewApi/Models/GetAllViewsResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ArangoDBNetStandard.ViewApi.Models 4 | { 5 | /// 6 | /// Response from 7 | /// 8 | public class GetAllViewsResponse : ResponseBase 9 | { 10 | /// 11 | /// List of views 12 | /// 13 | public List Result { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /arangodb-net-standard/ViewApi/Models/GetViewPropertiesResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.ViewApi.Models 4 | { 5 | /// 6 | /// Response from 7 | /// 8 | public class GetViewPropertiesResponse : ViewResponse 9 | { 10 | /// 11 | /// Indicates whether an error occurred 12 | /// 13 | /// 14 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 15 | /// client will throw an rather than 16 | /// populating this property. A try/catch block should be used instead 17 | /// for any required error handling. 18 | /// 19 | public bool Error { get; set; } 20 | 21 | /// 22 | /// The HTTP status code. 23 | /// 24 | public HttpStatusCode Code { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /arangodb-net-standard/ViewApi/Models/GetViewResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.ViewApi.Models 4 | { 5 | /// 6 | /// Response from 7 | /// 8 | public class GetViewResponse : ViewSummary 9 | { 10 | /// 11 | /// Indicates whether an error occurred 12 | /// 13 | /// 14 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 15 | /// client will throw an rather than 16 | /// populating this property. A try/catch block should be used instead 17 | /// for any required error handling. 18 | /// 19 | public bool Error { get; set; } 20 | 21 | /// 22 | /// The HTTP status code. 23 | /// 24 | public HttpStatusCode Code { get; set; } 25 | } 26 | } -------------------------------------------------------------------------------- /arangodb-net-standard/ViewApi/Models/PutRenameViewBody.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.ViewApi.Models 2 | { 3 | /// 4 | /// Body parameters for 5 | /// 6 | public class PutRenameViewBody 7 | { 8 | /// 9 | /// The new name for the view 10 | /// 11 | public string Name { get; set; } 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /arangodb-net-standard/ViewApi/Models/PutRenameViewResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.ViewApi.Models 4 | { 5 | /// 6 | /// Response from 7 | /// 8 | public class PutRenameViewResponse : ViewSummary 9 | { 10 | /// 11 | /// Indicates whether an error occurred 12 | /// 13 | /// 14 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 15 | /// client will throw an rather than 16 | /// populating this property. A try/catch block should be used instead 17 | /// for any required error handling. 18 | /// 19 | public bool Error { get; set; } 20 | 21 | /// 22 | /// The HTTP status code. 23 | /// 24 | public HttpStatusCode Code { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /arangodb-net-standard/ViewApi/Models/ResponseBase.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace ArangoDBNetStandard.ViewApi.Models 4 | { 5 | /// 6 | /// Represents a common response class for Views API operations. 7 | /// 8 | public class ResponseBase 9 | { 10 | /// 11 | /// Indicates whether an error occurred 12 | /// 13 | /// 14 | /// Note that in cases where an error occurs, the ArangoDBNetStandard 15 | /// client will throw an rather than 16 | /// populating this property. A try/catch block should be used instead 17 | /// for any required error handling. 18 | /// 19 | public bool Error { get; set; } 20 | 21 | /// 22 | /// The HTTP status code. 23 | /// 24 | public HttpStatusCode Code { get; set; } 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /arangodb-net-standard/ViewApi/Models/SearchAliasIndex.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ArangoDBNetStandard.ViewApi.Models 6 | { 7 | public class SearchAliasIndex 8 | { 9 | /// 10 | /// Name of the collection 11 | /// 12 | public string Collection { get; set; } 13 | 14 | /// 15 | /// Name of the index 16 | /// 17 | public string Index { get; set; } 18 | 19 | /// 20 | /// Optional. Type of operation. 21 | /// Possible values: 22 | /// , or 23 | /// 24 | /// Only relevant when updating the 25 | /// properties of a View definition. 26 | /// 27 | public string Operation { get; set; } 28 | } 29 | } -------------------------------------------------------------------------------- /arangodb-net-standard/ViewApi/Models/SearchAliasIndexOperation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ArangoDBNetStandard.ViewApi.Models 6 | { 7 | /// 8 | /// Possible operations for search alias indexes. 9 | /// 10 | public static class SearchAliasIndexOperation 11 | { 12 | /// 13 | /// Add the index to the stored indexes 14 | /// property of the View. 15 | /// 16 | public const string Add = "add"; 17 | 18 | /// 19 | /// Remove the index from the stored indexes 20 | /// property of the View. 21 | /// 22 | public const string Del = "del"; 23 | } 24 | } -------------------------------------------------------------------------------- /arangodb-net-standard/ViewApi/Models/SortCompressionTypes.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ArangoDBNetStandard.ViewApi.Models 6 | { 7 | /// 8 | /// Defines values for ArangoDB sort compression types. 9 | /// Possible value for 10 | /// 11 | public static class SortCompressionTypes 12 | { 13 | /// 14 | /// Use LZ4 fast compression. 15 | /// 16 | public const string LZ4 = "lz4"; 17 | 18 | /// 19 | /// Disable compression to trade space for speed. 20 | /// 21 | public const string None = "none"; 22 | } 23 | } -------------------------------------------------------------------------------- /arangodb-net-standard/ViewApi/Models/ViewResponse.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.ViewApi.Models 2 | { 3 | /// 4 | /// Response from several View API endpoints 5 | /// 6 | public class ViewResponse : ViewDetails 7 | { 8 | /// 9 | /// The globally unique identifier of the View 10 | /// 11 | public string GloballyUniqueId { get; set; } 12 | 13 | /// 14 | /// The id of the view 15 | /// 16 | public string Id { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /arangodb-net-standard/ViewApi/Models/ViewSort.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.ViewApi.Models 2 | { 3 | /// 4 | /// Defines sort order for a view. 5 | /// Read more about this in the documentation. 6 | /// 7 | public class ViewSort 8 | { 9 | /// 10 | /// Possible value for 11 | /// 12 | public const string AscendingSortDirection = "asc"; 13 | 14 | /// 15 | /// Possible value for 16 | /// 17 | public const string DescendingSortDirection = "desc"; 18 | 19 | /// 20 | /// Name of the field to sort by 21 | /// 22 | public string Field { get; set; } 23 | 24 | /// 25 | /// Direction of the sort: 26 | /// ( for ascending, 27 | /// for descending) 28 | /// 29 | public string Direction { get; set; } 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /arangodb-net-standard/ViewApi/Models/ViewSummary.cs: -------------------------------------------------------------------------------- 1 | namespace ArangoDBNetStandard.ViewApi.Models 2 | { 3 | /// 4 | /// Provides summary info about a view 5 | /// 6 | public class ViewSummary 7 | { 8 | /// 9 | /// The globally unique identifier of the View 10 | /// 11 | public string GloballyUniqueId { get; set; } 12 | 13 | /// 14 | /// The identifier of the View 15 | /// 16 | public string Id { get; set; } 17 | 18 | /// 19 | /// The name of the View 20 | /// 21 | public string Name { get; set; } 22 | 23 | /// 24 | /// The type of the View 25 | /// 26 | public string Type { get; set; } 27 | } 28 | } -------------------------------------------------------------------------------- /arangodb-net-standard/ViewApi/Models/ViewTypes.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ArangoDBNetStandard.ViewApi.Models 6 | { 7 | /// 8 | /// Defines values for ArangoDB view types. 9 | /// Possible value for 10 | /// 11 | public static class ViewTypes 12 | { 13 | /// 14 | /// See https://www.arangodb.com/docs/stable/arangosearch-views.html 15 | /// 16 | public const string ArangoSearch = "arangosearch"; 17 | 18 | /// 19 | /// See https://www.arangodb.com/docs/stable/arangosearch-views-search-alias.html 20 | /// 21 | public const string SearchAlias = "search-alias"; 22 | } 23 | } --------------------------------------------------------------------------------