org.openmetadata.client.api.BotsApi Maven / Gradle / Ivy
package org.openmetadata.client.api;
import org.openmetadata.client.ApiClient;
import org.openmetadata.client.EncodingUtils;
import org.openmetadata.client.model.ApiResponse;
import org.openmetadata.client.model.Bot;
import org.openmetadata.client.model.BotList;
import org.openmetadata.client.model.CreateBot;
import org.openmetadata.client.model.EntityHistory;
import org.openmetadata.client.model.RestoreEntity;
import java.util.UUID;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import feign.*;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-25T06:10:38.496414726Z[Etc/UTC]")
public interface BotsApi extends ApiClient.Api {
/**
* Create a bot
* Create a new bot.
* @param createBot (optional)
* @return Bot
*/
@RequestLine("POST /v1/bots")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
Bot createBot(CreateBot createBot);
/**
* Create a bot
* Similar to createBot
but it also returns the http response headers .
* Create a new bot.
* @param createBot (optional)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("POST /v1/bots")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
ApiResponse createBotWithHttpInfo(CreateBot createBot);
/**
* Create or update a bot
* Create a bot, if it does not exist. If a bot already exists, update the bot.
* @param createBot (optional)
* @return Bot
*/
@RequestLine("PUT /v1/bots")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
Bot createOrUpdateBot(CreateBot createBot);
/**
* Create or update a bot
* Similar to createOrUpdateBot
but it also returns the http response headers .
* Create a bot, if it does not exist. If a bot already exists, update the bot.
* @param createBot (optional)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("PUT /v1/bots")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
ApiResponse createOrUpdateBotWithHttpInfo(CreateBot createBot);
/**
* Delete a bot by Id
* Delete a bot by `Id`.
* @param id Id of the bot (required)
* @param hardDelete Hard delete the entity. (Default = `false`) (optional, default to false)
*/
@RequestLine("DELETE /v1/bots/{id}?hardDelete={hardDelete}")
@Headers({
"Accept: application/json",
})
void deleteBot(@Param("id") UUID id, @Param("hardDelete") Boolean hardDelete);
/**
* Delete a bot by Id
* Similar to deleteBot
but it also returns the http response headers .
* Delete a bot by `Id`.
* @param id Id of the bot (required)
* @param hardDelete Hard delete the entity. (Default = `false`) (optional, default to false)
*/
@RequestLine("DELETE /v1/bots/{id}?hardDelete={hardDelete}")
@Headers({
"Accept: application/json",
})
ApiResponse deleteBotWithHttpInfo(@Param("id") UUID id, @Param("hardDelete") Boolean hardDelete);
/**
* Delete a bot by Id
* Delete a bot by `Id`.
* Note, this is equivalent to the other deleteBot
method,
* but with the query parameters collected into a single Map parameter. This
* is convenient for services with optional query parameters, especially when
* used with the {@link DeleteBotQueryParams} class that allows for
* building up this map in a fluent style.
* @param id Id of the bot (required)
* @param queryParams Map of query parameters as name-value pairs
* The following elements may be specified in the query map:
*
* - hardDelete - Hard delete the entity. (Default = `false`) (optional, default to false)
*
*/
@RequestLine("DELETE /v1/bots/{id}?hardDelete={hardDelete}")
@Headers({
"Accept: application/json",
})
void deleteBot(@Param("id") UUID id, @QueryMap(encoded=true) DeleteBotQueryParams queryParams);
/**
* Delete a bot by Id
* Delete a bot by `Id`.
* Note, this is equivalent to the other deleteBot
that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param id Id of the bot (required)
* @param queryParams Map of query parameters as name-value pairs
* The following elements may be specified in the query map:
*
* - hardDelete - Hard delete the entity. (Default = `false`) (optional, default to false)
*
*/
@RequestLine("DELETE /v1/bots/{id}?hardDelete={hardDelete}")
@Headers({
"Accept: application/json",
})
ApiResponse deleteBotWithHttpInfo(@Param("id") UUID id, @QueryMap(encoded=true) DeleteBotQueryParams queryParams);
/**
* A convenience class for generating query parameters for the
* deleteBot
method in a fluent style.
*/
public static class DeleteBotQueryParams extends HashMap {
public DeleteBotQueryParams hardDelete(final Boolean value) {
put("hardDelete", EncodingUtils.encode(value));
return this;
}
}
/**
* Delete a bot by name
* Delete a bot by `name`.
* @param name Name of the bot (required)
* @param hardDelete Hard delete the entity. (Default = `false`) (optional, default to false)
*/
@RequestLine("DELETE /v1/bots/name/{name}?hardDelete={hardDelete}")
@Headers({
"Accept: application/json",
})
void deleteBotByFQN(@Param("name") String name, @Param("hardDelete") Boolean hardDelete);
/**
* Delete a bot by name
* Similar to deleteBotByFQN
but it also returns the http response headers .
* Delete a bot by `name`.
* @param name Name of the bot (required)
* @param hardDelete Hard delete the entity. (Default = `false`) (optional, default to false)
*/
@RequestLine("DELETE /v1/bots/name/{name}?hardDelete={hardDelete}")
@Headers({
"Accept: application/json",
})
ApiResponse deleteBotByFQNWithHttpInfo(@Param("name") String name, @Param("hardDelete") Boolean hardDelete);
/**
* Delete a bot by name
* Delete a bot by `name`.
* Note, this is equivalent to the other deleteBotByFQN
method,
* but with the query parameters collected into a single Map parameter. This
* is convenient for services with optional query parameters, especially when
* used with the {@link DeleteBotByFQNQueryParams} class that allows for
* building up this map in a fluent style.
* @param name Name of the bot (required)
* @param queryParams Map of query parameters as name-value pairs
* The following elements may be specified in the query map:
*
* - hardDelete - Hard delete the entity. (Default = `false`) (optional, default to false)
*
*/
@RequestLine("DELETE /v1/bots/name/{name}?hardDelete={hardDelete}")
@Headers({
"Accept: application/json",
})
void deleteBotByFQN(@Param("name") String name, @QueryMap(encoded=true) DeleteBotByFQNQueryParams queryParams);
/**
* Delete a bot by name
* Delete a bot by `name`.
* Note, this is equivalent to the other deleteBotByFQN
that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param name Name of the bot (required)
* @param queryParams Map of query parameters as name-value pairs
* The following elements may be specified in the query map:
*
* - hardDelete - Hard delete the entity. (Default = `false`) (optional, default to false)
*
*/
@RequestLine("DELETE /v1/bots/name/{name}?hardDelete={hardDelete}")
@Headers({
"Accept: application/json",
})
ApiResponse deleteBotByFQNWithHttpInfo(@Param("name") String name, @QueryMap(encoded=true) DeleteBotByFQNQueryParams queryParams);
/**
* A convenience class for generating query parameters for the
* deleteBotByFQN
method in a fluent style.
*/
public static class DeleteBotByFQNQueryParams extends HashMap {
public DeleteBotByFQNQueryParams hardDelete(final Boolean value) {
put("hardDelete", EncodingUtils.encode(value));
return this;
}
}
/**
* Get a bot by name
* Get a bot by `name`.
* @param name Name of the bot (required)
* @param include Include all, deleted, or non-deleted entities. (optional, default to non-deleted)
* @return Bot
*/
@RequestLine("GET /v1/bots/name/{name}?include={include}")
@Headers({
"Accept: application/json",
})
Bot getBotByFQN(@Param("name") String name, @Param("include") String include);
/**
* Get a bot by name
* Similar to getBotByFQN
but it also returns the http response headers .
* Get a bot by `name`.
* @param name Name of the bot (required)
* @param include Include all, deleted, or non-deleted entities. (optional, default to non-deleted)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /v1/bots/name/{name}?include={include}")
@Headers({
"Accept: application/json",
})
ApiResponse getBotByFQNWithHttpInfo(@Param("name") String name, @Param("include") String include);
/**
* Get a bot by name
* Get a bot by `name`.
* Note, this is equivalent to the other getBotByFQN
method,
* but with the query parameters collected into a single Map parameter. This
* is convenient for services with optional query parameters, especially when
* used with the {@link GetBotByFQNQueryParams} class that allows for
* building up this map in a fluent style.
* @param name Name of the bot (required)
* @param queryParams Map of query parameters as name-value pairs
* The following elements may be specified in the query map:
*
* - include - Include all, deleted, or non-deleted entities. (optional, default to non-deleted)
*
* @return Bot
*/
@RequestLine("GET /v1/bots/name/{name}?include={include}")
@Headers({
"Accept: application/json",
})
Bot getBotByFQN(@Param("name") String name, @QueryMap(encoded=true) GetBotByFQNQueryParams queryParams);
/**
* Get a bot by name
* Get a bot by `name`.
* Note, this is equivalent to the other getBotByFQN
that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param name Name of the bot (required)
* @param queryParams Map of query parameters as name-value pairs
* The following elements may be specified in the query map:
*
* - include - Include all, deleted, or non-deleted entities. (optional, default to non-deleted)
*
* @return Bot
*/
@RequestLine("GET /v1/bots/name/{name}?include={include}")
@Headers({
"Accept: application/json",
})
ApiResponse getBotByFQNWithHttpInfo(@Param("name") String name, @QueryMap(encoded=true) GetBotByFQNQueryParams queryParams);
/**
* A convenience class for generating query parameters for the
* getBotByFQN
method in a fluent style.
*/
public static class GetBotByFQNQueryParams extends HashMap {
public GetBotByFQNQueryParams include(final String value) {
put("include", EncodingUtils.encode(value));
return this;
}
}
/**
* Get a bot by Id
* Get a bot by `Id`.
* @param id Id of the bot (required)
* @param include (optional, default to non-deleted)
* @return Bot
*/
@RequestLine("GET /v1/bots/{id}?include={include}")
@Headers({
"Accept: application/json",
})
Bot getBotByID(@Param("id") UUID id, @Param("include") String include);
/**
* Get a bot by Id
* Similar to getBotByID
but it also returns the http response headers .
* Get a bot by `Id`.
* @param id Id of the bot (required)
* @param include (optional, default to non-deleted)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /v1/bots/{id}?include={include}")
@Headers({
"Accept: application/json",
})
ApiResponse getBotByIDWithHttpInfo(@Param("id") UUID id, @Param("include") String include);
/**
* Get a bot by Id
* Get a bot by `Id`.
* Note, this is equivalent to the other getBotByID
method,
* but with the query parameters collected into a single Map parameter. This
* is convenient for services with optional query parameters, especially when
* used with the {@link GetBotByIDQueryParams} class that allows for
* building up this map in a fluent style.
* @param id Id of the bot (required)
* @param queryParams Map of query parameters as name-value pairs
* The following elements may be specified in the query map:
*
* - include - (optional, default to non-deleted)
*
* @return Bot
*/
@RequestLine("GET /v1/bots/{id}?include={include}")
@Headers({
"Accept: application/json",
})
Bot getBotByID(@Param("id") UUID id, @QueryMap(encoded=true) GetBotByIDQueryParams queryParams);
/**
* Get a bot by Id
* Get a bot by `Id`.
* Note, this is equivalent to the other getBotByID
that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param id Id of the bot (required)
* @param queryParams Map of query parameters as name-value pairs
* The following elements may be specified in the query map:
*
* - include - (optional, default to non-deleted)
*
* @return Bot
*/
@RequestLine("GET /v1/bots/{id}?include={include}")
@Headers({
"Accept: application/json",
})
ApiResponse getBotByIDWithHttpInfo(@Param("id") UUID id, @QueryMap(encoded=true) GetBotByIDQueryParams queryParams);
/**
* A convenience class for generating query parameters for the
* getBotByID
method in a fluent style.
*/
public static class GetBotByIDQueryParams extends HashMap {
public GetBotByIDQueryParams include(final String value) {
put("include", EncodingUtils.encode(value));
return this;
}
}
/**
* List bot versions
* Get a list of all the versions of a bot identified by `Id`
* @param id Id of the bot (required)
* @return EntityHistory
*/
@RequestLine("GET /v1/bots/{id}/versions")
@Headers({
"Accept: application/json",
})
EntityHistory listAllBotVersion(@Param("id") UUID id);
/**
* List bot versions
* Similar to listAllBotVersion
but it also returns the http response headers .
* Get a list of all the versions of a bot identified by `Id`
* @param id Id of the bot (required)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /v1/bots/{id}/versions")
@Headers({
"Accept: application/json",
})
ApiResponse listAllBotVersionWithHttpInfo(@Param("id") UUID id);
/**
* List bots
* Get a list of Bot.
* @param limit (optional, default to 10)
* @param before Returns list of Bot before this cursor (optional)
* @param after Returns list of Bot after this cursor (optional)
* @param include Include all, deleted, or non-deleted entities. (optional, default to non-deleted)
* @return BotList
*/
@RequestLine("GET /v1/bots?limit={limit}&before={before}&after={after}&include={include}")
@Headers({
"Accept: application/json",
})
BotList listBots(@Param("limit") Integer limit, @Param("before") String before, @Param("after") String after, @Param("include") String include);
/**
* List bots
* Similar to listBots
but it also returns the http response headers .
* Get a list of Bot.
* @param limit (optional, default to 10)
* @param before Returns list of Bot before this cursor (optional)
* @param after Returns list of Bot after this cursor (optional)
* @param include Include all, deleted, or non-deleted entities. (optional, default to non-deleted)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /v1/bots?limit={limit}&before={before}&after={after}&include={include}")
@Headers({
"Accept: application/json",
})
ApiResponse listBotsWithHttpInfo(@Param("limit") Integer limit, @Param("before") String before, @Param("after") String after, @Param("include") String include);
/**
* List bots
* Get a list of Bot.
* Note, this is equivalent to the other listBots
method,
* but with the query parameters collected into a single Map parameter. This
* is convenient for services with optional query parameters, especially when
* used with the {@link ListBotsQueryParams} class that allows for
* building up this map in a fluent style.
* @param queryParams Map of query parameters as name-value pairs
* The following elements may be specified in the query map:
*
* - limit - (optional, default to 10)
* - before - Returns list of Bot before this cursor (optional)
* - after - Returns list of Bot after this cursor (optional)
* - include - Include all, deleted, or non-deleted entities. (optional, default to non-deleted)
*
* @return BotList
*/
@RequestLine("GET /v1/bots?limit={limit}&before={before}&after={after}&include={include}")
@Headers({
"Accept: application/json",
})
BotList listBots(@QueryMap(encoded=true) ListBotsQueryParams queryParams);
/**
* List bots
* Get a list of Bot.
* Note, this is equivalent to the other listBots
that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param queryParams Map of query parameters as name-value pairs
* The following elements may be specified in the query map:
*
* - limit - (optional, default to 10)
* - before - Returns list of Bot before this cursor (optional)
* - after - Returns list of Bot after this cursor (optional)
* - include - Include all, deleted, or non-deleted entities. (optional, default to non-deleted)
*
* @return BotList
*/
@RequestLine("GET /v1/bots?limit={limit}&before={before}&after={after}&include={include}")
@Headers({
"Accept: application/json",
})
ApiResponse listBotsWithHttpInfo(@QueryMap(encoded=true) ListBotsQueryParams queryParams);
/**
* A convenience class for generating query parameters for the
* listBots
method in a fluent style.
*/
public static class ListBotsQueryParams extends HashMap {
public ListBotsQueryParams limit(final Integer value) {
put("limit", EncodingUtils.encode(value));
return this;
}
public ListBotsQueryParams before(final String value) {
put("before", EncodingUtils.encode(value));
return this;
}
public ListBotsQueryParams after(final String value) {
put("after", EncodingUtils.encode(value));
return this;
}
public ListBotsQueryParams include(final String value) {
put("include", EncodingUtils.encode(value));
return this;
}
}
/**
* Get a version of the bot
* Get a version of the bot by given `Id`
* @param id Id of the bot (required)
* @param version bot version number in the form `major`.`minor` (required)
* @return Bot
*/
@RequestLine("GET /v1/bots/{id}/versions/{version}")
@Headers({
"Accept: application/json",
})
Bot listSpecificBotVersion(@Param("id") UUID id, @Param("version") String version);
/**
* Get a version of the bot
* Similar to listSpecificBotVersion
but it also returns the http response headers .
* Get a version of the bot by given `Id`
* @param id Id of the bot (required)
* @param version bot version number in the form `major`.`minor` (required)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /v1/bots/{id}/versions/{version}")
@Headers({
"Accept: application/json",
})
ApiResponse listSpecificBotVersionWithHttpInfo(@Param("id") UUID id, @Param("version") String version);
/**
* Update a bot by name.
* Update an existing bot using JsonPatch.
* @param fqn Name of the bot (required)
* @param body JsonPatch with array of operations (optional)
* JsonPatch RFC
* @see Update a bot by name. Documentation
*/
@RequestLine("PATCH /v1/bots/name/{fqn}")
@Headers({
"Content-Type: application/json-patch+json",
"Accept: application/json",
})
void patchBot(@Param("fqn") String fqn, Object body);
/**
* Update a bot by name.
* Similar to patchBot
but it also returns the http response headers .
* Update an existing bot using JsonPatch.
* @param fqn Name of the bot (required)
* @param body JsonPatch with array of operations (optional)
* JsonPatch RFC
* @see Update a bot by name. Documentation
*/
@RequestLine("PATCH /v1/bots/name/{fqn}")
@Headers({
"Content-Type: application/json-patch+json",
"Accept: application/json",
})
ApiResponse patchBotWithHttpInfo(@Param("fqn") String fqn, Object body);
/**
* Update a bot
* Update an existing bot using JsonPatch.
* @param id Id of the bot (required)
* @param body JsonPatch with array of operations (optional)
* JsonPatch RFC
* @see Update a bot Documentation
*/
@RequestLine("PATCH /v1/bots/{id}")
@Headers({
"Content-Type: application/json-patch+json",
"Accept: application/json",
})
void patchBot1(@Param("id") UUID id, Object body);
/**
* Update a bot
* Similar to patchBot1
but it also returns the http response headers .
* Update an existing bot using JsonPatch.
* @param id Id of the bot (required)
* @param body JsonPatch with array of operations (optional)
* JsonPatch RFC
* @see Update a bot Documentation
*/
@RequestLine("PATCH /v1/bots/{id}")
@Headers({
"Content-Type: application/json-patch+json",
"Accept: application/json",
})
ApiResponse patchBot1WithHttpInfo(@Param("id") UUID id, Object body);
/**
* Restore a soft deleted bot
* Restore a soft deleted bot.
* @param restoreEntity (optional)
* @return Bot
*/
@RequestLine("PUT /v1/bots/restore")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
Bot restore4(RestoreEntity restoreEntity);
/**
* Restore a soft deleted bot
* Similar to restore4
but it also returns the http response headers .
* Restore a soft deleted bot.
* @param restoreEntity (optional)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("PUT /v1/bots/restore")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
ApiResponse restore4WithHttpInfo(RestoreEntity restoreEntity);
}