Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate inference constructor overloads #8153

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,22 @@ public DeleteRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexNam
{
}

public DeleteRequestDescriptor(TDocument document) : this(typeof(TDocument), Elastic.Clients.Elasticsearch.Serverless.Id.From(document))
{
}

public DeleteRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index) : this(index, Elastic.Clients.Elasticsearch.Serverless.Id.From(document))
{
}

public DeleteRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id)
{
}

public DeleteRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id)
{
}

internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceDelete;

protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,22 @@ public ExistsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexNam
{
}

public ExistsRequestDescriptor(TDocument document) : this(typeof(TDocument), Elastic.Clients.Elasticsearch.Serverless.Id.From(document))
{
}

public ExistsRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index) : this(index, Elastic.Clients.Elasticsearch.Serverless.Id.From(document))
{
}

public ExistsRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id)
{
}

public ExistsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id)
{
}

internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceExists;

protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,22 @@ public ExistsSourceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.In
{
}

public ExistsSourceRequestDescriptor(TDocument document) : this(typeof(TDocument), Elastic.Clients.Elasticsearch.Serverless.Id.From(document))
{
}

public ExistsSourceRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index) : this(index, Elastic.Clients.Elasticsearch.Serverless.Id.From(document))
{
}

public ExistsSourceRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id)
{
}

public ExistsSourceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id)
{
}

internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceExistsSource;

protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,22 @@ public ExplainRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexNa
{
}

public ExplainRequestDescriptor(TDocument document) : this(typeof(TDocument), Elastic.Clients.Elasticsearch.Serverless.Id.From(document))
{
}

public ExplainRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index) : this(index, Elastic.Clients.Elasticsearch.Serverless.Id.From(document))
{
}

public ExplainRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id)
{
}

public ExplainRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id)
{
}

internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceExplain;

protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,22 @@ public GetRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName i
{
}

public GetRequestDescriptor(TDocument document) : this(typeof(TDocument), Elastic.Clients.Elasticsearch.Serverless.Id.From(document))
{
}

public GetRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index) : this(index, Elastic.Clients.Elasticsearch.Serverless.Id.From(document))
{
}

public GetRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id)
{
}

public GetRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id)
{
}

internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceGet;

protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,22 @@ public GetSourceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Index
{
}

public GetSourceRequestDescriptor(TDocument document) : this(typeof(TDocument), Elastic.Clients.Elasticsearch.Serverless.Id.From(document))
{
}

public GetSourceRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index) : this(index, Elastic.Clients.Elasticsearch.Serverless.Id.From(document))
{
}

public GetSourceRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id)
{
}

public GetSourceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id)
{
}

internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceGetSource;

protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,22 @@ public TermVectorsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Ind
{
}

public TermVectorsRequestDescriptor(TDocument document) : this(typeof(TDocument), Elastic.Clients.Elasticsearch.Serverless.Id.From(document))
{
}

public TermVectorsRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index) : this(index, Elastic.Clients.Elasticsearch.Serverless.Id.From(document))
{
}

public TermVectorsRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id? id) : this(typeof(TDocument), id)
{
}

public TermVectorsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? id) : this(typeof(TDocument), id)
{
}

internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceTermvectors;

protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,22 @@ public UpdateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexNam
{
}

public UpdateRequestDescriptor(TDocument document) : this(typeof(TDocument), Elastic.Clients.Elasticsearch.Serverless.Id.From(document))
{
}

public UpdateRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index) : this(index, Elastic.Clients.Elasticsearch.Serverless.Id.From(document))
{
}

public UpdateRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id)
{
}

public UpdateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id)
{
}

internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceUpdate;

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