Skip to content

Commit

Permalink
Generate ingest namespace (opensearch-project#1375)
Browse files Browse the repository at this point in the history
* Generate ingest.delete_pipeline

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Remove ingest.geo_ip_stats

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Generate ingest.get_pipeline

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Generate ingest.processor_grok

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Generate ingest.put_pipeline

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Generate ingest.simulate

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Simplify filtering

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Fix build

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

---------

Signed-off-by: Thomas Farr <tsfarr@amazon.com>
  • Loading branch information
Xtansia authored Jan 7, 2025
1 parent 4cbb17f commit bd77f0d
Show file tree
Hide file tree
Showing 82 changed files with 7,594 additions and 4,787 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ This section is for maintaining a changelog for all breaking changes for the cli
### Removed
- Removed the `features` and `shutdown` namespaces as they're not supported by OpenSearch ([#1361](https://github.com/opensearch-project/opensearch-java/pull/1361))
- Removed the `indices.diskUsage` operation as it's not supported by OpenSearch ([#1361](https://github.com/opensearch-project/opensearch-java/pull/1361))
- Removed the `ingest.geoIpStats` operation as it's not supported by OpenSearch ([#]())

### Fixed
- Fix version and build ([#254](https://github.com/opensearch-project/opensearch-java/pull/254))
Expand Down
12 changes: 11 additions & 1 deletion UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,4 +426,14 @@ After:

### NodeUsage
- The `restActions` property has been corrected to be of type `Map<String, Long>` instead of `Map<String, Integer>`.
- The `since` and `timestamp` properties have been corrected to be of type `long` instead of `String`.
- The `since` and `timestamp` properties have been corrected to be of type `long` instead of `String`.

### GetPipelineRequest
- The `summary` property has been removed as it is not supported by OpenSearch.

### InferenceProcessor
- The `InferenceProcessor` class has been removed as it is not supported by OpenSearch.
- This also affects the associated `InferenceConfig` and `InferenceConfigRegression` classes.

### DocumentSimulation
- The `type` property has been removed as it is no longer supported by OpenSearch.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import org.opensearch.client.opensearch.core.InfoResponse;
import org.opensearch.client.opensearch.dangling_indices.OpenSearchDanglingIndicesAsyncClient;
import org.opensearch.client.opensearch.indices.OpenSearchIndicesAsyncClient;
import org.opensearch.client.opensearch.ingest.OpenSearchIngestAsyncClient;
import org.opensearch.client.opensearch.ml.OpenSearchMlAsyncClient;
import org.opensearch.client.opensearch.nodes.OpenSearchNodesAsyncClient;
import org.opensearch.client.opensearch.snapshot.OpenSearchSnapshotAsyncClient;
Expand Down Expand Up @@ -77,6 +78,10 @@ public OpenSearchIndicesAsyncClient indices() {
return new OpenSearchIndicesAsyncClient(this.transport, this.transportOptions);
}

public OpenSearchIngestAsyncClient ingest() {
return new OpenSearchIngestAsyncClient(this.transport, this.transportOptions);
}

public OpenSearchMlAsyncClient ml() {
return new OpenSearchMlAsyncClient(this.transport, this.transportOptions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import org.opensearch.client.opensearch.core.InfoResponse;
import org.opensearch.client.opensearch.dangling_indices.OpenSearchDanglingIndicesClient;
import org.opensearch.client.opensearch.indices.OpenSearchIndicesClient;
import org.opensearch.client.opensearch.ingest.OpenSearchIngestClient;
import org.opensearch.client.opensearch.ml.OpenSearchMlClient;
import org.opensearch.client.opensearch.nodes.OpenSearchNodesClient;
import org.opensearch.client.opensearch.snapshot.OpenSearchSnapshotClient;
Expand Down Expand Up @@ -76,6 +77,10 @@ public OpenSearchIndicesClient indices() {
return new OpenSearchIndicesClient(this.transport, this.transportOptions);
}

public OpenSearchIngestClient ingest() {
return new OpenSearchIngestClient(this.transport, this.transportOptions);
}

public OpenSearchMlClient ml() {
return new OpenSearchMlClient(this.transport, this.transportOptions);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* 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.
*/

/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

/*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

//----------------------------------------------------
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
//----------------------------------------------------

package org.opensearch.client.opensearch._types;

import javax.annotation.Generated;
import org.opensearch.client.json.JsonEnum;
import org.opensearch.client.json.JsonpDeserializable;

// typedef: _types.ActionStatusOptions

@JsonpDeserializable
@Generated("org.opensearch.client.codegen.CodeGenerator")
public enum ActionStatusOptions implements JsonEnum {
Failure("failure"),

Simulated("simulated"),

Success("success"),

Throttled("throttled");

private final String jsonValue;

ActionStatusOptions(String jsonValue) {
this.jsonValue = jsonValue;
}

public String jsonValue() {
return this.jsonValue;
}

public static final JsonEnum.Deserializer<ActionStatusOptions> _DESERIALIZER = new JsonEnum.Deserializer<>(
ActionStatusOptions.values()
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
import org.opensearch.client.json.UnionDeserializer;
import org.opensearch.client.opensearch._types.query_dsl.IntervalsFilter;
import org.opensearch.client.opensearch._types.query_dsl.IntervalsFilterVariant;
import org.opensearch.client.opensearch.ingest.Processor;
import org.opensearch.client.opensearch.ingest.ProcessorVariant;
import org.opensearch.client.util.ApiTypeHelper;
import org.opensearch.client.util.ObjectBuilder;
import org.opensearch.client.util.ObjectBuilderBase;
Expand All @@ -59,7 +61,7 @@

@JsonpDeserializable
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class Script implements TaggedUnion<Script.Kind, Object>, IntervalsFilterVariant, PlainJsonSerializable {
public class Script implements TaggedUnion<Script.Kind, Object>, IntervalsFilterVariant, ProcessorVariant, PlainJsonSerializable {
/**
* {@link Script} variant kinds.
*/
Expand All @@ -76,6 +78,14 @@ public IntervalsFilter.Kind _intervalsFilterKind() {
return IntervalsFilter.Kind.Script;
}

/**
* {@link Processor} variant kind.
*/
@Override
public Processor.Kind _processorKind() {
return Processor.Kind.Script;
}

private final Kind _kind;
private final Object _value;

Expand Down
Loading

0 comments on commit bd77f0d

Please sign in to comment.