All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openmetadata.client.api.FeedsApi Maven / Gradle / Ivy

There is a newer version: 1.5.4
Show newest version
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.CloseTask;
import org.openmetadata.client.model.CreatePost;
import org.openmetadata.client.model.CreateThread;
import org.openmetadata.client.model.PostList;
import org.openmetadata.client.model.ResolveTask;
import org.openmetadata.client.model.Thread;
import org.openmetadata.client.model.ThreadCountList;
import org.openmetadata.client.model.ThreadList;

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-08-22T14:05:58.429779152Z[Etc/UTC]")
public interface FeedsApi extends ApiClient.Api {


  /**
   * Add post to a thread
   * Add a post to an existing thread.
   * @param id Id of the thread (required)
   * @param createPost  (optional)
   * @return Thread
   */
  @RequestLine("POST /v1/feed/{id}/posts")
  @Headers({
    "Content-Type: application/json",
    "Accept: application/json",
  })
  Thread addPostToThread(@Param("id") String id, CreatePost createPost);

  /**
   * Add post to a thread
   * Similar to addPostToThread but it also returns the http response headers .
   * Add a post to an existing thread.
   * @param id Id of the thread (required)
   * @param createPost  (optional)
   * @return A ApiResponse that wraps the response boyd and the http headers.
   */
  @RequestLine("POST /v1/feed/{id}/posts")
  @Headers({
    "Content-Type: application/json",
    "Accept: application/json",
  })
  ApiResponse addPostToThreadWithHttpInfo(@Param("id") String id, CreatePost createPost);



  /**
   * Close a task
   * Close a task without making any changes to the entity.
   * @param id Id of the task thread (required)
   * @param closeTask  (optional)
   * @return Thread
   */
  @RequestLine("PUT /v1/feed/tasks/{id}/close")
  @Headers({
    "Content-Type: application/json",
    "Accept: application/json",
  })
  Thread closeTask(@Param("id") String id, CloseTask closeTask);

  /**
   * Close a task
   * Similar to closeTask but it also returns the http response headers .
   * Close a task without making any changes to the entity.
   * @param id Id of the task thread (required)
   * @param closeTask  (optional)
   * @return A ApiResponse that wraps the response boyd and the http headers.
   */
  @RequestLine("PUT /v1/feed/tasks/{id}/close")
  @Headers({
    "Content-Type: application/json",
    "Accept: application/json",
  })
  ApiResponse closeTaskWithHttpInfo(@Param("id") String id, CloseTask closeTask);



  /**
   * Count of threads
   * Get a count of threads, optionally filtered by `entityLink` for each of the entities.
   * @param entityLink Filter threads by entity link (optional)
   * @return ThreadCountList
   */
  @RequestLine("GET /v1/feed/count?entityLink={entityLink}")
  @Headers({
    "Accept: application/json",
  })
  ThreadCountList countThreads(@Param("entityLink") String entityLink);

  /**
   * Count of threads
   * Similar to countThreads but it also returns the http response headers .
   * Get a count of threads, optionally filtered by `entityLink` for each of the entities.
   * @param entityLink Filter threads by entity link (optional)
   * @return A ApiResponse that wraps the response boyd and the http headers.
   */
  @RequestLine("GET /v1/feed/count?entityLink={entityLink}")
  @Headers({
    "Accept: application/json",
  })
  ApiResponse countThreadsWithHttpInfo(@Param("entityLink") String entityLink);


  /**
   * Count of threads
   * Get a count of threads, optionally filtered by `entityLink` for each of the entities.
   * Note, this is equivalent to the other countThreads 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 CountThreadsQueryParams} 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:

*
    *
  • entityLink - Filter threads by entity link (optional)
  • *
* @return ThreadCountList */ @RequestLine("GET /v1/feed/count?entityLink={entityLink}") @Headers({ "Accept: application/json", }) ThreadCountList countThreads(@QueryMap(encoded=true) CountThreadsQueryParams queryParams); /** * Count of threads * Get a count of threads, optionally filtered by `entityLink` for each of the entities. * Note, this is equivalent to the other countThreads 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:

*
    *
  • entityLink - Filter threads by entity link (optional)
  • *
* @return ThreadCountList */ @RequestLine("GET /v1/feed/count?entityLink={entityLink}") @Headers({ "Accept: application/json", }) ApiResponse countThreadsWithHttpInfo(@QueryMap(encoded=true) CountThreadsQueryParams queryParams); /** * A convenience class for generating query parameters for the * countThreads method in a fluent style. */ public static class CountThreadsQueryParams extends HashMap { public CountThreadsQueryParams entityLink(final String value) { put("entityLink", EncodingUtils.encode(value)); return this; } } /** * Create a thread * Create a new thread. A thread is created about a data asset when a user posts the first post. * @param createThread (optional) * @return Thread */ @RequestLine("POST /v1/feed") @Headers({ "Content-Type: application/json", "Accept: application/json", }) Thread createThread(CreateThread createThread); /** * Create a thread * Similar to createThread but it also returns the http response headers . * Create a new thread. A thread is created about a data asset when a user posts the first post. * @param createThread (optional) * @return A ApiResponse that wraps the response boyd and the http headers. */ @RequestLine("POST /v1/feed") @Headers({ "Content-Type: application/json", "Accept: application/json", }) ApiResponse createThreadWithHttpInfo(CreateThread createThread); /** * Delete a post from its thread * Delete a post from an existing thread. * @param threadId ThreadId of the post to be deleted (required) * @param postId PostId of the post to be deleted (required) */ @RequestLine("DELETE /v1/feed/{threadId}/posts/{postId}") @Headers({ "Accept: application/json", }) void deletePostFromThread(@Param("threadId") String threadId, @Param("postId") String postId); /** * Delete a post from its thread * Similar to deletePostFromThread but it also returns the http response headers . * Delete a post from an existing thread. * @param threadId ThreadId of the post to be deleted (required) * @param postId PostId of the post to be deleted (required) */ @RequestLine("DELETE /v1/feed/{threadId}/posts/{postId}") @Headers({ "Accept: application/json", }) ApiResponse deletePostFromThreadWithHttpInfo(@Param("threadId") String threadId, @Param("postId") String postId); /** * Delete a thread by Id * Delete an existing thread and all its relationships. * @param threadId ThreadId of the thread to be deleted (required) */ @RequestLine("DELETE /v1/feed/{threadId}") @Headers({ "Accept: application/json", }) void deleteThread(@Param("threadId") String threadId); /** * Delete a thread by Id * Similar to deleteThread but it also returns the http response headers . * Delete an existing thread and all its relationships. * @param threadId ThreadId of the thread to be deleted (required) */ @RequestLine("DELETE /v1/feed/{threadId}") @Headers({ "Accept: application/json", }) ApiResponse deleteThreadWithHttpInfo(@Param("threadId") String threadId); /** * Get all the posts of a thread * Get all the posts of an existing thread. * @param id Id of the thread (required) * @return PostList */ @RequestLine("GET /v1/feed/{id}/posts") @Headers({ "Accept: application/json", }) PostList getAllPostOfThread(@Param("id") String id); /** * Get all the posts of a thread * Similar to getAllPostOfThread but it also returns the http response headers . * Get all the posts of an existing thread. * @param id Id of the thread (required) * @return A ApiResponse that wraps the response boyd and the http headers. */ @RequestLine("GET /v1/feed/{id}/posts") @Headers({ "Accept: application/json", }) ApiResponse getAllPostOfThreadWithHttpInfo(@Param("id") String id); /** * Get a task thread by task Id * Get a task thread by `task Id`. * @param id Id of the task thread (required) * @return Thread */ @RequestLine("GET /v1/feed/tasks/{id}") @Headers({ "Accept: application/json", }) Thread getTaskByID(@Param("id") String id); /** * Get a task thread by task Id * Similar to getTaskByID but it also returns the http response headers . * Get a task thread by `task Id`. * @param id Id of the task thread (required) * @return A ApiResponse that wraps the response boyd and the http headers. */ @RequestLine("GET /v1/feed/tasks/{id}") @Headers({ "Accept: application/json", }) ApiResponse getTaskByIDWithHttpInfo(@Param("id") String id); /** * Get a thread by Id * Get a thread by `Id`. * @param id Id of the Thread (required) * @param entityType Type of the Entity (required) * @return Thread */ @RequestLine("GET /v1/feed/{id}") @Headers({ "Accept: application/json", }) Thread getThreadByID(@Param("id") String id, @Param("entityType") String entityType); /** * Get a thread by Id * Similar to getThreadByID but it also returns the http response headers . * Get a thread by `Id`. * @param id Id of the Thread (required) * @param entityType Type of the Entity (required) * @return A ApiResponse that wraps the response boyd and the http headers. */ @RequestLine("GET /v1/feed/{id}") @Headers({ "Accept: application/json", }) ApiResponse getThreadByIDWithHttpInfo(@Param("id") String id, @Param("entityType") String entityType); /** * List threads * Get a list of threads, optionally filtered by `entityLink`. * @param limitPosts Limit the number of posts sorted by chronological order (1 to 1000000, default = 3) (optional, default to 3) * @param limit Limit the number of threads 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 entityLink Filter threads by entity link of entity about which this thread is created (optional) * @param userId Filter threads by user id. This filter requires a 'filterType' query param. The default filter type is 'OWNER'. This filter cannot be combined with the entityLink filter. (optional) * @param filterType Filter type definition for the user filter. It can take one of 'OWNER', 'FOLLOWS', 'MENTIONS'. This must be used with the 'user' query param (optional) * @param resolved Filter threads by whether they are resolved or not. By default resolved is false (optional, default to false) * @param type The type of thread to filter the results. It can take one of 'Conversation', 'Task', 'Announcement' (optional) * @param taskStatus The status of tasks to filter the results. It can take one of 'Open', 'Closed'. This filter will take effect only when type is set to Task (optional) * @param activeAnnouncement Whether to filter results by announcements that are currently active. This filter will take effect only when type is set to Announcement (optional) * @return ThreadList */ @RequestLine("GET /v1/feed?limitPosts={limitPosts}&limit={limit}&before={before}&after={after}&entityLink={entityLink}&userId={userId}&filterType={filterType}&resolved={resolved}&type={type}&taskStatus={taskStatus}&activeAnnouncement={activeAnnouncement}") @Headers({ "Accept: application/json", }) ThreadList listThreads(@Param("limitPosts") Long limitPosts, @Param("limit") Integer limit, @Param("before") String before, @Param("after") String after, @Param("entityLink") String entityLink, @Param("userId") String userId, @Param("filterType") String filterType, @Param("resolved") Boolean resolved, @Param("type") String type, @Param("taskStatus") String taskStatus, @Param("activeAnnouncement") Boolean activeAnnouncement); /** * List threads * Similar to listThreads but it also returns the http response headers . * Get a list of threads, optionally filtered by `entityLink`. * @param limitPosts Limit the number of posts sorted by chronological order (1 to 1000000, default = 3) (optional, default to 3) * @param limit Limit the number of threads 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 entityLink Filter threads by entity link of entity about which this thread is created (optional) * @param userId Filter threads by user id. This filter requires a 'filterType' query param. The default filter type is 'OWNER'. This filter cannot be combined with the entityLink filter. (optional) * @param filterType Filter type definition for the user filter. It can take one of 'OWNER', 'FOLLOWS', 'MENTIONS'. This must be used with the 'user' query param (optional) * @param resolved Filter threads by whether they are resolved or not. By default resolved is false (optional, default to false) * @param type The type of thread to filter the results. It can take one of 'Conversation', 'Task', 'Announcement' (optional) * @param taskStatus The status of tasks to filter the results. It can take one of 'Open', 'Closed'. This filter will take effect only when type is set to Task (optional) * @param activeAnnouncement Whether to filter results by announcements that are currently active. This filter will take effect only when type is set to Announcement (optional) * @return A ApiResponse that wraps the response boyd and the http headers. */ @RequestLine("GET /v1/feed?limitPosts={limitPosts}&limit={limit}&before={before}&after={after}&entityLink={entityLink}&userId={userId}&filterType={filterType}&resolved={resolved}&type={type}&taskStatus={taskStatus}&activeAnnouncement={activeAnnouncement}") @Headers({ "Accept: application/json", }) ApiResponse listThreadsWithHttpInfo(@Param("limitPosts") Long limitPosts, @Param("limit") Integer limit, @Param("before") String before, @Param("after") String after, @Param("entityLink") String entityLink, @Param("userId") String userId, @Param("filterType") String filterType, @Param("resolved") Boolean resolved, @Param("type") String type, @Param("taskStatus") String taskStatus, @Param("activeAnnouncement") Boolean activeAnnouncement); /** * List threads * Get a list of threads, optionally filtered by `entityLink`. * Note, this is equivalent to the other listThreads 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 ListThreadsQueryParams} 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:

*
    *
  • limitPosts - Limit the number of posts sorted by chronological order (1 to 1000000, default = 3) (optional, default to 3)
  • *
  • limit - Limit the number of threads 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)
  • *
  • entityLink - Filter threads by entity link of entity about which this thread is created (optional)
  • *
  • userId - Filter threads by user id. This filter requires a 'filterType' query param. The default filter type is 'OWNER'. This filter cannot be combined with the entityLink filter. (optional)
  • *
  • filterType - Filter type definition for the user filter. It can take one of 'OWNER', 'FOLLOWS', 'MENTIONS'. This must be used with the 'user' query param (optional)
  • *
  • resolved - Filter threads by whether they are resolved or not. By default resolved is false (optional, default to false)
  • *
  • type - The type of thread to filter the results. It can take one of 'Conversation', 'Task', 'Announcement' (optional)
  • *
  • taskStatus - The status of tasks to filter the results. It can take one of 'Open', 'Closed'. This filter will take effect only when type is set to Task (optional)
  • *
  • activeAnnouncement - Whether to filter results by announcements that are currently active. This filter will take effect only when type is set to Announcement (optional)
  • *
* @return ThreadList */ @RequestLine("GET /v1/feed?limitPosts={limitPosts}&limit={limit}&before={before}&after={after}&entityLink={entityLink}&userId={userId}&filterType={filterType}&resolved={resolved}&type={type}&taskStatus={taskStatus}&activeAnnouncement={activeAnnouncement}") @Headers({ "Accept: application/json", }) ThreadList listThreads(@QueryMap(encoded=true) ListThreadsQueryParams queryParams); /** * List threads * Get a list of threads, optionally filtered by `entityLink`. * Note, this is equivalent to the other listThreads 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:

*
    *
  • limitPosts - Limit the number of posts sorted by chronological order (1 to 1000000, default = 3) (optional, default to 3)
  • *
  • limit - Limit the number of threads 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)
  • *
  • entityLink - Filter threads by entity link of entity about which this thread is created (optional)
  • *
  • userId - Filter threads by user id. This filter requires a 'filterType' query param. The default filter type is 'OWNER'. This filter cannot be combined with the entityLink filter. (optional)
  • *
  • filterType - Filter type definition for the user filter. It can take one of 'OWNER', 'FOLLOWS', 'MENTIONS'. This must be used with the 'user' query param (optional)
  • *
  • resolved - Filter threads by whether they are resolved or not. By default resolved is false (optional, default to false)
  • *
  • type - The type of thread to filter the results. It can take one of 'Conversation', 'Task', 'Announcement' (optional)
  • *
  • taskStatus - The status of tasks to filter the results. It can take one of 'Open', 'Closed'. This filter will take effect only when type is set to Task (optional)
  • *
  • activeAnnouncement - Whether to filter results by announcements that are currently active. This filter will take effect only when type is set to Announcement (optional)
  • *
* @return ThreadList */ @RequestLine("GET /v1/feed?limitPosts={limitPosts}&limit={limit}&before={before}&after={after}&entityLink={entityLink}&userId={userId}&filterType={filterType}&resolved={resolved}&type={type}&taskStatus={taskStatus}&activeAnnouncement={activeAnnouncement}") @Headers({ "Accept: application/json", }) ApiResponse listThreadsWithHttpInfo(@QueryMap(encoded=true) ListThreadsQueryParams queryParams); /** * A convenience class for generating query parameters for the * listThreads method in a fluent style. */ public static class ListThreadsQueryParams extends HashMap { public ListThreadsQueryParams limitPosts(final Long value) { put("limitPosts", EncodingUtils.encode(value)); return this; } public ListThreadsQueryParams limit(final Integer value) { put("limit", EncodingUtils.encode(value)); return this; } public ListThreadsQueryParams before(final String value) { put("before", EncodingUtils.encode(value)); return this; } public ListThreadsQueryParams after(final String value) { put("after", EncodingUtils.encode(value)); return this; } public ListThreadsQueryParams entityLink(final String value) { put("entityLink", EncodingUtils.encode(value)); return this; } public ListThreadsQueryParams userId(final String value) { put("userId", EncodingUtils.encode(value)); return this; } public ListThreadsQueryParams filterType(final String value) { put("filterType", EncodingUtils.encode(value)); return this; } public ListThreadsQueryParams resolved(final Boolean value) { put("resolved", EncodingUtils.encode(value)); return this; } public ListThreadsQueryParams type(final String value) { put("type", EncodingUtils.encode(value)); return this; } public ListThreadsQueryParams taskStatus(final String value) { put("taskStatus", EncodingUtils.encode(value)); return this; } public ListThreadsQueryParams activeAnnouncement(final Boolean value) { put("activeAnnouncement", EncodingUtils.encode(value)); return this; } } /** * Update post of a thread by `Id`. * Update a post of an existing thread using JsonPatch. * @param threadId Id of the thread (required) * @param postId Id of the post (required) * @param body JsonPatch with array of operations (optional) * JsonPatch RFC * @see Update post of a thread by `Id`. Documentation */ @RequestLine("PATCH /v1/feed/{threadId}/posts/{postId}") @Headers({ "Content-Type: application/json-patch+json", "Accept: application/json", }) void patchPostOfThread(@Param("threadId") String threadId, @Param("postId") String postId, Object body); /** * Update post of a thread by `Id`. * Similar to patchPostOfThread but it also returns the http response headers . * Update a post of an existing thread using JsonPatch. * @param threadId Id of the thread (required) * @param postId Id of the post (required) * @param body JsonPatch with array of operations (optional) * JsonPatch RFC * @see Update post of a thread by `Id`. Documentation */ @RequestLine("PATCH /v1/feed/{threadId}/posts/{postId}") @Headers({ "Content-Type: application/json-patch+json", "Accept: application/json", }) ApiResponse patchPostOfThreadWithHttpInfo(@Param("threadId") String threadId, @Param("postId") String postId, Object body); /** * Update a thread by `Id`. * Update an existing thread using JsonPatch. * @param id Id of the thread (required) * @param body JsonPatch with array of operations (optional) * JsonPatch RFC * @see Update a thread by `Id`. Documentation */ @RequestLine("PATCH /v1/feed/{id}") @Headers({ "Content-Type: application/json-patch+json", "Accept: application/json", }) void patchThread(@Param("id") String id, Object body); /** * Update a thread by `Id`. * Similar to patchThread but it also returns the http response headers . * Update an existing thread using JsonPatch. * @param id Id of the thread (required) * @param body JsonPatch with array of operations (optional) * JsonPatch RFC * @see Update a thread by `Id`. Documentation */ @RequestLine("PATCH /v1/feed/{id}") @Headers({ "Content-Type: application/json-patch+json", "Accept: application/json", }) ApiResponse patchThreadWithHttpInfo(@Param("id") String id, Object body); /** * Resolve a task * Resolve a task. * @param id Id of the task thread (required) * @param resolveTask (optional) * @return Thread */ @RequestLine("PUT /v1/feed/tasks/{id}/resolve") @Headers({ "Content-Type: application/json", "Accept: application/json", }) Thread resolveTask(@Param("id") String id, ResolveTask resolveTask); /** * Resolve a task * Similar to resolveTask but it also returns the http response headers . * Resolve a task. * @param id Id of the task thread (required) * @param resolveTask (optional) * @return A ApiResponse that wraps the response boyd and the http headers. */ @RequestLine("PUT /v1/feed/tasks/{id}/resolve") @Headers({ "Content-Type: application/json", "Accept: application/json", }) ApiResponse resolveTaskWithHttpInfo(@Param("id") String id, ResolveTask resolveTask); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy