org.openmetadata.client.api.SuggestionsApi 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.CreateSuggestion;
import org.openmetadata.client.model.Suggestion;
import org.openmetadata.client.model.SuggestionList;
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 SuggestionsApi extends ApiClient.Api {
/**
* Accept all Suggestions from a user and an Entity
* Accept a Suggestion and apply the changes to the entity.
* @param userId user id (optional)
* @param entityFQN fullyQualifiedName of entity (optional)
* @param suggestionType Suggestion type being accepted (optional, default to SuggestDescription)
* @return Suggestion
*/
@RequestLine("PUT /v1/suggestions/accept-all?userId={userId}&entityFQN={entityFQN}&suggestionType={suggestionType}")
@Headers({
"Accept: application/json",
})
Suggestion acceptAllSuggestion(@Param("userId") String userId, @Param("entityFQN") String entityFQN, @Param("suggestionType") String suggestionType);
/**
* Accept all Suggestions from a user and an Entity
* Similar to acceptAllSuggestion
but it also returns the http response headers .
* Accept a Suggestion and apply the changes to the entity.
* @param userId user id (optional)
* @param entityFQN fullyQualifiedName of entity (optional)
* @param suggestionType Suggestion type being accepted (optional, default to SuggestDescription)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("PUT /v1/suggestions/accept-all?userId={userId}&entityFQN={entityFQN}&suggestionType={suggestionType}")
@Headers({
"Accept: application/json",
})
ApiResponse acceptAllSuggestionWithHttpInfo(@Param("userId") String userId, @Param("entityFQN") String entityFQN, @Param("suggestionType") String suggestionType);
/**
* Accept all Suggestions from a user and an Entity
* Accept a Suggestion and apply the changes to the entity.
* Note, this is equivalent to the other acceptAllSuggestion
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 AcceptAllSuggestionQueryParams} 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:
*
* - userId - user id (optional)
* - entityFQN - fullyQualifiedName of entity (optional)
* - suggestionType - Suggestion type being accepted (optional, default to SuggestDescription)
*
* @return Suggestion
*/
@RequestLine("PUT /v1/suggestions/accept-all?userId={userId}&entityFQN={entityFQN}&suggestionType={suggestionType}")
@Headers({
"Accept: application/json",
})
Suggestion acceptAllSuggestion(@QueryMap(encoded=true) AcceptAllSuggestionQueryParams queryParams);
/**
* Accept all Suggestions from a user and an Entity
* Accept a Suggestion and apply the changes to the entity.
* Note, this is equivalent to the other acceptAllSuggestion
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:
*
* - userId - user id (optional)
* - entityFQN - fullyQualifiedName of entity (optional)
* - suggestionType - Suggestion type being accepted (optional, default to SuggestDescription)
*
* @return Suggestion
*/
@RequestLine("PUT /v1/suggestions/accept-all?userId={userId}&entityFQN={entityFQN}&suggestionType={suggestionType}")
@Headers({
"Accept: application/json",
})
ApiResponse acceptAllSuggestionWithHttpInfo(@QueryMap(encoded=true) AcceptAllSuggestionQueryParams queryParams);
/**
* A convenience class for generating query parameters for the
* acceptAllSuggestion
method in a fluent style.
*/
public static class AcceptAllSuggestionQueryParams extends HashMap {
public AcceptAllSuggestionQueryParams userId(final String value) {
put("userId", EncodingUtils.encode(value));
return this;
}
public AcceptAllSuggestionQueryParams entityFQN(final String value) {
put("entityFQN", EncodingUtils.encode(value));
return this;
}
public AcceptAllSuggestionQueryParams suggestionType(final String value) {
put("suggestionType", EncodingUtils.encode(value));
return this;
}
}
/**
* Accept a Suggestion
* Accept a Suggestion and apply the changes to the entity.
* @param id Id of the suggestion (required)
* @return Suggestion
*/
@RequestLine("PUT /v1/suggestions/{id}/accept")
@Headers({
"Accept: application/json",
})
Suggestion acceptSuggestion(@Param("id") String id);
/**
* Accept a Suggestion
* Similar to acceptSuggestion
but it also returns the http response headers .
* Accept a Suggestion and apply the changes to the entity.
* @param id Id of the suggestion (required)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("PUT /v1/suggestions/{id}/accept")
@Headers({
"Accept: application/json",
})
ApiResponse acceptSuggestionWithHttpInfo(@Param("id") String id);
/**
* Create a Suggestion
* Create a new Suggestion. A Suggestion is created about a data asset when a user suggests an update.
* @param createSuggestion (optional)
* @return Suggestion
*/
@RequestLine("POST /v1/suggestions")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
Suggestion createSuggestion(CreateSuggestion createSuggestion);
/**
* Create a Suggestion
* Similar to createSuggestion
but it also returns the http response headers .
* Create a new Suggestion. A Suggestion is created about a data asset when a user suggests an update.
* @param createSuggestion (optional)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("POST /v1/suggestions")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
ApiResponse createSuggestionWithHttpInfo(CreateSuggestion createSuggestion);
/**
* Delete a Suggestion by Id
* Delete an existing Suggestion and all its relationships.
* @param suggestionId ThreadId of the thread to be deleted (required)
*/
@RequestLine("DELETE /v1/suggestions/{suggestionId}")
@Headers({
"Accept: application/json",
})
void deleteSuggestion(@Param("suggestionId") String suggestionId);
/**
* Delete a Suggestion by Id
* Similar to deleteSuggestion
but it also returns the http response headers .
* Delete an existing Suggestion and all its relationships.
* @param suggestionId ThreadId of the thread to be deleted (required)
*/
@RequestLine("DELETE /v1/suggestions/{suggestionId}")
@Headers({
"Accept: application/json",
})
ApiResponse deleteSuggestionWithHttpInfo(@Param("suggestionId") String suggestionId);
/**
* Delete a Suggestions by entityFQN
* Delete an existing Suggestions and all its relationships.
* @param entityType entity type (required)
* @param entityFQN fullyQualifiedName of entity (required)
*/
@RequestLine("DELETE /v1/suggestions/{entityType}/name/{entityFQN}")
@Headers({
"Accept: application/json",
})
void deleteSuggestions(@Param("entityType") String entityType, @Param("entityFQN") String entityFQN);
/**
* Delete a Suggestions by entityFQN
* Similar to deleteSuggestions
but it also returns the http response headers .
* Delete an existing Suggestions and all its relationships.
* @param entityType entity type (required)
* @param entityFQN fullyQualifiedName of entity (required)
*/
@RequestLine("DELETE /v1/suggestions/{entityType}/name/{entityFQN}")
@Headers({
"Accept: application/json",
})
ApiResponse deleteSuggestionsWithHttpInfo(@Param("entityType") String entityType, @Param("entityFQN") String entityFQN);
/**
* Get a suggestion by Id
* Get a suggestion by `Id`.
* @param id Id of the Thread (required)
* @return Suggestion
*/
@RequestLine("GET /v1/suggestions/{id}")
@Headers({
"Accept: application/json",
})
Suggestion getSuggestionByID(@Param("id") String id);
/**
* Get a suggestion by Id
* Similar to getSuggestionByID
but it also returns the http response headers .
* Get a suggestion by `Id`.
* @param id Id of the Thread (required)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /v1/suggestions/{id}")
@Headers({
"Accept: application/json",
})
ApiResponse getSuggestionByIDWithHttpInfo(@Param("id") String id);
/**
* List Suggestions
* Get a list of suggestions, optionally filtered by `entityLink` or `entityFQN`.
* @param limit Limit the number of suggestions returned. (1 to 1000000, default = 10) (optional, default to 10)
* @param before Returns list of threads before this cursor (optional)
* @param after Returns list of threads after this cursor (optional)
* @param entityFQN Filter suggestions by entityFQN (optional)
* @param userId Filter threads by user id or bot id. This filter requires a 'filterType' query param. (optional)
* @param status Filter threads by whether they are accepted or rejected. By default status is OPEN. (optional, default to Open)
* @return SuggestionList
*/
@RequestLine("GET /v1/suggestions?limit={limit}&before={before}&after={after}&entityFQN={entityFQN}&userId={userId}&status={status}")
@Headers({
"Accept: application/json",
})
SuggestionList listSuggestions(@Param("limit") Integer limit, @Param("before") String before, @Param("after") String after, @Param("entityFQN") String entityFQN, @Param("userId") String userId, @Param("status") String status);
/**
* List Suggestions
* Similar to listSuggestions
but it also returns the http response headers .
* Get a list of suggestions, optionally filtered by `entityLink` or `entityFQN`.
* @param limit Limit the number of suggestions returned. (1 to 1000000, default = 10) (optional, default to 10)
* @param before Returns list of threads before this cursor (optional)
* @param after Returns list of threads after this cursor (optional)
* @param entityFQN Filter suggestions by entityFQN (optional)
* @param userId Filter threads by user id or bot id. This filter requires a 'filterType' query param. (optional)
* @param status Filter threads by whether they are accepted or rejected. By default status is OPEN. (optional, default to Open)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /v1/suggestions?limit={limit}&before={before}&after={after}&entityFQN={entityFQN}&userId={userId}&status={status}")
@Headers({
"Accept: application/json",
})
ApiResponse listSuggestionsWithHttpInfo(@Param("limit") Integer limit, @Param("before") String before, @Param("after") String after, @Param("entityFQN") String entityFQN, @Param("userId") String userId, @Param("status") String status);
/**
* List Suggestions
* Get a list of suggestions, optionally filtered by `entityLink` or `entityFQN`.
* Note, this is equivalent to the other listSuggestions
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 ListSuggestionsQueryParams} 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 - Limit the number of suggestions returned. (1 to 1000000, default = 10) (optional, default to 10)
* - before - Returns list of threads before this cursor (optional)
* - after - Returns list of threads after this cursor (optional)
* - entityFQN - Filter suggestions by entityFQN (optional)
* - userId - Filter threads by user id or bot id. This filter requires a 'filterType' query param. (optional)
* - status - Filter threads by whether they are accepted or rejected. By default status is OPEN. (optional, default to Open)
*
* @return SuggestionList
*/
@RequestLine("GET /v1/suggestions?limit={limit}&before={before}&after={after}&entityFQN={entityFQN}&userId={userId}&status={status}")
@Headers({
"Accept: application/json",
})
SuggestionList listSuggestions(@QueryMap(encoded=true) ListSuggestionsQueryParams queryParams);
/**
* List Suggestions
* Get a list of suggestions, optionally filtered by `entityLink` or `entityFQN`.
* Note, this is equivalent to the other listSuggestions
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 - Limit the number of suggestions returned. (1 to 1000000, default = 10) (optional, default to 10)
* - before - Returns list of threads before this cursor (optional)
* - after - Returns list of threads after this cursor (optional)
* - entityFQN - Filter suggestions by entityFQN (optional)
* - userId - Filter threads by user id or bot id. This filter requires a 'filterType' query param. (optional)
* - status - Filter threads by whether they are accepted or rejected. By default status is OPEN. (optional, default to Open)
*
* @return SuggestionList
*/
@RequestLine("GET /v1/suggestions?limit={limit}&before={before}&after={after}&entityFQN={entityFQN}&userId={userId}&status={status}")
@Headers({
"Accept: application/json",
})
ApiResponse listSuggestionsWithHttpInfo(@QueryMap(encoded=true) ListSuggestionsQueryParams queryParams);
/**
* A convenience class for generating query parameters for the
* listSuggestions
method in a fluent style.
*/
public static class ListSuggestionsQueryParams extends HashMap {
public ListSuggestionsQueryParams limit(final Integer value) {
put("limit", EncodingUtils.encode(value));
return this;
}
public ListSuggestionsQueryParams before(final String value) {
put("before", EncodingUtils.encode(value));
return this;
}
public ListSuggestionsQueryParams after(final String value) {
put("after", EncodingUtils.encode(value));
return this;
}
public ListSuggestionsQueryParams entityFQN(final String value) {
put("entityFQN", EncodingUtils.encode(value));
return this;
}
public ListSuggestionsQueryParams userId(final String value) {
put("userId", EncodingUtils.encode(value));
return this;
}
public ListSuggestionsQueryParams status(final String value) {
put("status", EncodingUtils.encode(value));
return this;
}
}
/**
* Reject all Suggestions from a user and an Entity
* Reject all Suggestions from a user and an Entity
* @param userId user id (optional)
* @param entityFQN fullyQualifiedName of entity (optional)
* @param suggestionType Suggestion type being rejected (optional, default to SuggestDescription)
* @return Suggestion
*/
@RequestLine("PUT /v1/suggestions/reject-all?userId={userId}&entityFQN={entityFQN}&suggestionType={suggestionType}")
@Headers({
"Accept: application/json",
})
Suggestion rejectAllSuggestion(@Param("userId") String userId, @Param("entityFQN") String entityFQN, @Param("suggestionType") String suggestionType);
/**
* Reject all Suggestions from a user and an Entity
* Similar to rejectAllSuggestion
but it also returns the http response headers .
* Reject all Suggestions from a user and an Entity
* @param userId user id (optional)
* @param entityFQN fullyQualifiedName of entity (optional)
* @param suggestionType Suggestion type being rejected (optional, default to SuggestDescription)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("PUT /v1/suggestions/reject-all?userId={userId}&entityFQN={entityFQN}&suggestionType={suggestionType}")
@Headers({
"Accept: application/json",
})
ApiResponse rejectAllSuggestionWithHttpInfo(@Param("userId") String userId, @Param("entityFQN") String entityFQN, @Param("suggestionType") String suggestionType);
/**
* Reject all Suggestions from a user and an Entity
* Reject all Suggestions from a user and an Entity
* Note, this is equivalent to the other rejectAllSuggestion
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 RejectAllSuggestionQueryParams} 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:
*
* - userId - user id (optional)
* - entityFQN - fullyQualifiedName of entity (optional)
* - suggestionType - Suggestion type being rejected (optional, default to SuggestDescription)
*
* @return Suggestion
*/
@RequestLine("PUT /v1/suggestions/reject-all?userId={userId}&entityFQN={entityFQN}&suggestionType={suggestionType}")
@Headers({
"Accept: application/json",
})
Suggestion rejectAllSuggestion(@QueryMap(encoded=true) RejectAllSuggestionQueryParams queryParams);
/**
* Reject all Suggestions from a user and an Entity
* Reject all Suggestions from a user and an Entity
* Note, this is equivalent to the other rejectAllSuggestion
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:
*
* - userId - user id (optional)
* - entityFQN - fullyQualifiedName of entity (optional)
* - suggestionType - Suggestion type being rejected (optional, default to SuggestDescription)
*
* @return Suggestion
*/
@RequestLine("PUT /v1/suggestions/reject-all?userId={userId}&entityFQN={entityFQN}&suggestionType={suggestionType}")
@Headers({
"Accept: application/json",
})
ApiResponse rejectAllSuggestionWithHttpInfo(@QueryMap(encoded=true) RejectAllSuggestionQueryParams queryParams);
/**
* A convenience class for generating query parameters for the
* rejectAllSuggestion
method in a fluent style.
*/
public static class RejectAllSuggestionQueryParams extends HashMap {
public RejectAllSuggestionQueryParams userId(final String value) {
put("userId", EncodingUtils.encode(value));
return this;
}
public RejectAllSuggestionQueryParams entityFQN(final String value) {
put("entityFQN", EncodingUtils.encode(value));
return this;
}
public RejectAllSuggestionQueryParams suggestionType(final String value) {
put("suggestionType", EncodingUtils.encode(value));
return this;
}
}
/**
* Reject a Suggestion
* Close a Suggestion without making any changes to the entity.
* @param id Id of the suggestion (required)
* @return Suggestion
*/
@RequestLine("PUT /v1/suggestions/{id}/reject")
@Headers({
"Accept: application/json",
})
Suggestion rejectSuggestion(@Param("id") String id);
/**
* Reject a Suggestion
* Similar to rejectSuggestion
but it also returns the http response headers .
* Close a Suggestion without making any changes to the entity.
* @param id Id of the suggestion (required)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("PUT /v1/suggestions/{id}/reject")
@Headers({
"Accept: application/json",
})
ApiResponse rejectSuggestionWithHttpInfo(@Param("id") String id);
/**
* Update a suggestion by `Id`.
* Update an existing suggestion using JsonPatch.
* @param id Id of the Suggestion (required)
* @param suggestion (optional)
* JsonPatch RFC
* @see Update a suggestion by `Id`. Documentation
*/
@RequestLine("PUT /v1/suggestions/{id}")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
void updateSuggestion(@Param("id") String id, Suggestion suggestion);
/**
* Update a suggestion by `Id`.
* Similar to updateSuggestion
but it also returns the http response headers .
* Update an existing suggestion using JsonPatch.
* @param id Id of the Suggestion (required)
* @param suggestion (optional)
* JsonPatch RFC
* @see Update a suggestion by `Id`. Documentation
*/
@RequestLine("PUT /v1/suggestions/{id}")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
ApiResponse updateSuggestionWithHttpInfo(@Param("id") String id, Suggestion suggestion);
}