Skip to content

Commit

Permalink
Generate inference constructor overloads (#8159)
Browse files Browse the repository at this point in the history
  • Loading branch information
flobernd committed Apr 22, 2024
1 parent c5d76be commit be9a915
Show file tree
Hide file tree
Showing 107 changed files with 3,362 additions and 1,628 deletions.
Expand Up @@ -958,7 +958,7 @@ public SubmitAsyncSearchRequestDescriptor(Elastic.Clients.Elasticsearch.Serverle
{
}

public SubmitAsyncSearchRequestDescriptor()
public SubmitAsyncSearchRequestDescriptor() : this(typeof(TDocument))
{
}

Expand Down
Expand Up @@ -186,7 +186,7 @@ public HealthRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices?
{
}

public HealthRequestDescriptor()
public HealthRequestDescriptor() : this(typeof(TDocument))
{
}

Expand Down
Expand Up @@ -225,7 +225,7 @@ public CountRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices?
{
}

public CountRequestDescriptor()
public CountRequestDescriptor() : this(typeof(TDocument))
{
}

Expand Down
Expand Up @@ -387,6 +387,10 @@ public DeleteByQueryRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.I
{
}

public DeleteByQueryRequestDescriptor() : this(typeof(TDocument))
{
}

internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceDeleteByQuery;

protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
Expand Down
Expand Up @@ -142,6 +142,10 @@ public EqlSearchRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indic
{
}

public EqlSearchRequestDescriptor() : this(typeof(TDocument))
{
}

internal override ApiUrls ApiUrls => ApiUrlLookup.EqlSearch;

protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
Expand Down
Expand Up @@ -161,7 +161,7 @@ public FieldCapsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indic
{
}

public FieldCapsRequestDescriptor()
public FieldCapsRequestDescriptor() : this(typeof(TDocument))
{
}

Expand Down
Expand Up @@ -107,6 +107,10 @@ public ExploreRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices
{
}

public ExploreRequestDescriptor() : this(typeof(TDocument))
{
}

internal override ApiUrls ApiUrls => ApiUrlLookup.GraphExplore;

protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
Expand Down
Expand Up @@ -142,7 +142,7 @@ public ClearCacheRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indi
{
}

public ClearCacheRequestDescriptor()
public ClearCacheRequestDescriptor() : this(typeof(TDocument))
{
}

Expand Down
Expand Up @@ -127,6 +127,10 @@ public CloseIndexRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indi
{
}

public CloseIndexRequestDescriptor() : this(typeof(TDocument))
{
}

internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementClose;

protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
Expand Down
Expand Up @@ -83,6 +83,10 @@ public DeleteAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Ind
{
}

public DeleteAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names name) : this(typeof(TDocument), name)
{
}

internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementDeleteAlias;

protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
Expand Down
Expand Up @@ -116,6 +116,10 @@ public DeleteIndexRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Ind
{
}

public DeleteIndexRequestDescriptor() : this(typeof(TDocument))
{
}

internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementDelete;

protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
Expand Down
Expand Up @@ -109,7 +109,7 @@ public ExistsAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Ind
{
}

public ExistsAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("name", name))
public ExistsAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names name) : this(typeof(TDocument), name)
{
}

Expand Down
Expand Up @@ -127,6 +127,10 @@ public ExistsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices
{
}

public ExistsRequestDescriptor() : this(typeof(TDocument))
{
}

internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementExists;

protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD;
Expand Down
Expand Up @@ -83,6 +83,10 @@ public ExplainDataLifecycleRequestDescriptor(Elastic.Clients.Elasticsearch.Serve
{
}

public ExplainDataLifecycleRequestDescriptor() : this(typeof(TDocument))
{
}

internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementExplainDataLifecycle;

protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
Expand Down
Expand Up @@ -120,7 +120,7 @@ public FlushRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices?
{
}

public FlushRequestDescriptor()
public FlushRequestDescriptor() : this(typeof(TDocument))
{
}

Expand Down
Expand Up @@ -142,7 +142,7 @@ public ForcemergeRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indi
{
}

public ForcemergeRequestDescriptor()
public ForcemergeRequestDescriptor() : this(typeof(TDocument))
{
}

Expand Down
Expand Up @@ -117,6 +117,10 @@ public GetAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indice
{
}

public GetAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names? name) : this(typeof(TDocument), name)
{
}

public GetAliasRequestDescriptor()
{
}
Expand Down
Expand Up @@ -149,6 +149,10 @@ public GetIndexRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indice
{
}

public GetIndexRequestDescriptor() : this(typeof(TDocument))
{
}

internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementGet;

protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
Expand Down
Expand Up @@ -150,6 +150,10 @@ public GetIndicesSettingsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverl
{
}

public GetIndicesSettingsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names? name) : this(typeof(TDocument), name)
{
}

public GetIndicesSettingsRequestDescriptor()
{
}
Expand Down
Expand Up @@ -120,7 +120,7 @@ public GetMappingRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indi
{
}

public GetMappingRequestDescriptor()
public GetMappingRequestDescriptor() : this(typeof(TDocument))
{
}

Expand Down
Expand Up @@ -172,6 +172,10 @@ public IndicesStatsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.In
{
}

public IndicesStatsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Metrics? metric) : this(typeof(TDocument), metric)
{
}

public IndicesStatsRequestDescriptor()
{
}
Expand Down
Expand Up @@ -127,6 +127,10 @@ public OpenIndexRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indic
{
}

public OpenIndexRequestDescriptor() : this(typeof(TDocument))
{
}

internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementOpen;

protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
Expand Down
Expand Up @@ -113,6 +113,10 @@ public PutAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indice
{
}

public PutAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : this(typeof(TDocument), name)
{
}

internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementPutAlias;

protected override HttpMethod StaticHttpMethod => HttpMethod.PUT;
Expand Down
Expand Up @@ -195,6 +195,10 @@ public PutMappingRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indi
{
}

public PutMappingRequestDescriptor() : this(typeof(TDocument))
{
}

internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementPutMapping;

protected override HttpMethod StaticHttpMethod => HttpMethod.PUT;
Expand Down
Expand Up @@ -87,7 +87,7 @@ public RecoveryRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indice
{
}

public RecoveryRequestDescriptor()
public RecoveryRequestDescriptor() : this(typeof(TDocument))
{
}

Expand Down
Expand Up @@ -98,7 +98,7 @@ public RefreshRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices
{
}

public RefreshRequestDescriptor()
public RefreshRequestDescriptor() : this(typeof(TDocument))
{
}

Expand Down
Expand Up @@ -109,7 +109,7 @@ public SegmentsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indice
{
}

public SegmentsRequestDescriptor()
public SegmentsRequestDescriptor() : this(typeof(TDocument))
{
}

Expand Down
Expand Up @@ -203,7 +203,7 @@ public ValidateQueryRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.I
{
}

public ValidateQueryRequestDescriptor()
public ValidateQueryRequestDescriptor() : this(typeof(TDocument))
{
}

Expand Down
Expand Up @@ -222,7 +222,7 @@ public MultiSearchRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Ind
{
}

public MultiSearchRequestDescriptor()
public MultiSearchRequestDescriptor() : this(typeof(TDocument))
{
}

Expand Down
Expand Up @@ -145,7 +145,7 @@ public MultiSearchTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Server
{
}

public MultiSearchTemplateRequestDescriptor()
public MultiSearchTemplateRequestDescriptor() : this(typeof(TDocument))
{
}

Expand Down
Expand Up @@ -116,6 +116,10 @@ public OpenPointInTimeRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless
{
}

public OpenPointInTimeRequestDescriptor() : this(typeof(TDocument))
{
}

internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceOpenPointInTime;

protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
Expand Down
Expand Up @@ -121,7 +121,7 @@ public RankEvalRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indice
{
}

public RankEvalRequestDescriptor()
public RankEvalRequestDescriptor() : this(typeof(TDocument))
{
}

Expand Down
Expand Up @@ -149,6 +149,10 @@ public SearchMvtRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indic
{
}

public SearchMvtRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Field field, int zoom, int x, int y) : this(typeof(TDocument), field, zoom, x, y)
{
}

internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceSearchMvt;

protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
Expand Down
Expand Up @@ -1007,7 +1007,7 @@ public SearchRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices?
{
}

public SearchRequestDescriptor()
public SearchRequestDescriptor() : this(typeof(TDocument))
{
}

Expand Down
Expand Up @@ -216,7 +216,7 @@ public SearchTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.
{
}

public SearchTemplateRequestDescriptor()
public SearchTemplateRequestDescriptor() : this(typeof(TDocument))
{
}

Expand Down
Expand Up @@ -399,6 +399,10 @@ public UpdateByQueryRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.I
{
}

public UpdateByQueryRequestDescriptor() : this(typeof(TDocument))
{
}

internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceUpdateByQuery;

protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
Expand Down

0 comments on commit be9a915

Please sign in to comment.