Skip to content

Commit

Permalink
Re-generate client code using latest OpenSearch API specification (20…
Browse files Browse the repository at this point in the history
…24-08-12)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Aug 12, 2024
1 parent 0bc6609 commit 69f77d2
Show file tree
Hide file tree
Showing 4 changed files with 505 additions and 468 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public final String type() {
}

/**
* Additional details about the error
* Additional details about the error.
*/
public final Map<String, JsonData> metadata() {
return this.metadata;
Expand Down Expand Up @@ -355,15 +355,15 @@ public final Builder type(String value) {
}

/**
* Additional details about the error
* Additional details about the error.
*/
public final Builder metadata(Map<String, JsonData> map) {
this.metadata = _mapPutAll(this.metadata, map);
return this;
}

/**
* Additional details about the error
* Additional details about the error.
*/
public final Builder metadata(String key, JsonData value) {
this.metadata = _mapPut(this.metadata, key, value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import javax.annotation.Nullable;
import org.opensearch.client.opensearch._types.ErrorResponse;
import org.opensearch.client.opensearch._types.RequestBase;
import org.opensearch.client.opensearch._types.Time;
import org.opensearch.client.transport.Endpoint;
import org.opensearch.client.transport.endpoints.SimpleEndpoint;
import org.opensearch.client.util.ApiTypeHelper;
Expand All @@ -61,16 +60,16 @@ public class DeleteDanglingIndexRequest extends RequestBase {
private final boolean acceptDataLoss;

@Nullable
private final Time clusterManagerTimeout;
private final String clusterManagerTimeout;

private final String indexUuid;

@Deprecated
@Nullable
private final Time masterTimeout;
private final String masterTimeout;

@Nullable
private final Time timeout;
private final String timeout;

// ---------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -105,7 +104,7 @@ public final boolean acceptDataLoss() {
* </p>
*/
@Nullable
public final Time clusterManagerTimeout() {
public final String clusterManagerTimeout() {
return this.clusterManagerTimeout;
}

Expand All @@ -127,7 +126,7 @@ public final String indexUuid() {
*/
@Deprecated
@Nullable
public final Time masterTimeout() {
public final String masterTimeout() {
return this.masterTimeout;
}

Expand All @@ -138,7 +137,7 @@ public final Time masterTimeout() {
* </p>
*/
@Nullable
public final Time timeout() {
public final String timeout() {
return this.timeout;
}

Expand All @@ -150,12 +149,12 @@ public final Time timeout() {
public static class Builder extends ObjectBuilderBase implements ObjectBuilder<DeleteDanglingIndexRequest> {
private Boolean acceptDataLoss;
@Nullable
private Time clusterManagerTimeout;
private String clusterManagerTimeout;
private String indexUuid;
@Nullable
private Time masterTimeout;
private String masterTimeout;
@Nullable
private Time timeout;
private String timeout;

/**
* Required - Must be set to true in order to delete the dangling index
Expand All @@ -174,21 +173,11 @@ public final Builder acceptDataLoss(boolean value) {
* API name: {@code cluster_manager_timeout}
* </p>
*/
public final Builder clusterManagerTimeout(@Nullable Time value) {
public final Builder clusterManagerTimeout(@Nullable String value) {
this.clusterManagerTimeout = value;
return this;
}

/**
* Operation timeout for connection to cluster-manager node.
* <p>
* API name: {@code cluster_manager_timeout}
* </p>
*/
public final Builder clusterManagerTimeout(Function<Time.Builder, ObjectBuilder<Time>> fn) {
return clusterManagerTimeout(fn.apply(new Time.Builder()).build());
}

/**
* Required - The UUID of the dangling index
* <p>
Expand All @@ -207,43 +196,22 @@ public final Builder indexUuid(String value) {
* </p>
*/
@Deprecated
public final Builder masterTimeout(@Nullable Time value) {
public final Builder masterTimeout(@Nullable String value) {
this.masterTimeout = value;
return this;
}

/**
* Specify timeout for connection to master
* <p>
* API name: {@code master_timeout}
* </p>
*/
@Deprecated
public final Builder masterTimeout(Function<Time.Builder, ObjectBuilder<Time>> fn) {
return masterTimeout(fn.apply(new Time.Builder()).build());
}

/**
* Explicit operation timeout
* <p>
* API name: {@code timeout}
* </p>
*/
public final Builder timeout(@Nullable Time value) {
public final Builder timeout(@Nullable String value) {
this.timeout = value;
return this;
}

/**
* Explicit operation timeout
* <p>
* API name: {@code timeout}
* </p>
*/
public final Builder timeout(Function<Time.Builder, ObjectBuilder<Time>> fn) {
return timeout(fn.apply(new Time.Builder()).build());
}

/**
* Builds a {@link DeleteDanglingIndexRequest}.
*
Expand Down Expand Up @@ -276,13 +244,13 @@ public DeleteDanglingIndexRequest build() {
Map<String, String> params = new HashMap<>();
params.put("accept_data_loss", String.valueOf(request.acceptDataLoss));
if (request.clusterManagerTimeout != null) {
params.put("cluster_manager_timeout", request.clusterManagerTimeout._toJsonString());
params.put("cluster_manager_timeout", request.clusterManagerTimeout);
}
if (request.masterTimeout != null) {
params.put("master_timeout", request.masterTimeout._toJsonString());
params.put("master_timeout", request.masterTimeout);
}
if (request.timeout != null) {
params.put("timeout", request.timeout._toJsonString());
params.put("timeout", request.timeout);
}
return params;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import javax.annotation.Nullable;
import org.opensearch.client.opensearch._types.ErrorResponse;
import org.opensearch.client.opensearch._types.RequestBase;
import org.opensearch.client.opensearch._types.Time;
import org.opensearch.client.transport.Endpoint;
import org.opensearch.client.transport.endpoints.SimpleEndpoint;
import org.opensearch.client.util.ApiTypeHelper;
Expand All @@ -61,16 +60,16 @@ public class ImportDanglingIndexRequest extends RequestBase {
private final boolean acceptDataLoss;

@Nullable
private final Time clusterManagerTimeout;
private final String clusterManagerTimeout;

private final String indexUuid;

@Deprecated
@Nullable
private final Time masterTimeout;
private final String masterTimeout;

@Nullable
private final Time timeout;
private final String timeout;

// ---------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -105,7 +104,7 @@ public final boolean acceptDataLoss() {
* </p>
*/
@Nullable
public final Time clusterManagerTimeout() {
public final String clusterManagerTimeout() {
return this.clusterManagerTimeout;
}

Expand All @@ -127,7 +126,7 @@ public final String indexUuid() {
*/
@Deprecated
@Nullable
public final Time masterTimeout() {
public final String masterTimeout() {
return this.masterTimeout;
}

Expand All @@ -138,7 +137,7 @@ public final Time masterTimeout() {
* </p>
*/
@Nullable
public final Time timeout() {
public final String timeout() {
return this.timeout;
}

Expand All @@ -150,12 +149,12 @@ public final Time timeout() {
public static class Builder extends ObjectBuilderBase implements ObjectBuilder<ImportDanglingIndexRequest> {
private Boolean acceptDataLoss;
@Nullable
private Time clusterManagerTimeout;
private String clusterManagerTimeout;
private String indexUuid;
@Nullable
private Time masterTimeout;
private String masterTimeout;
@Nullable
private Time timeout;
private String timeout;

/**
* Required - Must be set to true in order to import the dangling index
Expand All @@ -174,21 +173,11 @@ public final Builder acceptDataLoss(boolean value) {
* API name: {@code cluster_manager_timeout}
* </p>
*/
public final Builder clusterManagerTimeout(@Nullable Time value) {
public final Builder clusterManagerTimeout(@Nullable String value) {
this.clusterManagerTimeout = value;
return this;
}

/**
* Operation timeout for connection to cluster-manager node.
* <p>
* API name: {@code cluster_manager_timeout}
* </p>
*/
public final Builder clusterManagerTimeout(Function<Time.Builder, ObjectBuilder<Time>> fn) {
return clusterManagerTimeout(fn.apply(new Time.Builder()).build());
}

/**
* Required - The UUID of the dangling index
* <p>
Expand All @@ -207,43 +196,22 @@ public final Builder indexUuid(String value) {
* </p>
*/
@Deprecated
public final Builder masterTimeout(@Nullable Time value) {
public final Builder masterTimeout(@Nullable String value) {
this.masterTimeout = value;
return this;
}

/**
* Specify timeout for connection to master
* <p>
* API name: {@code master_timeout}
* </p>
*/
@Deprecated
public final Builder masterTimeout(Function<Time.Builder, ObjectBuilder<Time>> fn) {
return masterTimeout(fn.apply(new Time.Builder()).build());
}

/**
* Explicit operation timeout
* <p>
* API name: {@code timeout}
* </p>
*/
public final Builder timeout(@Nullable Time value) {
public final Builder timeout(@Nullable String value) {
this.timeout = value;
return this;
}

/**
* Explicit operation timeout
* <p>
* API name: {@code timeout}
* </p>
*/
public final Builder timeout(Function<Time.Builder, ObjectBuilder<Time>> fn) {
return timeout(fn.apply(new Time.Builder()).build());
}

/**
* Builds a {@link ImportDanglingIndexRequest}.
*
Expand Down Expand Up @@ -276,13 +244,13 @@ public ImportDanglingIndexRequest build() {
Map<String, String> params = new HashMap<>();
params.put("accept_data_loss", String.valueOf(request.acceptDataLoss));
if (request.clusterManagerTimeout != null) {
params.put("cluster_manager_timeout", request.clusterManagerTimeout._toJsonString());
params.put("cluster_manager_timeout", request.clusterManagerTimeout);
}
if (request.masterTimeout != null) {
params.put("master_timeout", request.masterTimeout._toJsonString());
params.put("master_timeout", request.masterTimeout);
}
if (request.timeout != null) {
params.put("timeout", request.timeout._toJsonString());
params.put("timeout", request.timeout);
}
return params;
},
Expand Down
Loading

0 comments on commit 69f77d2

Please sign in to comment.