diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java index bf02453cb..b32e3c56e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java @@ -26,7 +26,6 @@ import co.elastic.clients.elasticsearch.cat.ElasticsearchCatAsyncClient; import co.elastic.clients.elasticsearch.ccr.ElasticsearchCcrAsyncClient; import co.elastic.clients.elasticsearch.cluster.ElasticsearchClusterAsyncClient; -import co.elastic.clients.elasticsearch.connector.ElasticsearchConnectorAsyncClient; import co.elastic.clients.elasticsearch.core.BulkRequest; import co.elastic.clients.elasticsearch.core.BulkResponse; import co.elastic.clients.elasticsearch.core.ClearScrollRequest; @@ -213,10 +212,6 @@ public ElasticsearchClusterAsyncClient cluster() { return new ElasticsearchClusterAsyncClient(this.transport, this.transportOptions); } - public ElasticsearchConnectorAsyncClient connector() { - return new ElasticsearchConnectorAsyncClient(this.transport, this.transportOptions); - } - public ElasticsearchDanglingIndicesAsyncClient danglingIndices() { return new ElasticsearchDanglingIndicesAsyncClient(this.transport, this.transportOptions); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java index 94531f1aa..f7c09412f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java @@ -27,7 +27,6 @@ import co.elastic.clients.elasticsearch.cat.ElasticsearchCatClient; import co.elastic.clients.elasticsearch.ccr.ElasticsearchCcrClient; import co.elastic.clients.elasticsearch.cluster.ElasticsearchClusterClient; -import co.elastic.clients.elasticsearch.connector.ElasticsearchConnectorClient; import co.elastic.clients.elasticsearch.core.BulkRequest; import co.elastic.clients.elasticsearch.core.BulkResponse; import co.elastic.clients.elasticsearch.core.ClearScrollRequest; @@ -214,10 +213,6 @@ public ElasticsearchClusterClient cluster() { return new ElasticsearchClusterClient(this.transport, this.transportOptions); } - public ElasticsearchConnectorClient connector() { - return new ElasticsearchConnectorClient(this.transport, this.transportOptions); - } - public ElasticsearchDanglingIndicesClient danglingIndices() { return new ElasticsearchDanglingIndicesClient(this.transport, this.transportOptions); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInRequest.java deleted file mode 100644 index fc5fa4085..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInRequest.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.check_in.Request - -/** - * Updates the last_seen field in the connector, and sets it to current - * timestamp - * - * @see API - * specification - */ - -public class CheckInRequest extends RequestBase { - private final String connectorId; - - // --------------------------------------------------------------------------------------------- - - private CheckInRequest(Builder builder) { - - this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); - - } - - public static CheckInRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - The unique identifier of the connector to be checked in - *

- * API name: {@code connector_id} - */ - public final String connectorId() { - return this.connectorId; - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link CheckInRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { - private String connectorId; - - /** - * Required - The unique identifier of the connector to be checked in - *

- * API name: {@code connector_id} - */ - public final Builder connectorId(String value) { - this.connectorId = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link CheckInRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public CheckInRequest build() { - _checkSingleUse(); - - return new CheckInRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.check_in}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.check_in", - - // Request method - request -> { - return "PUT"; - - }, - - // Request path - request -> { - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_connector"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.connectorId, buf); - buf.append("/_check_in"); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); - - }, - - // Path parameters - request -> { - Map params = new HashMap<>(); - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - params.put("connectorId", request.connectorId); - } - return params; - }, - - // Request parameters - request -> { - return Collections.emptyMap(); - - }, SimpleEndpoint.emptyMap(), false, CheckInResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInResponse.java deleted file mode 100644 index a3ce1a027..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInResponse.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.Result; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.check_in.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class CheckInResponse implements JsonpSerializable { - private final Result result; - - // --------------------------------------------------------------------------------------------- - - private CheckInResponse(Builder builder) { - - this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); - - } - - public static CheckInResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code result} - */ - public final Result result() { - return this.result; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("result"); - this.result.serialize(generator, mapper); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link CheckInResponse}. - */ - - public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - private Result result; - - /** - * Required - API name: {@code result} - */ - public final Builder result(Result value) { - this.result = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link CheckInResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public CheckInResponse build() { - _checkSingleUse(); - - return new CheckInResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link CheckInResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - CheckInResponse::setupCheckInResponseDeserializer); - - protected static void setupCheckInResponseDeserializer(ObjectDeserializer op) { - - op.add(Builder::result, Result._DESERIALIZER, "result"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/Connector.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/Connector.java deleted file mode 100644 index efe33bfcf..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/Connector.java +++ /dev/null @@ -1,1025 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.DateTime; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.Boolean; -import java.lang.Long; -import java.lang.String; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.Connector - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class Connector implements JsonpSerializable { - @Nullable - private final String apiKeyId; - - private final Map configuration; - - private final Map customScheduling; - - @Nullable - private final String description; - - @Nullable - private final String error; - - @Nullable - private final ConnectorFeatures features; - - private final List filtering; - - @Nullable - private final String id; - - @Nullable - private final String indexName; - - private final boolean isNative; - - @Nullable - private final String language; - - @Nullable - private final String lastAccessControlSyncError; - - @Nullable - private final DateTime lastAccessControlSyncScheduledAt; - - @Nullable - private final SyncStatus lastAccessControlSyncStatus; - - @Nullable - private final Long lastDeletedDocumentCount; - - @Nullable - private final DateTime lastIncrementalSyncScheduledAt; - - @Nullable - private final Long lastIndexedDocumentCount; - - @Nullable - private final DateTime lastSeen; - - @Nullable - private final String lastSyncError; - - @Nullable - private final DateTime lastSyncScheduledAt; - - @Nullable - private final SyncStatus lastSyncStatus; - - @Nullable - private final DateTime lastSynced; - - @Nullable - private final String name; - - @Nullable - private final IngestPipelineParams pipeline; - - private final SchedulingConfiguration scheduling; - - private final String serviceType; - - private final ConnectorStatus status; - - private final boolean syncNow; - - // --------------------------------------------------------------------------------------------- - - protected Connector(AbstractBuilder builder) { - - this.apiKeyId = builder.apiKeyId; - this.configuration = ApiTypeHelper.unmodifiableRequired(builder.configuration, this, "configuration"); - this.customScheduling = ApiTypeHelper.unmodifiableRequired(builder.customScheduling, this, "customScheduling"); - this.description = builder.description; - this.error = builder.error; - this.features = builder.features; - this.filtering = ApiTypeHelper.unmodifiableRequired(builder.filtering, this, "filtering"); - this.id = builder.id; - this.indexName = builder.indexName; - this.isNative = ApiTypeHelper.requireNonNull(builder.isNative, this, "isNative"); - this.language = builder.language; - this.lastAccessControlSyncError = builder.lastAccessControlSyncError; - this.lastAccessControlSyncScheduledAt = builder.lastAccessControlSyncScheduledAt; - this.lastAccessControlSyncStatus = builder.lastAccessControlSyncStatus; - this.lastDeletedDocumentCount = builder.lastDeletedDocumentCount; - this.lastIncrementalSyncScheduledAt = builder.lastIncrementalSyncScheduledAt; - this.lastIndexedDocumentCount = builder.lastIndexedDocumentCount; - this.lastSeen = builder.lastSeen; - this.lastSyncError = builder.lastSyncError; - this.lastSyncScheduledAt = builder.lastSyncScheduledAt; - this.lastSyncStatus = builder.lastSyncStatus; - this.lastSynced = builder.lastSynced; - this.name = builder.name; - this.pipeline = builder.pipeline; - this.scheduling = ApiTypeHelper.requireNonNull(builder.scheduling, this, "scheduling"); - this.serviceType = ApiTypeHelper.requireNonNull(builder.serviceType, this, "serviceType"); - this.status = ApiTypeHelper.requireNonNull(builder.status, this, "status"); - this.syncNow = ApiTypeHelper.requireNonNull(builder.syncNow, this, "syncNow"); - - } - - public static Connector connectorOf(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * API name: {@code api_key_id} - */ - @Nullable - public final String apiKeyId() { - return this.apiKeyId; - } - - /** - * Required - API name: {@code configuration} - */ - public final Map configuration() { - return this.configuration; - } - - /** - * Required - API name: {@code custom_scheduling} - */ - public final Map customScheduling() { - return this.customScheduling; - } - - /** - * API name: {@code description} - */ - @Nullable - public final String description() { - return this.description; - } - - /** - * API name: {@code error} - */ - @Nullable - public final String error() { - return this.error; - } - - /** - * API name: {@code features} - */ - @Nullable - public final ConnectorFeatures features() { - return this.features; - } - - /** - * Required - API name: {@code filtering} - */ - public final List filtering() { - return this.filtering; - } - - /** - * API name: {@code id} - */ - @Nullable - public final String id() { - return this.id; - } - - /** - * API name: {@code index_name} - */ - @Nullable - public final String indexName() { - return this.indexName; - } - - /** - * Required - API name: {@code is_native} - */ - public final boolean isNative() { - return this.isNative; - } - - /** - * API name: {@code language} - */ - @Nullable - public final String language() { - return this.language; - } - - /** - * API name: {@code last_access_control_sync_error} - */ - @Nullable - public final String lastAccessControlSyncError() { - return this.lastAccessControlSyncError; - } - - /** - * API name: {@code last_access_control_sync_scheduled_at} - */ - @Nullable - public final DateTime lastAccessControlSyncScheduledAt() { - return this.lastAccessControlSyncScheduledAt; - } - - /** - * API name: {@code last_access_control_sync_status} - */ - @Nullable - public final SyncStatus lastAccessControlSyncStatus() { - return this.lastAccessControlSyncStatus; - } - - /** - * API name: {@code last_deleted_document_count} - */ - @Nullable - public final Long lastDeletedDocumentCount() { - return this.lastDeletedDocumentCount; - } - - /** - * API name: {@code last_incremental_sync_scheduled_at} - */ - @Nullable - public final DateTime lastIncrementalSyncScheduledAt() { - return this.lastIncrementalSyncScheduledAt; - } - - /** - * API name: {@code last_indexed_document_count} - */ - @Nullable - public final Long lastIndexedDocumentCount() { - return this.lastIndexedDocumentCount; - } - - /** - * API name: {@code last_seen} - */ - @Nullable - public final DateTime lastSeen() { - return this.lastSeen; - } - - /** - * API name: {@code last_sync_error} - */ - @Nullable - public final String lastSyncError() { - return this.lastSyncError; - } - - /** - * API name: {@code last_sync_scheduled_at} - */ - @Nullable - public final DateTime lastSyncScheduledAt() { - return this.lastSyncScheduledAt; - } - - /** - * API name: {@code last_sync_status} - */ - @Nullable - public final SyncStatus lastSyncStatus() { - return this.lastSyncStatus; - } - - /** - * API name: {@code last_synced} - */ - @Nullable - public final DateTime lastSynced() { - return this.lastSynced; - } - - /** - * API name: {@code name} - */ - @Nullable - public final String name() { - return this.name; - } - - /** - * API name: {@code pipeline} - */ - @Nullable - public final IngestPipelineParams pipeline() { - return this.pipeline; - } - - /** - * Required - API name: {@code scheduling} - */ - public final SchedulingConfiguration scheduling() { - return this.scheduling; - } - - /** - * Required - API name: {@code service_type} - */ - public final String serviceType() { - return this.serviceType; - } - - /** - * Required - API name: {@code status} - */ - public final ConnectorStatus status() { - return this.status; - } - - /** - * Required - API name: {@code sync_now} - */ - public final boolean syncNow() { - return this.syncNow; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.apiKeyId != null) { - generator.writeKey("api_key_id"); - generator.write(this.apiKeyId); - - } - if (ApiTypeHelper.isDefined(this.configuration)) { - generator.writeKey("configuration"); - generator.writeStartObject(); - for (Map.Entry item0 : this.configuration.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - - } - generator.writeEnd(); - - } - if (ApiTypeHelper.isDefined(this.customScheduling)) { - generator.writeKey("custom_scheduling"); - generator.writeStartObject(); - for (Map.Entry item0 : this.customScheduling.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - - } - generator.writeEnd(); - - } - if (this.description != null) { - generator.writeKey("description"); - generator.write(this.description); - - } - if (this.error != null) { - generator.writeKey("error"); - generator.write(this.error); - - } - if (this.features != null) { - generator.writeKey("features"); - this.features.serialize(generator, mapper); - - } - if (ApiTypeHelper.isDefined(this.filtering)) { - generator.writeKey("filtering"); - generator.writeStartArray(); - for (FilteringConfig item0 : this.filtering) { - item0.serialize(generator, mapper); - - } - generator.writeEnd(); - - } - if (this.id != null) { - generator.writeKey("id"); - generator.write(this.id); - - } - if (this.indexName != null) { - generator.writeKey("index_name"); - generator.write(this.indexName); - - } - generator.writeKey("is_native"); - generator.write(this.isNative); - - if (this.language != null) { - generator.writeKey("language"); - generator.write(this.language); - - } - if (this.lastAccessControlSyncError != null) { - generator.writeKey("last_access_control_sync_error"); - generator.write(this.lastAccessControlSyncError); - - } - if (this.lastAccessControlSyncScheduledAt != null) { - generator.writeKey("last_access_control_sync_scheduled_at"); - this.lastAccessControlSyncScheduledAt.serialize(generator, mapper); - } - if (this.lastAccessControlSyncStatus != null) { - generator.writeKey("last_access_control_sync_status"); - this.lastAccessControlSyncStatus.serialize(generator, mapper); - } - if (this.lastDeletedDocumentCount != null) { - generator.writeKey("last_deleted_document_count"); - generator.write(this.lastDeletedDocumentCount); - - } - if (this.lastIncrementalSyncScheduledAt != null) { - generator.writeKey("last_incremental_sync_scheduled_at"); - this.lastIncrementalSyncScheduledAt.serialize(generator, mapper); - } - if (this.lastIndexedDocumentCount != null) { - generator.writeKey("last_indexed_document_count"); - generator.write(this.lastIndexedDocumentCount); - - } - if (this.lastSeen != null) { - generator.writeKey("last_seen"); - this.lastSeen.serialize(generator, mapper); - } - if (this.lastSyncError != null) { - generator.writeKey("last_sync_error"); - generator.write(this.lastSyncError); - - } - if (this.lastSyncScheduledAt != null) { - generator.writeKey("last_sync_scheduled_at"); - this.lastSyncScheduledAt.serialize(generator, mapper); - } - if (this.lastSyncStatus != null) { - generator.writeKey("last_sync_status"); - this.lastSyncStatus.serialize(generator, mapper); - } - if (this.lastSynced != null) { - generator.writeKey("last_synced"); - this.lastSynced.serialize(generator, mapper); - } - if (this.name != null) { - generator.writeKey("name"); - generator.write(this.name); - - } - if (this.pipeline != null) { - generator.writeKey("pipeline"); - this.pipeline.serialize(generator, mapper); - - } - generator.writeKey("scheduling"); - this.scheduling.serialize(generator, mapper); - - generator.writeKey("service_type"); - generator.write(this.serviceType); - - generator.writeKey("status"); - this.status.serialize(generator, mapper); - generator.writeKey("sync_now"); - generator.write(this.syncNow); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link Connector}. - */ - - public static class Builder extends Connector.AbstractBuilder implements ObjectBuilder { - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link Connector}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public Connector build() { - _checkSingleUse(); - - return new Connector(this); - } - } - - public abstract static class AbstractBuilder> - extends - WithJsonObjectBuilderBase { - @Nullable - private String apiKeyId; - - private Map configuration; - - private Map customScheduling; - - @Nullable - private String description; - - @Nullable - private String error; - - @Nullable - private ConnectorFeatures features; - - private List filtering; - - @Nullable - private String id; - - @Nullable - private String indexName; - - private Boolean isNative; - - @Nullable - private String language; - - @Nullable - private String lastAccessControlSyncError; - - @Nullable - private DateTime lastAccessControlSyncScheduledAt; - - @Nullable - private SyncStatus lastAccessControlSyncStatus; - - @Nullable - private Long lastDeletedDocumentCount; - - @Nullable - private DateTime lastIncrementalSyncScheduledAt; - - @Nullable - private Long lastIndexedDocumentCount; - - @Nullable - private DateTime lastSeen; - - @Nullable - private String lastSyncError; - - @Nullable - private DateTime lastSyncScheduledAt; - - @Nullable - private SyncStatus lastSyncStatus; - - @Nullable - private DateTime lastSynced; - - @Nullable - private String name; - - @Nullable - private IngestPipelineParams pipeline; - - private SchedulingConfiguration scheduling; - - private String serviceType; - - private ConnectorStatus status; - - private Boolean syncNow; - - /** - * API name: {@code api_key_id} - */ - public final BuilderT apiKeyId(@Nullable String value) { - this.apiKeyId = value; - return self(); - } - - /** - * Required - API name: {@code configuration} - *

- * Adds all entries of map to configuration. - */ - public final BuilderT configuration(Map map) { - this.configuration = _mapPutAll(this.configuration, map); - return self(); - } - - /** - * Required - API name: {@code configuration} - *

- * Adds an entry to configuration. - */ - public final BuilderT configuration(String key, ConnectorConfigProperties value) { - this.configuration = _mapPut(this.configuration, key, value); - return self(); - } - - /** - * Required - API name: {@code configuration} - *

- * Adds an entry to configuration using a builder lambda. - */ - public final BuilderT configuration(String key, - Function> fn) { - return configuration(key, fn.apply(new ConnectorConfigProperties.Builder()).build()); - } - - /** - * Required - API name: {@code custom_scheduling} - *

- * Adds all entries of map to customScheduling. - */ - public final BuilderT customScheduling(Map map) { - this.customScheduling = _mapPutAll(this.customScheduling, map); - return self(); - } - - /** - * Required - API name: {@code custom_scheduling} - *

- * Adds an entry to customScheduling. - */ - public final BuilderT customScheduling(String key, CustomScheduling value) { - this.customScheduling = _mapPut(this.customScheduling, key, value); - return self(); - } - - /** - * Required - API name: {@code custom_scheduling} - *

- * Adds an entry to customScheduling using a builder lambda. - */ - public final BuilderT customScheduling(String key, - Function> fn) { - return customScheduling(key, fn.apply(new CustomScheduling.Builder()).build()); - } - - /** - * API name: {@code description} - */ - public final BuilderT description(@Nullable String value) { - this.description = value; - return self(); - } - - /** - * API name: {@code error} - */ - public final BuilderT error(@Nullable String value) { - this.error = value; - return self(); - } - - /** - * API name: {@code features} - */ - public final BuilderT features(@Nullable ConnectorFeatures value) { - this.features = value; - return self(); - } - - /** - * API name: {@code features} - */ - public final BuilderT features(Function> fn) { - return this.features(fn.apply(new ConnectorFeatures.Builder()).build()); - } - - /** - * Required - API name: {@code filtering} - *

- * Adds all elements of list to filtering. - */ - public final BuilderT filtering(List list) { - this.filtering = _listAddAll(this.filtering, list); - return self(); - } - - /** - * Required - API name: {@code filtering} - *

- * Adds one or more values to filtering. - */ - public final BuilderT filtering(FilteringConfig value, FilteringConfig... values) { - this.filtering = _listAdd(this.filtering, value, values); - return self(); - } - - /** - * Required - API name: {@code filtering} - *

- * Adds a value to filtering using a builder lambda. - */ - public final BuilderT filtering(Function> fn) { - return filtering(fn.apply(new FilteringConfig.Builder()).build()); - } - - /** - * API name: {@code id} - */ - public final BuilderT id(@Nullable String value) { - this.id = value; - return self(); - } - - /** - * API name: {@code index_name} - */ - public final BuilderT indexName(@Nullable String value) { - this.indexName = value; - return self(); - } - - /** - * Required - API name: {@code is_native} - */ - public final BuilderT isNative(boolean value) { - this.isNative = value; - return self(); - } - - /** - * API name: {@code language} - */ - public final BuilderT language(@Nullable String value) { - this.language = value; - return self(); - } - - /** - * API name: {@code last_access_control_sync_error} - */ - public final BuilderT lastAccessControlSyncError(@Nullable String value) { - this.lastAccessControlSyncError = value; - return self(); - } - - /** - * API name: {@code last_access_control_sync_scheduled_at} - */ - public final BuilderT lastAccessControlSyncScheduledAt(@Nullable DateTime value) { - this.lastAccessControlSyncScheduledAt = value; - return self(); - } - - /** - * API name: {@code last_access_control_sync_status} - */ - public final BuilderT lastAccessControlSyncStatus(@Nullable SyncStatus value) { - this.lastAccessControlSyncStatus = value; - return self(); - } - - /** - * API name: {@code last_deleted_document_count} - */ - public final BuilderT lastDeletedDocumentCount(@Nullable Long value) { - this.lastDeletedDocumentCount = value; - return self(); - } - - /** - * API name: {@code last_incremental_sync_scheduled_at} - */ - public final BuilderT lastIncrementalSyncScheduledAt(@Nullable DateTime value) { - this.lastIncrementalSyncScheduledAt = value; - return self(); - } - - /** - * API name: {@code last_indexed_document_count} - */ - public final BuilderT lastIndexedDocumentCount(@Nullable Long value) { - this.lastIndexedDocumentCount = value; - return self(); - } - - /** - * API name: {@code last_seen} - */ - public final BuilderT lastSeen(@Nullable DateTime value) { - this.lastSeen = value; - return self(); - } - - /** - * API name: {@code last_sync_error} - */ - public final BuilderT lastSyncError(@Nullable String value) { - this.lastSyncError = value; - return self(); - } - - /** - * API name: {@code last_sync_scheduled_at} - */ - public final BuilderT lastSyncScheduledAt(@Nullable DateTime value) { - this.lastSyncScheduledAt = value; - return self(); - } - - /** - * API name: {@code last_sync_status} - */ - public final BuilderT lastSyncStatus(@Nullable SyncStatus value) { - this.lastSyncStatus = value; - return self(); - } - - /** - * API name: {@code last_synced} - */ - public final BuilderT lastSynced(@Nullable DateTime value) { - this.lastSynced = value; - return self(); - } - - /** - * API name: {@code name} - */ - public final BuilderT name(@Nullable String value) { - this.name = value; - return self(); - } - - /** - * API name: {@code pipeline} - */ - public final BuilderT pipeline(@Nullable IngestPipelineParams value) { - this.pipeline = value; - return self(); - } - - /** - * API name: {@code pipeline} - */ - public final BuilderT pipeline(Function> fn) { - return this.pipeline(fn.apply(new IngestPipelineParams.Builder()).build()); - } - - /** - * Required - API name: {@code scheduling} - */ - public final BuilderT scheduling(SchedulingConfiguration value) { - this.scheduling = value; - return self(); - } - - /** - * Required - API name: {@code scheduling} - */ - public final BuilderT scheduling( - Function> fn) { - return this.scheduling(fn.apply(new SchedulingConfiguration.Builder()).build()); - } - - /** - * Required - API name: {@code service_type} - */ - public final BuilderT serviceType(String value) { - this.serviceType = value; - return self(); - } - - /** - * Required - API name: {@code status} - */ - public final BuilderT status(ConnectorStatus value) { - this.status = value; - return self(); - } - - /** - * Required - API name: {@code sync_now} - */ - public final BuilderT syncNow(boolean value) { - this.syncNow = value; - return self(); - } - - protected abstract BuilderT self(); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link Connector} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - Connector::setupConnectorDeserializer); - - protected static > void setupConnectorDeserializer( - ObjectDeserializer op) { - - op.add(AbstractBuilder::apiKeyId, JsonpDeserializer.stringDeserializer(), "api_key_id"); - op.add(AbstractBuilder::configuration, - JsonpDeserializer.stringMapDeserializer(ConnectorConfigProperties._DESERIALIZER), "configuration"); - op.add(AbstractBuilder::customScheduling, - JsonpDeserializer.stringMapDeserializer(CustomScheduling._DESERIALIZER), "custom_scheduling"); - op.add(AbstractBuilder::description, JsonpDeserializer.stringDeserializer(), "description"); - op.add(AbstractBuilder::error, JsonpDeserializer.stringDeserializer(), "error"); - op.add(AbstractBuilder::features, ConnectorFeatures._DESERIALIZER, "features"); - op.add(AbstractBuilder::filtering, JsonpDeserializer.arrayDeserializer(FilteringConfig._DESERIALIZER), - "filtering"); - op.add(AbstractBuilder::id, JsonpDeserializer.stringDeserializer(), "id"); - op.add(AbstractBuilder::indexName, JsonpDeserializer.stringDeserializer(), "index_name"); - op.add(AbstractBuilder::isNative, JsonpDeserializer.booleanDeserializer(), "is_native"); - op.add(AbstractBuilder::language, JsonpDeserializer.stringDeserializer(), "language"); - op.add(AbstractBuilder::lastAccessControlSyncError, JsonpDeserializer.stringDeserializer(), - "last_access_control_sync_error"); - op.add(AbstractBuilder::lastAccessControlSyncScheduledAt, DateTime._DESERIALIZER, - "last_access_control_sync_scheduled_at"); - op.add(AbstractBuilder::lastAccessControlSyncStatus, SyncStatus._DESERIALIZER, - "last_access_control_sync_status"); - op.add(AbstractBuilder::lastDeletedDocumentCount, JsonpDeserializer.longDeserializer(), - "last_deleted_document_count"); - op.add(AbstractBuilder::lastIncrementalSyncScheduledAt, DateTime._DESERIALIZER, - "last_incremental_sync_scheduled_at"); - op.add(AbstractBuilder::lastIndexedDocumentCount, JsonpDeserializer.longDeserializer(), - "last_indexed_document_count"); - op.add(AbstractBuilder::lastSeen, DateTime._DESERIALIZER, "last_seen"); - op.add(AbstractBuilder::lastSyncError, JsonpDeserializer.stringDeserializer(), "last_sync_error"); - op.add(AbstractBuilder::lastSyncScheduledAt, DateTime._DESERIALIZER, "last_sync_scheduled_at"); - op.add(AbstractBuilder::lastSyncStatus, SyncStatus._DESERIALIZER, "last_sync_status"); - op.add(AbstractBuilder::lastSynced, DateTime._DESERIALIZER, "last_synced"); - op.add(AbstractBuilder::name, JsonpDeserializer.stringDeserializer(), "name"); - op.add(AbstractBuilder::pipeline, IngestPipelineParams._DESERIALIZER, "pipeline"); - op.add(AbstractBuilder::scheduling, SchedulingConfiguration._DESERIALIZER, "scheduling"); - op.add(AbstractBuilder::serviceType, JsonpDeserializer.stringDeserializer(), "service_type"); - op.add(AbstractBuilder::status, ConnectorStatus._DESERIALIZER, "status"); - op.add(AbstractBuilder::syncNow, JsonpDeserializer.booleanDeserializer(), "sync_now"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorConfigProperties.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorConfigProperties.java deleted file mode 100644 index b2be793bb..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorConfigProperties.java +++ /dev/null @@ -1,697 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.FieldValue; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.String; -import java.util.List; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.ConnectorConfigProperties - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class ConnectorConfigProperties implements JsonpSerializable { - @Nullable - private final String category; - - private final FieldValue defaultValue; - - private final List dependsOn; - - private final DisplayType display; - - private final String label; - - private final List options; - - @Nullable - private final Integer order; - - @Nullable - private final String placeholder; - - private final boolean required; - - private final boolean sensitive; - - @Nullable - private final String tooltip; - - private final ConnectorFieldType type; - - private final List uiRestrictions; - - private final List validations; - - private final FieldValue value; - - // --------------------------------------------------------------------------------------------- - - private ConnectorConfigProperties(Builder builder) { - - this.category = builder.category; - this.defaultValue = ApiTypeHelper.requireNonNull(builder.defaultValue, this, "defaultValue"); - this.dependsOn = ApiTypeHelper.unmodifiableRequired(builder.dependsOn, this, "dependsOn"); - this.display = ApiTypeHelper.requireNonNull(builder.display, this, "display"); - this.label = ApiTypeHelper.requireNonNull(builder.label, this, "label"); - this.options = ApiTypeHelper.unmodifiableRequired(builder.options, this, "options"); - this.order = builder.order; - this.placeholder = builder.placeholder; - this.required = ApiTypeHelper.requireNonNull(builder.required, this, "required"); - this.sensitive = ApiTypeHelper.requireNonNull(builder.sensitive, this, "sensitive"); - this.tooltip = builder.tooltip; - this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type"); - this.uiRestrictions = ApiTypeHelper.unmodifiableRequired(builder.uiRestrictions, this, "uiRestrictions"); - this.validations = ApiTypeHelper.unmodifiableRequired(builder.validations, this, "validations"); - this.value = ApiTypeHelper.requireNonNull(builder.value, this, "value"); - - } - - public static ConnectorConfigProperties of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * API name: {@code category} - */ - @Nullable - public final String category() { - return this.category; - } - - /** - * Required - API name: {@code default_value} - */ - public final FieldValue defaultValue() { - return this.defaultValue; - } - - /** - * Required - API name: {@code depends_on} - */ - public final List dependsOn() { - return this.dependsOn; - } - - /** - * Required - API name: {@code display} - */ - public final DisplayType display() { - return this.display; - } - - /** - * Required - API name: {@code label} - */ - public final String label() { - return this.label; - } - - /** - * Required - API name: {@code options} - */ - public final List options() { - return this.options; - } - - /** - * API name: {@code order} - */ - @Nullable - public final Integer order() { - return this.order; - } - - /** - * API name: {@code placeholder} - */ - @Nullable - public final String placeholder() { - return this.placeholder; - } - - /** - * Required - API name: {@code required} - */ - public final boolean required() { - return this.required; - } - - /** - * Required - API name: {@code sensitive} - */ - public final boolean sensitive() { - return this.sensitive; - } - - /** - * API name: {@code tooltip} - */ - @Nullable - public final String tooltip() { - return this.tooltip; - } - - /** - * Required - API name: {@code type} - */ - public final ConnectorFieldType type() { - return this.type; - } - - /** - * Required - API name: {@code ui_restrictions} - */ - public final List uiRestrictions() { - return this.uiRestrictions; - } - - /** - * Required - API name: {@code validations} - */ - public final List validations() { - return this.validations; - } - - /** - * Required - API name: {@code value} - */ - public final FieldValue value() { - return this.value; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.category != null) { - generator.writeKey("category"); - generator.write(this.category); - - } - generator.writeKey("default_value"); - this.defaultValue.serialize(generator, mapper); - - if (ApiTypeHelper.isDefined(this.dependsOn)) { - generator.writeKey("depends_on"); - generator.writeStartArray(); - for (Dependency item0 : this.dependsOn) { - item0.serialize(generator, mapper); - - } - generator.writeEnd(); - - } - generator.writeKey("display"); - this.display.serialize(generator, mapper); - generator.writeKey("label"); - generator.write(this.label); - - if (ApiTypeHelper.isDefined(this.options)) { - generator.writeKey("options"); - generator.writeStartArray(); - for (SelectOption item0 : this.options) { - item0.serialize(generator, mapper); - - } - generator.writeEnd(); - - } - if (this.order != null) { - generator.writeKey("order"); - generator.write(this.order); - - } - if (this.placeholder != null) { - generator.writeKey("placeholder"); - generator.write(this.placeholder); - - } - generator.writeKey("required"); - generator.write(this.required); - - generator.writeKey("sensitive"); - generator.write(this.sensitive); - - if (this.tooltip != null) { - generator.writeKey("tooltip"); - generator.write(this.tooltip); - - } - generator.writeKey("type"); - this.type.serialize(generator, mapper); - if (ApiTypeHelper.isDefined(this.uiRestrictions)) { - generator.writeKey("ui_restrictions"); - generator.writeStartArray(); - for (String item0 : this.uiRestrictions) { - generator.write(item0); - - } - generator.writeEnd(); - - } - if (ApiTypeHelper.isDefined(this.validations)) { - generator.writeKey("validations"); - generator.writeStartArray(); - for (Validation item0 : this.validations) { - item0.serialize(generator, mapper); - - } - generator.writeEnd(); - - } - generator.writeKey("value"); - this.value.serialize(generator, mapper); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link ConnectorConfigProperties}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - @Nullable - private String category; - - private FieldValue defaultValue; - - private List dependsOn; - - private DisplayType display; - - private String label; - - private List options; - - @Nullable - private Integer order; - - @Nullable - private String placeholder; - - private Boolean required; - - private Boolean sensitive; - - @Nullable - private String tooltip; - - private ConnectorFieldType type; - - private List uiRestrictions; - - private List validations; - - private FieldValue value; - - /** - * API name: {@code category} - */ - public final Builder category(@Nullable String value) { - this.category = value; - return this; - } - - /** - * Required - API name: {@code default_value} - */ - public final Builder defaultValue(FieldValue value) { - this.defaultValue = value; - return this; - } - - /** - * Required - API name: {@code default_value} - */ - public final Builder defaultValue(Function> fn) { - return this.defaultValue(fn.apply(new FieldValue.Builder()).build()); - } - - /** - * Required - API name: {@code default_value} - */ - public final Builder defaultValue(String value) { - this.defaultValue = FieldValue.of(value); - return this; - } - - /** - * Required - API name: {@code default_value} - */ - public final Builder defaultValue(long value) { - this.defaultValue = FieldValue.of(value); - return this; - } - - /** - * Required - API name: {@code default_value} - */ - public final Builder defaultValue(double value) { - this.defaultValue = FieldValue.of(value); - return this; - } - - /** - * Required - API name: {@code default_value} - */ - public final Builder defaultValue(boolean value) { - this.defaultValue = FieldValue.of(value); - return this; - } - - /** - * Required - API name: {@code depends_on} - *

- * Adds all elements of list to dependsOn. - */ - public final Builder dependsOn(List list) { - this.dependsOn = _listAddAll(this.dependsOn, list); - return this; - } - - /** - * Required - API name: {@code depends_on} - *

- * Adds one or more values to dependsOn. - */ - public final Builder dependsOn(Dependency value, Dependency... values) { - this.dependsOn = _listAdd(this.dependsOn, value, values); - return this; - } - - /** - * Required - API name: {@code depends_on} - *

- * Adds a value to dependsOn using a builder lambda. - */ - public final Builder dependsOn(Function> fn) { - return dependsOn(fn.apply(new Dependency.Builder()).build()); - } - - /** - * Required - API name: {@code display} - */ - public final Builder display(DisplayType value) { - this.display = value; - return this; - } - - /** - * Required - API name: {@code label} - */ - public final Builder label(String value) { - this.label = value; - return this; - } - - /** - * Required - API name: {@code options} - *

- * Adds all elements of list to options. - */ - public final Builder options(List list) { - this.options = _listAddAll(this.options, list); - return this; - } - - /** - * Required - API name: {@code options} - *

- * Adds one or more values to options. - */ - public final Builder options(SelectOption value, SelectOption... values) { - this.options = _listAdd(this.options, value, values); - return this; - } - - /** - * Required - API name: {@code options} - *

- * Adds a value to options using a builder lambda. - */ - public final Builder options(Function> fn) { - return options(fn.apply(new SelectOption.Builder()).build()); - } - - /** - * API name: {@code order} - */ - public final Builder order(@Nullable Integer value) { - this.order = value; - return this; - } - - /** - * API name: {@code placeholder} - */ - public final Builder placeholder(@Nullable String value) { - this.placeholder = value; - return this; - } - - /** - * Required - API name: {@code required} - */ - public final Builder required(boolean value) { - this.required = value; - return this; - } - - /** - * Required - API name: {@code sensitive} - */ - public final Builder sensitive(boolean value) { - this.sensitive = value; - return this; - } - - /** - * API name: {@code tooltip} - */ - public final Builder tooltip(@Nullable String value) { - this.tooltip = value; - return this; - } - - /** - * Required - API name: {@code type} - */ - public final Builder type(ConnectorFieldType value) { - this.type = value; - return this; - } - - /** - * Required - API name: {@code ui_restrictions} - *

- * Adds all elements of list to uiRestrictions. - */ - public final Builder uiRestrictions(List list) { - this.uiRestrictions = _listAddAll(this.uiRestrictions, list); - return this; - } - - /** - * Required - API name: {@code ui_restrictions} - *

- * Adds one or more values to uiRestrictions. - */ - public final Builder uiRestrictions(String value, String... values) { - this.uiRestrictions = _listAdd(this.uiRestrictions, value, values); - return this; - } - - /** - * Required - API name: {@code validations} - *

- * Adds all elements of list to validations. - */ - public final Builder validations(List list) { - this.validations = _listAddAll(this.validations, list); - return this; - } - - /** - * Required - API name: {@code validations} - *

- * Adds one or more values to validations. - */ - public final Builder validations(Validation value, Validation... values) { - this.validations = _listAdd(this.validations, value, values); - return this; - } - - /** - * Required - API name: {@code validations} - *

- * Adds a value to validations using a builder lambda. - */ - public final Builder validations(Function> fn) { - return validations(fn.apply(new Validation.Builder()).build()); - } - - /** - * Required - API name: {@code value} - */ - public final Builder value(FieldValue value) { - this.value = value; - return this; - } - - /** - * Required - API name: {@code value} - */ - public final Builder value(Function> fn) { - return this.value(fn.apply(new FieldValue.Builder()).build()); - } - - /** - * Required - API name: {@code value} - */ - public final Builder value(String value) { - this.value = FieldValue.of(value); - return this; - } - - /** - * Required - API name: {@code value} - */ - public final Builder value(long value) { - this.value = FieldValue.of(value); - return this; - } - - /** - * Required - API name: {@code value} - */ - public final Builder value(double value) { - this.value = FieldValue.of(value); - return this; - } - - /** - * Required - API name: {@code value} - */ - public final Builder value(boolean value) { - this.value = FieldValue.of(value); - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link ConnectorConfigProperties}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public ConnectorConfigProperties build() { - _checkSingleUse(); - - return new ConnectorConfigProperties(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link ConnectorConfigProperties} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, ConnectorConfigProperties::setupConnectorConfigPropertiesDeserializer); - - protected static void setupConnectorConfigPropertiesDeserializer( - ObjectDeserializer op) { - - op.add(Builder::category, JsonpDeserializer.stringDeserializer(), "category"); - op.add(Builder::defaultValue, FieldValue._DESERIALIZER, "default_value"); - op.add(Builder::dependsOn, JsonpDeserializer.arrayDeserializer(Dependency._DESERIALIZER), "depends_on"); - op.add(Builder::display, DisplayType._DESERIALIZER, "display"); - op.add(Builder::label, JsonpDeserializer.stringDeserializer(), "label"); - op.add(Builder::options, JsonpDeserializer.arrayDeserializer(SelectOption._DESERIALIZER), "options"); - op.add(Builder::order, JsonpDeserializer.integerDeserializer(), "order"); - op.add(Builder::placeholder, JsonpDeserializer.stringDeserializer(), "placeholder"); - op.add(Builder::required, JsonpDeserializer.booleanDeserializer(), "required"); - op.add(Builder::sensitive, JsonpDeserializer.booleanDeserializer(), "sensitive"); - op.add(Builder::tooltip, JsonpDeserializer.stringDeserializer(), "tooltip"); - op.add(Builder::type, ConnectorFieldType._DESERIALIZER, "type"); - op.add(Builder::uiRestrictions, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), - "ui_restrictions"); - op.add(Builder::validations, JsonpDeserializer.arrayDeserializer(Validation._DESERIALIZER), "validations"); - op.add(Builder::value, FieldValue._DESERIALIZER, "value"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorFeatures.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorFeatures.java deleted file mode 100644 index 5ee9628dd..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorFeatures.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.Boolean; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.ConnectorFeatures - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class ConnectorFeatures implements JsonpSerializable { - @Nullable - private final FeatureEnabled documentLevelSecurity; - - @Nullable - private final Boolean filteringAdvancedConfig; - - @Nullable - private final Boolean filteringRules; - - @Nullable - private final FeatureEnabled incrementalSync; - - @Nullable - private final SyncRulesFeature syncRules; - - // --------------------------------------------------------------------------------------------- - - private ConnectorFeatures(Builder builder) { - - this.documentLevelSecurity = builder.documentLevelSecurity; - this.filteringAdvancedConfig = builder.filteringAdvancedConfig; - this.filteringRules = builder.filteringRules; - this.incrementalSync = builder.incrementalSync; - this.syncRules = builder.syncRules; - - } - - public static ConnectorFeatures of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * API name: {@code document_level_security} - */ - @Nullable - public final FeatureEnabled documentLevelSecurity() { - return this.documentLevelSecurity; - } - - /** - * API name: {@code filtering_advanced_config} - */ - @Nullable - public final Boolean filteringAdvancedConfig() { - return this.filteringAdvancedConfig; - } - - /** - * API name: {@code filtering_rules} - */ - @Nullable - public final Boolean filteringRules() { - return this.filteringRules; - } - - /** - * API name: {@code incremental_sync} - */ - @Nullable - public final FeatureEnabled incrementalSync() { - return this.incrementalSync; - } - - /** - * API name: {@code sync_rules} - */ - @Nullable - public final SyncRulesFeature syncRules() { - return this.syncRules; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.documentLevelSecurity != null) { - generator.writeKey("document_level_security"); - this.documentLevelSecurity.serialize(generator, mapper); - - } - if (this.filteringAdvancedConfig != null) { - generator.writeKey("filtering_advanced_config"); - generator.write(this.filteringAdvancedConfig); - - } - if (this.filteringRules != null) { - generator.writeKey("filtering_rules"); - generator.write(this.filteringRules); - - } - if (this.incrementalSync != null) { - generator.writeKey("incremental_sync"); - this.incrementalSync.serialize(generator, mapper); - - } - if (this.syncRules != null) { - generator.writeKey("sync_rules"); - this.syncRules.serialize(generator, mapper); - - } - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link ConnectorFeatures}. - */ - - public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - @Nullable - private FeatureEnabled documentLevelSecurity; - - @Nullable - private Boolean filteringAdvancedConfig; - - @Nullable - private Boolean filteringRules; - - @Nullable - private FeatureEnabled incrementalSync; - - @Nullable - private SyncRulesFeature syncRules; - - /** - * API name: {@code document_level_security} - */ - public final Builder documentLevelSecurity(@Nullable FeatureEnabled value) { - this.documentLevelSecurity = value; - return this; - } - - /** - * API name: {@code document_level_security} - */ - public final Builder documentLevelSecurity(Function> fn) { - return this.documentLevelSecurity(fn.apply(new FeatureEnabled.Builder()).build()); - } - - /** - * API name: {@code filtering_advanced_config} - */ - public final Builder filteringAdvancedConfig(@Nullable Boolean value) { - this.filteringAdvancedConfig = value; - return this; - } - - /** - * API name: {@code filtering_rules} - */ - public final Builder filteringRules(@Nullable Boolean value) { - this.filteringRules = value; - return this; - } - - /** - * API name: {@code incremental_sync} - */ - public final Builder incrementalSync(@Nullable FeatureEnabled value) { - this.incrementalSync = value; - return this; - } - - /** - * API name: {@code incremental_sync} - */ - public final Builder incrementalSync(Function> fn) { - return this.incrementalSync(fn.apply(new FeatureEnabled.Builder()).build()); - } - - /** - * API name: {@code sync_rules} - */ - public final Builder syncRules(@Nullable SyncRulesFeature value) { - this.syncRules = value; - return this; - } - - /** - * API name: {@code sync_rules} - */ - public final Builder syncRules(Function> fn) { - return this.syncRules(fn.apply(new SyncRulesFeature.Builder()).build()); - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link ConnectorFeatures}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public ConnectorFeatures build() { - _checkSingleUse(); - - return new ConnectorFeatures(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link ConnectorFeatures} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, ConnectorFeatures::setupConnectorFeaturesDeserializer); - - protected static void setupConnectorFeaturesDeserializer(ObjectDeserializer op) { - - op.add(Builder::documentLevelSecurity, FeatureEnabled._DESERIALIZER, "document_level_security"); - op.add(Builder::filteringAdvancedConfig, JsonpDeserializer.booleanDeserializer(), "filtering_advanced_config"); - op.add(Builder::filteringRules, JsonpDeserializer.booleanDeserializer(), "filtering_rules"); - op.add(Builder::incrementalSync, FeatureEnabled._DESERIALIZER, "incremental_sync"); - op.add(Builder::syncRules, SyncRulesFeature._DESERIALIZER, "sync_rules"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorFieldType.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorFieldType.java deleted file mode 100644 index cbe0abe34..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorFieldType.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonEnum; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public enum ConnectorFieldType implements JsonEnum { - Str("str"), - - Int("int"), - - List("list"), - - Bool("bool"), - - ; - - private final String jsonValue; - - ConnectorFieldType(String jsonValue) { - this.jsonValue = jsonValue; - } - - public String jsonValue() { - return this.jsonValue; - } - - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( - ConnectorFieldType.values()); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorScheduling.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorScheduling.java deleted file mode 100644 index 005338d47..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorScheduling.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.Boolean; -import java.lang.String; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.ConnectorScheduling - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class ConnectorScheduling implements JsonpSerializable { - private final boolean enabled; - - private final String interval; - - // --------------------------------------------------------------------------------------------- - - private ConnectorScheduling(Builder builder) { - - this.enabled = ApiTypeHelper.requireNonNull(builder.enabled, this, "enabled"); - this.interval = ApiTypeHelper.requireNonNull(builder.interval, this, "interval"); - - } - - public static ConnectorScheduling of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code enabled} - */ - public final boolean enabled() { - return this.enabled; - } - - /** - * Required - The interval is expressed using the crontab syntax - *

- * API name: {@code interval} - */ - public final String interval() { - return this.interval; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("enabled"); - generator.write(this.enabled); - - generator.writeKey("interval"); - generator.write(this.interval); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link ConnectorScheduling}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private Boolean enabled; - - private String interval; - - /** - * Required - API name: {@code enabled} - */ - public final Builder enabled(boolean value) { - this.enabled = value; - return this; - } - - /** - * Required - The interval is expressed using the crontab syntax - *

- * API name: {@code interval} - */ - public final Builder interval(String value) { - this.interval = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link ConnectorScheduling}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public ConnectorScheduling build() { - _checkSingleUse(); - - return new ConnectorScheduling(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link ConnectorScheduling} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, ConnectorScheduling::setupConnectorSchedulingDeserializer); - - protected static void setupConnectorSchedulingDeserializer(ObjectDeserializer op) { - - op.add(Builder::enabled, JsonpDeserializer.booleanDeserializer(), "enabled"); - op.add(Builder::interval, JsonpDeserializer.stringDeserializer(), "interval"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorStatus.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorStatus.java deleted file mode 100644 index 2407d8c10..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorStatus.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonEnum; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public enum ConnectorStatus implements JsonEnum { - Created("created"), - - NeedsConfiguration("needs_configuration"), - - Configured("configured"), - - Connected("connected"), - - Error("error"), - - ; - - private final String jsonValue; - - ConnectorStatus(String jsonValue) { - this.jsonValue = jsonValue; - } - - public String jsonValue() { - return this.jsonValue; - } - - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( - ConnectorStatus.values()); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorSyncJob.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorSyncJob.java deleted file mode 100644 index 1b1e0e434..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorSyncJob.java +++ /dev/null @@ -1,634 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonData; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.DateTime; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.Long; -import java.lang.String; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.ConnectorSyncJob - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class ConnectorSyncJob implements JsonpSerializable { - @Nullable - private final DateTime cancelationRequestedAt; - - @Nullable - private final DateTime canceledAt; - - @Nullable - private final DateTime completedAt; - - private final SyncJobConnectorReference connector; - - private final DateTime createdAt; - - private final long deletedDocumentCount; - - @Nullable - private final String error; - - private final String id; - - private final long indexedDocumentCount; - - private final long indexedDocumentVolume; - - private final SyncJobType jobType; - - @Nullable - private final DateTime lastSeen; - - private final Map metadata; - - @Nullable - private final DateTime startedAt; - - private final SyncStatus status; - - private final long totalDocumentCount; - - private final SyncJobTriggerMethod triggerMethod; - - @Nullable - private final String workerHostname; - - // --------------------------------------------------------------------------------------------- - - protected ConnectorSyncJob(AbstractBuilder builder) { - - this.cancelationRequestedAt = builder.cancelationRequestedAt; - this.canceledAt = builder.canceledAt; - this.completedAt = builder.completedAt; - this.connector = ApiTypeHelper.requireNonNull(builder.connector, this, "connector"); - this.createdAt = ApiTypeHelper.requireNonNull(builder.createdAt, this, "createdAt"); - this.deletedDocumentCount = ApiTypeHelper.requireNonNull(builder.deletedDocumentCount, this, - "deletedDocumentCount"); - this.error = builder.error; - this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); - this.indexedDocumentCount = ApiTypeHelper.requireNonNull(builder.indexedDocumentCount, this, - "indexedDocumentCount"); - this.indexedDocumentVolume = ApiTypeHelper.requireNonNull(builder.indexedDocumentVolume, this, - "indexedDocumentVolume"); - this.jobType = ApiTypeHelper.requireNonNull(builder.jobType, this, "jobType"); - this.lastSeen = builder.lastSeen; - this.metadata = ApiTypeHelper.unmodifiableRequired(builder.metadata, this, "metadata"); - this.startedAt = builder.startedAt; - this.status = ApiTypeHelper.requireNonNull(builder.status, this, "status"); - this.totalDocumentCount = ApiTypeHelper.requireNonNull(builder.totalDocumentCount, this, "totalDocumentCount"); - this.triggerMethod = ApiTypeHelper.requireNonNull(builder.triggerMethod, this, "triggerMethod"); - this.workerHostname = builder.workerHostname; - - } - - public static ConnectorSyncJob connectorSyncJobOf(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * API name: {@code cancelation_requested_at} - */ - @Nullable - public final DateTime cancelationRequestedAt() { - return this.cancelationRequestedAt; - } - - /** - * API name: {@code canceled_at} - */ - @Nullable - public final DateTime canceledAt() { - return this.canceledAt; - } - - /** - * API name: {@code completed_at} - */ - @Nullable - public final DateTime completedAt() { - return this.completedAt; - } - - /** - * Required - API name: {@code connector} - */ - public final SyncJobConnectorReference connector() { - return this.connector; - } - - /** - * Required - API name: {@code created_at} - */ - public final DateTime createdAt() { - return this.createdAt; - } - - /** - * Required - API name: {@code deleted_document_count} - */ - public final long deletedDocumentCount() { - return this.deletedDocumentCount; - } - - /** - * API name: {@code error} - */ - @Nullable - public final String error() { - return this.error; - } - - /** - * Required - API name: {@code id} - */ - public final String id() { - return this.id; - } - - /** - * Required - API name: {@code indexed_document_count} - */ - public final long indexedDocumentCount() { - return this.indexedDocumentCount; - } - - /** - * Required - API name: {@code indexed_document_volume} - */ - public final long indexedDocumentVolume() { - return this.indexedDocumentVolume; - } - - /** - * Required - API name: {@code job_type} - */ - public final SyncJobType jobType() { - return this.jobType; - } - - /** - * API name: {@code last_seen} - */ - @Nullable - public final DateTime lastSeen() { - return this.lastSeen; - } - - /** - * Required - API name: {@code metadata} - */ - public final Map metadata() { - return this.metadata; - } - - /** - * API name: {@code started_at} - */ - @Nullable - public final DateTime startedAt() { - return this.startedAt; - } - - /** - * Required - API name: {@code status} - */ - public final SyncStatus status() { - return this.status; - } - - /** - * Required - API name: {@code total_document_count} - */ - public final long totalDocumentCount() { - return this.totalDocumentCount; - } - - /** - * Required - API name: {@code trigger_method} - */ - public final SyncJobTriggerMethod triggerMethod() { - return this.triggerMethod; - } - - /** - * API name: {@code worker_hostname} - */ - @Nullable - public final String workerHostname() { - return this.workerHostname; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.cancelationRequestedAt != null) { - generator.writeKey("cancelation_requested_at"); - this.cancelationRequestedAt.serialize(generator, mapper); - } - if (this.canceledAt != null) { - generator.writeKey("canceled_at"); - this.canceledAt.serialize(generator, mapper); - } - if (this.completedAt != null) { - generator.writeKey("completed_at"); - this.completedAt.serialize(generator, mapper); - } - generator.writeKey("connector"); - this.connector.serialize(generator, mapper); - - generator.writeKey("created_at"); - this.createdAt.serialize(generator, mapper); - generator.writeKey("deleted_document_count"); - generator.write(this.deletedDocumentCount); - - if (this.error != null) { - generator.writeKey("error"); - generator.write(this.error); - - } - generator.writeKey("id"); - generator.write(this.id); - - generator.writeKey("indexed_document_count"); - generator.write(this.indexedDocumentCount); - - generator.writeKey("indexed_document_volume"); - generator.write(this.indexedDocumentVolume); - - generator.writeKey("job_type"); - this.jobType.serialize(generator, mapper); - if (this.lastSeen != null) { - generator.writeKey("last_seen"); - this.lastSeen.serialize(generator, mapper); - } - if (ApiTypeHelper.isDefined(this.metadata)) { - generator.writeKey("metadata"); - generator.writeStartObject(); - for (Map.Entry item0 : this.metadata.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - - } - generator.writeEnd(); - - } - if (this.startedAt != null) { - generator.writeKey("started_at"); - this.startedAt.serialize(generator, mapper); - } - generator.writeKey("status"); - this.status.serialize(generator, mapper); - generator.writeKey("total_document_count"); - generator.write(this.totalDocumentCount); - - generator.writeKey("trigger_method"); - this.triggerMethod.serialize(generator, mapper); - if (this.workerHostname != null) { - generator.writeKey("worker_hostname"); - generator.write(this.workerHostname); - - } - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link ConnectorSyncJob}. - */ - - public static class Builder extends ConnectorSyncJob.AbstractBuilder - implements - ObjectBuilder { - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link ConnectorSyncJob}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public ConnectorSyncJob build() { - _checkSingleUse(); - - return new ConnectorSyncJob(this); - } - } - - public abstract static class AbstractBuilder> - extends - WithJsonObjectBuilderBase { - @Nullable - private DateTime cancelationRequestedAt; - - @Nullable - private DateTime canceledAt; - - @Nullable - private DateTime completedAt; - - private SyncJobConnectorReference connector; - - private DateTime createdAt; - - private Long deletedDocumentCount; - - @Nullable - private String error; - - private String id; - - private Long indexedDocumentCount; - - private Long indexedDocumentVolume; - - private SyncJobType jobType; - - @Nullable - private DateTime lastSeen; - - private Map metadata; - - @Nullable - private DateTime startedAt; - - private SyncStatus status; - - private Long totalDocumentCount; - - private SyncJobTriggerMethod triggerMethod; - - @Nullable - private String workerHostname; - - /** - * API name: {@code cancelation_requested_at} - */ - public final BuilderT cancelationRequestedAt(@Nullable DateTime value) { - this.cancelationRequestedAt = value; - return self(); - } - - /** - * API name: {@code canceled_at} - */ - public final BuilderT canceledAt(@Nullable DateTime value) { - this.canceledAt = value; - return self(); - } - - /** - * API name: {@code completed_at} - */ - public final BuilderT completedAt(@Nullable DateTime value) { - this.completedAt = value; - return self(); - } - - /** - * Required - API name: {@code connector} - */ - public final BuilderT connector(SyncJobConnectorReference value) { - this.connector = value; - return self(); - } - - /** - * Required - API name: {@code connector} - */ - public final BuilderT connector( - Function> fn) { - return this.connector(fn.apply(new SyncJobConnectorReference.Builder()).build()); - } - - /** - * Required - API name: {@code created_at} - */ - public final BuilderT createdAt(DateTime value) { - this.createdAt = value; - return self(); - } - - /** - * Required - API name: {@code deleted_document_count} - */ - public final BuilderT deletedDocumentCount(long value) { - this.deletedDocumentCount = value; - return self(); - } - - /** - * API name: {@code error} - */ - public final BuilderT error(@Nullable String value) { - this.error = value; - return self(); - } - - /** - * Required - API name: {@code id} - */ - public final BuilderT id(String value) { - this.id = value; - return self(); - } - - /** - * Required - API name: {@code indexed_document_count} - */ - public final BuilderT indexedDocumentCount(long value) { - this.indexedDocumentCount = value; - return self(); - } - - /** - * Required - API name: {@code indexed_document_volume} - */ - public final BuilderT indexedDocumentVolume(long value) { - this.indexedDocumentVolume = value; - return self(); - } - - /** - * Required - API name: {@code job_type} - */ - public final BuilderT jobType(SyncJobType value) { - this.jobType = value; - return self(); - } - - /** - * API name: {@code last_seen} - */ - public final BuilderT lastSeen(@Nullable DateTime value) { - this.lastSeen = value; - return self(); - } - - /** - * Required - API name: {@code metadata} - *

- * Adds all entries of map to metadata. - */ - public final BuilderT metadata(Map map) { - this.metadata = _mapPutAll(this.metadata, map); - return self(); - } - - /** - * Required - API name: {@code metadata} - *

- * Adds an entry to metadata. - */ - public final BuilderT metadata(String key, JsonData value) { - this.metadata = _mapPut(this.metadata, key, value); - return self(); - } - - /** - * API name: {@code started_at} - */ - public final BuilderT startedAt(@Nullable DateTime value) { - this.startedAt = value; - return self(); - } - - /** - * Required - API name: {@code status} - */ - public final BuilderT status(SyncStatus value) { - this.status = value; - return self(); - } - - /** - * Required - API name: {@code total_document_count} - */ - public final BuilderT totalDocumentCount(long value) { - this.totalDocumentCount = value; - return self(); - } - - /** - * Required - API name: {@code trigger_method} - */ - public final BuilderT triggerMethod(SyncJobTriggerMethod value) { - this.triggerMethod = value; - return self(); - } - - /** - * API name: {@code worker_hostname} - */ - public final BuilderT workerHostname(@Nullable String value) { - this.workerHostname = value; - return self(); - } - - protected abstract BuilderT self(); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link ConnectorSyncJob} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - ConnectorSyncJob::setupConnectorSyncJobDeserializer); - - protected static > void setupConnectorSyncJobDeserializer( - ObjectDeserializer op) { - - op.add(AbstractBuilder::cancelationRequestedAt, DateTime._DESERIALIZER, "cancelation_requested_at"); - op.add(AbstractBuilder::canceledAt, DateTime._DESERIALIZER, "canceled_at"); - op.add(AbstractBuilder::completedAt, DateTime._DESERIALIZER, "completed_at"); - op.add(AbstractBuilder::connector, SyncJobConnectorReference._DESERIALIZER, "connector"); - op.add(AbstractBuilder::createdAt, DateTime._DESERIALIZER, "created_at"); - op.add(AbstractBuilder::deletedDocumentCount, JsonpDeserializer.longDeserializer(), "deleted_document_count"); - op.add(AbstractBuilder::error, JsonpDeserializer.stringDeserializer(), "error"); - op.add(AbstractBuilder::id, JsonpDeserializer.stringDeserializer(), "id"); - op.add(AbstractBuilder::indexedDocumentCount, JsonpDeserializer.longDeserializer(), "indexed_document_count"); - op.add(AbstractBuilder::indexedDocumentVolume, JsonpDeserializer.longDeserializer(), "indexed_document_volume"); - op.add(AbstractBuilder::jobType, SyncJobType._DESERIALIZER, "job_type"); - op.add(AbstractBuilder::lastSeen, DateTime._DESERIALIZER, "last_seen"); - op.add(AbstractBuilder::metadata, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "metadata"); - op.add(AbstractBuilder::startedAt, DateTime._DESERIALIZER, "started_at"); - op.add(AbstractBuilder::status, SyncStatus._DESERIALIZER, "status"); - op.add(AbstractBuilder::totalDocumentCount, JsonpDeserializer.longDeserializer(), "total_document_count"); - op.add(AbstractBuilder::triggerMethod, SyncJobTriggerMethod._DESERIALIZER, "trigger_method"); - op.add(AbstractBuilder::workerHostname, JsonpDeserializer.stringDeserializer(), "worker_hostname"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/CustomScheduling.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/CustomScheduling.java deleted file mode 100644 index 302a7d46f..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/CustomScheduling.java +++ /dev/null @@ -1,266 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.DateTime; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.Boolean; -import java.lang.String; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.CustomScheduling - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class CustomScheduling implements JsonpSerializable { - private final CustomSchedulingConfigurationOverrides configurationOverrides; - - private final boolean enabled; - - private final String interval; - - @Nullable - private final DateTime lastSynced; - - private final String name; - - // --------------------------------------------------------------------------------------------- - - private CustomScheduling(Builder builder) { - - this.configurationOverrides = ApiTypeHelper.requireNonNull(builder.configurationOverrides, this, - "configurationOverrides"); - this.enabled = ApiTypeHelper.requireNonNull(builder.enabled, this, "enabled"); - this.interval = ApiTypeHelper.requireNonNull(builder.interval, this, "interval"); - this.lastSynced = builder.lastSynced; - this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); - - } - - public static CustomScheduling of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code configuration_overrides} - */ - public final CustomSchedulingConfigurationOverrides configurationOverrides() { - return this.configurationOverrides; - } - - /** - * Required - API name: {@code enabled} - */ - public final boolean enabled() { - return this.enabled; - } - - /** - * Required - API name: {@code interval} - */ - public final String interval() { - return this.interval; - } - - /** - * API name: {@code last_synced} - */ - @Nullable - public final DateTime lastSynced() { - return this.lastSynced; - } - - /** - * Required - API name: {@code name} - */ - public final String name() { - return this.name; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("configuration_overrides"); - this.configurationOverrides.serialize(generator, mapper); - - generator.writeKey("enabled"); - generator.write(this.enabled); - - generator.writeKey("interval"); - generator.write(this.interval); - - if (this.lastSynced != null) { - generator.writeKey("last_synced"); - this.lastSynced.serialize(generator, mapper); - } - generator.writeKey("name"); - generator.write(this.name); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link CustomScheduling}. - */ - - public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - private CustomSchedulingConfigurationOverrides configurationOverrides; - - private Boolean enabled; - - private String interval; - - @Nullable - private DateTime lastSynced; - - private String name; - - /** - * Required - API name: {@code configuration_overrides} - */ - public final Builder configurationOverrides(CustomSchedulingConfigurationOverrides value) { - this.configurationOverrides = value; - return this; - } - - /** - * Required - API name: {@code configuration_overrides} - */ - public final Builder configurationOverrides( - Function> fn) { - return this.configurationOverrides(fn.apply(new CustomSchedulingConfigurationOverrides.Builder()).build()); - } - - /** - * Required - API name: {@code enabled} - */ - public final Builder enabled(boolean value) { - this.enabled = value; - return this; - } - - /** - * Required - API name: {@code interval} - */ - public final Builder interval(String value) { - this.interval = value; - return this; - } - - /** - * API name: {@code last_synced} - */ - public final Builder lastSynced(@Nullable DateTime value) { - this.lastSynced = value; - return this; - } - - /** - * Required - API name: {@code name} - */ - public final Builder name(String value) { - this.name = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link CustomScheduling}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public CustomScheduling build() { - _checkSingleUse(); - - return new CustomScheduling(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link CustomScheduling} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - CustomScheduling::setupCustomSchedulingDeserializer); - - protected static void setupCustomSchedulingDeserializer(ObjectDeserializer op) { - - op.add(Builder::configurationOverrides, CustomSchedulingConfigurationOverrides._DESERIALIZER, - "configuration_overrides"); - op.add(Builder::enabled, JsonpDeserializer.booleanDeserializer(), "enabled"); - op.add(Builder::interval, JsonpDeserializer.stringDeserializer(), "interval"); - op.add(Builder::lastSynced, DateTime._DESERIALIZER, "last_synced"); - op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/CustomSchedulingConfigurationOverrides.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/CustomSchedulingConfigurationOverrides.java deleted file mode 100644 index 11d919a0b..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/CustomSchedulingConfigurationOverrides.java +++ /dev/null @@ -1,333 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.String; -import java.util.List; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.CustomSchedulingConfigurationOverrides - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class CustomSchedulingConfigurationOverrides implements JsonpSerializable { - @Nullable - private final Integer maxCrawlDepth; - - @Nullable - private final Boolean sitemapDiscoveryDisabled; - - private final List domainAllowlist; - - private final List sitemapUrls; - - private final List seedUrls; - - // --------------------------------------------------------------------------------------------- - - private CustomSchedulingConfigurationOverrides(Builder builder) { - - this.maxCrawlDepth = builder.maxCrawlDepth; - this.sitemapDiscoveryDisabled = builder.sitemapDiscoveryDisabled; - this.domainAllowlist = ApiTypeHelper.unmodifiable(builder.domainAllowlist); - this.sitemapUrls = ApiTypeHelper.unmodifiable(builder.sitemapUrls); - this.seedUrls = ApiTypeHelper.unmodifiable(builder.seedUrls); - - } - - public static CustomSchedulingConfigurationOverrides of( - Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * API name: {@code max_crawl_depth} - */ - @Nullable - public final Integer maxCrawlDepth() { - return this.maxCrawlDepth; - } - - /** - * API name: {@code sitemap_discovery_disabled} - */ - @Nullable - public final Boolean sitemapDiscoveryDisabled() { - return this.sitemapDiscoveryDisabled; - } - - /** - * API name: {@code domain_allowlist} - */ - public final List domainAllowlist() { - return this.domainAllowlist; - } - - /** - * API name: {@code sitemap_urls} - */ - public final List sitemapUrls() { - return this.sitemapUrls; - } - - /** - * API name: {@code seed_urls} - */ - public final List seedUrls() { - return this.seedUrls; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.maxCrawlDepth != null) { - generator.writeKey("max_crawl_depth"); - generator.write(this.maxCrawlDepth); - - } - if (this.sitemapDiscoveryDisabled != null) { - generator.writeKey("sitemap_discovery_disabled"); - generator.write(this.sitemapDiscoveryDisabled); - - } - if (ApiTypeHelper.isDefined(this.domainAllowlist)) { - generator.writeKey("domain_allowlist"); - generator.writeStartArray(); - for (String item0 : this.domainAllowlist) { - generator.write(item0); - - } - generator.writeEnd(); - - } - if (ApiTypeHelper.isDefined(this.sitemapUrls)) { - generator.writeKey("sitemap_urls"); - generator.writeStartArray(); - for (String item0 : this.sitemapUrls) { - generator.write(item0); - - } - generator.writeEnd(); - - } - if (ApiTypeHelper.isDefined(this.seedUrls)) { - generator.writeKey("seed_urls"); - generator.writeStartArray(); - for (String item0 : this.seedUrls) { - generator.write(item0); - - } - generator.writeEnd(); - - } - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link CustomSchedulingConfigurationOverrides}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - @Nullable - private Integer maxCrawlDepth; - - @Nullable - private Boolean sitemapDiscoveryDisabled; - - @Nullable - private List domainAllowlist; - - @Nullable - private List sitemapUrls; - - @Nullable - private List seedUrls; - - /** - * API name: {@code max_crawl_depth} - */ - public final Builder maxCrawlDepth(@Nullable Integer value) { - this.maxCrawlDepth = value; - return this; - } - - /** - * API name: {@code sitemap_discovery_disabled} - */ - public final Builder sitemapDiscoveryDisabled(@Nullable Boolean value) { - this.sitemapDiscoveryDisabled = value; - return this; - } - - /** - * API name: {@code domain_allowlist} - *

- * Adds all elements of list to domainAllowlist. - */ - public final Builder domainAllowlist(List list) { - this.domainAllowlist = _listAddAll(this.domainAllowlist, list); - return this; - } - - /** - * API name: {@code domain_allowlist} - *

- * Adds one or more values to domainAllowlist. - */ - public final Builder domainAllowlist(String value, String... values) { - this.domainAllowlist = _listAdd(this.domainAllowlist, value, values); - return this; - } - - /** - * API name: {@code sitemap_urls} - *

- * Adds all elements of list to sitemapUrls. - */ - public final Builder sitemapUrls(List list) { - this.sitemapUrls = _listAddAll(this.sitemapUrls, list); - return this; - } - - /** - * API name: {@code sitemap_urls} - *

- * Adds one or more values to sitemapUrls. - */ - public final Builder sitemapUrls(String value, String... values) { - this.sitemapUrls = _listAdd(this.sitemapUrls, value, values); - return this; - } - - /** - * API name: {@code seed_urls} - *

- * Adds all elements of list to seedUrls. - */ - public final Builder seedUrls(List list) { - this.seedUrls = _listAddAll(this.seedUrls, list); - return this; - } - - /** - * API name: {@code seed_urls} - *

- * Adds one or more values to seedUrls. - */ - public final Builder seedUrls(String value, String... values) { - this.seedUrls = _listAdd(this.seedUrls, value, values); - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link CustomSchedulingConfigurationOverrides}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public CustomSchedulingConfigurationOverrides build() { - _checkSingleUse(); - - return new CustomSchedulingConfigurationOverrides(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link CustomSchedulingConfigurationOverrides} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, - CustomSchedulingConfigurationOverrides::setupCustomSchedulingConfigurationOverridesDeserializer); - - protected static void setupCustomSchedulingConfigurationOverridesDeserializer( - ObjectDeserializer op) { - - op.add(Builder::maxCrawlDepth, JsonpDeserializer.integerDeserializer(), "max_crawl_depth"); - op.add(Builder::sitemapDiscoveryDisabled, JsonpDeserializer.booleanDeserializer(), - "sitemap_discovery_disabled"); - op.add(Builder::domainAllowlist, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), - "domain_allowlist"); - op.add(Builder::sitemapUrls, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), - "sitemap_urls"); - op.add(Builder::seedUrls, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), - "seed_urls"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorRequest.java deleted file mode 100644 index c0eff592d..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorRequest.java +++ /dev/null @@ -1,207 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.Boolean; -import java.lang.String; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.delete.Request - -/** - * Deletes a connector. - * - * @see API - * specification - */ - -public class DeleteConnectorRequest extends RequestBase { - private final String connectorId; - - private final boolean deleteSyncJobs; - - // --------------------------------------------------------------------------------------------- - - private DeleteConnectorRequest(Builder builder) { - - this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); - this.deleteSyncJobs = ApiTypeHelper.requireNonNull(builder.deleteSyncJobs, this, "deleteSyncJobs"); - - } - - public static DeleteConnectorRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - The unique identifier of the connector to be deleted - *

- * API name: {@code connector_id} - */ - public final String connectorId() { - return this.connectorId; - } - - /** - * Required - Determines whether associated sync jobs are also deleted. - *

- * API name: {@code delete_sync_jobs} - */ - public final boolean deleteSyncJobs() { - return this.deleteSyncJobs; - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link DeleteConnectorRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder - implements - ObjectBuilder { - private String connectorId; - - private Boolean deleteSyncJobs; - - /** - * Required - The unique identifier of the connector to be deleted - *

- * API name: {@code connector_id} - */ - public final Builder connectorId(String value) { - this.connectorId = value; - return this; - } - - /** - * Required - Determines whether associated sync jobs are also deleted. - *

- * API name: {@code delete_sync_jobs} - */ - public final Builder deleteSyncJobs(boolean value) { - this.deleteSyncJobs = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link DeleteConnectorRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public DeleteConnectorRequest build() { - _checkSingleUse(); - - return new DeleteConnectorRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.delete}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.delete", - - // Request method - request -> { - return "DELETE"; - - }, - - // Request path - request -> { - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_connector"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.connectorId, buf); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); - - }, - - // Path parameters - request -> { - Map params = new HashMap<>(); - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - params.put("connectorId", request.connectorId); - } - return params; - }, - - // Request parameters - request -> { - Map params = new HashMap<>(); - params.put("delete_sync_jobs", String.valueOf(request.deleteSyncJobs)); - return params; - - }, SimpleEndpoint.emptyMap(), false, DeleteConnectorResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorResponse.java deleted file mode 100644 index 801c81a34..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorResponse.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.AcknowledgedResponseBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.delete.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class DeleteConnectorResponse extends AcknowledgedResponseBase { - // --------------------------------------------------------------------------------------------- - - private DeleteConnectorResponse(Builder builder) { - super(builder); - - } - - public static DeleteConnectorResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link DeleteConnectorResponse}. - */ - - public static class Builder extends AcknowledgedResponseBase.AbstractBuilder - implements - ObjectBuilder { - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link DeleteConnectorResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public DeleteConnectorResponse build() { - _checkSingleUse(); - - return new DeleteConnectorResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link DeleteConnectorResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, DeleteConnectorResponse::setupDeleteConnectorResponseDeserializer); - - protected static void setupDeleteConnectorResponseDeserializer( - ObjectDeserializer op) { - AcknowledgedResponseBase.setupAcknowledgedResponseBaseDeserializer(op); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/Dependency.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/Dependency.java deleted file mode 100644 index 2934cefe4..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/Dependency.java +++ /dev/null @@ -1,217 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.FieldValue; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.Dependency - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class Dependency implements JsonpSerializable { - private final String field; - - private final FieldValue value; - - // --------------------------------------------------------------------------------------------- - - private Dependency(Builder builder) { - - this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); - this.value = ApiTypeHelper.requireNonNull(builder.value, this, "value"); - - } - - public static Dependency of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code field} - */ - public final String field() { - return this.field; - } - - /** - * Required - API name: {@code value} - */ - public final FieldValue value() { - return this.value; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("field"); - generator.write(this.field); - - generator.writeKey("value"); - this.value.serialize(generator, mapper); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link Dependency}. - */ - - public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - private String field; - - private FieldValue value; - - /** - * Required - API name: {@code field} - */ - public final Builder field(String value) { - this.field = value; - return this; - } - - /** - * Required - API name: {@code value} - */ - public final Builder value(FieldValue value) { - this.value = value; - return this; - } - - /** - * Required - API name: {@code value} - */ - public final Builder value(Function> fn) { - return this.value(fn.apply(new FieldValue.Builder()).build()); - } - - /** - * Required - API name: {@code value} - */ - public final Builder value(String value) { - this.value = FieldValue.of(value); - return this; - } - - /** - * Required - API name: {@code value} - */ - public final Builder value(long value) { - this.value = FieldValue.of(value); - return this; - } - - /** - * Required - API name: {@code value} - */ - public final Builder value(double value) { - this.value = FieldValue.of(value); - return this; - } - - /** - * Required - API name: {@code value} - */ - public final Builder value(boolean value) { - this.value = FieldValue.of(value); - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link Dependency}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public Dependency build() { - _checkSingleUse(); - - return new Dependency(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link Dependency} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - Dependency::setupDependencyDeserializer); - - protected static void setupDependencyDeserializer(ObjectDeserializer op) { - - op.add(Builder::field, JsonpDeserializer.stringDeserializer(), "field"); - op.add(Builder::value, FieldValue._DESERIALIZER, "value"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/DisplayType.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/DisplayType.java deleted file mode 100644 index 93fcd3569..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/DisplayType.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonEnum; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public enum DisplayType implements JsonEnum { - Textbox("textbox"), - - Textarea("textarea"), - - Numeric("numeric"), - - Toggle("toggle"), - - Dropdown("dropdown"), - - ; - - private final String jsonValue; - - DisplayType(String jsonValue) { - this.jsonValue = jsonValue; - } - - public String jsonValue() { - return this.jsonValue; - } - - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( - DisplayType.values()); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorAsyncClient.java deleted file mode 100644 index 717f7bf3d..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorAsyncClient.java +++ /dev/null @@ -1,922 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.ApiClient; -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.transport.ElasticsearchTransport; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.JsonEndpoint; -import co.elastic.clients.transport.Transport; -import co.elastic.clients.transport.TransportOptions; -import co.elastic.clients.util.ObjectBuilder; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -/** - * Client for the connector namespace. - */ -public class ElasticsearchConnectorAsyncClient - extends - ApiClient { - - public ElasticsearchConnectorAsyncClient(ElasticsearchTransport transport) { - super(transport, null); - } - - public ElasticsearchConnectorAsyncClient(ElasticsearchTransport transport, - @Nullable TransportOptions transportOptions) { - super(transport, transportOptions); - } - - @Override - public ElasticsearchConnectorAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions) { - return new ElasticsearchConnectorAsyncClient(this.transport, transportOptions); - } - - // ----- Endpoint: connector.check_in - - /** - * Updates the last_seen timestamp in the connector document. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture checkIn(CheckInRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) CheckInRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Updates the last_seen timestamp in the connector document. - * - * @param fn - * a function that initializes a builder to create the - * {@link CheckInRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture checkIn( - Function> fn) { - return checkIn(fn.apply(new CheckInRequest.Builder()).build()); - } - - // ----- Endpoint: connector.delete - - /** - * Deletes a connector. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture delete(DeleteConnectorRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) DeleteConnectorRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Deletes a connector. - * - * @param fn - * a function that initializes a builder to create the - * {@link DeleteConnectorRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture delete( - Function> fn) { - return delete(fn.apply(new DeleteConnectorRequest.Builder()).build()); - } - - // ----- Endpoint: connector.get - - /** - * Returns the details about a connector. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture get(GetConnectorRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) GetConnectorRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Returns the details about a connector. - * - * @param fn - * a function that initializes a builder to create the - * {@link GetConnectorRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture get( - Function> fn) { - return get(fn.apply(new GetConnectorRequest.Builder()).build()); - } - - // ----- Endpoint: connector.last_sync - - /** - * Updates the stats of last sync in the connector document. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture lastSync(LastSyncRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) LastSyncRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Updates the stats of last sync in the connector document. - * - * @param fn - * a function that initializes a builder to create the - * {@link LastSyncRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture lastSync( - Function> fn) { - return lastSync(fn.apply(new LastSyncRequest.Builder()).build()); - } - - // ----- Endpoint: connector.list - - /** - * Lists all connectors. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture list(ListRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) ListRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Lists all connectors. - * - * @param fn - * a function that initializes a builder to create the - * {@link ListRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture list(Function> fn) { - return list(fn.apply(new ListRequest.Builder()).build()); - } - - /** - * Lists all connectors. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture list() { - return this.transport.performRequestAsync(new ListRequest.Builder().build(), ListRequest._ENDPOINT, - this.transportOptions); - } - - // ----- Endpoint: connector.post - - /** - * Creates a connector. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture post(PostRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) PostRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Creates a connector. - * - * @param fn - * a function that initializes a builder to create the - * {@link PostRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture post(Function> fn) { - return post(fn.apply(new PostRequest.Builder()).build()); - } - - // ----- Endpoint: connector.put - - /** - * Creates or updates a connector. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture put(PutRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) PutRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Creates or updates a connector. - * - * @param fn - * a function that initializes a builder to create the - * {@link PutRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture put(Function> fn) { - return put(fn.apply(new PutRequest.Builder()).build()); - } - - // ----- Endpoint: connector.sync_job_cancel - - /** - * Cancels a connector sync job. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture syncJobCancel(SyncJobCancelRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) SyncJobCancelRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Cancels a connector sync job. - * - * @param fn - * a function that initializes a builder to create the - * {@link SyncJobCancelRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture syncJobCancel( - Function> fn) { - return syncJobCancel(fn.apply(new SyncJobCancelRequest.Builder()).build()); - } - - // ----- Endpoint: connector.sync_job_delete - - /** - * Deletes a connector sync job. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture syncJobDelete(SyncJobDeleteRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) SyncJobDeleteRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Deletes a connector sync job. - * - * @param fn - * a function that initializes a builder to create the - * {@link SyncJobDeleteRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture syncJobDelete( - Function> fn) { - return syncJobDelete(fn.apply(new SyncJobDeleteRequest.Builder()).build()); - } - - // ----- Endpoint: connector.sync_job_get - - /** - * Returns the details about a connector sync job. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture syncJobGet(SyncJobGetRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) SyncJobGetRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Returns the details about a connector sync job. - * - * @param fn - * a function that initializes a builder to create the - * {@link SyncJobGetRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture syncJobGet( - Function> fn) { - return syncJobGet(fn.apply(new SyncJobGetRequest.Builder()).build()); - } - - // ----- Endpoint: connector.sync_job_list - - /** - * Lists all connector sync jobs. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture syncJobList(SyncJobListRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) SyncJobListRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Lists all connector sync jobs. - * - * @param fn - * a function that initializes a builder to create the - * {@link SyncJobListRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture syncJobList( - Function> fn) { - return syncJobList(fn.apply(new SyncJobListRequest.Builder()).build()); - } - - /** - * Lists all connector sync jobs. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture syncJobList() { - return this.transport.performRequestAsync(new SyncJobListRequest.Builder().build(), - SyncJobListRequest._ENDPOINT, this.transportOptions); - } - - // ----- Endpoint: connector.sync_job_post - - /** - * Creates a connector sync job. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture syncJobPost(SyncJobPostRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) SyncJobPostRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Creates a connector sync job. - * - * @param fn - * a function that initializes a builder to create the - * {@link SyncJobPostRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture syncJobPost( - Function> fn) { - return syncJobPost(fn.apply(new SyncJobPostRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_active_filtering - - /** - * Activates the draft filtering rules if they are in a validated state. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture updateActiveFiltering( - UpdateActiveFilteringRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateActiveFilteringRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Activates the draft filtering rules if they are in a validated state. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateActiveFilteringRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture updateActiveFiltering( - Function> fn) { - return updateActiveFiltering(fn.apply(new UpdateActiveFilteringRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_api_key_id - - /** - * Updates the API key id and/or API key secret id fields in the connector - * document. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture updateApiKeyId(UpdateApiKeyIdRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateApiKeyIdRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Updates the API key id and/or API key secret id fields in the connector - * document. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateApiKeyIdRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture updateApiKeyId( - Function> fn) { - return updateApiKeyId(fn.apply(new UpdateApiKeyIdRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_configuration - - /** - * Updates the connector configuration. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture updateConfiguration(UpdateConfigurationRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateConfigurationRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Updates the connector configuration. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateConfigurationRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture updateConfiguration( - Function> fn) { - return updateConfiguration(fn.apply(new UpdateConfigurationRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_error - - /** - * Updates the error field in the connector document. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture updateError(UpdateErrorRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateErrorRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Updates the error field in the connector document. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateErrorRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture updateError( - Function> fn) { - return updateError(fn.apply(new UpdateErrorRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_filtering - - /** - * Updates the filtering field in the connector document. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture updateFiltering(UpdateFilteringRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateFilteringRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Updates the filtering field in the connector document. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateFilteringRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture updateFiltering( - Function> fn) { - return updateFiltering(fn.apply(new UpdateFilteringRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_filtering_validation - - /** - * Updates the validation info of the draft filtering rules. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture updateFilteringValidation( - UpdateFilteringValidationRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateFilteringValidationRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Updates the validation info of the draft filtering rules. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateFilteringValidationRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture updateFilteringValidation( - Function> fn) { - return updateFilteringValidation(fn.apply(new UpdateFilteringValidationRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_index_name - - /** - * Updates the index name of the connector. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture updateIndexName(UpdateIndexNameRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateIndexNameRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Updates the index name of the connector. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateIndexNameRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture updateIndexName( - Function> fn) { - return updateIndexName(fn.apply(new UpdateIndexNameRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_name - - /** - * Updates the name and/or description fields in the connector document. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture updateName(UpdateNameRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateNameRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Updates the name and/or description fields in the connector document. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateNameRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture updateName( - Function> fn) { - return updateName(fn.apply(new UpdateNameRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_native - - /** - * Updates the is_native flag of the connector. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture updateNative(UpdateNativeRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateNativeRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Updates the is_native flag of the connector. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateNativeRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture updateNative( - Function> fn) { - return updateNative(fn.apply(new UpdateNativeRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_pipeline - - /** - * Updates the pipeline field in the connector document. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture updatePipeline(UpdatePipelineRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdatePipelineRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Updates the pipeline field in the connector document. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdatePipelineRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture updatePipeline( - Function> fn) { - return updatePipeline(fn.apply(new UpdatePipelineRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_scheduling - - /** - * Updates the scheduling field in the connector document. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture updateScheduling(UpdateSchedulingRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateSchedulingRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Updates the scheduling field in the connector document. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateSchedulingRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture updateScheduling( - Function> fn) { - return updateScheduling(fn.apply(new UpdateSchedulingRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_service_type - - /** - * Updates the service type of the connector. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture updateServiceType(UpdateServiceTypeRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateServiceTypeRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Updates the service type of the connector. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateServiceTypeRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture updateServiceType( - Function> fn) { - return updateServiceType(fn.apply(new UpdateServiceTypeRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_status - - /** - * Updates the status of the connector. - * - * @see Documentation - * on elastic.co - */ - - public CompletableFuture updateStatus(UpdateStatusRequest request) { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateStatusRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); - } - - /** - * Updates the status of the connector. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateStatusRequest} - * @see Documentation - * on elastic.co - */ - - public final CompletableFuture updateStatus( - Function> fn) { - return updateStatus(fn.apply(new UpdateStatusRequest.Builder()).build()); - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorClient.java deleted file mode 100644 index 39406d7dd..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorClient.java +++ /dev/null @@ -1,949 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.ApiClient; -import co.elastic.clients.elasticsearch._types.ElasticsearchException; -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.transport.ElasticsearchTransport; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.JsonEndpoint; -import co.elastic.clients.transport.Transport; -import co.elastic.clients.transport.TransportOptions; -import co.elastic.clients.util.ObjectBuilder; -import java.io.IOException; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -/** - * Client for the connector namespace. - */ -public class ElasticsearchConnectorClient extends ApiClient { - - public ElasticsearchConnectorClient(ElasticsearchTransport transport) { - super(transport, null); - } - - public ElasticsearchConnectorClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions) { - super(transport, transportOptions); - } - - @Override - public ElasticsearchConnectorClient withTransportOptions(@Nullable TransportOptions transportOptions) { - return new ElasticsearchConnectorClient(this.transport, transportOptions); - } - - // ----- Endpoint: connector.check_in - - /** - * Updates the last_seen timestamp in the connector document. - * - * @see Documentation - * on elastic.co - */ - - public CheckInResponse checkIn(CheckInRequest request) throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) CheckInRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Updates the last_seen timestamp in the connector document. - * - * @param fn - * a function that initializes a builder to create the - * {@link CheckInRequest} - * @see Documentation - * on elastic.co - */ - - public final CheckInResponse checkIn(Function> fn) - throws IOException, ElasticsearchException { - return checkIn(fn.apply(new CheckInRequest.Builder()).build()); - } - - // ----- Endpoint: connector.delete - - /** - * Deletes a connector. - * - * @see Documentation - * on elastic.co - */ - - public DeleteConnectorResponse delete(DeleteConnectorRequest request) throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) DeleteConnectorRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Deletes a connector. - * - * @param fn - * a function that initializes a builder to create the - * {@link DeleteConnectorRequest} - * @see Documentation - * on elastic.co - */ - - public final DeleteConnectorResponse delete( - Function> fn) - throws IOException, ElasticsearchException { - return delete(fn.apply(new DeleteConnectorRequest.Builder()).build()); - } - - // ----- Endpoint: connector.get - - /** - * Returns the details about a connector. - * - * @see Documentation - * on elastic.co - */ - - public GetConnectorResponse get(GetConnectorRequest request) throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) GetConnectorRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Returns the details about a connector. - * - * @param fn - * a function that initializes a builder to create the - * {@link GetConnectorRequest} - * @see Documentation - * on elastic.co - */ - - public final GetConnectorResponse get(Function> fn) - throws IOException, ElasticsearchException { - return get(fn.apply(new GetConnectorRequest.Builder()).build()); - } - - // ----- Endpoint: connector.last_sync - - /** - * Updates the stats of last sync in the connector document. - * - * @see Documentation - * on elastic.co - */ - - public LastSyncResponse lastSync(LastSyncRequest request) throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) LastSyncRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Updates the stats of last sync in the connector document. - * - * @param fn - * a function that initializes a builder to create the - * {@link LastSyncRequest} - * @see Documentation - * on elastic.co - */ - - public final LastSyncResponse lastSync(Function> fn) - throws IOException, ElasticsearchException { - return lastSync(fn.apply(new LastSyncRequest.Builder()).build()); - } - - // ----- Endpoint: connector.list - - /** - * Lists all connectors. - * - * @see Documentation - * on elastic.co - */ - - public ListResponse list(ListRequest request) throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) ListRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Lists all connectors. - * - * @param fn - * a function that initializes a builder to create the - * {@link ListRequest} - * @see Documentation - * on elastic.co - */ - - public final ListResponse list(Function> fn) - throws IOException, ElasticsearchException { - return list(fn.apply(new ListRequest.Builder()).build()); - } - - /** - * Lists all connectors. - * - * @see Documentation - * on elastic.co - */ - - public ListResponse list() throws IOException, ElasticsearchException { - return this.transport.performRequest(new ListRequest.Builder().build(), ListRequest._ENDPOINT, - this.transportOptions); - } - - // ----- Endpoint: connector.post - - /** - * Creates a connector. - * - * @see Documentation - * on elastic.co - */ - - public PostResponse post(PostRequest request) throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) PostRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Creates a connector. - * - * @param fn - * a function that initializes a builder to create the - * {@link PostRequest} - * @see Documentation - * on elastic.co - */ - - public final PostResponse post(Function> fn) - throws IOException, ElasticsearchException { - return post(fn.apply(new PostRequest.Builder()).build()); - } - - // ----- Endpoint: connector.put - - /** - * Creates or updates a connector. - * - * @see Documentation - * on elastic.co - */ - - public PutResponse put(PutRequest request) throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) PutRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Creates or updates a connector. - * - * @param fn - * a function that initializes a builder to create the - * {@link PutRequest} - * @see Documentation - * on elastic.co - */ - - public final PutResponse put(Function> fn) - throws IOException, ElasticsearchException { - return put(fn.apply(new PutRequest.Builder()).build()); - } - - // ----- Endpoint: connector.sync_job_cancel - - /** - * Cancels a connector sync job. - * - * @see Documentation - * on elastic.co - */ - - public SyncJobCancelResponse syncJobCancel(SyncJobCancelRequest request) - throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) SyncJobCancelRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Cancels a connector sync job. - * - * @param fn - * a function that initializes a builder to create the - * {@link SyncJobCancelRequest} - * @see Documentation - * on elastic.co - */ - - public final SyncJobCancelResponse syncJobCancel( - Function> fn) - throws IOException, ElasticsearchException { - return syncJobCancel(fn.apply(new SyncJobCancelRequest.Builder()).build()); - } - - // ----- Endpoint: connector.sync_job_delete - - /** - * Deletes a connector sync job. - * - * @see Documentation - * on elastic.co - */ - - public SyncJobDeleteResponse syncJobDelete(SyncJobDeleteRequest request) - throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) SyncJobDeleteRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Deletes a connector sync job. - * - * @param fn - * a function that initializes a builder to create the - * {@link SyncJobDeleteRequest} - * @see Documentation - * on elastic.co - */ - - public final SyncJobDeleteResponse syncJobDelete( - Function> fn) - throws IOException, ElasticsearchException { - return syncJobDelete(fn.apply(new SyncJobDeleteRequest.Builder()).build()); - } - - // ----- Endpoint: connector.sync_job_get - - /** - * Returns the details about a connector sync job. - * - * @see Documentation - * on elastic.co - */ - - public SyncJobGetResponse syncJobGet(SyncJobGetRequest request) throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) SyncJobGetRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Returns the details about a connector sync job. - * - * @param fn - * a function that initializes a builder to create the - * {@link SyncJobGetRequest} - * @see Documentation - * on elastic.co - */ - - public final SyncJobGetResponse syncJobGet(Function> fn) - throws IOException, ElasticsearchException { - return syncJobGet(fn.apply(new SyncJobGetRequest.Builder()).build()); - } - - // ----- Endpoint: connector.sync_job_list - - /** - * Lists all connector sync jobs. - * - * @see Documentation - * on elastic.co - */ - - public SyncJobListResponse syncJobList(SyncJobListRequest request) throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) SyncJobListRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Lists all connector sync jobs. - * - * @param fn - * a function that initializes a builder to create the - * {@link SyncJobListRequest} - * @see Documentation - * on elastic.co - */ - - public final SyncJobListResponse syncJobList( - Function> fn) - throws IOException, ElasticsearchException { - return syncJobList(fn.apply(new SyncJobListRequest.Builder()).build()); - } - - /** - * Lists all connector sync jobs. - * - * @see Documentation - * on elastic.co - */ - - public SyncJobListResponse syncJobList() throws IOException, ElasticsearchException { - return this.transport.performRequest(new SyncJobListRequest.Builder().build(), SyncJobListRequest._ENDPOINT, - this.transportOptions); - } - - // ----- Endpoint: connector.sync_job_post - - /** - * Creates a connector sync job. - * - * @see Documentation - * on elastic.co - */ - - public SyncJobPostResponse syncJobPost(SyncJobPostRequest request) throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) SyncJobPostRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Creates a connector sync job. - * - * @param fn - * a function that initializes a builder to create the - * {@link SyncJobPostRequest} - * @see Documentation - * on elastic.co - */ - - public final SyncJobPostResponse syncJobPost( - Function> fn) - throws IOException, ElasticsearchException { - return syncJobPost(fn.apply(new SyncJobPostRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_active_filtering - - /** - * Activates the draft filtering rules if they are in a validated state. - * - * @see Documentation - * on elastic.co - */ - - public UpdateActiveFilteringResponse updateActiveFiltering(UpdateActiveFilteringRequest request) - throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateActiveFilteringRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Activates the draft filtering rules if they are in a validated state. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateActiveFilteringRequest} - * @see Documentation - * on elastic.co - */ - - public final UpdateActiveFilteringResponse updateActiveFiltering( - Function> fn) - throws IOException, ElasticsearchException { - return updateActiveFiltering(fn.apply(new UpdateActiveFilteringRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_api_key_id - - /** - * Updates the API key id and/or API key secret id fields in the connector - * document. - * - * @see Documentation - * on elastic.co - */ - - public UpdateApiKeyIdResponse updateApiKeyId(UpdateApiKeyIdRequest request) - throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateApiKeyIdRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Updates the API key id and/or API key secret id fields in the connector - * document. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateApiKeyIdRequest} - * @see Documentation - * on elastic.co - */ - - public final UpdateApiKeyIdResponse updateApiKeyId( - Function> fn) - throws IOException, ElasticsearchException { - return updateApiKeyId(fn.apply(new UpdateApiKeyIdRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_configuration - - /** - * Updates the connector configuration. - * - * @see Documentation - * on elastic.co - */ - - public UpdateConfigurationResponse updateConfiguration(UpdateConfigurationRequest request) - throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateConfigurationRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Updates the connector configuration. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateConfigurationRequest} - * @see Documentation - * on elastic.co - */ - - public final UpdateConfigurationResponse updateConfiguration( - Function> fn) - throws IOException, ElasticsearchException { - return updateConfiguration(fn.apply(new UpdateConfigurationRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_error - - /** - * Updates the error field in the connector document. - * - * @see Documentation - * on elastic.co - */ - - public UpdateErrorResponse updateError(UpdateErrorRequest request) throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateErrorRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Updates the error field in the connector document. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateErrorRequest} - * @see Documentation - * on elastic.co - */ - - public final UpdateErrorResponse updateError( - Function> fn) - throws IOException, ElasticsearchException { - return updateError(fn.apply(new UpdateErrorRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_filtering - - /** - * Updates the filtering field in the connector document. - * - * @see Documentation - * on elastic.co - */ - - public UpdateFilteringResponse updateFiltering(UpdateFilteringRequest request) - throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateFilteringRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Updates the filtering field in the connector document. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateFilteringRequest} - * @see Documentation - * on elastic.co - */ - - public final UpdateFilteringResponse updateFiltering( - Function> fn) - throws IOException, ElasticsearchException { - return updateFiltering(fn.apply(new UpdateFilteringRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_filtering_validation - - /** - * Updates the validation info of the draft filtering rules. - * - * @see Documentation - * on elastic.co - */ - - public UpdateFilteringValidationResponse updateFilteringValidation(UpdateFilteringValidationRequest request) - throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateFilteringValidationRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Updates the validation info of the draft filtering rules. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateFilteringValidationRequest} - * @see Documentation - * on elastic.co - */ - - public final UpdateFilteringValidationResponse updateFilteringValidation( - Function> fn) - throws IOException, ElasticsearchException { - return updateFilteringValidation(fn.apply(new UpdateFilteringValidationRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_index_name - - /** - * Updates the index name of the connector. - * - * @see Documentation - * on elastic.co - */ - - public UpdateIndexNameResponse updateIndexName(UpdateIndexNameRequest request) - throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateIndexNameRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Updates the index name of the connector. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateIndexNameRequest} - * @see Documentation - * on elastic.co - */ - - public final UpdateIndexNameResponse updateIndexName( - Function> fn) - throws IOException, ElasticsearchException { - return updateIndexName(fn.apply(new UpdateIndexNameRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_name - - /** - * Updates the name and/or description fields in the connector document. - * - * @see Documentation - * on elastic.co - */ - - public UpdateNameResponse updateName(UpdateNameRequest request) throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateNameRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Updates the name and/or description fields in the connector document. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateNameRequest} - * @see Documentation - * on elastic.co - */ - - public final UpdateNameResponse updateName(Function> fn) - throws IOException, ElasticsearchException { - return updateName(fn.apply(new UpdateNameRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_native - - /** - * Updates the is_native flag of the connector. - * - * @see Documentation - * on elastic.co - */ - - public UpdateNativeResponse updateNative(UpdateNativeRequest request) throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateNativeRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Updates the is_native flag of the connector. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateNativeRequest} - * @see Documentation - * on elastic.co - */ - - public final UpdateNativeResponse updateNative( - Function> fn) - throws IOException, ElasticsearchException { - return updateNative(fn.apply(new UpdateNativeRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_pipeline - - /** - * Updates the pipeline field in the connector document. - * - * @see Documentation - * on elastic.co - */ - - public UpdatePipelineResponse updatePipeline(UpdatePipelineRequest request) - throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdatePipelineRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Updates the pipeline field in the connector document. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdatePipelineRequest} - * @see Documentation - * on elastic.co - */ - - public final UpdatePipelineResponse updatePipeline( - Function> fn) - throws IOException, ElasticsearchException { - return updatePipeline(fn.apply(new UpdatePipelineRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_scheduling - - /** - * Updates the scheduling field in the connector document. - * - * @see Documentation - * on elastic.co - */ - - public UpdateSchedulingResponse updateScheduling(UpdateSchedulingRequest request) - throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateSchedulingRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Updates the scheduling field in the connector document. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateSchedulingRequest} - * @see Documentation - * on elastic.co - */ - - public final UpdateSchedulingResponse updateScheduling( - Function> fn) - throws IOException, ElasticsearchException { - return updateScheduling(fn.apply(new UpdateSchedulingRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_service_type - - /** - * Updates the service type of the connector. - * - * @see Documentation - * on elastic.co - */ - - public UpdateServiceTypeResponse updateServiceType(UpdateServiceTypeRequest request) - throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateServiceTypeRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Updates the service type of the connector. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateServiceTypeRequest} - * @see Documentation - * on elastic.co - */ - - public final UpdateServiceTypeResponse updateServiceType( - Function> fn) - throws IOException, ElasticsearchException { - return updateServiceType(fn.apply(new UpdateServiceTypeRequest.Builder()).build()); - } - - // ----- Endpoint: connector.update_status - - /** - * Updates the status of the connector. - * - * @see Documentation - * on elastic.co - */ - - public UpdateStatusResponse updateStatus(UpdateStatusRequest request) throws IOException, ElasticsearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint) UpdateStatusRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); - } - - /** - * Updates the status of the connector. - * - * @param fn - * a function that initializes a builder to create the - * {@link UpdateStatusRequest} - * @see Documentation - * on elastic.co - */ - - public final UpdateStatusResponse updateStatus( - Function> fn) - throws IOException, ElasticsearchException { - return updateStatus(fn.apply(new UpdateStatusRequest.Builder()).build()); - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FeatureEnabled.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FeatureEnabled.java deleted file mode 100644 index 13d2c8ad6..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FeatureEnabled.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.Boolean; -import java.util.Objects; -import java.util.function.Function; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.FeatureEnabled - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class FeatureEnabled implements JsonpSerializable { - private final boolean enabled; - - // --------------------------------------------------------------------------------------------- - - private FeatureEnabled(Builder builder) { - - this.enabled = ApiTypeHelper.requireNonNull(builder.enabled, this, "enabled"); - - } - - public static FeatureEnabled of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code enabled} - */ - public final boolean enabled() { - return this.enabled; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("enabled"); - generator.write(this.enabled); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link FeatureEnabled}. - */ - - public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - private Boolean enabled; - - /** - * Required - API name: {@code enabled} - */ - public final Builder enabled(boolean value) { - this.enabled = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link FeatureEnabled}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public FeatureEnabled build() { - _checkSingleUse(); - - return new FeatureEnabled(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link FeatureEnabled} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - FeatureEnabled::setupFeatureEnabledDeserializer); - - protected static void setupFeatureEnabledDeserializer(ObjectDeserializer op) { - - op.add(Builder::enabled, JsonpDeserializer.booleanDeserializer(), "enabled"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringAdvancedSnippet.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringAdvancedSnippet.java deleted file mode 100644 index a36839618..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringAdvancedSnippet.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonData; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.DateTime; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.FilteringAdvancedSnippet - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class FilteringAdvancedSnippet implements JsonpSerializable { - @Nullable - private final DateTime createdAt; - - @Nullable - private final DateTime updatedAt; - - private final Map value; - - // --------------------------------------------------------------------------------------------- - - private FilteringAdvancedSnippet(Builder builder) { - - this.createdAt = builder.createdAt; - this.updatedAt = builder.updatedAt; - this.value = ApiTypeHelper.unmodifiableRequired(builder.value, this, "value"); - - } - - public static FilteringAdvancedSnippet of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * API name: {@code created_at} - */ - @Nullable - public final DateTime createdAt() { - return this.createdAt; - } - - /** - * API name: {@code updated_at} - */ - @Nullable - public final DateTime updatedAt() { - return this.updatedAt; - } - - /** - * Required - API name: {@code value} - */ - public final Map value() { - return this.value; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.createdAt != null) { - generator.writeKey("created_at"); - this.createdAt.serialize(generator, mapper); - } - if (this.updatedAt != null) { - generator.writeKey("updated_at"); - this.updatedAt.serialize(generator, mapper); - } - if (ApiTypeHelper.isDefined(this.value)) { - generator.writeKey("value"); - generator.writeStartObject(); - for (Map.Entry item0 : this.value.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - - } - generator.writeEnd(); - - } - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link FilteringAdvancedSnippet}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - @Nullable - private DateTime createdAt; - - @Nullable - private DateTime updatedAt; - - private Map value; - - /** - * API name: {@code created_at} - */ - public final Builder createdAt(@Nullable DateTime value) { - this.createdAt = value; - return this; - } - - /** - * API name: {@code updated_at} - */ - public final Builder updatedAt(@Nullable DateTime value) { - this.updatedAt = value; - return this; - } - - /** - * Required - API name: {@code value} - *

- * Adds all entries of map to value. - */ - public final Builder value(Map map) { - this.value = _mapPutAll(this.value, map); - return this; - } - - /** - * Required - API name: {@code value} - *

- * Adds an entry to value. - */ - public final Builder value(String key, JsonData value) { - this.value = _mapPut(this.value, key, value); - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link FilteringAdvancedSnippet}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public FilteringAdvancedSnippet build() { - _checkSingleUse(); - - return new FilteringAdvancedSnippet(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link FilteringAdvancedSnippet} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, FilteringAdvancedSnippet::setupFilteringAdvancedSnippetDeserializer); - - protected static void setupFilteringAdvancedSnippetDeserializer( - ObjectDeserializer op) { - - op.add(Builder::createdAt, DateTime._DESERIALIZER, "created_at"); - op.add(Builder::updatedAt, DateTime._DESERIALIZER, "updated_at"); - op.add(Builder::value, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "value"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringConfig.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringConfig.java deleted file mode 100644 index de91bfd0e..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringConfig.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.FilteringConfig - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class FilteringConfig implements JsonpSerializable { - private final FilteringRules active; - - private final String domain; - - private final FilteringRules draft; - - // --------------------------------------------------------------------------------------------- - - private FilteringConfig(Builder builder) { - - this.active = ApiTypeHelper.requireNonNull(builder.active, this, "active"); - this.domain = ApiTypeHelper.requireNonNull(builder.domain, this, "domain"); - this.draft = ApiTypeHelper.requireNonNull(builder.draft, this, "draft"); - - } - - public static FilteringConfig of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code active} - */ - public final FilteringRules active() { - return this.active; - } - - /** - * Required - API name: {@code domain} - */ - public final String domain() { - return this.domain; - } - - /** - * Required - API name: {@code draft} - */ - public final FilteringRules draft() { - return this.draft; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("active"); - this.active.serialize(generator, mapper); - - generator.writeKey("domain"); - generator.write(this.domain); - - generator.writeKey("draft"); - this.draft.serialize(generator, mapper); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link FilteringConfig}. - */ - - public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - private FilteringRules active; - - private String domain; - - private FilteringRules draft; - - /** - * Required - API name: {@code active} - */ - public final Builder active(FilteringRules value) { - this.active = value; - return this; - } - - /** - * Required - API name: {@code active} - */ - public final Builder active(Function> fn) { - return this.active(fn.apply(new FilteringRules.Builder()).build()); - } - - /** - * Required - API name: {@code domain} - */ - public final Builder domain(String value) { - this.domain = value; - return this; - } - - /** - * Required - API name: {@code draft} - */ - public final Builder draft(FilteringRules value) { - this.draft = value; - return this; - } - - /** - * Required - API name: {@code draft} - */ - public final Builder draft(Function> fn) { - return this.draft(fn.apply(new FilteringRules.Builder()).build()); - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link FilteringConfig}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public FilteringConfig build() { - _checkSingleUse(); - - return new FilteringConfig(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link FilteringConfig} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - FilteringConfig::setupFilteringConfigDeserializer); - - protected static void setupFilteringConfigDeserializer(ObjectDeserializer op) { - - op.add(Builder::active, FilteringRules._DESERIALIZER, "active"); - op.add(Builder::domain, JsonpDeserializer.stringDeserializer(), "domain"); - op.add(Builder::draft, FilteringRules._DESERIALIZER, "draft"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringPolicy.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringPolicy.java deleted file mode 100644 index e6c3c5d5f..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringPolicy.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonEnum; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public enum FilteringPolicy implements JsonEnum { - Exclude("exclude"), - - Include("include"), - - ; - - private final String jsonValue; - - FilteringPolicy(String jsonValue) { - this.jsonValue = jsonValue; - } - - public String jsonValue() { - return this.jsonValue; - } - - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( - FilteringPolicy.values()); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRule.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRule.java deleted file mode 100644 index 5b7431337..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRule.java +++ /dev/null @@ -1,329 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.DateTime; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.Integer; -import java.lang.String; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.FilteringRule - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class FilteringRule implements JsonpSerializable { - @Nullable - private final DateTime createdAt; - - private final String field; - - private final String id; - - private final int order; - - private final FilteringPolicy policy; - - private final FilteringRuleRule rule; - - @Nullable - private final DateTime updatedAt; - - private final String value; - - // --------------------------------------------------------------------------------------------- - - private FilteringRule(Builder builder) { - - this.createdAt = builder.createdAt; - this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); - this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); - this.order = ApiTypeHelper.requireNonNull(builder.order, this, "order"); - this.policy = ApiTypeHelper.requireNonNull(builder.policy, this, "policy"); - this.rule = ApiTypeHelper.requireNonNull(builder.rule, this, "rule"); - this.updatedAt = builder.updatedAt; - this.value = ApiTypeHelper.requireNonNull(builder.value, this, "value"); - - } - - public static FilteringRule of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * API name: {@code created_at} - */ - @Nullable - public final DateTime createdAt() { - return this.createdAt; - } - - /** - * Required - API name: {@code field} - */ - public final String field() { - return this.field; - } - - /** - * Required - API name: {@code id} - */ - public final String id() { - return this.id; - } - - /** - * Required - API name: {@code order} - */ - public final int order() { - return this.order; - } - - /** - * Required - API name: {@code policy} - */ - public final FilteringPolicy policy() { - return this.policy; - } - - /** - * Required - API name: {@code rule} - */ - public final FilteringRuleRule rule() { - return this.rule; - } - - /** - * API name: {@code updated_at} - */ - @Nullable - public final DateTime updatedAt() { - return this.updatedAt; - } - - /** - * Required - API name: {@code value} - */ - public final String value() { - return this.value; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.createdAt != null) { - generator.writeKey("created_at"); - this.createdAt.serialize(generator, mapper); - } - generator.writeKey("field"); - generator.write(this.field); - - generator.writeKey("id"); - generator.write(this.id); - - generator.writeKey("order"); - generator.write(this.order); - - generator.writeKey("policy"); - this.policy.serialize(generator, mapper); - generator.writeKey("rule"); - this.rule.serialize(generator, mapper); - if (this.updatedAt != null) { - generator.writeKey("updated_at"); - this.updatedAt.serialize(generator, mapper); - } - generator.writeKey("value"); - generator.write(this.value); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link FilteringRule}. - */ - - public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - @Nullable - private DateTime createdAt; - - private String field; - - private String id; - - private Integer order; - - private FilteringPolicy policy; - - private FilteringRuleRule rule; - - @Nullable - private DateTime updatedAt; - - private String value; - - /** - * API name: {@code created_at} - */ - public final Builder createdAt(@Nullable DateTime value) { - this.createdAt = value; - return this; - } - - /** - * Required - API name: {@code field} - */ - public final Builder field(String value) { - this.field = value; - return this; - } - - /** - * Required - API name: {@code id} - */ - public final Builder id(String value) { - this.id = value; - return this; - } - - /** - * Required - API name: {@code order} - */ - public final Builder order(int value) { - this.order = value; - return this; - } - - /** - * Required - API name: {@code policy} - */ - public final Builder policy(FilteringPolicy value) { - this.policy = value; - return this; - } - - /** - * Required - API name: {@code rule} - */ - public final Builder rule(FilteringRuleRule value) { - this.rule = value; - return this; - } - - /** - * API name: {@code updated_at} - */ - public final Builder updatedAt(@Nullable DateTime value) { - this.updatedAt = value; - return this; - } - - /** - * Required - API name: {@code value} - */ - public final Builder value(String value) { - this.value = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link FilteringRule}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public FilteringRule build() { - _checkSingleUse(); - - return new FilteringRule(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link FilteringRule} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - FilteringRule::setupFilteringRuleDeserializer); - - protected static void setupFilteringRuleDeserializer(ObjectDeserializer op) { - - op.add(Builder::createdAt, DateTime._DESERIALIZER, "created_at"); - op.add(Builder::field, JsonpDeserializer.stringDeserializer(), "field"); - op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); - op.add(Builder::order, JsonpDeserializer.integerDeserializer(), "order"); - op.add(Builder::policy, FilteringPolicy._DESERIALIZER, "policy"); - op.add(Builder::rule, FilteringRuleRule._DESERIALIZER, "rule"); - op.add(Builder::updatedAt, DateTime._DESERIALIZER, "updated_at"); - op.add(Builder::value, JsonpDeserializer.stringDeserializer(), "value"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRuleRule.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRuleRule.java deleted file mode 100644 index fe34e7223..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRuleRule.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonEnum; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public enum FilteringRuleRule implements JsonEnum { - Contains("contains"), - - EndsWith("ends_with"), - - Equals("equals"), - - Regex("regex"), - - StartsWith("starts_with"), - - GreaterThan(">"), - - LessThan("<"), - - ; - - private final String jsonValue; - - FilteringRuleRule(String jsonValue) { - this.jsonValue = jsonValue; - } - - public String jsonValue() { - return this.jsonValue; - } - - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( - FilteringRuleRule.values()); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRules.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRules.java deleted file mode 100644 index 577602f7c..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRules.java +++ /dev/null @@ -1,245 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.List; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.FilteringRules - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class FilteringRules implements JsonpSerializable { - private final FilteringAdvancedSnippet advancedSnippet; - - private final List rules; - - private final FilteringRulesValidation validation; - - // --------------------------------------------------------------------------------------------- - - private FilteringRules(Builder builder) { - - this.advancedSnippet = ApiTypeHelper.requireNonNull(builder.advancedSnippet, this, "advancedSnippet"); - this.rules = ApiTypeHelper.unmodifiableRequired(builder.rules, this, "rules"); - this.validation = ApiTypeHelper.requireNonNull(builder.validation, this, "validation"); - - } - - public static FilteringRules of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code advanced_snippet} - */ - public final FilteringAdvancedSnippet advancedSnippet() { - return this.advancedSnippet; - } - - /** - * Required - API name: {@code rules} - */ - public final List rules() { - return this.rules; - } - - /** - * Required - API name: {@code validation} - */ - public final FilteringRulesValidation validation() { - return this.validation; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("advanced_snippet"); - this.advancedSnippet.serialize(generator, mapper); - - if (ApiTypeHelper.isDefined(this.rules)) { - generator.writeKey("rules"); - generator.writeStartArray(); - for (FilteringRule item0 : this.rules) { - item0.serialize(generator, mapper); - - } - generator.writeEnd(); - - } - generator.writeKey("validation"); - this.validation.serialize(generator, mapper); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link FilteringRules}. - */ - - public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - private FilteringAdvancedSnippet advancedSnippet; - - private List rules; - - private FilteringRulesValidation validation; - - /** - * Required - API name: {@code advanced_snippet} - */ - public final Builder advancedSnippet(FilteringAdvancedSnippet value) { - this.advancedSnippet = value; - return this; - } - - /** - * Required - API name: {@code advanced_snippet} - */ - public final Builder advancedSnippet( - Function> fn) { - return this.advancedSnippet(fn.apply(new FilteringAdvancedSnippet.Builder()).build()); - } - - /** - * Required - API name: {@code rules} - *

- * Adds all elements of list to rules. - */ - public final Builder rules(List list) { - this.rules = _listAddAll(this.rules, list); - return this; - } - - /** - * Required - API name: {@code rules} - *

- * Adds one or more values to rules. - */ - public final Builder rules(FilteringRule value, FilteringRule... values) { - this.rules = _listAdd(this.rules, value, values); - return this; - } - - /** - * Required - API name: {@code rules} - *

- * Adds a value to rules using a builder lambda. - */ - public final Builder rules(Function> fn) { - return rules(fn.apply(new FilteringRule.Builder()).build()); - } - - /** - * Required - API name: {@code validation} - */ - public final Builder validation(FilteringRulesValidation value) { - this.validation = value; - return this; - } - - /** - * Required - API name: {@code validation} - */ - public final Builder validation( - Function> fn) { - return this.validation(fn.apply(new FilteringRulesValidation.Builder()).build()); - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link FilteringRules}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public FilteringRules build() { - _checkSingleUse(); - - return new FilteringRules(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link FilteringRules} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - FilteringRules::setupFilteringRulesDeserializer); - - protected static void setupFilteringRulesDeserializer(ObjectDeserializer op) { - - op.add(Builder::advancedSnippet, FilteringAdvancedSnippet._DESERIALIZER, "advanced_snippet"); - op.add(Builder::rules, JsonpDeserializer.arrayDeserializer(FilteringRule._DESERIALIZER), "rules"); - op.add(Builder::validation, FilteringRulesValidation._DESERIALIZER, "validation"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRulesValidation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRulesValidation.java deleted file mode 100644 index ca7c7f02f..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRulesValidation.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.List; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.FilteringRulesValidation - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class FilteringRulesValidation implements JsonpSerializable { - private final List errors; - - private final FilteringValidationState state; - - // --------------------------------------------------------------------------------------------- - - private FilteringRulesValidation(Builder builder) { - - this.errors = ApiTypeHelper.unmodifiableRequired(builder.errors, this, "errors"); - this.state = ApiTypeHelper.requireNonNull(builder.state, this, "state"); - - } - - public static FilteringRulesValidation of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code errors} - */ - public final List errors() { - return this.errors; - } - - /** - * Required - API name: {@code state} - */ - public final FilteringValidationState state() { - return this.state; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (ApiTypeHelper.isDefined(this.errors)) { - generator.writeKey("errors"); - generator.writeStartArray(); - for (FilteringValidation item0 : this.errors) { - item0.serialize(generator, mapper); - - } - generator.writeEnd(); - - } - generator.writeKey("state"); - this.state.serialize(generator, mapper); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link FilteringRulesValidation}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private List errors; - - private FilteringValidationState state; - - /** - * Required - API name: {@code errors} - *

- * Adds all elements of list to errors. - */ - public final Builder errors(List list) { - this.errors = _listAddAll(this.errors, list); - return this; - } - - /** - * Required - API name: {@code errors} - *

- * Adds one or more values to errors. - */ - public final Builder errors(FilteringValidation value, FilteringValidation... values) { - this.errors = _listAdd(this.errors, value, values); - return this; - } - - /** - * Required - API name: {@code errors} - *

- * Adds a value to errors using a builder lambda. - */ - public final Builder errors(Function> fn) { - return errors(fn.apply(new FilteringValidation.Builder()).build()); - } - - /** - * Required - API name: {@code state} - */ - public final Builder state(FilteringValidationState value) { - this.state = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link FilteringRulesValidation}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public FilteringRulesValidation build() { - _checkSingleUse(); - - return new FilteringRulesValidation(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link FilteringRulesValidation} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, FilteringRulesValidation::setupFilteringRulesValidationDeserializer); - - protected static void setupFilteringRulesValidationDeserializer( - ObjectDeserializer op) { - - op.add(Builder::errors, JsonpDeserializer.arrayDeserializer(FilteringValidation._DESERIALIZER), "errors"); - op.add(Builder::state, FilteringValidationState._DESERIALIZER, "state"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringValidation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringValidation.java deleted file mode 100644 index b97f661e2..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringValidation.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.List; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.FilteringValidation - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class FilteringValidation implements JsonpSerializable { - private final List ids; - - private final List messages; - - // --------------------------------------------------------------------------------------------- - - private FilteringValidation(Builder builder) { - - this.ids = ApiTypeHelper.unmodifiableRequired(builder.ids, this, "ids"); - this.messages = ApiTypeHelper.unmodifiableRequired(builder.messages, this, "messages"); - - } - - public static FilteringValidation of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code ids} - */ - public final List ids() { - return this.ids; - } - - /** - * Required - API name: {@code messages} - */ - public final List messages() { - return this.messages; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (ApiTypeHelper.isDefined(this.ids)) { - generator.writeKey("ids"); - generator.writeStartArray(); - for (String item0 : this.ids) { - generator.write(item0); - - } - generator.writeEnd(); - - } - if (ApiTypeHelper.isDefined(this.messages)) { - generator.writeKey("messages"); - generator.writeStartArray(); - for (String item0 : this.messages) { - generator.write(item0); - - } - generator.writeEnd(); - - } - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link FilteringValidation}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private List ids; - - private List messages; - - /** - * Required - API name: {@code ids} - *

- * Adds all elements of list to ids. - */ - public final Builder ids(List list) { - this.ids = _listAddAll(this.ids, list); - return this; - } - - /** - * Required - API name: {@code ids} - *

- * Adds one or more values to ids. - */ - public final Builder ids(String value, String... values) { - this.ids = _listAdd(this.ids, value, values); - return this; - } - - /** - * Required - API name: {@code messages} - *

- * Adds all elements of list to messages. - */ - public final Builder messages(List list) { - this.messages = _listAddAll(this.messages, list); - return this; - } - - /** - * Required - API name: {@code messages} - *

- * Adds one or more values to messages. - */ - public final Builder messages(String value, String... values) { - this.messages = _listAdd(this.messages, value, values); - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link FilteringValidation}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public FilteringValidation build() { - _checkSingleUse(); - - return new FilteringValidation(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link FilteringValidation} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, FilteringValidation::setupFilteringValidationDeserializer); - - protected static void setupFilteringValidationDeserializer(ObjectDeserializer op) { - - op.add(Builder::ids, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "ids"); - op.add(Builder::messages, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), - "messages"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringValidationState.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringValidationState.java deleted file mode 100644 index 1111f24d1..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringValidationState.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonEnum; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public enum FilteringValidationState implements JsonEnum { - Edited("edited"), - - Invalid("invalid"), - - Valid("valid"), - - ; - - private final String jsonValue; - - FilteringValidationState(String jsonValue) { - this.jsonValue = jsonValue; - } - - public String jsonValue() { - return this.jsonValue; - } - - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( - FilteringValidationState.values()); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorRequest.java deleted file mode 100644 index 9d9cd9328..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorRequest.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.get.Request - -/** - * Retrieves a connector. - * - * @see API - * specification - */ - -public class GetConnectorRequest extends RequestBase { - private final String connectorId; - - // --------------------------------------------------------------------------------------------- - - private GetConnectorRequest(Builder builder) { - - this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); - - } - - public static GetConnectorRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - The unique identifier of the connector - *

- * API name: {@code connector_id} - */ - public final String connectorId() { - return this.connectorId; - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link GetConnectorRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder - implements - ObjectBuilder { - private String connectorId; - - /** - * Required - The unique identifier of the connector - *

- * API name: {@code connector_id} - */ - public final Builder connectorId(String value) { - this.connectorId = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link GetConnectorRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public GetConnectorRequest build() { - _checkSingleUse(); - - return new GetConnectorRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.get}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.get", - - // Request method - request -> { - return "GET"; - - }, - - // Request path - request -> { - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_connector"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.connectorId, buf); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); - - }, - - // Path parameters - request -> { - Map params = new HashMap<>(); - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - params.put("connectorId", request.connectorId); - } - return params; - }, - - // Request parameters - request -> { - return Collections.emptyMap(); - - }, SimpleEndpoint.emptyMap(), false, GetConnectorResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorResponse.java deleted file mode 100644 index d4b9fc44a..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorResponse.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.get.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class GetConnectorResponse extends Connector { - // --------------------------------------------------------------------------------------------- - - private GetConnectorResponse(Builder builder) { - super(builder); - - } - - public static GetConnectorResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link GetConnectorResponse}. - */ - - public static class Builder extends Connector.AbstractBuilder - implements - ObjectBuilder { - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link GetConnectorResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public GetConnectorResponse build() { - _checkSingleUse(); - - return new GetConnectorResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link GetConnectorResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, GetConnectorResponse::setupGetConnectorResponseDeserializer); - - protected static void setupGetConnectorResponseDeserializer(ObjectDeserializer op) { - Connector.setupConnectorDeserializer(op); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/GreaterThanValidation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/GreaterThanValidation.java deleted file mode 100644 index 44e5bb722..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/GreaterThanValidation.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.Double; -import java.util.Objects; -import java.util.function.Function; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.GreaterThanValidation - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class GreaterThanValidation implements ValidationVariant, JsonpSerializable { - private final double constraint; - - // --------------------------------------------------------------------------------------------- - - private GreaterThanValidation(Builder builder) { - - this.constraint = ApiTypeHelper.requireNonNull(builder.constraint, this, "constraint"); - - } - - public static GreaterThanValidation of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Validation variant kind. - */ - @Override - public Validation.Kind _validationKind() { - return Validation.Kind.GreaterThan; - } - - /** - * Required - API name: {@code constraint} - */ - public final double constraint() { - return this.constraint; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.write("type", "greater_than"); - - generator.writeKey("constraint"); - generator.write(this.constraint); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link GreaterThanValidation}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private Double constraint; - - /** - * Required - API name: {@code constraint} - */ - public final Builder constraint(double value) { - this.constraint = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link GreaterThanValidation}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public GreaterThanValidation build() { - _checkSingleUse(); - - return new GreaterThanValidation(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link GreaterThanValidation} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, GreaterThanValidation::setupGreaterThanValidationDeserializer); - - protected static void setupGreaterThanValidationDeserializer(ObjectDeserializer op) { - - op.add(Builder::constraint, JsonpDeserializer.doubleDeserializer(), "constraint"); - - op.ignore("type"); - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/IncludedInValidation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/IncludedInValidation.java deleted file mode 100644 index d98d61fb8..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/IncludedInValidation.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.IncludedInValidation - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class IncludedInValidation implements ValidationVariant, JsonpSerializable { - private final String constraint; - - // --------------------------------------------------------------------------------------------- - - private IncludedInValidation(Builder builder) { - - this.constraint = ApiTypeHelper.requireNonNull(builder.constraint, this, "constraint"); - - } - - public static IncludedInValidation of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Validation variant kind. - */ - @Override - public Validation.Kind _validationKind() { - return Validation.Kind.IncludedIn; - } - - /** - * Required - API name: {@code constraint} - */ - public final String constraint() { - return this.constraint; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.write("type", "included_in"); - - generator.writeKey("constraint"); - generator.write(this.constraint); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link IncludedInValidation}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private String constraint; - - /** - * Required - API name: {@code constraint} - */ - public final Builder constraint(String value) { - this.constraint = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link IncludedInValidation}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public IncludedInValidation build() { - _checkSingleUse(); - - return new IncludedInValidation(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link IncludedInValidation} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, IncludedInValidation::setupIncludedInValidationDeserializer); - - protected static void setupIncludedInValidationDeserializer(ObjectDeserializer op) { - - op.add(Builder::constraint, JsonpDeserializer.stringDeserializer(), "constraint"); - - op.ignore("type"); - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/IngestPipelineParams.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/IngestPipelineParams.java deleted file mode 100644 index d6ae02a2b..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/IngestPipelineParams.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.Boolean; -import java.lang.String; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.IngestPipelineParams - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class IngestPipelineParams implements JsonpSerializable { - private final boolean extractBinaryContent; - - private final String name; - - private final boolean reduceWhitespace; - - private final boolean runMlInference; - - // --------------------------------------------------------------------------------------------- - - private IngestPipelineParams(Builder builder) { - - this.extractBinaryContent = ApiTypeHelper.requireNonNull(builder.extractBinaryContent, this, - "extractBinaryContent"); - this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); - this.reduceWhitespace = ApiTypeHelper.requireNonNull(builder.reduceWhitespace, this, "reduceWhitespace"); - this.runMlInference = ApiTypeHelper.requireNonNull(builder.runMlInference, this, "runMlInference"); - - } - - public static IngestPipelineParams of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code extract_binary_content} - */ - public final boolean extractBinaryContent() { - return this.extractBinaryContent; - } - - /** - * Required - API name: {@code name} - */ - public final String name() { - return this.name; - } - - /** - * Required - API name: {@code reduce_whitespace} - */ - public final boolean reduceWhitespace() { - return this.reduceWhitespace; - } - - /** - * Required - API name: {@code run_ml_inference} - */ - public final boolean runMlInference() { - return this.runMlInference; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("extract_binary_content"); - generator.write(this.extractBinaryContent); - - generator.writeKey("name"); - generator.write(this.name); - - generator.writeKey("reduce_whitespace"); - generator.write(this.reduceWhitespace); - - generator.writeKey("run_ml_inference"); - generator.write(this.runMlInference); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link IngestPipelineParams}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private Boolean extractBinaryContent; - - private String name; - - private Boolean reduceWhitespace; - - private Boolean runMlInference; - - /** - * Required - API name: {@code extract_binary_content} - */ - public final Builder extractBinaryContent(boolean value) { - this.extractBinaryContent = value; - return this; - } - - /** - * Required - API name: {@code name} - */ - public final Builder name(String value) { - this.name = value; - return this; - } - - /** - * Required - API name: {@code reduce_whitespace} - */ - public final Builder reduceWhitespace(boolean value) { - this.reduceWhitespace = value; - return this; - } - - /** - * Required - API name: {@code run_ml_inference} - */ - public final Builder runMlInference(boolean value) { - this.runMlInference = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link IngestPipelineParams}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public IngestPipelineParams build() { - _checkSingleUse(); - - return new IngestPipelineParams(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link IngestPipelineParams} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, IngestPipelineParams::setupIngestPipelineParamsDeserializer); - - protected static void setupIngestPipelineParamsDeserializer(ObjectDeserializer op) { - - op.add(Builder::extractBinaryContent, JsonpDeserializer.booleanDeserializer(), "extract_binary_content"); - op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); - op.add(Builder::reduceWhitespace, JsonpDeserializer.booleanDeserializer(), "reduce_whitespace"); - op.add(Builder::runMlInference, JsonpDeserializer.booleanDeserializer(), "run_ml_inference"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/LastSyncRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/LastSyncRequest.java deleted file mode 100644 index a114e3892..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/LastSyncRequest.java +++ /dev/null @@ -1,525 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.DateTime; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.Long; -import java.lang.String; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.last_sync.Request - -/** - * Updates last sync stats in the connector document - * - * @see API - * specification - */ -@JsonpDeserializable -public class LastSyncRequest extends RequestBase implements JsonpSerializable { - private final String connectorId; - - @Nullable - private final String lastAccessControlSyncError; - - @Nullable - private final DateTime lastAccessControlSyncScheduledAt; - - @Nullable - private final SyncStatus lastAccessControlSyncStatus; - - @Nullable - private final Long lastDeletedDocumentCount; - - @Nullable - private final DateTime lastIncrementalSyncScheduledAt; - - @Nullable - private final Long lastIndexedDocumentCount; - - @Nullable - private final DateTime lastSeen; - - @Nullable - private final String lastSyncError; - - @Nullable - private final DateTime lastSyncScheduledAt; - - @Nullable - private final SyncStatus lastSyncStatus; - - @Nullable - private final DateTime lastSynced; - - // --------------------------------------------------------------------------------------------- - - private LastSyncRequest(Builder builder) { - - this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); - this.lastAccessControlSyncError = builder.lastAccessControlSyncError; - this.lastAccessControlSyncScheduledAt = builder.lastAccessControlSyncScheduledAt; - this.lastAccessControlSyncStatus = builder.lastAccessControlSyncStatus; - this.lastDeletedDocumentCount = builder.lastDeletedDocumentCount; - this.lastIncrementalSyncScheduledAt = builder.lastIncrementalSyncScheduledAt; - this.lastIndexedDocumentCount = builder.lastIndexedDocumentCount; - this.lastSeen = builder.lastSeen; - this.lastSyncError = builder.lastSyncError; - this.lastSyncScheduledAt = builder.lastSyncScheduledAt; - this.lastSyncStatus = builder.lastSyncStatus; - this.lastSynced = builder.lastSynced; - - } - - public static LastSyncRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final String connectorId() { - return this.connectorId; - } - - /** - * API name: {@code last_access_control_sync_error} - */ - @Nullable - public final String lastAccessControlSyncError() { - return this.lastAccessControlSyncError; - } - - /** - * API name: {@code last_access_control_sync_scheduled_at} - */ - @Nullable - public final DateTime lastAccessControlSyncScheduledAt() { - return this.lastAccessControlSyncScheduledAt; - } - - /** - * API name: {@code last_access_control_sync_status} - */ - @Nullable - public final SyncStatus lastAccessControlSyncStatus() { - return this.lastAccessControlSyncStatus; - } - - /** - * API name: {@code last_deleted_document_count} - */ - @Nullable - public final Long lastDeletedDocumentCount() { - return this.lastDeletedDocumentCount; - } - - /** - * API name: {@code last_incremental_sync_scheduled_at} - */ - @Nullable - public final DateTime lastIncrementalSyncScheduledAt() { - return this.lastIncrementalSyncScheduledAt; - } - - /** - * API name: {@code last_indexed_document_count} - */ - @Nullable - public final Long lastIndexedDocumentCount() { - return this.lastIndexedDocumentCount; - } - - /** - * API name: {@code last_seen} - */ - @Nullable - public final DateTime lastSeen() { - return this.lastSeen; - } - - /** - * API name: {@code last_sync_error} - */ - @Nullable - public final String lastSyncError() { - return this.lastSyncError; - } - - /** - * API name: {@code last_sync_scheduled_at} - */ - @Nullable - public final DateTime lastSyncScheduledAt() { - return this.lastSyncScheduledAt; - } - - /** - * API name: {@code last_sync_status} - */ - @Nullable - public final SyncStatus lastSyncStatus() { - return this.lastSyncStatus; - } - - /** - * API name: {@code last_synced} - */ - @Nullable - public final DateTime lastSynced() { - return this.lastSynced; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.lastAccessControlSyncError != null) { - generator.writeKey("last_access_control_sync_error"); - generator.write(this.lastAccessControlSyncError); - - } - if (this.lastAccessControlSyncScheduledAt != null) { - generator.writeKey("last_access_control_sync_scheduled_at"); - this.lastAccessControlSyncScheduledAt.serialize(generator, mapper); - } - if (this.lastAccessControlSyncStatus != null) { - generator.writeKey("last_access_control_sync_status"); - this.lastAccessControlSyncStatus.serialize(generator, mapper); - } - if (this.lastDeletedDocumentCount != null) { - generator.writeKey("last_deleted_document_count"); - generator.write(this.lastDeletedDocumentCount); - - } - if (this.lastIncrementalSyncScheduledAt != null) { - generator.writeKey("last_incremental_sync_scheduled_at"); - this.lastIncrementalSyncScheduledAt.serialize(generator, mapper); - } - if (this.lastIndexedDocumentCount != null) { - generator.writeKey("last_indexed_document_count"); - generator.write(this.lastIndexedDocumentCount); - - } - if (this.lastSeen != null) { - generator.writeKey("last_seen"); - this.lastSeen.serialize(generator, mapper); - } - if (this.lastSyncError != null) { - generator.writeKey("last_sync_error"); - generator.write(this.lastSyncError); - - } - if (this.lastSyncScheduledAt != null) { - generator.writeKey("last_sync_scheduled_at"); - this.lastSyncScheduledAt.serialize(generator, mapper); - } - if (this.lastSyncStatus != null) { - generator.writeKey("last_sync_status"); - this.lastSyncStatus.serialize(generator, mapper); - } - if (this.lastSynced != null) { - generator.writeKey("last_synced"); - this.lastSynced.serialize(generator, mapper); - } - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link LastSyncRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { - private String connectorId; - - @Nullable - private String lastAccessControlSyncError; - - @Nullable - private DateTime lastAccessControlSyncScheduledAt; - - @Nullable - private SyncStatus lastAccessControlSyncStatus; - - @Nullable - private Long lastDeletedDocumentCount; - - @Nullable - private DateTime lastIncrementalSyncScheduledAt; - - @Nullable - private Long lastIndexedDocumentCount; - - @Nullable - private DateTime lastSeen; - - @Nullable - private String lastSyncError; - - @Nullable - private DateTime lastSyncScheduledAt; - - @Nullable - private SyncStatus lastSyncStatus; - - @Nullable - private DateTime lastSynced; - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final Builder connectorId(String value) { - this.connectorId = value; - return this; - } - - /** - * API name: {@code last_access_control_sync_error} - */ - public final Builder lastAccessControlSyncError(@Nullable String value) { - this.lastAccessControlSyncError = value; - return this; - } - - /** - * API name: {@code last_access_control_sync_scheduled_at} - */ - public final Builder lastAccessControlSyncScheduledAt(@Nullable DateTime value) { - this.lastAccessControlSyncScheduledAt = value; - return this; - } - - /** - * API name: {@code last_access_control_sync_status} - */ - public final Builder lastAccessControlSyncStatus(@Nullable SyncStatus value) { - this.lastAccessControlSyncStatus = value; - return this; - } - - /** - * API name: {@code last_deleted_document_count} - */ - public final Builder lastDeletedDocumentCount(@Nullable Long value) { - this.lastDeletedDocumentCount = value; - return this; - } - - /** - * API name: {@code last_incremental_sync_scheduled_at} - */ - public final Builder lastIncrementalSyncScheduledAt(@Nullable DateTime value) { - this.lastIncrementalSyncScheduledAt = value; - return this; - } - - /** - * API name: {@code last_indexed_document_count} - */ - public final Builder lastIndexedDocumentCount(@Nullable Long value) { - this.lastIndexedDocumentCount = value; - return this; - } - - /** - * API name: {@code last_seen} - */ - public final Builder lastSeen(@Nullable DateTime value) { - this.lastSeen = value; - return this; - } - - /** - * API name: {@code last_sync_error} - */ - public final Builder lastSyncError(@Nullable String value) { - this.lastSyncError = value; - return this; - } - - /** - * API name: {@code last_sync_scheduled_at} - */ - public final Builder lastSyncScheduledAt(@Nullable DateTime value) { - this.lastSyncScheduledAt = value; - return this; - } - - /** - * API name: {@code last_sync_status} - */ - public final Builder lastSyncStatus(@Nullable SyncStatus value) { - this.lastSyncStatus = value; - return this; - } - - /** - * API name: {@code last_synced} - */ - public final Builder lastSynced(@Nullable DateTime value) { - this.lastSynced = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link LastSyncRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public LastSyncRequest build() { - _checkSingleUse(); - - return new LastSyncRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link LastSyncRequest} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - LastSyncRequest::setupLastSyncRequestDeserializer); - - protected static void setupLastSyncRequestDeserializer(ObjectDeserializer op) { - - op.add(Builder::lastAccessControlSyncError, JsonpDeserializer.stringDeserializer(), - "last_access_control_sync_error"); - op.add(Builder::lastAccessControlSyncScheduledAt, DateTime._DESERIALIZER, - "last_access_control_sync_scheduled_at"); - op.add(Builder::lastAccessControlSyncStatus, SyncStatus._DESERIALIZER, "last_access_control_sync_status"); - op.add(Builder::lastDeletedDocumentCount, JsonpDeserializer.longDeserializer(), "last_deleted_document_count"); - op.add(Builder::lastIncrementalSyncScheduledAt, DateTime._DESERIALIZER, "last_incremental_sync_scheduled_at"); - op.add(Builder::lastIndexedDocumentCount, JsonpDeserializer.longDeserializer(), "last_indexed_document_count"); - op.add(Builder::lastSeen, DateTime._DESERIALIZER, "last_seen"); - op.add(Builder::lastSyncError, JsonpDeserializer.stringDeserializer(), "last_sync_error"); - op.add(Builder::lastSyncScheduledAt, DateTime._DESERIALIZER, "last_sync_scheduled_at"); - op.add(Builder::lastSyncStatus, SyncStatus._DESERIALIZER, "last_sync_status"); - op.add(Builder::lastSynced, DateTime._DESERIALIZER, "last_synced"); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.last_sync}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.last_sync", - - // Request method - request -> { - return "PUT"; - - }, - - // Request path - request -> { - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_connector"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.connectorId, buf); - buf.append("/_last_sync"); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); - - }, - - // Path parameters - request -> { - Map params = new HashMap<>(); - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - params.put("connectorId", request.connectorId); - } - return params; - }, - - // Request parameters - request -> { - return Collections.emptyMap(); - - }, SimpleEndpoint.emptyMap(), true, LastSyncResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/LastSyncResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/LastSyncResponse.java deleted file mode 100644 index f8677088a..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/LastSyncResponse.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.Result; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.last_sync.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class LastSyncResponse implements JsonpSerializable { - private final Result result; - - // --------------------------------------------------------------------------------------------- - - private LastSyncResponse(Builder builder) { - - this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); - - } - - public static LastSyncResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code result} - */ - public final Result result() { - return this.result; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("result"); - this.result.serialize(generator, mapper); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link LastSyncResponse}. - */ - - public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - private Result result; - - /** - * Required - API name: {@code result} - */ - public final Builder result(Result value) { - this.result = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link LastSyncResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public LastSyncResponse build() { - _checkSingleUse(); - - return new LastSyncResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link LastSyncResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - LastSyncResponse::setupLastSyncResponseDeserializer); - - protected static void setupLastSyncResponseDeserializer(ObjectDeserializer op) { - - op.add(Builder::result, Result._DESERIALIZER, "result"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/LessThanValidation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/LessThanValidation.java deleted file mode 100644 index 8ea89d561..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/LessThanValidation.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.Double; -import java.util.Objects; -import java.util.function.Function; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.LessThanValidation - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class LessThanValidation implements ValidationVariant, JsonpSerializable { - private final double constraint; - - // --------------------------------------------------------------------------------------------- - - private LessThanValidation(Builder builder) { - - this.constraint = ApiTypeHelper.requireNonNull(builder.constraint, this, "constraint"); - - } - - public static LessThanValidation of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Validation variant kind. - */ - @Override - public Validation.Kind _validationKind() { - return Validation.Kind.LessThan; - } - - /** - * Required - API name: {@code constraint} - */ - public final double constraint() { - return this.constraint; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.write("type", "less_than"); - - generator.writeKey("constraint"); - generator.write(this.constraint); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link LessThanValidation}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private Double constraint; - - /** - * Required - API name: {@code constraint} - */ - public final Builder constraint(double value) { - this.constraint = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link LessThanValidation}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public LessThanValidation build() { - _checkSingleUse(); - - return new LessThanValidation(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link LessThanValidation} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, LessThanValidation::setupLessThanValidationDeserializer); - - protected static void setupLessThanValidationDeserializer(ObjectDeserializer op) { - - op.add(Builder::constraint, JsonpDeserializer.doubleDeserializer(), "constraint"); - - op.ignore("type"); - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ListRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ListRequest.java deleted file mode 100644 index c290e19f7..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ListRequest.java +++ /dev/null @@ -1,362 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.Integer; -import java.lang.String; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import java.util.stream.Collectors; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.list.Request - -/** - * Returns existing connectors. - * - * @see API - * specification - */ - -public class ListRequest extends RequestBase { - private final List connectorName; - - @Nullable - private final Integer from; - - private final List indexName; - - @Nullable - private final String query; - - private final List serviceType; - - @Nullable - private final Integer size; - - // --------------------------------------------------------------------------------------------- - - private ListRequest(Builder builder) { - - this.connectorName = ApiTypeHelper.unmodifiable(builder.connectorName); - this.from = builder.from; - this.indexName = ApiTypeHelper.unmodifiable(builder.indexName); - this.query = builder.query; - this.serviceType = ApiTypeHelper.unmodifiable(builder.serviceType); - this.size = builder.size; - - } - - public static ListRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * A comma-separated list of connector names to fetch connector documents for - *

- * API name: {@code connector_name} - */ - public final List connectorName() { - return this.connectorName; - } - - /** - * Starting offset (default: 0) - *

- * API name: {@code from} - */ - @Nullable - public final Integer from() { - return this.from; - } - - /** - * A comma-separated list of connector index names to fetch connector documents - * for - *

- * API name: {@code index_name} - */ - public final List indexName() { - return this.indexName; - } - - /** - * A wildcard query string that filters connectors with matching name, - * description or index name - *

- * API name: {@code query} - */ - @Nullable - public final String query() { - return this.query; - } - - /** - * A comma-separated list of connector service types to fetch connector - * documents for - *

- * API name: {@code service_type} - */ - public final List serviceType() { - return this.serviceType; - } - - /** - * Specifies a max number of results to get - *

- * API name: {@code size} - */ - @Nullable - public final Integer size() { - return this.size; - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link ListRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { - @Nullable - private List connectorName; - - @Nullable - private Integer from; - - @Nullable - private List indexName; - - @Nullable - private String query; - - @Nullable - private List serviceType; - - @Nullable - private Integer size; - - /** - * A comma-separated list of connector names to fetch connector documents for - *

- * API name: {@code connector_name} - *

- * Adds all elements of list to connectorName. - */ - public final Builder connectorName(List list) { - this.connectorName = _listAddAll(this.connectorName, list); - return this; - } - - /** - * A comma-separated list of connector names to fetch connector documents for - *

- * API name: {@code connector_name} - *

- * Adds one or more values to connectorName. - */ - public final Builder connectorName(String value, String... values) { - this.connectorName = _listAdd(this.connectorName, value, values); - return this; - } - - /** - * Starting offset (default: 0) - *

- * API name: {@code from} - */ - public final Builder from(@Nullable Integer value) { - this.from = value; - return this; - } - - /** - * A comma-separated list of connector index names to fetch connector documents - * for - *

- * API name: {@code index_name} - *

- * Adds all elements of list to indexName. - */ - public final Builder indexName(List list) { - this.indexName = _listAddAll(this.indexName, list); - return this; - } - - /** - * A comma-separated list of connector index names to fetch connector documents - * for - *

- * API name: {@code index_name} - *

- * Adds one or more values to indexName. - */ - public final Builder indexName(String value, String... values) { - this.indexName = _listAdd(this.indexName, value, values); - return this; - } - - /** - * A wildcard query string that filters connectors with matching name, - * description or index name - *

- * API name: {@code query} - */ - public final Builder query(@Nullable String value) { - this.query = value; - return this; - } - - /** - * A comma-separated list of connector service types to fetch connector - * documents for - *

- * API name: {@code service_type} - *

- * Adds all elements of list to serviceType. - */ - public final Builder serviceType(List list) { - this.serviceType = _listAddAll(this.serviceType, list); - return this; - } - - /** - * A comma-separated list of connector service types to fetch connector - * documents for - *

- * API name: {@code service_type} - *

- * Adds one or more values to serviceType. - */ - public final Builder serviceType(String value, String... values) { - this.serviceType = _listAdd(this.serviceType, value, values); - return this; - } - - /** - * Specifies a max number of results to get - *

- * API name: {@code size} - */ - public final Builder size(@Nullable Integer value) { - this.size = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link ListRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public ListRequest build() { - _checkSingleUse(); - - return new ListRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.list}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.list", - - // Request method - request -> { - return "GET"; - - }, - - // Request path - request -> { - return "/_connector"; - - }, - - // Path parameters - request -> { - return Collections.emptyMap(); - }, - - // Request parameters - request -> { - Map params = new HashMap<>(); - if (ApiTypeHelper.isDefined(request.serviceType)) { - params.put("service_type", - request.serviceType.stream().map(v -> v).collect(Collectors.joining(","))); - } - if (request.size != null) { - params.put("size", String.valueOf(request.size)); - } - if (request.query != null) { - params.put("query", request.query); - } - if (request.from != null) { - params.put("from", String.valueOf(request.from)); - } - if (ApiTypeHelper.isDefined(request.connectorName)) { - params.put("connector_name", - request.connectorName.stream().map(v -> v).collect(Collectors.joining(","))); - } - if (ApiTypeHelper.isDefined(request.indexName)) { - params.put("index_name", request.indexName.stream().map(v -> v).collect(Collectors.joining(","))); - } - return params; - - }, SimpleEndpoint.emptyMap(), false, ListResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ListResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ListResponse.java deleted file mode 100644 index fab2f74c1..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ListResponse.java +++ /dev/null @@ -1,207 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.Long; -import java.util.List; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.list.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class ListResponse implements JsonpSerializable { - private final long count; - - private final List results; - - // --------------------------------------------------------------------------------------------- - - private ListResponse(Builder builder) { - - this.count = ApiTypeHelper.requireNonNull(builder.count, this, "count"); - this.results = ApiTypeHelper.unmodifiableRequired(builder.results, this, "results"); - - } - - public static ListResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code count} - */ - public final long count() { - return this.count; - } - - /** - * Required - API name: {@code results} - */ - public final List results() { - return this.results; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("count"); - generator.write(this.count); - - if (ApiTypeHelper.isDefined(this.results)) { - generator.writeKey("results"); - generator.writeStartArray(); - for (Connector item0 : this.results) { - item0.serialize(generator, mapper); - - } - generator.writeEnd(); - - } - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link ListResponse}. - */ - - public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - private Long count; - - private List results; - - /** - * Required - API name: {@code count} - */ - public final Builder count(long value) { - this.count = value; - return this; - } - - /** - * Required - API name: {@code results} - *

- * Adds all elements of list to results. - */ - public final Builder results(List list) { - this.results = _listAddAll(this.results, list); - return this; - } - - /** - * Required - API name: {@code results} - *

- * Adds one or more values to results. - */ - public final Builder results(Connector value, Connector... values) { - this.results = _listAdd(this.results, value, values); - return this; - } - - /** - * Required - API name: {@code results} - *

- * Adds a value to results using a builder lambda. - */ - public final Builder results(Function> fn) { - return results(fn.apply(new Connector.Builder()).build()); - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link ListResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public ListResponse build() { - _checkSingleUse(); - - return new ListResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link ListResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - ListResponse::setupListResponseDeserializer); - - protected static void setupListResponseDeserializer(ObjectDeserializer op) { - - op.add(Builder::count, JsonpDeserializer.longDeserializer(), "count"); - op.add(Builder::results, JsonpDeserializer.arrayDeserializer(Connector._DESERIALIZER), "results"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ListTypeValidation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ListTypeValidation.java deleted file mode 100644 index 046e8c90b..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ListTypeValidation.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.FieldValue; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.List; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.ListTypeValidation - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class ListTypeValidation implements ValidationVariant, JsonpSerializable { - private final List constraint; - - // --------------------------------------------------------------------------------------------- - - private ListTypeValidation(Builder builder) { - - this.constraint = ApiTypeHelper.unmodifiableRequired(builder.constraint, this, "constraint"); - - } - - public static ListTypeValidation of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Validation variant kind. - */ - @Override - public Validation.Kind _validationKind() { - return Validation.Kind.ListType; - } - - /** - * Required - API name: {@code constraint} - */ - public final List constraint() { - return this.constraint; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.write("type", "list_type"); - - if (ApiTypeHelper.isDefined(this.constraint)) { - generator.writeKey("constraint"); - generator.writeStartArray(); - for (FieldValue item0 : this.constraint) { - item0.serialize(generator, mapper); - - } - generator.writeEnd(); - - } - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link ListTypeValidation}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private List constraint; - - /** - * Required - API name: {@code constraint} - *

- * Adds all elements of list to constraint. - */ - public final Builder constraint(List list) { - this.constraint = _listAddAll(this.constraint, list); - return this; - } - - /** - * Required - API name: {@code constraint} - *

- * Adds one or more values to constraint. - */ - public final Builder constraint(FieldValue value, FieldValue... values) { - this.constraint = _listAdd(this.constraint, value, values); - return this; - } - - /** - * Required - API name: {@code constraint} - *

- * Adds a value to constraint using a builder lambda. - */ - public final Builder constraint(Function> fn) { - return constraint(fn.apply(new FieldValue.Builder()).build()); - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link ListTypeValidation}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public ListTypeValidation build() { - _checkSingleUse(); - - return new ListTypeValidation(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link ListTypeValidation} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, ListTypeValidation::setupListTypeValidationDeserializer); - - protected static void setupListTypeValidationDeserializer(ObjectDeserializer op) { - - op.add(Builder::constraint, JsonpDeserializer.arrayDeserializer(FieldValue._DESERIALIZER), "constraint"); - - op.ignore("type"); - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/PostRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/PostRequest.java deleted file mode 100644 index 6cf94f423..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/PostRequest.java +++ /dev/null @@ -1,329 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.Boolean; -import java.lang.String; -import java.util.Collections; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.post.Request - -/** - * Creates a connector. - * - * @see API - * specification - */ -@JsonpDeserializable -public class PostRequest extends RequestBase implements JsonpSerializable { - @Nullable - private final String description; - - private final String indexName; - - @Nullable - private final Boolean isNative; - - @Nullable - private final String language; - - @Nullable - private final String name; - - @Nullable - private final String serviceType; - - // --------------------------------------------------------------------------------------------- - - private PostRequest(Builder builder) { - - this.description = builder.description; - this.indexName = ApiTypeHelper.requireNonNull(builder.indexName, this, "indexName"); - this.isNative = builder.isNative; - this.language = builder.language; - this.name = builder.name; - this.serviceType = builder.serviceType; - - } - - public static PostRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * API name: {@code description} - */ - @Nullable - public final String description() { - return this.description; - } - - /** - * Required - API name: {@code index_name} - */ - public final String indexName() { - return this.indexName; - } - - /** - * API name: {@code is_native} - */ - @Nullable - public final Boolean isNative() { - return this.isNative; - } - - /** - * API name: {@code language} - */ - @Nullable - public final String language() { - return this.language; - } - - /** - * API name: {@code name} - */ - @Nullable - public final String name() { - return this.name; - } - - /** - * API name: {@code service_type} - */ - @Nullable - public final String serviceType() { - return this.serviceType; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.description != null) { - generator.writeKey("description"); - generator.write(this.description); - - } - generator.writeKey("index_name"); - generator.write(this.indexName); - - if (this.isNative != null) { - generator.writeKey("is_native"); - generator.write(this.isNative); - - } - if (this.language != null) { - generator.writeKey("language"); - generator.write(this.language); - - } - if (this.name != null) { - generator.writeKey("name"); - generator.write(this.name); - - } - if (this.serviceType != null) { - generator.writeKey("service_type"); - generator.write(this.serviceType); - - } - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link PostRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { - @Nullable - private String description; - - private String indexName; - - @Nullable - private Boolean isNative; - - @Nullable - private String language; - - @Nullable - private String name; - - @Nullable - private String serviceType; - - /** - * API name: {@code description} - */ - public final Builder description(@Nullable String value) { - this.description = value; - return this; - } - - /** - * Required - API name: {@code index_name} - */ - public final Builder indexName(String value) { - this.indexName = value; - return this; - } - - /** - * API name: {@code is_native} - */ - public final Builder isNative(@Nullable Boolean value) { - this.isNative = value; - return this; - } - - /** - * API name: {@code language} - */ - public final Builder language(@Nullable String value) { - this.language = value; - return this; - } - - /** - * API name: {@code name} - */ - public final Builder name(@Nullable String value) { - this.name = value; - return this; - } - - /** - * API name: {@code service_type} - */ - public final Builder serviceType(@Nullable String value) { - this.serviceType = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link PostRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public PostRequest build() { - _checkSingleUse(); - - return new PostRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link PostRequest} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - PostRequest::setupPostRequestDeserializer); - - protected static void setupPostRequestDeserializer(ObjectDeserializer op) { - - op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description"); - op.add(Builder::indexName, JsonpDeserializer.stringDeserializer(), "index_name"); - op.add(Builder::isNative, JsonpDeserializer.booleanDeserializer(), "is_native"); - op.add(Builder::language, JsonpDeserializer.stringDeserializer(), "language"); - op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); - op.add(Builder::serviceType, JsonpDeserializer.stringDeserializer(), "service_type"); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.post}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.post", - - // Request method - request -> { - return "POST"; - - }, - - // Request path - request -> { - return "/_connector"; - - }, - - // Path parameters - request -> { - return Collections.emptyMap(); - }, - - // Request parameters - request -> { - return Collections.emptyMap(); - - }, SimpleEndpoint.emptyMap(), true, PostResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/PostResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/PostResponse.java deleted file mode 100644 index 068c427a4..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/PostResponse.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.post.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class PostResponse implements JsonpSerializable { - private final String id; - - // --------------------------------------------------------------------------------------------- - - private PostResponse(Builder builder) { - - this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); - - } - - public static PostResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code id} - */ - public final String id() { - return this.id; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("id"); - generator.write(this.id); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link PostResponse}. - */ - - public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - private String id; - - /** - * Required - API name: {@code id} - */ - public final Builder id(String value) { - this.id = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link PostResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public PostResponse build() { - _checkSingleUse(); - - return new PostResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link PostResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - PostResponse::setupPostResponseDeserializer); - - protected static void setupPostResponseDeserializer(ObjectDeserializer op) { - - op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/PutRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/PutRequest.java deleted file mode 100644 index 944de431b..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/PutRequest.java +++ /dev/null @@ -1,378 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.Boolean; -import java.lang.String; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.put.Request - -/** - * Creates or updates a connector. - * - * @see API - * specification - */ -@JsonpDeserializable -public class PutRequest extends RequestBase implements JsonpSerializable { - private final String connectorId; - - @Nullable - private final String description; - - private final String indexName; - - @Nullable - private final Boolean isNative; - - @Nullable - private final String language; - - @Nullable - private final String name; - - @Nullable - private final String serviceType; - - // --------------------------------------------------------------------------------------------- - - private PutRequest(Builder builder) { - - this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); - this.description = builder.description; - this.indexName = ApiTypeHelper.requireNonNull(builder.indexName, this, "indexName"); - this.isNative = builder.isNative; - this.language = builder.language; - this.name = builder.name; - this.serviceType = builder.serviceType; - - } - - public static PutRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - The unique identifier of the connector to be created or updated - *

- * API name: {@code connector_id} - */ - public final String connectorId() { - return this.connectorId; - } - - /** - * API name: {@code description} - */ - @Nullable - public final String description() { - return this.description; - } - - /** - * Required - API name: {@code index_name} - */ - public final String indexName() { - return this.indexName; - } - - /** - * API name: {@code is_native} - */ - @Nullable - public final Boolean isNative() { - return this.isNative; - } - - /** - * API name: {@code language} - */ - @Nullable - public final String language() { - return this.language; - } - - /** - * API name: {@code name} - */ - @Nullable - public final String name() { - return this.name; - } - - /** - * API name: {@code service_type} - */ - @Nullable - public final String serviceType() { - return this.serviceType; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.description != null) { - generator.writeKey("description"); - generator.write(this.description); - - } - generator.writeKey("index_name"); - generator.write(this.indexName); - - if (this.isNative != null) { - generator.writeKey("is_native"); - generator.write(this.isNative); - - } - if (this.language != null) { - generator.writeKey("language"); - generator.write(this.language); - - } - if (this.name != null) { - generator.writeKey("name"); - generator.write(this.name); - - } - if (this.serviceType != null) { - generator.writeKey("service_type"); - generator.write(this.serviceType); - - } - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link PutRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { - private String connectorId; - - @Nullable - private String description; - - private String indexName; - - @Nullable - private Boolean isNative; - - @Nullable - private String language; - - @Nullable - private String name; - - @Nullable - private String serviceType; - - /** - * Required - The unique identifier of the connector to be created or updated - *

- * API name: {@code connector_id} - */ - public final Builder connectorId(String value) { - this.connectorId = value; - return this; - } - - /** - * API name: {@code description} - */ - public final Builder description(@Nullable String value) { - this.description = value; - return this; - } - - /** - * Required - API name: {@code index_name} - */ - public final Builder indexName(String value) { - this.indexName = value; - return this; - } - - /** - * API name: {@code is_native} - */ - public final Builder isNative(@Nullable Boolean value) { - this.isNative = value; - return this; - } - - /** - * API name: {@code language} - */ - public final Builder language(@Nullable String value) { - this.language = value; - return this; - } - - /** - * API name: {@code name} - */ - public final Builder name(@Nullable String value) { - this.name = value; - return this; - } - - /** - * API name: {@code service_type} - */ - public final Builder serviceType(@Nullable String value) { - this.serviceType = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link PutRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public PutRequest build() { - _checkSingleUse(); - - return new PutRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link PutRequest} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - PutRequest::setupPutRequestDeserializer); - - protected static void setupPutRequestDeserializer(ObjectDeserializer op) { - - op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description"); - op.add(Builder::indexName, JsonpDeserializer.stringDeserializer(), "index_name"); - op.add(Builder::isNative, JsonpDeserializer.booleanDeserializer(), "is_native"); - op.add(Builder::language, JsonpDeserializer.stringDeserializer(), "language"); - op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); - op.add(Builder::serviceType, JsonpDeserializer.stringDeserializer(), "service_type"); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.put}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.put", - - // Request method - request -> { - return "PUT"; - - }, - - // Request path - request -> { - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_connector"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.connectorId, buf); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); - - }, - - // Path parameters - request -> { - Map params = new HashMap<>(); - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - params.put("connectorId", request.connectorId); - } - return params; - }, - - // Request parameters - request -> { - return Collections.emptyMap(); - - }, SimpleEndpoint.emptyMap(), true, PutResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/PutResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/PutResponse.java deleted file mode 100644 index d8ab39f30..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/PutResponse.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.Result; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.put.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class PutResponse implements JsonpSerializable { - private final Result result; - - // --------------------------------------------------------------------------------------------- - - private PutResponse(Builder builder) { - - this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); - - } - - public static PutResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code result} - */ - public final Result result() { - return this.result; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("result"); - this.result.serialize(generator, mapper); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link PutResponse}. - */ - - public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - private Result result; - - /** - * Required - API name: {@code result} - */ - public final Builder result(Result value) { - this.result = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link PutResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public PutResponse build() { - _checkSingleUse(); - - return new PutResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link PutResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - PutResponse::setupPutResponseDeserializer); - - protected static void setupPutResponseDeserializer(ObjectDeserializer op) { - - op.add(Builder::result, Result._DESERIALIZER, "result"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/RegexValidation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/RegexValidation.java deleted file mode 100644 index ac3f410ba..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/RegexValidation.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.RegexValidation - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class RegexValidation implements ValidationVariant, JsonpSerializable { - private final String constraint; - - // --------------------------------------------------------------------------------------------- - - private RegexValidation(Builder builder) { - - this.constraint = ApiTypeHelper.requireNonNull(builder.constraint, this, "constraint"); - - } - - public static RegexValidation of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Validation variant kind. - */ - @Override - public Validation.Kind _validationKind() { - return Validation.Kind.Regex; - } - - /** - * Required - API name: {@code constraint} - */ - public final String constraint() { - return this.constraint; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.write("type", "regex"); - - generator.writeKey("constraint"); - generator.write(this.constraint); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link RegexValidation}. - */ - - public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - private String constraint; - - /** - * Required - API name: {@code constraint} - */ - public final Builder constraint(String value) { - this.constraint = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link RegexValidation}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public RegexValidation build() { - _checkSingleUse(); - - return new RegexValidation(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link RegexValidation} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - RegexValidation::setupRegexValidationDeserializer); - - protected static void setupRegexValidationDeserializer(ObjectDeserializer op) { - - op.add(Builder::constraint, JsonpDeserializer.stringDeserializer(), "constraint"); - - op.ignore("type"); - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SchedulingConfiguration.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SchedulingConfiguration.java deleted file mode 100644 index 8de91e1b3..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SchedulingConfiguration.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.SchedulingConfiguration - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class SchedulingConfiguration implements JsonpSerializable { - @Nullable - private final ConnectorScheduling accessControl; - - @Nullable - private final ConnectorScheduling full; - - @Nullable - private final ConnectorScheduling incremental; - - // --------------------------------------------------------------------------------------------- - - private SchedulingConfiguration(Builder builder) { - - this.accessControl = builder.accessControl; - this.full = builder.full; - this.incremental = builder.incremental; - - } - - public static SchedulingConfiguration of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * API name: {@code access_control} - */ - @Nullable - public final ConnectorScheduling accessControl() { - return this.accessControl; - } - - /** - * API name: {@code full} - */ - @Nullable - public final ConnectorScheduling full() { - return this.full; - } - - /** - * API name: {@code incremental} - */ - @Nullable - public final ConnectorScheduling incremental() { - return this.incremental; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.accessControl != null) { - generator.writeKey("access_control"); - this.accessControl.serialize(generator, mapper); - - } - if (this.full != null) { - generator.writeKey("full"); - this.full.serialize(generator, mapper); - - } - if (this.incremental != null) { - generator.writeKey("incremental"); - this.incremental.serialize(generator, mapper); - - } - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link SchedulingConfiguration}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - @Nullable - private ConnectorScheduling accessControl; - - @Nullable - private ConnectorScheduling full; - - @Nullable - private ConnectorScheduling incremental; - - /** - * API name: {@code access_control} - */ - public final Builder accessControl(@Nullable ConnectorScheduling value) { - this.accessControl = value; - return this; - } - - /** - * API name: {@code access_control} - */ - public final Builder accessControl( - Function> fn) { - return this.accessControl(fn.apply(new ConnectorScheduling.Builder()).build()); - } - - /** - * API name: {@code full} - */ - public final Builder full(@Nullable ConnectorScheduling value) { - this.full = value; - return this; - } - - /** - * API name: {@code full} - */ - public final Builder full(Function> fn) { - return this.full(fn.apply(new ConnectorScheduling.Builder()).build()); - } - - /** - * API name: {@code incremental} - */ - public final Builder incremental(@Nullable ConnectorScheduling value) { - this.incremental = value; - return this; - } - - /** - * API name: {@code incremental} - */ - public final Builder incremental(Function> fn) { - return this.incremental(fn.apply(new ConnectorScheduling.Builder()).build()); - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link SchedulingConfiguration}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public SchedulingConfiguration build() { - _checkSingleUse(); - - return new SchedulingConfiguration(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link SchedulingConfiguration} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, SchedulingConfiguration::setupSchedulingConfigurationDeserializer); - - protected static void setupSchedulingConfigurationDeserializer( - ObjectDeserializer op) { - - op.add(Builder::accessControl, ConnectorScheduling._DESERIALIZER, "access_control"); - op.add(Builder::full, ConnectorScheduling._DESERIALIZER, "full"); - op.add(Builder::incremental, ConnectorScheduling._DESERIALIZER, "incremental"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SelectOption.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SelectOption.java deleted file mode 100644 index a4faa56cb..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SelectOption.java +++ /dev/null @@ -1,177 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.SelectOption - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class SelectOption implements JsonpSerializable { - private final String label; - - private final String value; - - // --------------------------------------------------------------------------------------------- - - private SelectOption(Builder builder) { - - this.label = ApiTypeHelper.requireNonNull(builder.label, this, "label"); - this.value = ApiTypeHelper.requireNonNull(builder.value, this, "value"); - - } - - public static SelectOption of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code label} - */ - public final String label() { - return this.label; - } - - /** - * Required - API name: {@code value} - */ - public final String value() { - return this.value; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("label"); - generator.write(this.label); - - generator.writeKey("value"); - generator.write(this.value); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link SelectOption}. - */ - - public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - private String label; - - private String value; - - /** - * Required - API name: {@code label} - */ - public final Builder label(String value) { - this.label = value; - return this; - } - - /** - * Required - API name: {@code value} - */ - public final Builder value(String value) { - this.value = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link SelectOption}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public SelectOption build() { - _checkSingleUse(); - - return new SelectOption(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link SelectOption} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - SelectOption::setupSelectOptionDeserializer); - - protected static void setupSelectOptionDeserializer(ObjectDeserializer op) { - - op.add(Builder::label, JsonpDeserializer.stringDeserializer(), "label"); - op.add(Builder::value, JsonpDeserializer.stringDeserializer(), "value"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelRequest.java deleted file mode 100644 index d87926d47..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelRequest.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.sync_job_cancel.Request - -/** - * Cancels a connector sync job. - * - * @see API - * specification - */ - -public class SyncJobCancelRequest extends RequestBase { - private final String connectorSyncJobId; - - // --------------------------------------------------------------------------------------------- - - private SyncJobCancelRequest(Builder builder) { - - this.connectorSyncJobId = ApiTypeHelper.requireNonNull(builder.connectorSyncJobId, this, "connectorSyncJobId"); - - } - - public static SyncJobCancelRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - The unique identifier of the connector sync job - *

- * API name: {@code connector_sync_job_id} - */ - public final String connectorSyncJobId() { - return this.connectorSyncJobId; - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link SyncJobCancelRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder - implements - ObjectBuilder { - private String connectorSyncJobId; - - /** - * Required - The unique identifier of the connector sync job - *

- * API name: {@code connector_sync_job_id} - */ - public final Builder connectorSyncJobId(String value) { - this.connectorSyncJobId = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link SyncJobCancelRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public SyncJobCancelRequest build() { - _checkSingleUse(); - - return new SyncJobCancelRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.sync_job_cancel}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.sync_job_cancel", - - // Request method - request -> { - return "PUT"; - - }, - - // Request path - request -> { - final int _connectorSyncJobId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorSyncJobId; - - if (propsSet == (_connectorSyncJobId)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_connector"); - buf.append("/_sync_job"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.connectorSyncJobId, buf); - buf.append("/_cancel"); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); - - }, - - // Path parameters - request -> { - Map params = new HashMap<>(); - final int _connectorSyncJobId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorSyncJobId; - - if (propsSet == (_connectorSyncJobId)) { - params.put("connectorSyncJobId", request.connectorSyncJobId); - } - return params; - }, - - // Request parameters - request -> { - return Collections.emptyMap(); - - }, SimpleEndpoint.emptyMap(), false, SyncJobCancelResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelResponse.java deleted file mode 100644 index d3a36d231..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelResponse.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.Result; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.sync_job_cancel.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class SyncJobCancelResponse implements JsonpSerializable { - private final Result result; - - // --------------------------------------------------------------------------------------------- - - private SyncJobCancelResponse(Builder builder) { - - this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); - - } - - public static SyncJobCancelResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code result} - */ - public final Result result() { - return this.result; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("result"); - this.result.serialize(generator, mapper); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link SyncJobCancelResponse}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private Result result; - - /** - * Required - API name: {@code result} - */ - public final Builder result(Result value) { - this.result = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link SyncJobCancelResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public SyncJobCancelResponse build() { - _checkSingleUse(); - - return new SyncJobCancelResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link SyncJobCancelResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, SyncJobCancelResponse::setupSyncJobCancelResponseDeserializer); - - protected static void setupSyncJobCancelResponseDeserializer(ObjectDeserializer op) { - - op.add(Builder::result, Result._DESERIALIZER, "result"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobConnectorReference.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobConnectorReference.java deleted file mode 100644 index 542699742..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobConnectorReference.java +++ /dev/null @@ -1,357 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.SyncJobConnectorReference - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class SyncJobConnectorReference implements JsonpSerializable { - private final Map configuration; - - private final FilteringRules filtering; - - private final String id; - - private final String indexName; - - @Nullable - private final String language; - - @Nullable - private final IngestPipelineParams pipeline; - - private final String serviceType; - - // --------------------------------------------------------------------------------------------- - - private SyncJobConnectorReference(Builder builder) { - - this.configuration = ApiTypeHelper.unmodifiableRequired(builder.configuration, this, "configuration"); - this.filtering = ApiTypeHelper.requireNonNull(builder.filtering, this, "filtering"); - this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); - this.indexName = ApiTypeHelper.requireNonNull(builder.indexName, this, "indexName"); - this.language = builder.language; - this.pipeline = builder.pipeline; - this.serviceType = ApiTypeHelper.requireNonNull(builder.serviceType, this, "serviceType"); - - } - - public static SyncJobConnectorReference of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code configuration} - */ - public final Map configuration() { - return this.configuration; - } - - /** - * Required - API name: {@code filtering} - */ - public final FilteringRules filtering() { - return this.filtering; - } - - /** - * Required - API name: {@code id} - */ - public final String id() { - return this.id; - } - - /** - * Required - API name: {@code index_name} - */ - public final String indexName() { - return this.indexName; - } - - /** - * API name: {@code language} - */ - @Nullable - public final String language() { - return this.language; - } - - /** - * API name: {@code pipeline} - */ - @Nullable - public final IngestPipelineParams pipeline() { - return this.pipeline; - } - - /** - * Required - API name: {@code service_type} - */ - public final String serviceType() { - return this.serviceType; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (ApiTypeHelper.isDefined(this.configuration)) { - generator.writeKey("configuration"); - generator.writeStartObject(); - for (Map.Entry item0 : this.configuration.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - - } - generator.writeEnd(); - - } - generator.writeKey("filtering"); - this.filtering.serialize(generator, mapper); - - generator.writeKey("id"); - generator.write(this.id); - - generator.writeKey("index_name"); - generator.write(this.indexName); - - if (this.language != null) { - generator.writeKey("language"); - generator.write(this.language); - - } - if (this.pipeline != null) { - generator.writeKey("pipeline"); - this.pipeline.serialize(generator, mapper); - - } - generator.writeKey("service_type"); - generator.write(this.serviceType); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link SyncJobConnectorReference}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private Map configuration; - - private FilteringRules filtering; - - private String id; - - private String indexName; - - @Nullable - private String language; - - @Nullable - private IngestPipelineParams pipeline; - - private String serviceType; - - /** - * Required - API name: {@code configuration} - *

- * Adds all entries of map to configuration. - */ - public final Builder configuration(Map map) { - this.configuration = _mapPutAll(this.configuration, map); - return this; - } - - /** - * Required - API name: {@code configuration} - *

- * Adds an entry to configuration. - */ - public final Builder configuration(String key, ConnectorConfigProperties value) { - this.configuration = _mapPut(this.configuration, key, value); - return this; - } - - /** - * Required - API name: {@code configuration} - *

- * Adds an entry to configuration using a builder lambda. - */ - public final Builder configuration(String key, - Function> fn) { - return configuration(key, fn.apply(new ConnectorConfigProperties.Builder()).build()); - } - - /** - * Required - API name: {@code filtering} - */ - public final Builder filtering(FilteringRules value) { - this.filtering = value; - return this; - } - - /** - * Required - API name: {@code filtering} - */ - public final Builder filtering(Function> fn) { - return this.filtering(fn.apply(new FilteringRules.Builder()).build()); - } - - /** - * Required - API name: {@code id} - */ - public final Builder id(String value) { - this.id = value; - return this; - } - - /** - * Required - API name: {@code index_name} - */ - public final Builder indexName(String value) { - this.indexName = value; - return this; - } - - /** - * API name: {@code language} - */ - public final Builder language(@Nullable String value) { - this.language = value; - return this; - } - - /** - * API name: {@code pipeline} - */ - public final Builder pipeline(@Nullable IngestPipelineParams value) { - this.pipeline = value; - return this; - } - - /** - * API name: {@code pipeline} - */ - public final Builder pipeline(Function> fn) { - return this.pipeline(fn.apply(new IngestPipelineParams.Builder()).build()); - } - - /** - * Required - API name: {@code service_type} - */ - public final Builder serviceType(String value) { - this.serviceType = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link SyncJobConnectorReference}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public SyncJobConnectorReference build() { - _checkSingleUse(); - - return new SyncJobConnectorReference(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link SyncJobConnectorReference} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, SyncJobConnectorReference::setupSyncJobConnectorReferenceDeserializer); - - protected static void setupSyncJobConnectorReferenceDeserializer( - ObjectDeserializer op) { - - op.add(Builder::configuration, JsonpDeserializer.stringMapDeserializer(ConnectorConfigProperties._DESERIALIZER), - "configuration"); - op.add(Builder::filtering, FilteringRules._DESERIALIZER, "filtering"); - op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); - op.add(Builder::indexName, JsonpDeserializer.stringDeserializer(), "index_name"); - op.add(Builder::language, JsonpDeserializer.stringDeserializer(), "language"); - op.add(Builder::pipeline, IngestPipelineParams._DESERIALIZER, "pipeline"); - op.add(Builder::serviceType, JsonpDeserializer.stringDeserializer(), "service_type"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteRequest.java deleted file mode 100644 index 7fabf48c1..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteRequest.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.sync_job_delete.Request - -/** - * Deletes a connector sync job. - * - * @see API - * specification - */ - -public class SyncJobDeleteRequest extends RequestBase { - private final String connectorSyncJobId; - - // --------------------------------------------------------------------------------------------- - - private SyncJobDeleteRequest(Builder builder) { - - this.connectorSyncJobId = ApiTypeHelper.requireNonNull(builder.connectorSyncJobId, this, "connectorSyncJobId"); - - } - - public static SyncJobDeleteRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - The unique identifier of the connector sync job to be deleted - *

- * API name: {@code connector_sync_job_id} - */ - public final String connectorSyncJobId() { - return this.connectorSyncJobId; - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link SyncJobDeleteRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder - implements - ObjectBuilder { - private String connectorSyncJobId; - - /** - * Required - The unique identifier of the connector sync job to be deleted - *

- * API name: {@code connector_sync_job_id} - */ - public final Builder connectorSyncJobId(String value) { - this.connectorSyncJobId = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link SyncJobDeleteRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public SyncJobDeleteRequest build() { - _checkSingleUse(); - - return new SyncJobDeleteRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.sync_job_delete}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.sync_job_delete", - - // Request method - request -> { - return "DELETE"; - - }, - - // Request path - request -> { - final int _connectorSyncJobId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorSyncJobId; - - if (propsSet == (_connectorSyncJobId)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_connector"); - buf.append("/_sync_job"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.connectorSyncJobId, buf); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); - - }, - - // Path parameters - request -> { - Map params = new HashMap<>(); - final int _connectorSyncJobId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorSyncJobId; - - if (propsSet == (_connectorSyncJobId)) { - params.put("connectorSyncJobId", request.connectorSyncJobId); - } - return params; - }, - - // Request parameters - request -> { - return Collections.emptyMap(); - - }, SimpleEndpoint.emptyMap(), false, SyncJobDeleteResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteResponse.java deleted file mode 100644 index 95b7a101b..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteResponse.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.AcknowledgedResponseBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.sync_job_delete.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class SyncJobDeleteResponse extends AcknowledgedResponseBase { - // --------------------------------------------------------------------------------------------- - - private SyncJobDeleteResponse(Builder builder) { - super(builder); - - } - - public static SyncJobDeleteResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link SyncJobDeleteResponse}. - */ - - public static class Builder extends AcknowledgedResponseBase.AbstractBuilder - implements - ObjectBuilder { - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link SyncJobDeleteResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public SyncJobDeleteResponse build() { - _checkSingleUse(); - - return new SyncJobDeleteResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link SyncJobDeleteResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, SyncJobDeleteResponse::setupSyncJobDeleteResponseDeserializer); - - protected static void setupSyncJobDeleteResponseDeserializer(ObjectDeserializer op) { - AcknowledgedResponseBase.setupAcknowledgedResponseBaseDeserializer(op); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetRequest.java deleted file mode 100644 index 16bb24995..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetRequest.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.sync_job_get.Request - -/** - * Retrieves a connector sync job. - * - * @see API - * specification - */ - -public class SyncJobGetRequest extends RequestBase { - private final String connectorSyncJobId; - - // --------------------------------------------------------------------------------------------- - - private SyncJobGetRequest(Builder builder) { - - this.connectorSyncJobId = ApiTypeHelper.requireNonNull(builder.connectorSyncJobId, this, "connectorSyncJobId"); - - } - - public static SyncJobGetRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - The unique identifier of the connector sync job - *

- * API name: {@code connector_sync_job_id} - */ - public final String connectorSyncJobId() { - return this.connectorSyncJobId; - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link SyncJobGetRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder - implements - ObjectBuilder { - private String connectorSyncJobId; - - /** - * Required - The unique identifier of the connector sync job - *

- * API name: {@code connector_sync_job_id} - */ - public final Builder connectorSyncJobId(String value) { - this.connectorSyncJobId = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link SyncJobGetRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public SyncJobGetRequest build() { - _checkSingleUse(); - - return new SyncJobGetRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.sync_job_get}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.sync_job_get", - - // Request method - request -> { - return "GET"; - - }, - - // Request path - request -> { - final int _connectorSyncJobId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorSyncJobId; - - if (propsSet == (_connectorSyncJobId)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_connector"); - buf.append("/_sync_job"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.connectorSyncJobId, buf); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); - - }, - - // Path parameters - request -> { - Map params = new HashMap<>(); - final int _connectorSyncJobId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorSyncJobId; - - if (propsSet == (_connectorSyncJobId)) { - params.put("connectorSyncJobId", request.connectorSyncJobId); - } - return params; - }, - - // Request parameters - request -> { - return Collections.emptyMap(); - - }, SimpleEndpoint.emptyMap(), false, SyncJobGetResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetResponse.java deleted file mode 100644 index 510cc6257..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetResponse.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.sync_job_get.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class SyncJobGetResponse extends ConnectorSyncJob { - // --------------------------------------------------------------------------------------------- - - private SyncJobGetResponse(Builder builder) { - super(builder); - - } - - public static SyncJobGetResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link SyncJobGetResponse}. - */ - - public static class Builder extends ConnectorSyncJob.AbstractBuilder - implements - ObjectBuilder { - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link SyncJobGetResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public SyncJobGetResponse build() { - _checkSingleUse(); - - return new SyncJobGetResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link SyncJobGetResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, SyncJobGetResponse::setupSyncJobGetResponseDeserializer); - - protected static void setupSyncJobGetResponseDeserializer(ObjectDeserializer op) { - ConnectorSyncJob.setupConnectorSyncJobDeserializer(op); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListRequest.java deleted file mode 100644 index 884e96a94..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListRequest.java +++ /dev/null @@ -1,301 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.Integer; -import java.lang.String; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import java.util.stream.Collectors; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.sync_job_list.Request - -/** - * Lists connector sync jobs. - * - * @see API - * specification - */ - -public class SyncJobListRequest extends RequestBase { - @Nullable - private final String connectorId; - - @Nullable - private final Integer from; - - private final List jobType; - - @Nullable - private final Integer size; - - @Nullable - private final SyncStatus status; - - // --------------------------------------------------------------------------------------------- - - private SyncJobListRequest(Builder builder) { - - this.connectorId = builder.connectorId; - this.from = builder.from; - this.jobType = ApiTypeHelper.unmodifiable(builder.jobType); - this.size = builder.size; - this.status = builder.status; - - } - - public static SyncJobListRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * A connector id to fetch connector sync jobs for - *

- * API name: {@code connector_id} - */ - @Nullable - public final String connectorId() { - return this.connectorId; - } - - /** - * Starting offset (default: 0) - *

- * API name: {@code from} - */ - @Nullable - public final Integer from() { - return this.from; - } - - /** - * A comma-separated list of job types to fetch the sync jobs for - *

- * API name: {@code job_type} - */ - public final List jobType() { - return this.jobType; - } - - /** - * Specifies a max number of results to get - *

- * API name: {@code size} - */ - @Nullable - public final Integer size() { - return this.size; - } - - /** - * A sync job status to fetch connector sync jobs for - *

- * API name: {@code status} - */ - @Nullable - public final SyncStatus status() { - return this.status; - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link SyncJobListRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder - implements - ObjectBuilder { - @Nullable - private String connectorId; - - @Nullable - private Integer from; - - @Nullable - private List jobType; - - @Nullable - private Integer size; - - @Nullable - private SyncStatus status; - - /** - * A connector id to fetch connector sync jobs for - *

- * API name: {@code connector_id} - */ - public final Builder connectorId(@Nullable String value) { - this.connectorId = value; - return this; - } - - /** - * Starting offset (default: 0) - *

- * API name: {@code from} - */ - public final Builder from(@Nullable Integer value) { - this.from = value; - return this; - } - - /** - * A comma-separated list of job types to fetch the sync jobs for - *

- * API name: {@code job_type} - *

- * Adds all elements of list to jobType. - */ - public final Builder jobType(List list) { - this.jobType = _listAddAll(this.jobType, list); - return this; - } - - /** - * A comma-separated list of job types to fetch the sync jobs for - *

- * API name: {@code job_type} - *

- * Adds one or more values to jobType. - */ - public final Builder jobType(SyncJobType value, SyncJobType... values) { - this.jobType = _listAdd(this.jobType, value, values); - return this; - } - - /** - * Specifies a max number of results to get - *

- * API name: {@code size} - */ - public final Builder size(@Nullable Integer value) { - this.size = value; - return this; - } - - /** - * A sync job status to fetch connector sync jobs for - *

- * API name: {@code status} - */ - public final Builder status(@Nullable SyncStatus value) { - this.status = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link SyncJobListRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public SyncJobListRequest build() { - _checkSingleUse(); - - return new SyncJobListRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.sync_job_list}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.sync_job_list", - - // Request method - request -> { - return "GET"; - - }, - - // Request path - request -> { - return "/_connector/_sync_job"; - - }, - - // Path parameters - request -> { - return Collections.emptyMap(); - }, - - // Request parameters - request -> { - Map params = new HashMap<>(); - if (ApiTypeHelper.isDefined(request.jobType)) { - params.put("job_type", - request.jobType.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); - } - if (request.size != null) { - params.put("size", String.valueOf(request.size)); - } - if (request.connectorId != null) { - params.put("connector_id", request.connectorId); - } - if (request.from != null) { - params.put("from", String.valueOf(request.from)); - } - if (request.status != null) { - params.put("status", request.status.jsonValue()); - } - return params; - - }, SimpleEndpoint.emptyMap(), false, SyncJobListResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListResponse.java deleted file mode 100644 index 210545d41..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.Long; -import java.util.List; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.sync_job_list.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class SyncJobListResponse implements JsonpSerializable { - private final long count; - - private final List results; - - // --------------------------------------------------------------------------------------------- - - private SyncJobListResponse(Builder builder) { - - this.count = ApiTypeHelper.requireNonNull(builder.count, this, "count"); - this.results = ApiTypeHelper.unmodifiableRequired(builder.results, this, "results"); - - } - - public static SyncJobListResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code count} - */ - public final long count() { - return this.count; - } - - /** - * Required - API name: {@code results} - */ - public final List results() { - return this.results; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("count"); - generator.write(this.count); - - if (ApiTypeHelper.isDefined(this.results)) { - generator.writeKey("results"); - generator.writeStartArray(); - for (ConnectorSyncJob item0 : this.results) { - item0.serialize(generator, mapper); - - } - generator.writeEnd(); - - } - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link SyncJobListResponse}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private Long count; - - private List results; - - /** - * Required - API name: {@code count} - */ - public final Builder count(long value) { - this.count = value; - return this; - } - - /** - * Required - API name: {@code results} - *

- * Adds all elements of list to results. - */ - public final Builder results(List list) { - this.results = _listAddAll(this.results, list); - return this; - } - - /** - * Required - API name: {@code results} - *

- * Adds one or more values to results. - */ - public final Builder results(ConnectorSyncJob value, ConnectorSyncJob... values) { - this.results = _listAdd(this.results, value, values); - return this; - } - - /** - * Required - API name: {@code results} - *

- * Adds a value to results using a builder lambda. - */ - public final Builder results(Function> fn) { - return results(fn.apply(new ConnectorSyncJob.Builder()).build()); - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link SyncJobListResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public SyncJobListResponse build() { - _checkSingleUse(); - - return new SyncJobListResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link SyncJobListResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, SyncJobListResponse::setupSyncJobListResponseDeserializer); - - protected static void setupSyncJobListResponseDeserializer(ObjectDeserializer op) { - - op.add(Builder::count, JsonpDeserializer.longDeserializer(), "count"); - op.add(Builder::results, JsonpDeserializer.arrayDeserializer(ConnectorSyncJob._DESERIALIZER), "results"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostRequest.java deleted file mode 100644 index 88290cfea..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostRequest.java +++ /dev/null @@ -1,245 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Collections; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.sync_job_post.Request - -/** - * Creates a connector sync job. - * - * @see API - * specification - */ -@JsonpDeserializable -public class SyncJobPostRequest extends RequestBase implements JsonpSerializable { - private final String id; - - @Nullable - private final SyncJobType jobType; - - @Nullable - private final SyncJobTriggerMethod triggerMethod; - - // --------------------------------------------------------------------------------------------- - - private SyncJobPostRequest(Builder builder) { - - this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); - this.jobType = builder.jobType; - this.triggerMethod = builder.triggerMethod; - - } - - public static SyncJobPostRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - The id of the associated connector - *

- * API name: {@code id} - */ - public final String id() { - return this.id; - } - - /** - * API name: {@code job_type} - */ - @Nullable - public final SyncJobType jobType() { - return this.jobType; - } - - /** - * API name: {@code trigger_method} - */ - @Nullable - public final SyncJobTriggerMethod triggerMethod() { - return this.triggerMethod; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("id"); - generator.write(this.id); - - if (this.jobType != null) { - generator.writeKey("job_type"); - this.jobType.serialize(generator, mapper); - } - if (this.triggerMethod != null) { - generator.writeKey("trigger_method"); - this.triggerMethod.serialize(generator, mapper); - } - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link SyncJobPostRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder - implements - ObjectBuilder { - private String id; - - @Nullable - private SyncJobType jobType; - - @Nullable - private SyncJobTriggerMethod triggerMethod; - - /** - * Required - The id of the associated connector - *

- * API name: {@code id} - */ - public final Builder id(String value) { - this.id = value; - return this; - } - - /** - * API name: {@code job_type} - */ - public final Builder jobType(@Nullable SyncJobType value) { - this.jobType = value; - return this; - } - - /** - * API name: {@code trigger_method} - */ - public final Builder triggerMethod(@Nullable SyncJobTriggerMethod value) { - this.triggerMethod = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link SyncJobPostRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public SyncJobPostRequest build() { - _checkSingleUse(); - - return new SyncJobPostRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link SyncJobPostRequest} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, SyncJobPostRequest::setupSyncJobPostRequestDeserializer); - - protected static void setupSyncJobPostRequestDeserializer(ObjectDeserializer op) { - - op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); - op.add(Builder::jobType, SyncJobType._DESERIALIZER, "job_type"); - op.add(Builder::triggerMethod, SyncJobTriggerMethod._DESERIALIZER, "trigger_method"); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.sync_job_post}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.sync_job_post", - - // Request method - request -> { - return "POST"; - - }, - - // Request path - request -> { - return "/_connector/_sync_job"; - - }, - - // Path parameters - request -> { - return Collections.emptyMap(); - }, - - // Request parameters - request -> { - return Collections.emptyMap(); - - }, SimpleEndpoint.emptyMap(), true, SyncJobPostResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostResponse.java deleted file mode 100644 index cb55d6e6b..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostResponse.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.sync_job_post.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class SyncJobPostResponse implements JsonpSerializable { - private final String id; - - // --------------------------------------------------------------------------------------------- - - private SyncJobPostResponse(Builder builder) { - - this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); - - } - - public static SyncJobPostResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code id} - */ - public final String id() { - return this.id; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("id"); - generator.write(this.id); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link SyncJobPostResponse}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private String id; - - /** - * Required - API name: {@code id} - */ - public final Builder id(String value) { - this.id = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link SyncJobPostResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public SyncJobPostResponse build() { - _checkSingleUse(); - - return new SyncJobPostResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link SyncJobPostResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, SyncJobPostResponse::setupSyncJobPostResponseDeserializer); - - protected static void setupSyncJobPostResponseDeserializer(ObjectDeserializer op) { - - op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobTriggerMethod.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobTriggerMethod.java deleted file mode 100644 index d9ece5d16..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobTriggerMethod.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonEnum; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public enum SyncJobTriggerMethod implements JsonEnum { - OnDemand("on_demand"), - - Scheduled("scheduled"), - - ; - - private final String jsonValue; - - SyncJobTriggerMethod(String jsonValue) { - this.jsonValue = jsonValue; - } - - public String jsonValue() { - return this.jsonValue; - } - - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( - SyncJobTriggerMethod.values()); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobType.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobType.java deleted file mode 100644 index f83282d4b..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobType.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonEnum; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public enum SyncJobType implements JsonEnum { - Full("full"), - - Incremental("incremental"), - - AccessControl("access_control"), - - ; - - private final String jsonValue; - - SyncJobType(String jsonValue) { - this.jsonValue = jsonValue; - } - - public String jsonValue() { - return this.jsonValue; - } - - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( - SyncJobType.values()); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncRulesFeature.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncRulesFeature.java deleted file mode 100644 index 68fa4f46a..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncRulesFeature.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.SyncRulesFeature - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class SyncRulesFeature implements JsonpSerializable { - @Nullable - private final FeatureEnabled advanced; - - @Nullable - private final FeatureEnabled basic; - - // --------------------------------------------------------------------------------------------- - - private SyncRulesFeature(Builder builder) { - - this.advanced = builder.advanced; - this.basic = builder.basic; - - } - - public static SyncRulesFeature of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * API name: {@code advanced} - */ - @Nullable - public final FeatureEnabled advanced() { - return this.advanced; - } - - /** - * API name: {@code basic} - */ - @Nullable - public final FeatureEnabled basic() { - return this.basic; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.advanced != null) { - generator.writeKey("advanced"); - this.advanced.serialize(generator, mapper); - - } - if (this.basic != null) { - generator.writeKey("basic"); - this.basic.serialize(generator, mapper); - - } - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link SyncRulesFeature}. - */ - - public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - @Nullable - private FeatureEnabled advanced; - - @Nullable - private FeatureEnabled basic; - - /** - * API name: {@code advanced} - */ - public final Builder advanced(@Nullable FeatureEnabled value) { - this.advanced = value; - return this; - } - - /** - * API name: {@code advanced} - */ - public final Builder advanced(Function> fn) { - return this.advanced(fn.apply(new FeatureEnabled.Builder()).build()); - } - - /** - * API name: {@code basic} - */ - public final Builder basic(@Nullable FeatureEnabled value) { - this.basic = value; - return this; - } - - /** - * API name: {@code basic} - */ - public final Builder basic(Function> fn) { - return this.basic(fn.apply(new FeatureEnabled.Builder()).build()); - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link SyncRulesFeature}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public SyncRulesFeature build() { - _checkSingleUse(); - - return new SyncRulesFeature(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link SyncRulesFeature} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - SyncRulesFeature::setupSyncRulesFeatureDeserializer); - - protected static void setupSyncRulesFeatureDeserializer(ObjectDeserializer op) { - - op.add(Builder::advanced, FeatureEnabled._DESERIALIZER, "advanced"); - op.add(Builder::basic, FeatureEnabled._DESERIALIZER, "basic"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncStatus.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncStatus.java deleted file mode 100644 index 80514495b..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncStatus.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonEnum; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public enum SyncStatus implements JsonEnum { - Canceling("canceling"), - - Canceled("canceled"), - - Completed("completed"), - - Error("error"), - - InProgress("in_progress"), - - Pending("pending"), - - Suspended("suspended"), - - ; - - private final String jsonValue; - - SyncStatus(String jsonValue) { - this.jsonValue = jsonValue; - } - - public String jsonValue() { - return this.jsonValue; - } - - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( - SyncStatus.values()); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringRequest.java deleted file mode 100644 index 518494566..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringRequest.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_active_filtering.Request - -/** - * Activates the valid draft filtering for a connector. - * - * @see API - * specification - */ - -public class UpdateActiveFilteringRequest extends RequestBase { - private final String connectorId; - - // --------------------------------------------------------------------------------------------- - - private UpdateActiveFilteringRequest(Builder builder) { - - this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); - - } - - public static UpdateActiveFilteringRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final String connectorId() { - return this.connectorId; - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateActiveFilteringRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder - implements - ObjectBuilder { - private String connectorId; - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final Builder connectorId(String value) { - this.connectorId = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateActiveFilteringRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateActiveFilteringRequest build() { - _checkSingleUse(); - - return new UpdateActiveFilteringRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.update_active_filtering}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.update_active_filtering", - - // Request method - request -> { - return "PUT"; - - }, - - // Request path - request -> { - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_connector"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.connectorId, buf); - buf.append("/_filtering"); - buf.append("/_activate"); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); - - }, - - // Path parameters - request -> { - Map params = new HashMap<>(); - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - params.put("connectorId", request.connectorId); - } - return params; - }, - - // Request parameters - request -> { - return Collections.emptyMap(); - - }, SimpleEndpoint.emptyMap(), false, UpdateActiveFilteringResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringResponse.java deleted file mode 100644 index 42011066e..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringResponse.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.Result; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_active_filtering.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdateActiveFilteringResponse implements JsonpSerializable { - private final Result result; - - // --------------------------------------------------------------------------------------------- - - private UpdateActiveFilteringResponse(Builder builder) { - - this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); - - } - - public static UpdateActiveFilteringResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code result} - */ - public final Result result() { - return this.result; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("result"); - this.result.serialize(generator, mapper); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateActiveFilteringResponse}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private Result result; - - /** - * Required - API name: {@code result} - */ - public final Builder result(Result value) { - this.result = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateActiveFilteringResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateActiveFilteringResponse build() { - _checkSingleUse(); - - return new UpdateActiveFilteringResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdateActiveFilteringResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdateActiveFilteringResponse::setupUpdateActiveFilteringResponseDeserializer); - - protected static void setupUpdateActiveFilteringResponseDeserializer( - ObjectDeserializer op) { - - op.add(Builder::result, Result._DESERIALIZER, "result"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateApiKeyIdRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateApiKeyIdRequest.java deleted file mode 100644 index ec1beb3a5..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateApiKeyIdRequest.java +++ /dev/null @@ -1,270 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_api_key_id.Request - -/** - * Updates the API key id in the connector document - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdateApiKeyIdRequest extends RequestBase implements JsonpSerializable { - @Nullable - private final String apiKeyId; - - @Nullable - private final String apiKeySecretId; - - private final String connectorId; - - // --------------------------------------------------------------------------------------------- - - private UpdateApiKeyIdRequest(Builder builder) { - - this.apiKeyId = builder.apiKeyId; - this.apiKeySecretId = builder.apiKeySecretId; - this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); - - } - - public static UpdateApiKeyIdRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * API name: {@code api_key_id} - */ - @Nullable - public final String apiKeyId() { - return this.apiKeyId; - } - - /** - * API name: {@code api_key_secret_id} - */ - @Nullable - public final String apiKeySecretId() { - return this.apiKeySecretId; - } - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final String connectorId() { - return this.connectorId; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.apiKeyId != null) { - generator.writeKey("api_key_id"); - generator.write(this.apiKeyId); - - } - if (this.apiKeySecretId != null) { - generator.writeKey("api_key_secret_id"); - generator.write(this.apiKeySecretId); - - } - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateApiKeyIdRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder - implements - ObjectBuilder { - @Nullable - private String apiKeyId; - - @Nullable - private String apiKeySecretId; - - private String connectorId; - - /** - * API name: {@code api_key_id} - */ - public final Builder apiKeyId(@Nullable String value) { - this.apiKeyId = value; - return this; - } - - /** - * API name: {@code api_key_secret_id} - */ - public final Builder apiKeySecretId(@Nullable String value) { - this.apiKeySecretId = value; - return this; - } - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final Builder connectorId(String value) { - this.connectorId = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateApiKeyIdRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateApiKeyIdRequest build() { - _checkSingleUse(); - - return new UpdateApiKeyIdRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdateApiKeyIdRequest} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdateApiKeyIdRequest::setupUpdateApiKeyIdRequestDeserializer); - - protected static void setupUpdateApiKeyIdRequestDeserializer(ObjectDeserializer op) { - - op.add(Builder::apiKeyId, JsonpDeserializer.stringDeserializer(), "api_key_id"); - op.add(Builder::apiKeySecretId, JsonpDeserializer.stringDeserializer(), "api_key_secret_id"); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.update_api_key_id}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.update_api_key_id", - - // Request method - request -> { - return "PUT"; - - }, - - // Request path - request -> { - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_connector"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.connectorId, buf); - buf.append("/_api_key_id"); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); - - }, - - // Path parameters - request -> { - Map params = new HashMap<>(); - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - params.put("connectorId", request.connectorId); - } - return params; - }, - - // Request parameters - request -> { - return Collections.emptyMap(); - - }, SimpleEndpoint.emptyMap(), true, UpdateApiKeyIdResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateApiKeyIdResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateApiKeyIdResponse.java deleted file mode 100644 index 1bd4736e6..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateApiKeyIdResponse.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.Result; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_api_key_id.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdateApiKeyIdResponse implements JsonpSerializable { - private final Result result; - - // --------------------------------------------------------------------------------------------- - - private UpdateApiKeyIdResponse(Builder builder) { - - this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); - - } - - public static UpdateApiKeyIdResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code result} - */ - public final Result result() { - return this.result; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("result"); - this.result.serialize(generator, mapper); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateApiKeyIdResponse}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private Result result; - - /** - * Required - API name: {@code result} - */ - public final Builder result(Result value) { - this.result = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateApiKeyIdResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateApiKeyIdResponse build() { - _checkSingleUse(); - - return new UpdateApiKeyIdResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdateApiKeyIdResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdateApiKeyIdResponse::setupUpdateApiKeyIdResponseDeserializer); - - protected static void setupUpdateApiKeyIdResponseDeserializer( - ObjectDeserializer op) { - - op.add(Builder::result, Result._DESERIALIZER, "result"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationRequest.java deleted file mode 100644 index 0c5965cae..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationRequest.java +++ /dev/null @@ -1,315 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonData; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_configuration.Request - -/** - * Updates the configuration field in the connector document - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdateConfigurationRequest extends RequestBase implements JsonpSerializable { - private final Map configuration; - - private final String connectorId; - - private final Map values; - - // --------------------------------------------------------------------------------------------- - - private UpdateConfigurationRequest(Builder builder) { - - this.configuration = ApiTypeHelper.unmodifiable(builder.configuration); - this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); - this.values = ApiTypeHelper.unmodifiable(builder.values); - - } - - public static UpdateConfigurationRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * API name: {@code configuration} - */ - public final Map configuration() { - return this.configuration; - } - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final String connectorId() { - return this.connectorId; - } - - /** - * API name: {@code values} - */ - public final Map values() { - return this.values; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (ApiTypeHelper.isDefined(this.configuration)) { - generator.writeKey("configuration"); - generator.writeStartObject(); - for (Map.Entry item0 : this.configuration.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - - } - generator.writeEnd(); - - } - if (ApiTypeHelper.isDefined(this.values)) { - generator.writeKey("values"); - generator.writeStartObject(); - for (Map.Entry item0 : this.values.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - - } - generator.writeEnd(); - - } - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateConfigurationRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder - implements - ObjectBuilder { - @Nullable - private Map configuration; - - private String connectorId; - - @Nullable - private Map values; - - /** - * API name: {@code configuration} - *

- * Adds all entries of map to configuration. - */ - public final Builder configuration(Map map) { - this.configuration = _mapPutAll(this.configuration, map); - return this; - } - - /** - * API name: {@code configuration} - *

- * Adds an entry to configuration. - */ - public final Builder configuration(String key, ConnectorConfigProperties value) { - this.configuration = _mapPut(this.configuration, key, value); - return this; - } - - /** - * API name: {@code configuration} - *

- * Adds an entry to configuration using a builder lambda. - */ - public final Builder configuration(String key, - Function> fn) { - return configuration(key, fn.apply(new ConnectorConfigProperties.Builder()).build()); - } - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final Builder connectorId(String value) { - this.connectorId = value; - return this; - } - - /** - * API name: {@code values} - *

- * Adds all entries of map to values. - */ - public final Builder values(Map map) { - this.values = _mapPutAll(this.values, map); - return this; - } - - /** - * API name: {@code values} - *

- * Adds an entry to values. - */ - public final Builder values(String key, JsonData value) { - this.values = _mapPut(this.values, key, value); - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateConfigurationRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateConfigurationRequest build() { - _checkSingleUse(); - - return new UpdateConfigurationRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdateConfigurationRequest} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdateConfigurationRequest::setupUpdateConfigurationRequestDeserializer); - - protected static void setupUpdateConfigurationRequestDeserializer( - ObjectDeserializer op) { - - op.add(Builder::configuration, JsonpDeserializer.stringMapDeserializer(ConnectorConfigProperties._DESERIALIZER), - "configuration"); - op.add(Builder::values, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "values"); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.update_configuration}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.update_configuration", - - // Request method - request -> { - return "PUT"; - - }, - - // Request path - request -> { - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_connector"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.connectorId, buf); - buf.append("/_configuration"); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); - - }, - - // Path parameters - request -> { - Map params = new HashMap<>(); - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - params.put("connectorId", request.connectorId); - } - return params; - }, - - // Request parameters - request -> { - return Collections.emptyMap(); - - }, SimpleEndpoint.emptyMap(), true, UpdateConfigurationResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationResponse.java deleted file mode 100644 index d690482c8..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationResponse.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.Result; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_configuration.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdateConfigurationResponse implements JsonpSerializable { - private final Result result; - - // --------------------------------------------------------------------------------------------- - - private UpdateConfigurationResponse(Builder builder) { - - this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); - - } - - public static UpdateConfigurationResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code result} - */ - public final Result result() { - return this.result; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("result"); - this.result.serialize(generator, mapper); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateConfigurationResponse}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private Result result; - - /** - * Required - API name: {@code result} - */ - public final Builder result(Result value) { - this.result = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateConfigurationResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateConfigurationResponse build() { - _checkSingleUse(); - - return new UpdateConfigurationResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdateConfigurationResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdateConfigurationResponse::setupUpdateConfigurationResponseDeserializer); - - protected static void setupUpdateConfigurationResponseDeserializer( - ObjectDeserializer op) { - - op.add(Builder::result, Result._DESERIALIZER, "result"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorRequest.java deleted file mode 100644 index c47ca02c1..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorRequest.java +++ /dev/null @@ -1,234 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_error.Request - -/** - * Updates the filtering field in the connector document - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdateErrorRequest extends RequestBase implements JsonpSerializable { - private final String connectorId; - - private final String error; - - // --------------------------------------------------------------------------------------------- - - private UpdateErrorRequest(Builder builder) { - - this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); - this.error = ApiTypeHelper.requireNonNull(builder.error, this, "error"); - - } - - public static UpdateErrorRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final String connectorId() { - return this.connectorId; - } - - /** - * Required - API name: {@code error} - */ - public final String error() { - return this.error; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("error"); - generator.write(this.error); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateErrorRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder - implements - ObjectBuilder { - private String connectorId; - - private String error; - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final Builder connectorId(String value) { - this.connectorId = value; - return this; - } - - /** - * Required - API name: {@code error} - */ - public final Builder error(String value) { - this.error = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateErrorRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateErrorRequest build() { - _checkSingleUse(); - - return new UpdateErrorRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdateErrorRequest} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdateErrorRequest::setupUpdateErrorRequestDeserializer); - - protected static void setupUpdateErrorRequestDeserializer(ObjectDeserializer op) { - - op.add(Builder::error, JsonpDeserializer.stringDeserializer(), "error"); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.update_error}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.update_error", - - // Request method - request -> { - return "PUT"; - - }, - - // Request path - request -> { - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_connector"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.connectorId, buf); - buf.append("/_error"); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); - - }, - - // Path parameters - request -> { - Map params = new HashMap<>(); - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - params.put("connectorId", request.connectorId); - } - return params; - }, - - // Request parameters - request -> { - return Collections.emptyMap(); - - }, SimpleEndpoint.emptyMap(), true, UpdateErrorResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorResponse.java deleted file mode 100644 index f5247a227..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorResponse.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.Result; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_error.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdateErrorResponse implements JsonpSerializable { - private final Result result; - - // --------------------------------------------------------------------------------------------- - - private UpdateErrorResponse(Builder builder) { - - this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); - - } - - public static UpdateErrorResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code result} - */ - public final Result result() { - return this.result; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("result"); - this.result.serialize(generator, mapper); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateErrorResponse}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private Result result; - - /** - * Required - API name: {@code result} - */ - public final Builder result(Result value) { - this.result = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateErrorResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateErrorResponse build() { - _checkSingleUse(); - - return new UpdateErrorResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdateErrorResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdateErrorResponse::setupUpdateErrorResponseDeserializer); - - protected static void setupUpdateErrorResponseDeserializer(ObjectDeserializer op) { - - op.add(Builder::result, Result._DESERIALIZER, "result"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringRequest.java deleted file mode 100644 index a3d636dae..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringRequest.java +++ /dev/null @@ -1,357 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_filtering.Request - -/** - * Updates the filtering field in the connector document - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdateFilteringRequest extends RequestBase implements JsonpSerializable { - @Nullable - private final FilteringAdvancedSnippet advancedSnippet; - - private final String connectorId; - - private final List filtering; - - private final List rules; - - // --------------------------------------------------------------------------------------------- - - private UpdateFilteringRequest(Builder builder) { - - this.advancedSnippet = builder.advancedSnippet; - this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); - this.filtering = ApiTypeHelper.unmodifiable(builder.filtering); - this.rules = ApiTypeHelper.unmodifiable(builder.rules); - - } - - public static UpdateFilteringRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * API name: {@code advanced_snippet} - */ - @Nullable - public final FilteringAdvancedSnippet advancedSnippet() { - return this.advancedSnippet; - } - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final String connectorId() { - return this.connectorId; - } - - /** - * API name: {@code filtering} - */ - public final List filtering() { - return this.filtering; - } - - /** - * API name: {@code rules} - */ - public final List rules() { - return this.rules; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.advancedSnippet != null) { - generator.writeKey("advanced_snippet"); - this.advancedSnippet.serialize(generator, mapper); - - } - if (ApiTypeHelper.isDefined(this.filtering)) { - generator.writeKey("filtering"); - generator.writeStartArray(); - for (FilteringConfig item0 : this.filtering) { - item0.serialize(generator, mapper); - - } - generator.writeEnd(); - - } - if (ApiTypeHelper.isDefined(this.rules)) { - generator.writeKey("rules"); - generator.writeStartArray(); - for (FilteringRule item0 : this.rules) { - item0.serialize(generator, mapper); - - } - generator.writeEnd(); - - } - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateFilteringRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder - implements - ObjectBuilder { - @Nullable - private FilteringAdvancedSnippet advancedSnippet; - - private String connectorId; - - @Nullable - private List filtering; - - @Nullable - private List rules; - - /** - * API name: {@code advanced_snippet} - */ - public final Builder advancedSnippet(@Nullable FilteringAdvancedSnippet value) { - this.advancedSnippet = value; - return this; - } - - /** - * API name: {@code advanced_snippet} - */ - public final Builder advancedSnippet( - Function> fn) { - return this.advancedSnippet(fn.apply(new FilteringAdvancedSnippet.Builder()).build()); - } - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final Builder connectorId(String value) { - this.connectorId = value; - return this; - } - - /** - * API name: {@code filtering} - *

- * Adds all elements of list to filtering. - */ - public final Builder filtering(List list) { - this.filtering = _listAddAll(this.filtering, list); - return this; - } - - /** - * API name: {@code filtering} - *

- * Adds one or more values to filtering. - */ - public final Builder filtering(FilteringConfig value, FilteringConfig... values) { - this.filtering = _listAdd(this.filtering, value, values); - return this; - } - - /** - * API name: {@code filtering} - *

- * Adds a value to filtering using a builder lambda. - */ - public final Builder filtering(Function> fn) { - return filtering(fn.apply(new FilteringConfig.Builder()).build()); - } - - /** - * API name: {@code rules} - *

- * Adds all elements of list to rules. - */ - public final Builder rules(List list) { - this.rules = _listAddAll(this.rules, list); - return this; - } - - /** - * API name: {@code rules} - *

- * Adds one or more values to rules. - */ - public final Builder rules(FilteringRule value, FilteringRule... values) { - this.rules = _listAdd(this.rules, value, values); - return this; - } - - /** - * API name: {@code rules} - *

- * Adds a value to rules using a builder lambda. - */ - public final Builder rules(Function> fn) { - return rules(fn.apply(new FilteringRule.Builder()).build()); - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateFilteringRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateFilteringRequest build() { - _checkSingleUse(); - - return new UpdateFilteringRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdateFilteringRequest} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdateFilteringRequest::setupUpdateFilteringRequestDeserializer); - - protected static void setupUpdateFilteringRequestDeserializer( - ObjectDeserializer op) { - - op.add(Builder::advancedSnippet, FilteringAdvancedSnippet._DESERIALIZER, "advanced_snippet"); - op.add(Builder::filtering, JsonpDeserializer.arrayDeserializer(FilteringConfig._DESERIALIZER), "filtering"); - op.add(Builder::rules, JsonpDeserializer.arrayDeserializer(FilteringRule._DESERIALIZER), "rules"); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.update_filtering}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.update_filtering", - - // Request method - request -> { - return "PUT"; - - }, - - // Request path - request -> { - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_connector"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.connectorId, buf); - buf.append("/_filtering"); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); - - }, - - // Path parameters - request -> { - Map params = new HashMap<>(); - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - params.put("connectorId", request.connectorId); - } - return params; - }, - - // Request parameters - request -> { - return Collections.emptyMap(); - - }, SimpleEndpoint.emptyMap(), true, UpdateFilteringResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringResponse.java deleted file mode 100644 index f95fbf72c..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringResponse.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.Result; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_filtering.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdateFilteringResponse implements JsonpSerializable { - private final Result result; - - // --------------------------------------------------------------------------------------------- - - private UpdateFilteringResponse(Builder builder) { - - this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); - - } - - public static UpdateFilteringResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code result} - */ - public final Result result() { - return this.result; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("result"); - this.result.serialize(generator, mapper); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateFilteringResponse}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private Result result; - - /** - * Required - API name: {@code result} - */ - public final Builder result(Result value) { - this.result = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateFilteringResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateFilteringResponse build() { - _checkSingleUse(); - - return new UpdateFilteringResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdateFilteringResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdateFilteringResponse::setupUpdateFilteringResponseDeserializer); - - protected static void setupUpdateFilteringResponseDeserializer( - ObjectDeserializer op) { - - op.add(Builder::result, Result._DESERIALIZER, "result"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationRequest.java deleted file mode 100644 index 4c204e883..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationRequest.java +++ /dev/null @@ -1,246 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_filtering_validation.Request - -/** - * Updates the draft filtering validation info for a connector. - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdateFilteringValidationRequest extends RequestBase implements JsonpSerializable { - private final String connectorId; - - private final FilteringRulesValidation validation; - - // --------------------------------------------------------------------------------------------- - - private UpdateFilteringValidationRequest(Builder builder) { - - this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); - this.validation = ApiTypeHelper.requireNonNull(builder.validation, this, "validation"); - - } - - public static UpdateFilteringValidationRequest of( - Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final String connectorId() { - return this.connectorId; - } - - /** - * Required - API name: {@code validation} - */ - public final FilteringRulesValidation validation() { - return this.validation; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("validation"); - this.validation.serialize(generator, mapper); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateFilteringValidationRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder - implements - ObjectBuilder { - private String connectorId; - - private FilteringRulesValidation validation; - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final Builder connectorId(String value) { - this.connectorId = value; - return this; - } - - /** - * Required - API name: {@code validation} - */ - public final Builder validation(FilteringRulesValidation value) { - this.validation = value; - return this; - } - - /** - * Required - API name: {@code validation} - */ - public final Builder validation( - Function> fn) { - return this.validation(fn.apply(new FilteringRulesValidation.Builder()).build()); - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateFilteringValidationRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateFilteringValidationRequest build() { - _checkSingleUse(); - - return new UpdateFilteringValidationRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdateFilteringValidationRequest} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdateFilteringValidationRequest::setupUpdateFilteringValidationRequestDeserializer); - - protected static void setupUpdateFilteringValidationRequestDeserializer( - ObjectDeserializer op) { - - op.add(Builder::validation, FilteringRulesValidation._DESERIALIZER, "validation"); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.update_filtering_validation}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.update_filtering_validation", - - // Request method - request -> { - return "PUT"; - - }, - - // Request path - request -> { - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_connector"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.connectorId, buf); - buf.append("/_filtering"); - buf.append("/_validation"); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); - - }, - - // Path parameters - request -> { - Map params = new HashMap<>(); - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - params.put("connectorId", request.connectorId); - } - return params; - }, - - // Request parameters - request -> { - return Collections.emptyMap(); - - }, SimpleEndpoint.emptyMap(), true, UpdateFilteringValidationResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationResponse.java deleted file mode 100644 index f152d7774..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationResponse.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.Result; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_filtering_validation.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdateFilteringValidationResponse implements JsonpSerializable { - private final Result result; - - // --------------------------------------------------------------------------------------------- - - private UpdateFilteringValidationResponse(Builder builder) { - - this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); - - } - - public static UpdateFilteringValidationResponse of( - Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code result} - */ - public final Result result() { - return this.result; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("result"); - this.result.serialize(generator, mapper); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateFilteringValidationResponse}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private Result result; - - /** - * Required - API name: {@code result} - */ - public final Builder result(Result value) { - this.result = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateFilteringValidationResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateFilteringValidationResponse build() { - _checkSingleUse(); - - return new UpdateFilteringValidationResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdateFilteringValidationResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdateFilteringValidationResponse::setupUpdateFilteringValidationResponseDeserializer); - - protected static void setupUpdateFilteringValidationResponseDeserializer( - ObjectDeserializer op) { - - op.add(Builder::result, Result._DESERIALIZER, "result"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameRequest.java deleted file mode 100644 index 5066e6c6c..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameRequest.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_index_name.Request - -/** - * Updates the index_name in the connector document - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdateIndexNameRequest extends RequestBase implements JsonpSerializable { - private final String connectorId; - - private final String indexName; - - // --------------------------------------------------------------------------------------------- - - private UpdateIndexNameRequest(Builder builder) { - - this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); - this.indexName = ApiTypeHelper.requireNonNull(builder.indexName, this, "indexName"); - - } - - public static UpdateIndexNameRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final String connectorId() { - return this.connectorId; - } - - /** - * Required - API name: {@code index_name} - */ - public final String indexName() { - return this.indexName; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("index_name"); - generator.write(this.indexName); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateIndexNameRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder - implements - ObjectBuilder { - private String connectorId; - - private String indexName; - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final Builder connectorId(String value) { - this.connectorId = value; - return this; - } - - /** - * Required - API name: {@code index_name} - */ - public final Builder indexName(String value) { - this.indexName = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateIndexNameRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateIndexNameRequest build() { - _checkSingleUse(); - - return new UpdateIndexNameRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdateIndexNameRequest} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdateIndexNameRequest::setupUpdateIndexNameRequestDeserializer); - - protected static void setupUpdateIndexNameRequestDeserializer( - ObjectDeserializer op) { - - op.add(Builder::indexName, JsonpDeserializer.stringDeserializer(), "index_name"); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.update_index_name}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.update_index_name", - - // Request method - request -> { - return "PUT"; - - }, - - // Request path - request -> { - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_connector"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.connectorId, buf); - buf.append("/_index_name"); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); - - }, - - // Path parameters - request -> { - Map params = new HashMap<>(); - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - params.put("connectorId", request.connectorId); - } - return params; - }, - - // Request parameters - request -> { - return Collections.emptyMap(); - - }, SimpleEndpoint.emptyMap(), true, UpdateIndexNameResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameResponse.java deleted file mode 100644 index d762a6935..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameResponse.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.Result; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_index_name.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdateIndexNameResponse implements JsonpSerializable { - private final Result result; - - // --------------------------------------------------------------------------------------------- - - private UpdateIndexNameResponse(Builder builder) { - - this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); - - } - - public static UpdateIndexNameResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code result} - */ - public final Result result() { - return this.result; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("result"); - this.result.serialize(generator, mapper); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateIndexNameResponse}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private Result result; - - /** - * Required - API name: {@code result} - */ - public final Builder result(Result value) { - this.result = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateIndexNameResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateIndexNameResponse build() { - _checkSingleUse(); - - return new UpdateIndexNameResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdateIndexNameResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdateIndexNameResponse::setupUpdateIndexNameResponseDeserializer); - - protected static void setupUpdateIndexNameResponseDeserializer( - ObjectDeserializer op) { - - op.add(Builder::result, Result._DESERIALIZER, "result"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameRequest.java deleted file mode 100644 index bd7ecb0cb..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameRequest.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_name.Request - -/** - * Updates the name and description fields in the connector document - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdateNameRequest extends RequestBase implements JsonpSerializable { - private final String connectorId; - - @Nullable - private final String description; - - private final String name; - - // --------------------------------------------------------------------------------------------- - - private UpdateNameRequest(Builder builder) { - - this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); - this.description = builder.description; - this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); - - } - - public static UpdateNameRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final String connectorId() { - return this.connectorId; - } - - /** - * API name: {@code description} - */ - @Nullable - public final String description() { - return this.description; - } - - /** - * Required - API name: {@code name} - */ - public final String name() { - return this.name; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.description != null) { - generator.writeKey("description"); - generator.write(this.description); - - } - generator.writeKey("name"); - generator.write(this.name); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateNameRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder - implements - ObjectBuilder { - private String connectorId; - - @Nullable - private String description; - - private String name; - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final Builder connectorId(String value) { - this.connectorId = value; - return this; - } - - /** - * API name: {@code description} - */ - public final Builder description(@Nullable String value) { - this.description = value; - return this; - } - - /** - * Required - API name: {@code name} - */ - public final Builder name(String value) { - this.name = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateNameRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateNameRequest build() { - _checkSingleUse(); - - return new UpdateNameRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdateNameRequest} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdateNameRequest::setupUpdateNameRequestDeserializer); - - protected static void setupUpdateNameRequestDeserializer(ObjectDeserializer op) { - - op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description"); - op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.update_name}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.update_name", - - // Request method - request -> { - return "PUT"; - - }, - - // Request path - request -> { - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_connector"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.connectorId, buf); - buf.append("/_name"); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); - - }, - - // Path parameters - request -> { - Map params = new HashMap<>(); - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - params.put("connectorId", request.connectorId); - } - return params; - }, - - // Request parameters - request -> { - return Collections.emptyMap(); - - }, SimpleEndpoint.emptyMap(), true, UpdateNameResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameResponse.java deleted file mode 100644 index eccdaaa88..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameResponse.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.Result; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_name.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdateNameResponse implements JsonpSerializable { - private final Result result; - - // --------------------------------------------------------------------------------------------- - - private UpdateNameResponse(Builder builder) { - - this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); - - } - - public static UpdateNameResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code result} - */ - public final Result result() { - return this.result; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("result"); - this.result.serialize(generator, mapper); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateNameResponse}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private Result result; - - /** - * Required - API name: {@code result} - */ - public final Builder result(Result value) { - this.result = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateNameResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateNameResponse build() { - _checkSingleUse(); - - return new UpdateNameResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdateNameResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdateNameResponse::setupUpdateNameResponseDeserializer); - - protected static void setupUpdateNameResponseDeserializer(ObjectDeserializer op) { - - op.add(Builder::result, Result._DESERIALIZER, "result"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeRequest.java deleted file mode 100644 index 728a5783b..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeRequest.java +++ /dev/null @@ -1,235 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.Boolean; -import java.lang.String; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_native.Request - -/** - * Updates the is_native flag in the connector document - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdateNativeRequest extends RequestBase implements JsonpSerializable { - private final String connectorId; - - private final boolean isNative; - - // --------------------------------------------------------------------------------------------- - - private UpdateNativeRequest(Builder builder) { - - this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); - this.isNative = ApiTypeHelper.requireNonNull(builder.isNative, this, "isNative"); - - } - - public static UpdateNativeRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final String connectorId() { - return this.connectorId; - } - - /** - * Required - API name: {@code is_native} - */ - public final boolean isNative() { - return this.isNative; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("is_native"); - generator.write(this.isNative); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateNativeRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder - implements - ObjectBuilder { - private String connectorId; - - private Boolean isNative; - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final Builder connectorId(String value) { - this.connectorId = value; - return this; - } - - /** - * Required - API name: {@code is_native} - */ - public final Builder isNative(boolean value) { - this.isNative = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateNativeRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateNativeRequest build() { - _checkSingleUse(); - - return new UpdateNativeRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdateNativeRequest} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdateNativeRequest::setupUpdateNativeRequestDeserializer); - - protected static void setupUpdateNativeRequestDeserializer(ObjectDeserializer op) { - - op.add(Builder::isNative, JsonpDeserializer.booleanDeserializer(), "is_native"); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.update_native}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.update_native", - - // Request method - request -> { - return "PUT"; - - }, - - // Request path - request -> { - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_connector"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.connectorId, buf); - buf.append("/_native"); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); - - }, - - // Path parameters - request -> { - Map params = new HashMap<>(); - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - params.put("connectorId", request.connectorId); - } - return params; - }, - - // Request parameters - request -> { - return Collections.emptyMap(); - - }, SimpleEndpoint.emptyMap(), true, UpdateNativeResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeResponse.java deleted file mode 100644 index 47a357eeb..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeResponse.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.Result; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_native.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdateNativeResponse implements JsonpSerializable { - private final Result result; - - // --------------------------------------------------------------------------------------------- - - private UpdateNativeResponse(Builder builder) { - - this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); - - } - - public static UpdateNativeResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code result} - */ - public final Result result() { - return this.result; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("result"); - this.result.serialize(generator, mapper); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateNativeResponse}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private Result result; - - /** - * Required - API name: {@code result} - */ - public final Builder result(Result value) { - this.result = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateNativeResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateNativeResponse build() { - _checkSingleUse(); - - return new UpdateNativeResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdateNativeResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdateNativeResponse::setupUpdateNativeResponseDeserializer); - - protected static void setupUpdateNativeResponseDeserializer(ObjectDeserializer op) { - - op.add(Builder::result, Result._DESERIALIZER, "result"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineRequest.java deleted file mode 100644 index 8c77a6354..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineRequest.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_pipeline.Request - -/** - * Updates the pipeline field in the connector document - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdatePipelineRequest extends RequestBase implements JsonpSerializable { - private final String connectorId; - - private final IngestPipelineParams pipeline; - - // --------------------------------------------------------------------------------------------- - - private UpdatePipelineRequest(Builder builder) { - - this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); - this.pipeline = ApiTypeHelper.requireNonNull(builder.pipeline, this, "pipeline"); - - } - - public static UpdatePipelineRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final String connectorId() { - return this.connectorId; - } - - /** - * Required - API name: {@code pipeline} - */ - public final IngestPipelineParams pipeline() { - return this.pipeline; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("pipeline"); - this.pipeline.serialize(generator, mapper); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdatePipelineRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder - implements - ObjectBuilder { - private String connectorId; - - private IngestPipelineParams pipeline; - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final Builder connectorId(String value) { - this.connectorId = value; - return this; - } - - /** - * Required - API name: {@code pipeline} - */ - public final Builder pipeline(IngestPipelineParams value) { - this.pipeline = value; - return this; - } - - /** - * Required - API name: {@code pipeline} - */ - public final Builder pipeline(Function> fn) { - return this.pipeline(fn.apply(new IngestPipelineParams.Builder()).build()); - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdatePipelineRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdatePipelineRequest build() { - _checkSingleUse(); - - return new UpdatePipelineRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdatePipelineRequest} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdatePipelineRequest::setupUpdatePipelineRequestDeserializer); - - protected static void setupUpdatePipelineRequestDeserializer(ObjectDeserializer op) { - - op.add(Builder::pipeline, IngestPipelineParams._DESERIALIZER, "pipeline"); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.update_pipeline}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.update_pipeline", - - // Request method - request -> { - return "PUT"; - - }, - - // Request path - request -> { - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_connector"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.connectorId, buf); - buf.append("/_pipeline"); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); - - }, - - // Path parameters - request -> { - Map params = new HashMap<>(); - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - params.put("connectorId", request.connectorId); - } - return params; - }, - - // Request parameters - request -> { - return Collections.emptyMap(); - - }, SimpleEndpoint.emptyMap(), true, UpdatePipelineResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineResponse.java deleted file mode 100644 index d4336f8db..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineResponse.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.Result; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_pipeline.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdatePipelineResponse implements JsonpSerializable { - private final Result result; - - // --------------------------------------------------------------------------------------------- - - private UpdatePipelineResponse(Builder builder) { - - this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); - - } - - public static UpdatePipelineResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code result} - */ - public final Result result() { - return this.result; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("result"); - this.result.serialize(generator, mapper); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdatePipelineResponse}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private Result result; - - /** - * Required - API name: {@code result} - */ - public final Builder result(Result value) { - this.result = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdatePipelineResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdatePipelineResponse build() { - _checkSingleUse(); - - return new UpdatePipelineResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdatePipelineResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdatePipelineResponse::setupUpdatePipelineResponseDeserializer); - - protected static void setupUpdatePipelineResponseDeserializer( - ObjectDeserializer op) { - - op.add(Builder::result, Result._DESERIALIZER, "result"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingRequest.java deleted file mode 100644 index 6fc8be6e4..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingRequest.java +++ /dev/null @@ -1,244 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_scheduling.Request - -/** - * Updates the scheduling field in the connector document - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdateSchedulingRequest extends RequestBase implements JsonpSerializable { - private final String connectorId; - - private final SchedulingConfiguration scheduling; - - // --------------------------------------------------------------------------------------------- - - private UpdateSchedulingRequest(Builder builder) { - - this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); - this.scheduling = ApiTypeHelper.requireNonNull(builder.scheduling, this, "scheduling"); - - } - - public static UpdateSchedulingRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final String connectorId() { - return this.connectorId; - } - - /** - * Required - API name: {@code scheduling} - */ - public final SchedulingConfiguration scheduling() { - return this.scheduling; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("scheduling"); - this.scheduling.serialize(generator, mapper); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateSchedulingRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder - implements - ObjectBuilder { - private String connectorId; - - private SchedulingConfiguration scheduling; - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final Builder connectorId(String value) { - this.connectorId = value; - return this; - } - - /** - * Required - API name: {@code scheduling} - */ - public final Builder scheduling(SchedulingConfiguration value) { - this.scheduling = value; - return this; - } - - /** - * Required - API name: {@code scheduling} - */ - public final Builder scheduling( - Function> fn) { - return this.scheduling(fn.apply(new SchedulingConfiguration.Builder()).build()); - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateSchedulingRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateSchedulingRequest build() { - _checkSingleUse(); - - return new UpdateSchedulingRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdateSchedulingRequest} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdateSchedulingRequest::setupUpdateSchedulingRequestDeserializer); - - protected static void setupUpdateSchedulingRequestDeserializer( - ObjectDeserializer op) { - - op.add(Builder::scheduling, SchedulingConfiguration._DESERIALIZER, "scheduling"); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.update_scheduling}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.update_scheduling", - - // Request method - request -> { - return "PUT"; - - }, - - // Request path - request -> { - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_connector"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.connectorId, buf); - buf.append("/_scheduling"); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); - - }, - - // Path parameters - request -> { - Map params = new HashMap<>(); - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - params.put("connectorId", request.connectorId); - } - return params; - }, - - // Request parameters - request -> { - return Collections.emptyMap(); - - }, SimpleEndpoint.emptyMap(), true, UpdateSchedulingResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingResponse.java deleted file mode 100644 index d3b3bcf7a..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingResponse.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.Result; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_scheduling.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdateSchedulingResponse implements JsonpSerializable { - private final Result result; - - // --------------------------------------------------------------------------------------------- - - private UpdateSchedulingResponse(Builder builder) { - - this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); - - } - - public static UpdateSchedulingResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code result} - */ - public final Result result() { - return this.result; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("result"); - this.result.serialize(generator, mapper); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateSchedulingResponse}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private Result result; - - /** - * Required - API name: {@code result} - */ - public final Builder result(Result value) { - this.result = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateSchedulingResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateSchedulingResponse build() { - _checkSingleUse(); - - return new UpdateSchedulingResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdateSchedulingResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdateSchedulingResponse::setupUpdateSchedulingResponseDeserializer); - - protected static void setupUpdateSchedulingResponseDeserializer( - ObjectDeserializer op) { - - op.add(Builder::result, Result._DESERIALIZER, "result"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeRequest.java deleted file mode 100644 index 9e7c93ee8..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeRequest.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_service_type.Request - -/** - * Updates the service type of the connector - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdateServiceTypeRequest extends RequestBase implements JsonpSerializable { - private final String connectorId; - - private final String serviceType; - - // --------------------------------------------------------------------------------------------- - - private UpdateServiceTypeRequest(Builder builder) { - - this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); - this.serviceType = ApiTypeHelper.requireNonNull(builder.serviceType, this, "serviceType"); - - } - - public static UpdateServiceTypeRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final String connectorId() { - return this.connectorId; - } - - /** - * Required - API name: {@code service_type} - */ - public final String serviceType() { - return this.serviceType; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("service_type"); - generator.write(this.serviceType); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateServiceTypeRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder - implements - ObjectBuilder { - private String connectorId; - - private String serviceType; - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final Builder connectorId(String value) { - this.connectorId = value; - return this; - } - - /** - * Required - API name: {@code service_type} - */ - public final Builder serviceType(String value) { - this.serviceType = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateServiceTypeRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateServiceTypeRequest build() { - _checkSingleUse(); - - return new UpdateServiceTypeRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdateServiceTypeRequest} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdateServiceTypeRequest::setupUpdateServiceTypeRequestDeserializer); - - protected static void setupUpdateServiceTypeRequestDeserializer( - ObjectDeserializer op) { - - op.add(Builder::serviceType, JsonpDeserializer.stringDeserializer(), "service_type"); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.update_service_type}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.update_service_type", - - // Request method - request -> { - return "PUT"; - - }, - - // Request path - request -> { - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_connector"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.connectorId, buf); - buf.append("/_service_type"); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); - - }, - - // Path parameters - request -> { - Map params = new HashMap<>(); - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - params.put("connectorId", request.connectorId); - } - return params; - }, - - // Request parameters - request -> { - return Collections.emptyMap(); - - }, SimpleEndpoint.emptyMap(), true, UpdateServiceTypeResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeResponse.java deleted file mode 100644 index 7f8e0d53e..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeResponse.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.Result; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_service_type.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdateServiceTypeResponse implements JsonpSerializable { - private final Result result; - - // --------------------------------------------------------------------------------------------- - - private UpdateServiceTypeResponse(Builder builder) { - - this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); - - } - - public static UpdateServiceTypeResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code result} - */ - public final Result result() { - return this.result; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("result"); - this.result.serialize(generator, mapper); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateServiceTypeResponse}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private Result result; - - /** - * Required - API name: {@code result} - */ - public final Builder result(Result value) { - this.result = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateServiceTypeResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateServiceTypeResponse build() { - _checkSingleUse(); - - return new UpdateServiceTypeResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdateServiceTypeResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdateServiceTypeResponse::setupUpdateServiceTypeResponseDeserializer); - - protected static void setupUpdateServiceTypeResponseDeserializer( - ObjectDeserializer op) { - - op.add(Builder::result, Result._DESERIALIZER, "result"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusRequest.java deleted file mode 100644 index 5f0b7270f..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusRequest.java +++ /dev/null @@ -1,234 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.ErrorResponse; -import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.transport.Endpoint; -import co.elastic.clients.transport.endpoints.SimpleEndpoint; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_status.Request - -/** - * Updates the status of the connector - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdateStatusRequest extends RequestBase implements JsonpSerializable { - private final String connectorId; - - private final ConnectorStatus status; - - // --------------------------------------------------------------------------------------------- - - private UpdateStatusRequest(Builder builder) { - - this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); - this.status = ApiTypeHelper.requireNonNull(builder.status, this, "status"); - - } - - public static UpdateStatusRequest of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final String connectorId() { - return this.connectorId; - } - - /** - * Required - API name: {@code status} - */ - public final ConnectorStatus status() { - return this.status; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("status"); - this.status.serialize(generator, mapper); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateStatusRequest}. - */ - - public static class Builder extends RequestBase.AbstractBuilder - implements - ObjectBuilder { - private String connectorId; - - private ConnectorStatus status; - - /** - * Required - The unique identifier of the connector to be updated - *

- * API name: {@code connector_id} - */ - public final Builder connectorId(String value) { - this.connectorId = value; - return this; - } - - /** - * Required - API name: {@code status} - */ - public final Builder status(ConnectorStatus value) { - this.status = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateStatusRequest}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateStatusRequest build() { - _checkSingleUse(); - - return new UpdateStatusRequest(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdateStatusRequest} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdateStatusRequest::setupUpdateStatusRequestDeserializer); - - protected static void setupUpdateStatusRequestDeserializer(ObjectDeserializer op) { - - op.add(Builder::status, ConnectorStatus._DESERIALIZER, "status"); - - } - - // --------------------------------------------------------------------------------------------- - - /** - * Endpoint "{@code connector.update_status}". - */ - public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( - "es/connector.update_status", - - // Request method - request -> { - return "PUT"; - - }, - - // Request path - request -> { - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_connector"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.connectorId, buf); - buf.append("/_status"); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); - - }, - - // Path parameters - request -> { - Map params = new HashMap<>(); - final int _connectorId = 1 << 0; - - int propsSet = 0; - - propsSet |= _connectorId; - - if (propsSet == (_connectorId)) { - params.put("connectorId", request.connectorId); - } - return params; - }, - - // Request parameters - request -> { - return Collections.emptyMap(); - - }, SimpleEndpoint.emptyMap(), true, UpdateStatusResponse._DESERIALIZER); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusResponse.java deleted file mode 100644 index f5cfe4ad5..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusResponse.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.elasticsearch._types.Result; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector.update_status.Response - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class UpdateStatusResponse implements JsonpSerializable { - private final Result result; - - // --------------------------------------------------------------------------------------------- - - private UpdateStatusResponse(Builder builder) { - - this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); - - } - - public static UpdateStatusResponse of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code result} - */ - public final Result result() { - return this.result; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("result"); - this.result.serialize(generator, mapper); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link UpdateStatusResponse}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private Result result; - - /** - * Required - API name: {@code result} - */ - public final Builder result(Result value) { - this.result = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link UpdateStatusResponse}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public UpdateStatusResponse build() { - _checkSingleUse(); - - return new UpdateStatusResponse(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link UpdateStatusResponse} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, UpdateStatusResponse::setupUpdateStatusResponseDeserializer); - - protected static void setupUpdateStatusResponseDeserializer(ObjectDeserializer op) { - - op.add(Builder::result, Result._DESERIALIZER, "result"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/Validation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/Validation.java deleted file mode 100644 index c84ac100b..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/Validation.java +++ /dev/null @@ -1,308 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonEnum; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.TaggedUnion; -import co.elastic.clients.util.TaggedUnionUtils; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -// typedef: connector._types.Validation - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class Validation implements TaggedUnion, JsonpSerializable { - - /** - * {@link Validation} variant kinds. - * - * @see API - * specification - */ - - public enum Kind implements JsonEnum { - GreaterThan("greater_than"), - - IncludedIn("included_in"), - - LessThan("less_than"), - - ListType("list_type"), - - Regex("regex"), - - ; - - private final String jsonValue; - - Kind(String jsonValue) { - this.jsonValue = jsonValue; - } - - public String jsonValue() { - return this.jsonValue; - } - - } - - private final Kind _kind; - private final ValidationVariant _value; - - @Override - public final Kind _kind() { - return _kind; - } - - @Override - public final ValidationVariant _get() { - return _value; - } - - public Validation(ValidationVariant value) { - - this._kind = ApiTypeHelper.requireNonNull(value._validationKind(), this, ""); - this._value = ApiTypeHelper.requireNonNull(value, this, ""); - - } - - private Validation(Builder builder) { - - this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, ""); - this._value = ApiTypeHelper.requireNonNull(builder._value, builder, ""); - - } - - public static Validation of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Is this variant instance of kind {@code greater_than}? - */ - public boolean isGreaterThan() { - return _kind == Kind.GreaterThan; - } - - /** - * Get the {@code greater_than} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code greater_than} kind. - */ - public GreaterThanValidation greaterThan() { - return TaggedUnionUtils.get(this, Kind.GreaterThan); - } - - /** - * Is this variant instance of kind {@code included_in}? - */ - public boolean isIncludedIn() { - return _kind == Kind.IncludedIn; - } - - /** - * Get the {@code included_in} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code included_in} kind. - */ - public IncludedInValidation includedIn() { - return TaggedUnionUtils.get(this, Kind.IncludedIn); - } - - /** - * Is this variant instance of kind {@code less_than}? - */ - public boolean isLessThan() { - return _kind == Kind.LessThan; - } - - /** - * Get the {@code less_than} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code less_than} kind. - */ - public LessThanValidation lessThan() { - return TaggedUnionUtils.get(this, Kind.LessThan); - } - - /** - * Is this variant instance of kind {@code list_type}? - */ - public boolean isListType() { - return _kind == Kind.ListType; - } - - /** - * Get the {@code list_type} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code list_type} kind. - */ - public ListTypeValidation listType() { - return TaggedUnionUtils.get(this, Kind.ListType); - } - - /** - * Is this variant instance of kind {@code regex}? - */ - public boolean isRegex() { - return _kind == Kind.Regex; - } - - /** - * Get the {@code regex} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code regex} kind. - */ - public RegexValidation regex() { - return TaggedUnionUtils.get(this, Kind.Regex); - } - - @Override - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - - mapper.serialize(_value, generator); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - private Kind _kind; - private ValidationVariant _value; - - @Override - protected Builder self() { - return this; - } - public ObjectBuilder greaterThan(GreaterThanValidation v) { - this._kind = Kind.GreaterThan; - this._value = v; - return this; - } - - public ObjectBuilder greaterThan( - Function> fn) { - return this.greaterThan(fn.apply(new GreaterThanValidation.Builder()).build()); - } - - public ObjectBuilder includedIn(IncludedInValidation v) { - this._kind = Kind.IncludedIn; - this._value = v; - return this; - } - - public ObjectBuilder includedIn( - Function> fn) { - return this.includedIn(fn.apply(new IncludedInValidation.Builder()).build()); - } - - public ObjectBuilder lessThan(LessThanValidation v) { - this._kind = Kind.LessThan; - this._value = v; - return this; - } - - public ObjectBuilder lessThan( - Function> fn) { - return this.lessThan(fn.apply(new LessThanValidation.Builder()).build()); - } - - public ObjectBuilder listType(ListTypeValidation v) { - this._kind = Kind.ListType; - this._value = v; - return this; - } - - public ObjectBuilder listType( - Function> fn) { - return this.listType(fn.apply(new ListTypeValidation.Builder()).build()); - } - - public ObjectBuilder regex(RegexValidation v) { - this._kind = Kind.Regex; - this._value = v; - return this; - } - - public ObjectBuilder regex(Function> fn) { - return this.regex(fn.apply(new RegexValidation.Builder()).build()); - } - - public Validation build() { - _checkSingleUse(); - return new Validation(this); - } - - } - - protected static void setupValidationDeserializer(ObjectDeserializer op) { - - op.add(Builder::greaterThan, GreaterThanValidation._DESERIALIZER, "greater_than"); - op.add(Builder::includedIn, IncludedInValidation._DESERIALIZER, "included_in"); - op.add(Builder::lessThan, LessThanValidation._DESERIALIZER, "less_than"); - op.add(Builder::listType, ListTypeValidation._DESERIALIZER, "list_type"); - op.add(Builder::regex, RegexValidation._DESERIALIZER, "regex"); - - op.setTypeProperty("type", null); - - } - - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - Validation::setupValidationDeserializer, Builder::build); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ValidationBuilders.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ValidationBuilders.java deleted file mode 100644 index a6ea904d1..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ValidationBuilders.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.util.ObjectBuilder; -import java.util.function.Function; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -/** - * Builders for {@link Validation} variants. - */ -public class ValidationBuilders { - private ValidationBuilders() { - } - - /** - * Creates a builder for the {@link GreaterThanValidation greater_than} - * {@code Validation} variant. - */ - public static GreaterThanValidation.Builder greaterThan() { - return new GreaterThanValidation.Builder(); - } - - /** - * Creates a Validation of the {@link GreaterThanValidation greater_than} - * {@code Validation} variant. - */ - public static Validation greaterThan( - Function> fn) { - Validation.Builder builder = new Validation.Builder(); - builder.greaterThan(fn.apply(new GreaterThanValidation.Builder()).build()); - return builder.build(); - } - - /** - * Creates a builder for the {@link IncludedInValidation included_in} - * {@code Validation} variant. - */ - public static IncludedInValidation.Builder includedIn() { - return new IncludedInValidation.Builder(); - } - - /** - * Creates a Validation of the {@link IncludedInValidation included_in} - * {@code Validation} variant. - */ - public static Validation includedIn( - Function> fn) { - Validation.Builder builder = new Validation.Builder(); - builder.includedIn(fn.apply(new IncludedInValidation.Builder()).build()); - return builder.build(); - } - - /** - * Creates a builder for the {@link LessThanValidation less_than} - * {@code Validation} variant. - */ - public static LessThanValidation.Builder lessThan() { - return new LessThanValidation.Builder(); - } - - /** - * Creates a Validation of the {@link LessThanValidation less_than} - * {@code Validation} variant. - */ - public static Validation lessThan(Function> fn) { - Validation.Builder builder = new Validation.Builder(); - builder.lessThan(fn.apply(new LessThanValidation.Builder()).build()); - return builder.build(); - } - - /** - * Creates a builder for the {@link ListTypeValidation list_type} - * {@code Validation} variant. - */ - public static ListTypeValidation.Builder listType() { - return new ListTypeValidation.Builder(); - } - - /** - * Creates a Validation of the {@link ListTypeValidation list_type} - * {@code Validation} variant. - */ - public static Validation listType(Function> fn) { - Validation.Builder builder = new Validation.Builder(); - builder.listType(fn.apply(new ListTypeValidation.Builder()).build()); - return builder.build(); - } - - /** - * Creates a builder for the {@link RegexValidation regex} {@code Validation} - * variant. - */ - public static RegexValidation.Builder regex() { - return new RegexValidation.Builder(); - } - - /** - * Creates a Validation of the {@link RegexValidation regex} {@code Validation} - * variant. - */ - public static Validation regex(Function> fn) { - Validation.Builder builder = new Validation.Builder(); - builder.regex(fn.apply(new RegexValidation.Builder()).build()); - return builder.build(); - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ValidationVariant.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ValidationVariant.java deleted file mode 100644 index 73140347d..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ValidationVariant.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ - -package co.elastic.clients.elasticsearch.connector; - -import co.elastic.clients.json.JsonpSerializable; - -//---------------------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------------------- -// -// This code is generated from the Elasticsearch API specification -// at https://github.com/elastic/elasticsearch-specification -// -// Manual updates to this file will be lost when the code is -// re-generated. -// -// If you find a property that is missing or wrongly typed, please -// open an issue or a PR on the API specification repository. -// -//---------------------------------------------------------------- - -/** - * Base interface for {@link Validation} variants. - */ -public interface ValidationVariant extends JsonpSerializable { - - Validation.Kind _validationKind(); - - default Validation _toValidation() { - return new Validation(this); - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html b/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html index 7dd207b05..f8847a845 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html @@ -1145,91 +1145,6 @@ 'cluster.stats.Response': 'cluster/stats/ClusterStatsResponse.ts#L53-L55', 'cluster.stats.RuntimeFieldTypes': 'cluster/stats/types.ts#L169-L226', 'cluster.stats.StatsResponseBase': 'cluster/stats/ClusterStatsResponse.ts#L25-L51', -'connector._types.Connector': 'connector/_types/Connector.ts#L238-L267', -'connector._types.ConnectorConfigProperties': 'connector/_types/Connector.ts#L83-L99', -'connector._types.ConnectorFeatures': 'connector/_types/Connector.ts#L224-L230', -'connector._types.ConnectorFieldType': 'connector/_types/Connector.ts#L43-L48', -'connector._types.ConnectorScheduling': 'connector/_types/Connector.ts#L106-L110', -'connector._types.ConnectorStatus': 'connector/_types/Connector.ts#L130-L136', -'connector._types.ConnectorSyncJob': 'connector/_types/SyncJob.ts#L52-L71', -'connector._types.CustomScheduling': 'connector/_types/Connector.ts#L120-L126', -'connector._types.CustomSchedulingConfigurationOverrides': 'connector/_types/Connector.ts#L112-L118', -'connector._types.Dependency': 'connector/_types/Connector.ts#L30-L33', -'connector._types.DisplayType': 'connector/_types/Connector.ts#L35-L41', -'connector._types.FeatureEnabled': 'connector/_types/Connector.ts#L215-L217', -'connector._types.FilteringAdvancedSnippet': 'connector/_types/Connector.ts#L192-L196', -'connector._types.FilteringConfig': 'connector/_types/Connector.ts#L209-L213', -'connector._types.FilteringPolicy': 'connector/_types/Connector.ts#L155-L158', -'connector._types.FilteringRule': 'connector/_types/Connector.ts#L170-L179', -'connector._types.FilteringRuleRule': 'connector/_types/Connector.ts#L160-L168', -'connector._types.FilteringRules': 'connector/_types/Connector.ts#L203-L207', -'connector._types.FilteringRulesValidation': 'connector/_types/Connector.ts#L198-L201', -'connector._types.FilteringValidation': 'connector/_types/Connector.ts#L181-L184', -'connector._types.FilteringValidationState': 'connector/_types/Connector.ts#L186-L190', -'connector._types.GreaterThanValidation': 'connector/_types/Connector.ts#L63-L66', -'connector._types.IncludedInValidation': 'connector/_types/Connector.ts#L73-L76', -'connector._types.IngestPipelineParams': 'connector/_types/Connector.ts#L148-L153', -'connector._types.LessThanValidation': 'connector/_types/Connector.ts#L58-L61', -'connector._types.ListTypeValidation': 'connector/_types/Connector.ts#L68-L71', -'connector._types.RegexValidation': 'connector/_types/Connector.ts#L78-L81', -'connector._types.SchedulingConfiguration': 'connector/_types/Connector.ts#L232-L236', -'connector._types.SelectOption': 'connector/_types/Connector.ts#L25-L28', -'connector._types.SyncJobConnectorReference': 'connector/_types/SyncJob.ts#L31-L39', -'connector._types.SyncJobTriggerMethod': 'connector/_types/SyncJob.ts#L47-L50', -'connector._types.SyncJobType': 'connector/_types/SyncJob.ts#L41-L45', -'connector._types.SyncRulesFeature': 'connector/_types/Connector.ts#L219-L222', -'connector._types.SyncStatus': 'connector/_types/Connector.ts#L138-L146', -'connector._types.Validation': 'connector/_types/Connector.ts#L50-L56', -'connector.check_in.Request': 'connector/check_in/ConnectorCheckInRequest.ts#L22-L36', -'connector.check_in.Response': 'connector/check_in/ConnectorCheckInResponse.ts#L22-L26', -'connector.delete.Request': 'connector/delete/ConnectorDeleteRequest.ts#L22-L39', -'connector.delete.Response': 'connector/delete/ConnectorDeleteResponse.ts#L22-L24', -'connector.get.Request': 'connector/get/ConnectorGetRequest.ts#L22-L36', -'connector.get.Response': 'connector/get/ConnectorGetResponse.ts#L22-L24', -'connector.last_sync.Request': 'connector/last_sync/ConnectorUpdateLastSyncRequest.ts#L26-L56', -'connector.last_sync.Response': 'connector/last_sync/ConnectorUpdateLastSyncResponse.ts#L22-L26', -'connector.list.Request': 'connector/list/ConnectorListRequest.ts#L23-L57', -'connector.list.Response': 'connector/list/ConnectorListResponse.ts#L23-L28', -'connector.post.Request': 'connector/post/ConnectorPostRequest.ts#L23-L43', -'connector.post.Response': 'connector/post/ConnectorPostResponse.ts#L22-L26', -'connector.put.Request': 'connector/put/ConnectorPutRequest.ts#L23-L49', -'connector.put.Response': 'connector/put/ConnectorPutResponse.ts#L22-L26', -'connector.sync_job_cancel.Request': 'connector/sync_job_cancel/SyncJobCancelRequest.ts#L22-L36', -'connector.sync_job_cancel.Response': 'connector/sync_job_cancel/SyncJobCancelResponse.ts#L22-L26', -'connector.sync_job_delete.Request': 'connector/sync_job_delete/SyncJobDeleteRequest.ts#L22-L36', -'connector.sync_job_delete.Response': 'connector/sync_job_delete/SyncJobDeleteResponse.ts#L22-L24', -'connector.sync_job_get.Request': 'connector/sync_job_get/SyncJobGetRequest.ts#L22-L36', -'connector.sync_job_get.Response': 'connector/sync_job_get/SyncJobGetResponse.ts#L22-L24', -'connector.sync_job_list.Request': 'connector/sync_job_list/SyncJobListRequest.ts#L25-L55', -'connector.sync_job_list.Response': 'connector/sync_job_list/SyncJobListResponse.ts#L23-L28', -'connector.sync_job_post.Request': 'connector/sync_job_post/SyncJobPostRequest.ts#L23-L43', -'connector.sync_job_post.Response': 'connector/sync_job_post/SyncJobPostResponse.ts#L22-L26', -'connector.update_active_filtering.Request': 'connector/update_active_filtering/ConnectorUpdateActiveFilteringRequest.ts#L22-L36', -'connector.update_active_filtering.Response': 'connector/update_active_filtering/ConnectorUpdateActiveFilteringResponse.ts#L22-L26', -'connector.update_api_key_id.Request': 'connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts#L23-L44', -'connector.update_api_key_id.Response': 'connector/update_api_key_id/ConnectorUpdateAPIKeyIDResponse.ts#L22-L26', -'connector.update_configuration.Request': 'connector/update_configuration/ConnectorUpdateConfigurationRequest.ts#L25-L47', -'connector.update_configuration.Response': 'connector/update_configuration/ConnectorUpdateConfigurationResponse.ts#L22-L26', -'connector.update_error.Request': 'connector/update_error/ConnectorUpdateErrorRequest.ts#L23-L44', -'connector.update_error.Response': 'connector/update_error/ConnectorUpdateErrorResponse.ts#L22-L26', -'connector.update_filtering.Request': 'connector/update_filtering/ConnectorUpdateFilteringRequest.ts#L27-L50', -'connector.update_filtering.Response': 'connector/update_filtering/ConnectorUpdateFilteringResponse.ts#L22-L26', -'connector.update_filtering_validation.Request': 'connector/update_filtering_validation/ConnectorUpdateFilteringValidationRequest.ts#L23-L40', -'connector.update_filtering_validation.Response': 'connector/update_filtering_validation/ConnectorUpdateFilteringValidationResponse.ts#L22-L26', -'connector.update_index_name.Request': 'connector/update_index_name/ConnectorUpdateIndexNameRequest.ts#L23-L43', -'connector.update_index_name.Response': 'connector/update_index_name/ConnectorUpdateIndexNameResponse.ts#L22-L26', -'connector.update_name.Request': 'connector/update_name/ConnectorUpdateNameRequest.ts#L22-L43', -'connector.update_name.Response': 'connector/update_name/ConnectorUpdateNameResponse.ts#L22-L26', -'connector.update_native.Request': 'connector/update_native/ConnectorUpdateNativeRequest.ts#L22-L42', -'connector.update_native.Response': 'connector/update_native/ConnectorUpdateNativeResponse.ts#L22-L26', -'connector.update_pipeline.Request': 'connector/update_pipeline/ConnectorUpdatePipelineRequest.ts#L23-L44', -'connector.update_pipeline.Response': 'connector/update_pipeline/ConnectorUpdatePipelineResponse.ts#L22-L26', -'connector.update_scheduling.Request': 'connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts#L23-L44', -'connector.update_scheduling.Response': 'connector/update_scheduling/ConnectorUpdateSchedulingResponse.ts#L22-L26', -'connector.update_service_type.Request': 'connector/update_service_type/ConnectorUpdateServiceTypeRequest.ts#L22-L42', -'connector.update_service_type.Response': 'connector/update_service_type/ConnectorUpdateServiceTypeResponse.ts#L22-L26', -'connector.update_status.Request': 'connector/update_status/ConnectorUpdateStatusRequest.ts#L23-L43', -'connector.update_status.Response': 'connector/update_status/ConnectorUpdateStatusResponse.ts#L22-L26', 'dangling_indices.delete_dangling_index.Request': 'dangling_indices/delete_dangling_index/DeleteDanglingIndexRequest.ts#L24-L37', 'dangling_indices.delete_dangling_index.Response': 'dangling_indices/delete_dangling_index/DeleteDanglingIndexResponse.ts#L22-L24', 'dangling_indices.import_dangling_index.Request': 'dangling_indices/import_dangling_index/ImportDanglingIndexRequest.ts#L24-L37',