-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Generate the ml namespace (#1158) * Generate ml.register_model_group Signed-off-by: Thomas Farr <[email protected]> * Start neural search sample Signed-off-by: Thomas Farr <[email protected]> * Re-generate ShardStatistics Signed-off-by: Thomas Farr <[email protected]> * Re-generate ShardFailure Signed-off-by: Thomas Farr <[email protected]> * Re-generate Result Signed-off-by: Thomas Farr <[email protected]> * Re-generate WriteResponseBase Signed-off-by: Thomas Farr <[email protected]> * Generate ml.delete_model_group Signed-off-by: Thomas Farr <[email protected]> * Generate ml.register_model Signed-off-by: Thomas Farr <[email protected]> * Exclude legacy license from ml namespace Signed-off-by: Thomas Farr <[email protected]> * Generate ml.get_task Signed-off-by: Thomas Farr <[email protected]> * Generate ml.delete_task Signed-off-by: Thomas Farr <[email protected]> * Generate ml.delete_model Signed-off-by: Thomas Farr <[email protected]> * Generate ml.deploy_model Signed-off-by: Thomas Farr <[email protected]> * Generate ml.undeploy_model Signed-off-by: Thomas Farr <[email protected]> * Complete neural search sample Signed-off-by: Thomas Farr <[email protected]> * Generate ml.get_model Signed-off-by: Thomas Farr <[email protected]> * Add changelog entry Signed-off-by: Thomas Farr <[email protected]> * note Signed-off-by: Thomas Farr <[email protected]> * Fix tests Signed-off-by: Thomas Farr <[email protected]> --------- Signed-off-by: Thomas Farr <[email protected]> (cherry picked from commit c6e61e1) * Tie into manually edited client Signed-off-by: Thomas Farr <[email protected]> * Remove stray codegen files Signed-off-by: Thomas Farr <[email protected]> --------- Signed-off-by: Thomas Farr <[email protected]>
- Loading branch information
Showing
29 changed files
with
3,829 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
101 changes: 101 additions & 0 deletions
101
...lient/src/generated/java/org/opensearch/client/opensearch/ml/DeleteModelGroupRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
//---------------------------------------------------- | ||
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. | ||
//---------------------------------------------------- | ||
|
||
package org.opensearch.client.opensearch.ml; | ||
|
||
import java.util.function.Function; | ||
import javax.annotation.Generated; | ||
import org.opensearch.client.opensearch._types.ErrorResponse; | ||
import org.opensearch.client.opensearch._types.RequestBase; | ||
import org.opensearch.client.transport.Endpoint; | ||
import org.opensearch.client.transport.endpoints.SimpleEndpoint; | ||
import org.opensearch.client.util.ApiTypeHelper; | ||
import org.opensearch.client.util.ObjectBuilder; | ||
import org.opensearch.client.util.ObjectBuilderBase; | ||
|
||
// typedef: ml.delete_model_group.Request | ||
|
||
/** | ||
* Deletes a model group. | ||
*/ | ||
@Generated("org.opensearch.client.codegen.CodeGenerator") | ||
public class DeleteModelGroupRequest extends RequestBase { | ||
|
||
private final String modelGroupId; | ||
|
||
// --------------------------------------------------------------------------------------------- | ||
|
||
private DeleteModelGroupRequest(Builder builder) { | ||
this.modelGroupId = ApiTypeHelper.requireNonNull(builder.modelGroupId, this, "modelGroupId"); | ||
} | ||
|
||
public static DeleteModelGroupRequest of(Function<DeleteModelGroupRequest.Builder, ObjectBuilder<DeleteModelGroupRequest>> fn) { | ||
return fn.apply(new Builder()).build(); | ||
} | ||
|
||
/** | ||
* Required - API name: {@code model_group_id} | ||
*/ | ||
public final String modelGroupId() { | ||
return this.modelGroupId; | ||
} | ||
|
||
// --------------------------------------------------------------------------------------------- | ||
|
||
/** | ||
* Builder for {@link DeleteModelGroupRequest}. | ||
*/ | ||
public static class Builder extends ObjectBuilderBase implements ObjectBuilder<DeleteModelGroupRequest> { | ||
private String modelGroupId; | ||
|
||
/** | ||
* Required - API name: {@code model_group_id} | ||
*/ | ||
public final Builder modelGroupId(String value) { | ||
this.modelGroupId = value; | ||
return this; | ||
} | ||
|
||
/** | ||
* Builds a {@link DeleteModelGroupRequest}. | ||
* | ||
* @throws NullPointerException if some of the required fields are null. | ||
*/ | ||
public DeleteModelGroupRequest build() { | ||
_checkSingleUse(); | ||
|
||
return new DeleteModelGroupRequest(this); | ||
} | ||
} | ||
|
||
// --------------------------------------------------------------------------------------------- | ||
|
||
/** | ||
* Endpoint "{@code ml.delete_model_group}". | ||
*/ | ||
public static final Endpoint<DeleteModelGroupRequest, DeleteModelGroupResponse, ErrorResponse> _ENDPOINT = new SimpleEndpoint<>( | ||
// Request method | ||
request -> "DELETE", | ||
// Request path | ||
request -> { | ||
StringBuilder buf = new StringBuilder(); | ||
buf.append("/_plugins/_ml/model_groups/"); | ||
SimpleEndpoint.pathEncode(request.modelGroupId, buf); | ||
return buf.toString(); | ||
}, | ||
// Request parameters | ||
SimpleEndpoint.emptyMap(), | ||
SimpleEndpoint.emptyMap(), | ||
false, | ||
DeleteModelGroupResponse._DESERIALIZER | ||
); | ||
} |
75 changes: 75 additions & 0 deletions
75
...ient/src/generated/java/org/opensearch/client/opensearch/ml/DeleteModelGroupResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
//---------------------------------------------------- | ||
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. | ||
//---------------------------------------------------- | ||
|
||
package org.opensearch.client.opensearch.ml; | ||
|
||
import java.util.function.Function; | ||
import javax.annotation.Generated; | ||
import org.opensearch.client.json.JsonpDeserializable; | ||
import org.opensearch.client.json.JsonpDeserializer; | ||
import org.opensearch.client.json.ObjectBuilderDeserializer; | ||
import org.opensearch.client.json.ObjectDeserializer; | ||
import org.opensearch.client.opensearch._types.WriteResponseBase; | ||
import org.opensearch.client.util.ObjectBuilder; | ||
|
||
// typedef: ml.delete_model_group.Response | ||
|
||
@JsonpDeserializable | ||
@Generated("org.opensearch.client.codegen.CodeGenerator") | ||
public class DeleteModelGroupResponse extends WriteResponseBase { | ||
|
||
// --------------------------------------------------------------------------------------------- | ||
|
||
private DeleteModelGroupResponse(Builder builder) { | ||
super(builder); | ||
} | ||
|
||
public static DeleteModelGroupResponse of(Function<DeleteModelGroupResponse.Builder, ObjectBuilder<DeleteModelGroupResponse>> fn) { | ||
return fn.apply(new Builder()).build(); | ||
} | ||
|
||
// --------------------------------------------------------------------------------------------- | ||
|
||
/** | ||
* Builder for {@link DeleteModelGroupResponse}. | ||
*/ | ||
public static class Builder extends WriteResponseBase.AbstractBuilder<Builder> implements ObjectBuilder<DeleteModelGroupResponse> { | ||
@Override | ||
protected Builder self() { | ||
return this; | ||
} | ||
|
||
/** | ||
* Builds a {@link DeleteModelGroupResponse}. | ||
* | ||
* @throws NullPointerException if some of the required fields are null. | ||
*/ | ||
public DeleteModelGroupResponse build() { | ||
_checkSingleUse(); | ||
|
||
return new DeleteModelGroupResponse(this); | ||
} | ||
} | ||
// --------------------------------------------------------------------------------------------- | ||
|
||
/** | ||
* Json deserializer for {@link DeleteModelGroupResponse} | ||
*/ | ||
public static final JsonpDeserializer<DeleteModelGroupResponse> _DESERIALIZER = ObjectBuilderDeserializer.lazy( | ||
Builder::new, | ||
DeleteModelGroupResponse::setupDeleteModelGroupResponseDeserializer | ||
); | ||
|
||
protected static void setupDeleteModelGroupResponseDeserializer(ObjectDeserializer<DeleteModelGroupResponse.Builder> op) { | ||
WriteResponseBase.setupWriteResponseBaseDeserializer(op); | ||
} | ||
} |
101 changes: 101 additions & 0 deletions
101
java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteModelRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
//---------------------------------------------------- | ||
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. | ||
//---------------------------------------------------- | ||
|
||
package org.opensearch.client.opensearch.ml; | ||
|
||
import java.util.function.Function; | ||
import javax.annotation.Generated; | ||
import org.opensearch.client.opensearch._types.ErrorResponse; | ||
import org.opensearch.client.opensearch._types.RequestBase; | ||
import org.opensearch.client.transport.Endpoint; | ||
import org.opensearch.client.transport.endpoints.SimpleEndpoint; | ||
import org.opensearch.client.util.ApiTypeHelper; | ||
import org.opensearch.client.util.ObjectBuilder; | ||
import org.opensearch.client.util.ObjectBuilderBase; | ||
|
||
// typedef: ml.delete_model.Request | ||
|
||
/** | ||
* Deletes a model. | ||
*/ | ||
@Generated("org.opensearch.client.codegen.CodeGenerator") | ||
public class DeleteModelRequest extends RequestBase { | ||
|
||
private final String modelId; | ||
|
||
// --------------------------------------------------------------------------------------------- | ||
|
||
private DeleteModelRequest(Builder builder) { | ||
this.modelId = ApiTypeHelper.requireNonNull(builder.modelId, this, "modelId"); | ||
} | ||
|
||
public static DeleteModelRequest of(Function<DeleteModelRequest.Builder, ObjectBuilder<DeleteModelRequest>> fn) { | ||
return fn.apply(new Builder()).build(); | ||
} | ||
|
||
/** | ||
* Required - API name: {@code model_id} | ||
*/ | ||
public final String modelId() { | ||
return this.modelId; | ||
} | ||
|
||
// --------------------------------------------------------------------------------------------- | ||
|
||
/** | ||
* Builder for {@link DeleteModelRequest}. | ||
*/ | ||
public static class Builder extends ObjectBuilderBase implements ObjectBuilder<DeleteModelRequest> { | ||
private String modelId; | ||
|
||
/** | ||
* Required - API name: {@code model_id} | ||
*/ | ||
public final Builder modelId(String value) { | ||
this.modelId = value; | ||
return this; | ||
} | ||
|
||
/** | ||
* Builds a {@link DeleteModelRequest}. | ||
* | ||
* @throws NullPointerException if some of the required fields are null. | ||
*/ | ||
public DeleteModelRequest build() { | ||
_checkSingleUse(); | ||
|
||
return new DeleteModelRequest(this); | ||
} | ||
} | ||
|
||
// --------------------------------------------------------------------------------------------- | ||
|
||
/** | ||
* Endpoint "{@code ml.delete_model}". | ||
*/ | ||
public static final Endpoint<DeleteModelRequest, DeleteModelResponse, ErrorResponse> _ENDPOINT = new SimpleEndpoint<>( | ||
// Request method | ||
request -> "DELETE", | ||
// Request path | ||
request -> { | ||
StringBuilder buf = new StringBuilder(); | ||
buf.append("/_plugins/_ml/models/"); | ||
SimpleEndpoint.pathEncode(request.modelId, buf); | ||
return buf.toString(); | ||
}, | ||
// Request parameters | ||
SimpleEndpoint.emptyMap(), | ||
SimpleEndpoint.emptyMap(), | ||
false, | ||
DeleteModelResponse._DESERIALIZER | ||
); | ||
} |
75 changes: 75 additions & 0 deletions
75
java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteModelResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
//---------------------------------------------------- | ||
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. | ||
//---------------------------------------------------- | ||
|
||
package org.opensearch.client.opensearch.ml; | ||
|
||
import java.util.function.Function; | ||
import javax.annotation.Generated; | ||
import org.opensearch.client.json.JsonpDeserializable; | ||
import org.opensearch.client.json.JsonpDeserializer; | ||
import org.opensearch.client.json.ObjectBuilderDeserializer; | ||
import org.opensearch.client.json.ObjectDeserializer; | ||
import org.opensearch.client.opensearch._types.WriteResponseBase; | ||
import org.opensearch.client.util.ObjectBuilder; | ||
|
||
// typedef: ml.delete_model.Response | ||
|
||
@JsonpDeserializable | ||
@Generated("org.opensearch.client.codegen.CodeGenerator") | ||
public class DeleteModelResponse extends WriteResponseBase { | ||
|
||
// --------------------------------------------------------------------------------------------- | ||
|
||
private DeleteModelResponse(Builder builder) { | ||
super(builder); | ||
} | ||
|
||
public static DeleteModelResponse of(Function<DeleteModelResponse.Builder, ObjectBuilder<DeleteModelResponse>> fn) { | ||
return fn.apply(new Builder()).build(); | ||
} | ||
|
||
// --------------------------------------------------------------------------------------------- | ||
|
||
/** | ||
* Builder for {@link DeleteModelResponse}. | ||
*/ | ||
public static class Builder extends WriteResponseBase.AbstractBuilder<Builder> implements ObjectBuilder<DeleteModelResponse> { | ||
@Override | ||
protected Builder self() { | ||
return this; | ||
} | ||
|
||
/** | ||
* Builds a {@link DeleteModelResponse}. | ||
* | ||
* @throws NullPointerException if some of the required fields are null. | ||
*/ | ||
public DeleteModelResponse build() { | ||
_checkSingleUse(); | ||
|
||
return new DeleteModelResponse(this); | ||
} | ||
} | ||
// --------------------------------------------------------------------------------------------- | ||
|
||
/** | ||
* Json deserializer for {@link DeleteModelResponse} | ||
*/ | ||
public static final JsonpDeserializer<DeleteModelResponse> _DESERIALIZER = ObjectBuilderDeserializer.lazy( | ||
Builder::new, | ||
DeleteModelResponse::setupDeleteModelResponseDeserializer | ||
); | ||
|
||
protected static void setupDeleteModelResponseDeserializer(ObjectDeserializer<DeleteModelResponse.Builder> op) { | ||
WriteResponseBase.setupWriteResponseBaseDeserializer(op); | ||
} | ||
} |
Oops, something went wrong.