Example #1
0
        [U] public override async Task Urls()
        {
            await UrlTester.GET("/_nodes/usage")
            .Fluent(c => c.Nodes.Usage(d => d))
            .Request(c => c.Nodes.Usage(new NodesUsageRequest()))
            .FluentAsync(c => c.Nodes.UsageAsync(d => d))
            .RequestAsync(c => c.Nodes.UsageAsync(new NodesUsageRequest()))
            ;

            await UrlTester.GET("/_nodes/nodeId/usage")
            .Fluent(c => c.Nodes.Usage(d => d.NodeId("nodeId")))
            .Request(c => c.Nodes.Usage(new NodesUsageRequest("nodeId")))
            .FluentAsync(c => c.Nodes.UsageAsync(d => d.NodeId("nodeId")))
            .RequestAsync(c => c.Nodes.UsageAsync(new NodesUsageRequest("nodeId")))
            ;

            await UrlTester.GET("/_nodes/nodeId/usage/rest_actions")
            .Fluent(c => c.Nodes.Usage(d => d.NodeId("nodeId").Metric(NodesUsageMetric.RestActions)))
            .Request(c => c.Nodes.Usage(new NodesUsageRequest("nodeId", NodesUsageMetric.RestActions)))
            .FluentAsync(c => c.Nodes.UsageAsync(d => d.NodeId("nodeId").Metric(NodesUsageMetric.RestActions)))
            .RequestAsync(c => c.Nodes.UsageAsync(new NodesUsageRequest("nodeId", NodesUsageMetric.RestActions)))
            ;

            await UrlTester.GET("/_nodes/nodeId/usage/_all")
            .Fluent(c => c.Nodes.Usage(d => d.NodeId("nodeId").Metric(NodesUsageMetric.All)))
            .Request(c => c.Nodes.Usage(new NodesUsageRequest("nodeId", NodesUsageMetric.All)))
            .FluentAsync(c => c.Nodes.UsageAsync(d => d.NodeId("nodeId").Metric(NodesUsageMetric.All)))
            .RequestAsync(c => c.Nodes.UsageAsync(new NodesUsageRequest("nodeId", NodesUsageMetric.All)))
            ;
        }
Example #2
0
        [U] public async Task Urls()
        {
            var hardcoded = "hardcoded";

            await UrlTester.POST("/hardcoded/doc/_search/template")
            .Request(c => c.SearchTemplate <Project>(new SearchTemplateRequest(hardcoded, "doc")))
            .Request(c => c.SearchTemplate <Project>(new SearchTemplateRequest <Project>(hardcoded, Type <Project>())))
            .FluentAsync(c => c.SearchTemplateAsync <Project>(s => s.Index(hardcoded).Type <Project>()))
            .RequestAsync(c => c.SearchTemplateAsync <Project>(new SearchTemplateRequest <Project>(hardcoded, Type <Project>())))
            .FluentAsync(c => c.SearchTemplateAsync <Project>(s => s.Index(hardcoded).Type <Project>()))
            ;

            await UrlTester.POST("/project/_search/template")
            .Request(c => c.SearchTemplate <Project>(new SearchTemplateRequest("project")))
            .Fluent(c => c.SearchTemplate <Project>(s => s.Index("project").AllTypes()))
            .Request(c => c.SearchTemplate <Project>(new SearchTemplateRequest <Project>(typeof(Project))))
            .FluentAsync(c => c.SearchTemplateAsync <Project>(s => s.Index("project").AllTypes()))
            .RequestAsync(c => c.SearchTemplateAsync <Project>(new SearchTemplateRequest <Project>(typeof(Project))));

            await UrlTester.POST("/_search/template")
            .Fluent(c => c.SearchTemplate <Project>(s => s.AllIndices().AllTypes()))
            .Request(c => c.SearchTemplate <Project>(new SearchTemplateRequest()))
            .Request(c => c.SearchTemplate <Project>(new SearchTemplateRequest <Project>(Nest.Indices.All, Types.All)))
            .FluentAsync(c => c.SearchTemplateAsync <Project>(s => s.AllIndices().AllTypes()))
            .RequestAsync(c => c.SearchTemplateAsync <Project>(new SearchTemplateRequest <Project>(Nest.Indices.All, Types.All)))
            .RequestAsync(c => c.SearchTemplateAsync <Project>(new SearchTemplateRequest()))
            ;
        }
Example #3
0
 [U] public override async Task Urls()
 {
     await UrlTester.GET("_ml/info")
     .Fluent(c => c.MachineLearningInfo())
     .Request(c => c.MachineLearningInfo(new MachineLearningInfoRequest()))
     .FluentAsync(c => c.MachineLearningInfoAsync())
     .RequestAsync(c => c.MachineLearningInfoAsync(new MachineLearningInfoRequest()));
 }
 [U] public override async Task Urls()
 {
     var name = "x";
     await UrlTester.POST($"/{name}/_ccr/resume_follow")
     .Fluent(c => c.ResumeFollowIndex(name, d => d))
     .Request(c => c.ResumeFollowIndex(new ResumeFollowIndexRequest(name)))
     .FluentAsync(c => c.ResumeFollowIndexAsync(name, d => d))
     .RequestAsync(c => c.ResumeFollowIndexAsync(new ResumeFollowIndexRequest(name)));
 }
 [U] public override async Task Urls()
 {
     var name = "x";
     await UrlTester.PUT($"/_ccr/auto_follow/{name}")
     .Fluent(c => c.CreateAutoFollowPattern(name, d => d))
     .Request(c => c.CreateAutoFollowPattern(new CreateAutoFollowPatternRequest(name)))
     .FluentAsync(c => c.CreateAutoFollowPatternAsync(name, d => d))
     .RequestAsync(c => c.CreateAutoFollowPatternAsync(new CreateAutoFollowPatternRequest(name)));
 }
Example #6
0
 [U] public override async Task Urls()
 {
     await UrlTester.GET("/_tasks")
     .Fluent(c => c.ListTasks())
     .Request(c => c.ListTasks(new ListTasksRequest()))
     .FluentAsync(c => c.ListTasksAsync())
     .RequestAsync(c => c.ListTasksAsync(new ListTasksRequest()))
     ;
 }
 [U] public override async Task Urls()
 {
     var name = "x";
     await UrlTester.PUT($"/{name}/_ccr/follow")
     .Fluent(c => c.CrossClusterReplication.CreateFollowIndex(name, d => d))
     .Request(c => c.CrossClusterReplication.CreateFollowIndex(new CreateFollowIndexRequest(name)))
     .FluentAsync(c => c.CrossClusterReplication.CreateFollowIndexAsync(name, d => d))
     .RequestAsync(c => c.CrossClusterReplication.CreateFollowIndexAsync(new CreateFollowIndexRequest(name)));
 }
Example #8
0
 [U] public async Task Urls()
 {
     await UrlTester.PUT("/_xpack/security/user/mpdreamz")
     .Fluent(c => c.PutUser("mpdreamz"))
     .Request(c => c.PutUser(new PutUserRequest("mpdreamz")))
     .FluentAsync(c => c.PutUserAsync("mpdreamz"))
     .RequestAsync(c => c.PutUserAsync(new PutUserRequest("mpdreamz")))
     ;
 }
Example #9
0
 [U] public override async Task Urls()
 {
     var name = "x";
     await UrlTester.POST($"/{name}/_ccr/forget_follower")
     .Fluent(c => c.CrossClusterReplication.ForgetFollowerIndex(name, d => d))
     .Request(c => c.CrossClusterReplication.ForgetFollowerIndex(new ForgetFollowerIndexRequest(name)))
     .FluentAsync(c => c.CrossClusterReplication.ForgetFollowerIndexAsync(name, d => d))
     .RequestAsync(c => c.CrossClusterReplication.ForgetFollowerIndexAsync(new ForgetFollowerIndexRequest(name)));
 }
 [U] public override async Task Urls()
 {
     var name = "x";
     await UrlTester.DELETE($"/_ccr/auto_follow/{name}")
     .Fluent(c => c.CrossClusterReplication.DeleteAutoFollowPattern(name, d => d))
     .Request(c => c.CrossClusterReplication.DeleteAutoFollowPattern(new DeleteAutoFollowPatternRequest(name)))
     .FluentAsync(c => c.CrossClusterReplication.DeleteAutoFollowPatternAsync(name, d => d))
     .RequestAsync(c => c.CrossClusterReplication.DeleteAutoFollowPatternAsync(new DeleteAutoFollowPatternRequest(name)));
 }
 [U] public override async Task Urls()
 {
     var name = "x";
     await UrlTester.GET($"/{name}/_ccr/stats")
     .Fluent(c => c.CrossClusterReplication.FollowIndexStats(name, d => d))
     .Request(c => c.CrossClusterReplication.FollowIndexStats(new FollowIndexStatsRequest(name)))
     .FluentAsync(c => c.CrossClusterReplication.FollowIndexStatsAsync(name, d => d))
     .RequestAsync(c => c.CrossClusterReplication.FollowIndexStatsAsync(new FollowIndexStatsRequest(name)));
 }
 [U] public override async Task Urls() => await UrlTester.POST("/_cluster/allocation/explain?include_yes_decisions=true")
 .Fluent(c => c.ClusterAllocationExplain(s => s.Index <Project>().Shard(0).Primary(true).IncludeYesDecisions()))
 .Request(c => c.ClusterAllocationExplain(new ClusterAllocationExplainRequest
 {
     Index = typeof(Project), Shard = 0, Primary = true, IncludeYesDecisions = true
 }))
 .FluentAsync(c => c.ClusterAllocationExplainAsync(s => s.Index <Project>().Shard(0).Primary(true).IncludeYesDecisions()))
 .RequestAsync(c => c.ClusterAllocationExplainAsync(new ClusterAllocationExplainRequest
 {
     Index = typeof(Project), Shard = 0, Primary = true, IncludeYesDecisions = true
 }));
Example #13
0
 [U] public async Task Urls()
 {
     var indices = Nest.Indices.Index <Project>().And <Developer>();
     var index   = "project%2Cdevs";
     await UrlTester.POST($"/{index}/_open")
     .Fluent(c => c.OpenIndex(indices, s => s))
     .Request(c => c.OpenIndex(new OpenIndexRequest(indices)))
     .FluentAsync(c => c.OpenIndexAsync(indices))
     .RequestAsync(c => c.OpenIndexAsync(new OpenIndexRequest(indices)))
     ;
 }
 [U] public async Task Urls()
 {
     var indices = Nest.Indices.Index <Project>().And <CommitActivity>();
     var index   = "project";
     await UrlTester.HEAD($"/{index}")
     .Fluent(c => c.Indices.Exists(index, s => s))
     .Request(c => c.Indices.Exists(new IndexExistsRequest(index)))
     .FluentAsync(c => c.Indices.ExistsAsync(index))
     .RequestAsync(c => c.Indices.ExistsAsync(new IndexExistsRequest(index)))
     ;
 }
Example #15
0
        [U] public async Task Urls()
        {
            var repository = "repos";
            var snapshot   = "snap";

            await UrlTester.POST($"/_snapshot/{repository}/{snapshot}/_restore")
            .Fluent(c => c.Snapshot.Restore(repository, snapshot))
            .Request(c => c.Snapshot.Restore(new RestoreRequest(repository, snapshot)))
            .FluentAsync(c => c.Snapshot.RestoreAsync(repository, snapshot))
            .RequestAsync(c => c.Snapshot.RestoreAsync(new RestoreRequest(repository, snapshot)))
            ;
        }
 [U] public async Task Urls()
 {
     var indices = Nest.Indices.Index <Project>().And <Developer>();
     var index   = "project%2Cdevs";
     var types   = "_doc";
     var type    = "_doc";
     await UrlTester.HEAD($"/{index}/_mapping/{type}")
     .Fluent(c => c.Indices.TypeExists(indices, types))
     .Request(c => c.Indices.TypeExists(new TypeExistsRequest(indices, types)))
     .FluentAsync(c => c.Indices.TypeExistsAsync(indices, types))
     .RequestAsync(c => c.Indices.TypeExistsAsync(new TypeExistsRequest(indices, types)))
     ;
 }
        [U] public override async Task Urls()
        {
            await UrlTester.POST("/_security/api_key/id1%2Cid2/_clear_cache")
            .Fluent(c => c.Security.ClearApiKeyCache(f => f.Ids("id1,id2")))
            .Request(c => c.Security.ClearApiKeyCache(new ClearApiKeyCacheRequest("id1,id2")))
            .FluentAsync(c => c.Security.ClearApiKeyCacheAsync(f => f.Ids("id1,id2")))
            .RequestAsync(c => c.Security.ClearApiKeyCacheAsync(new ClearApiKeyCacheRequest("id1,id2")));

            await UrlTester.POST("/_security/api_key/*/_clear_cache")
            .Fluent(c => c.Security.ClearApiKeyCache())
            .Request(c => c.Security.ClearApiKeyCache(new ClearApiKeyCacheRequest()))
            .FluentAsync(c => c.Security.ClearApiKeyCacheAsync())
            .RequestAsync(c => c.Security.ClearApiKeyCacheAsync(new ClearApiKeyCacheRequest()));
        }
        [U] public override async Task Urls()
        {
            var name = "x";
            await UrlTester.GET($"/_ccr/auto_follow/{name}")
            .Fluent(c => c.CrossClusterReplication.GetAutoFollowPattern(name))
            .Request(c => c.CrossClusterReplication.GetAutoFollowPattern(new GetAutoFollowPatternRequest(name)))
            .FluentAsync(c => c.CrossClusterReplication.GetAutoFollowPatternAsync(name))
            .RequestAsync(c => c.CrossClusterReplication.GetAutoFollowPatternAsync(new GetAutoFollowPatternRequest(name)));

            await UrlTester.GET($"/_ccr/auto_follow")
            .Fluent(c => c.CrossClusterReplication.GetAutoFollowPattern())
            .Request(c => c.CrossClusterReplication.GetAutoFollowPattern(new GetAutoFollowPatternRequest()))
            .FluentAsync(c => c.CrossClusterReplication.GetAutoFollowPatternAsync())
            .RequestAsync(c => c.CrossClusterReplication.GetAutoFollowPatternAsync(new GetAutoFollowPatternRequest()));
        }
Example #19
0
        [U] public override async Task Urls()
        {
            var name = "x";
            await UrlTester.GET($"/_ccr/auto_follow/{name}")
            .Fluent(c => c.GetAutoFollowPattern(d => d.Name(name)))
            .Request(c => c.GetAutoFollowPattern(new GetAutoFollowPatternRequest(name)))
            .FluentAsync(c => c.GetAutoFollowPatternAsync(d => d.Name(name)))
            .RequestAsync(c => c.GetAutoFollowPatternAsync(new GetAutoFollowPatternRequest(name)));

            await UrlTester.GET($"/_ccr/auto_follow")
            .Fluent(c => c.GetAutoFollowPattern(d => d))
            .Request(c => c.GetAutoFollowPattern(new GetAutoFollowPatternRequest()))
            .FluentAsync(c => c.GetAutoFollowPatternAsync(d => d))
            .RequestAsync(c => c.GetAutoFollowPatternAsync(new GetAutoFollowPatternRequest()));
        }
Example #20
0
        [U] public override async Task Urls()
        {
            await UrlTester.GET("/_security/role_mapping")
            .Fluent(c => c.Security.GetRoleMapping())
            .Request(c => c.Security.GetRoleMapping(new GetRoleMappingRequest()))
            .FluentAsync(c => c.Security.GetRoleMappingAsync())
            .RequestAsync(c => c.Security.GetRoleMappingAsync(new GetRoleMappingRequest()))
            ;

            var roles = "can_write,can_read_metadata";
            await UrlTester.GET($"/_security/role_mapping/{UrlTester.EscapeUriString(roles)}")
            .Fluent(c => c.Security.GetRoleMapping(roles))
            .Request(c => c.Security.GetRoleMapping(new GetRoleMappingRequest(roles)))
            .FluentAsync(c => c.Security.GetRoleMappingAsync(roles))
            .RequestAsync(c => c.Security.GetRoleMappingAsync(new GetRoleMappingRequest(roles)))
            ;
        }
Example #21
0
        [U] public async Task Urls()
        {
            await UrlTester.GET($"/_segments")
            .Fluent(c => c.Segments(Nest.Indices.All))
            .Request(c => c.Segments(new SegmentsRequest()))
            .FluentAsync(c => c.SegmentsAsync(Nest.Indices.All))
            .RequestAsync(c => c.SegmentsAsync(new SegmentsRequest()))
            ;

            var index = "index1,index2";
            await UrlTester.GET($"/{index}/_segments")
            .Fluent(c => c.Segments(index))
            .Request(c => c.Segments(new SegmentsRequest(index)))
            .FluentAsync(c => c.SegmentsAsync(index))
            .RequestAsync(c => c.SegmentsAsync(new SegmentsRequest(index)))
            ;
        }
Example #22
0
        [U] public async Task Urls()
        {
            await UrlTester.GET("/_tasks")
            .Fluent(c => c.TasksList())
            .Request(c => c.TasksList(new TasksListRequest()))
            .FluentAsync(c => c.TasksListAsync())
            .RequestAsync(c => c.TasksListAsync(new TasksListRequest()))
            ;

            var taskId = "node:4";
            await UrlTester.GET($"/_tasks/node%3A4")
            .Fluent(c => c.TasksList(t => t.TaskId(taskId)))
            .Request(c => c.TasksList(new TasksListRequest(taskId)))
            .FluentAsync(c => c.TasksListAsync(t => t.TaskId(taskId)))
            .RequestAsync(c => c.TasksListAsync(new TasksListRequest(taskId)))
            ;
        }
        [U] public async Task Urls()
        {
            await UrlTester.GET($"/_recovery")
            .Fluent(c => c.RecoveryStatus(Nest.Indices.All))
            .Request(c => c.RecoveryStatus(new RecoveryStatusRequest()))
            .FluentAsync(c => c.RecoveryStatusAsync(Nest.Indices.All))
            .RequestAsync(c => c.RecoveryStatusAsync(new RecoveryStatusRequest()))
            ;

            var index = "index1,index2";
            await UrlTester.GET($"/index1%2Cindex2/_recovery")
            .Fluent(c => c.RecoveryStatus(index))
            .Request(c => c.RecoveryStatus(new RecoveryStatusRequest(index)))
            .FluentAsync(c => c.RecoveryStatusAsync(index))
            .RequestAsync(c => c.RecoveryStatusAsync(new RecoveryStatusRequest(index)))
            ;
        }
        [U] public async Task Urls()
        {
            await UrlTester.POST("/project/_graph/explore")
            .Fluent(c => c.GraphExplore <Project>(d => d))
            .Request(c => c.GraphExplore(new GraphExploreRequest <Project>("project")))
            .FluentAsync(c => c.GraphExploreAsync <Project>(d => d))
            .RequestAsync(c => c.GraphExploreAsync(new GraphExploreRequest <Project>("project")))
            ;


            var index = "another-index";
            await UrlTester.POST($"/{index}/project/_graph/explore")
            .Fluent(c => c.GraphExplore <Project>(d => d.Type <Project>().Index(index)))
            .Request(c => c.GraphExplore(new GraphExploreRequest <Project>(index, Type <Project>())))
            .FluentAsync(c => c.GraphExploreAsync <Project>(d => d.Type <Project>().Index(index)))
            .RequestAsync(c => c.GraphExploreAsync(new GraphExploreRequest <Project>(index, Type <Project>())))
            ;
        }
        [U] public async Task Urls()
        {
            await UrlTester.GET("/_xpack/migration/assistance")
            .Fluent(c => c.MigrationAssistance())
            .Request(c => c.MigrationAssistance(new MigrationAssistanceRequest()))
            .FluentAsync(c => c.MigrationAssistanceAsync())
            .RequestAsync(c => c.MigrationAssistanceAsync(new MigrationAssistanceRequest()))
            ;

            var index = "another-index";

            await UrlTester.GET($"/_xpack/migration/assistance/{index}")
            .Fluent(c => c.MigrationAssistance(d => d.Index(index)))
            .Request(c => c.MigrationAssistance(new MigrationAssistanceRequest(index)))
            .FluentAsync(c => c.MigrationAssistanceAsync(d => d.Index(index)))
            .RequestAsync(c => c.MigrationAssistanceAsync(new MigrationAssistanceRequest(index)))
            ;
        }
Example #26
0
        [U] public async Task Urls()
        {
            await UrlTester.GET($"/_segments")
            .Request(c => c.Indices.Segments(new SegmentsRequest()))
            .RequestAsync(c => c.Indices.SegmentsAsync(new SegmentsRequest()))
            ;

            await UrlTester.GET($"/_all/_segments")
            .Fluent(c => c.Indices.Segments(All))
            .Request(c => c.Indices.Segments(new SegmentsRequest(All)))
            .FluentAsync(c => c.Indices.SegmentsAsync(All))
            .RequestAsync(c => c.Indices.SegmentsAsync(new SegmentsRequest(All)))
            ;

            var index = "index1,index2";
            await UrlTester.GET($"/index1%2Cindex2/_segments")
            .Fluent(c => c.Indices.Segments(index))
            .Request(c => c.Indices.Segments(new SegmentsRequest(index)))
            .FluentAsync(c => c.Indices.SegmentsAsync(index))
            .RequestAsync(c => c.Indices.SegmentsAsync(new SegmentsRequest(index)))
            ;
        }