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

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

There is a newer version: 1.5.11
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.CreateType;
import org.openmetadata.client.model.CustomProperty;
import org.openmetadata.client.model.EntityHistory;
import org.openmetadata.client.model.Type;
import org.openmetadata.client.model.TypeList;
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-07-25T09:42:14.348793228Z[Etc/UTC]")
public interface MetadataApi extends ApiClient.Api {


  /**
   * Add or update a Property to an entity
   * Add or update a property to an entity type. Properties can only be added to entity type and not property type.
   * @param id Id of the type (required)
   * @param customProperty  (optional)
   */
  @RequestLine("PUT /v1/metadata/types/{id}")
  @Headers({
    "Content-Type: application/json",
    "Accept: application/json",
  })
  void addProperty(@Param("id") UUID id, CustomProperty customProperty);

  /**
   * Add or update a Property to an entity
   * Similar to addProperty but it also returns the http response headers .
   * Add or update a property to an entity type. Properties can only be added to entity type and not property type.
   * @param id Id of the type (required)
   * @param customProperty  (optional)
   */
  @RequestLine("PUT /v1/metadata/types/{id}")
  @Headers({
    "Content-Type: application/json",
    "Accept: application/json",
  })
  ApiResponse addPropertyWithHttpInfo(@Param("id") UUID id, CustomProperty customProperty);



  /**
   * Create or update a type
   * Create a new type, if it does not exist or update an existing type.
   * @param createType  (optional)
   * @return Type
   */
  @RequestLine("PUT /v1/metadata/types")
  @Headers({
    "Content-Type: application/json",
    "Accept: application/json",
  })
  Type createOrUpdate(CreateType createType);

  /**
   * Create or update a type
   * Similar to createOrUpdate but it also returns the http response headers .
   * Create a new type, if it does not exist or update an existing type.
   * @param createType  (optional)
   * @return A ApiResponse that wraps the response boyd and the http headers.
   */
  @RequestLine("PUT /v1/metadata/types")
  @Headers({
    "Content-Type: application/json",
    "Accept: application/json",
  })
  ApiResponse createOrUpdateWithHttpInfo(CreateType createType);



  /**
   * Create a type
   * Create a new type.
   * @param createType  (optional)
   * @return Type
   */
  @RequestLine("POST /v1/metadata/types")
  @Headers({
    "Content-Type: application/json",
    "Accept: application/json",
  })
  Type createType(CreateType createType);

  /**
   * Create a type
   * Similar to createType but it also returns the http response headers .
   * Create a new type.
   * @param createType  (optional)
   * @return A ApiResponse that wraps the response boyd and the http headers.
   */
  @RequestLine("POST /v1/metadata/types")
  @Headers({
    "Content-Type: application/json",
    "Accept: application/json",
  })
  ApiResponse createTypeWithHttpInfo(CreateType createType);



  /**
   * Delete a type by id
   * Delete a type by `id`.
   * @param id Id of the type (required)
   */
  @RequestLine("DELETE /v1/metadata/types/{id}")
  @Headers({
    "Accept: application/json",
  })
  void deleteType(@Param("id") UUID id);

  /**
   * Delete a type by id
   * Similar to deleteType but it also returns the http response headers .
   * Delete a type by `id`.
   * @param id Id of the type (required)
   */
  @RequestLine("DELETE /v1/metadata/types/{id}")
  @Headers({
    "Accept: application/json",
  })
  ApiResponse deleteTypeWithHttpInfo(@Param("id") UUID id);



  /**
   * Delete a type by name
   * Delete a type by `name`.
   * @param name Name of the type (required)
   */
  @RequestLine("DELETE /v1/metadata/types/name/{name}")
  @Headers({
    "Accept: application/json",
  })
  void deleteTypeByName(@Param("name") String name);

  /**
   * Delete a type by name
   * Similar to deleteTypeByName but it also returns the http response headers .
   * Delete a type by `name`.
   * @param name Name of the type (required)
   */
  @RequestLine("DELETE /v1/metadata/types/name/{name}")
  @Headers({
    "Accept: application/json",
  })
  ApiResponse deleteTypeByNameWithHttpInfo(@Param("name") String name);



  /**
   * Get a version of the types
   * Get a version of the type by given `id`
   * @param id Id of the type (required)
   * @param version type version number in the form `major`.`minor` (required)
   * @return Type
   */
  @RequestLine("GET /v1/metadata/types/{id}/versions/{version}")
  @Headers({
    "Accept: application/json",
  })
  Type getSpecificTypeVersion(@Param("id") UUID id, @Param("version") String version);

  /**
   * Get a version of the types
   * Similar to getSpecificTypeVersion but it also returns the http response headers .
   * Get a version of the type by given `id`
   * @param id Id of the type (required)
   * @param version type version number in the form `major`.`minor` (required)
   * @return A ApiResponse that wraps the response boyd and the http headers.
   */
  @RequestLine("GET /v1/metadata/types/{id}/versions/{version}")
  @Headers({
    "Accept: application/json",
  })
  ApiResponse getSpecificTypeVersionWithHttpInfo(@Param("id") UUID id, @Param("version") String version);



  /**
   * Get a type
   * Get a type by `id`.
   * @param id Id of the type (required)
   * @param fields Fields requested in the returned resource (optional)
   * @param include Include all, deleted, or non-deleted entities. (optional, default to non-deleted)
   * @return Type
   */
  @RequestLine("GET /v1/metadata/types/{id}?fields={fields}&include={include}")
  @Headers({
    "Accept: application/json",
  })
  Type getTypeByID(@Param("id") UUID id, @Param("fields") String fields, @Param("include") String include);

  /**
   * Get a type
   * Similar to getTypeByID but it also returns the http response headers .
   * Get a type by `id`.
   * @param id Id of the type (required)
   * @param fields Fields requested in the returned resource (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/metadata/types/{id}?fields={fields}&include={include}")
  @Headers({
    "Accept: application/json",
  })
  ApiResponse getTypeByIDWithHttpInfo(@Param("id") UUID id, @Param("fields") String fields, @Param("include") String include);


  /**
   * Get a type
   * Get a type by `id`.
   * Note, this is equivalent to the other getTypeByID 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 GetTypeByIDQueryParams} class that allows for
   * building up this map in a fluent style.
   * @param id Id of the type (required)
   * @param queryParams Map of query parameters as name-value pairs
   *   

The following elements may be specified in the query map:

*
    *
  • fields - Fields requested in the returned resource (optional)
  • *
  • include - Include all, deleted, or non-deleted entities. (optional, default to non-deleted)
  • *
* @return Type */ @RequestLine("GET /v1/metadata/types/{id}?fields={fields}&include={include}") @Headers({ "Accept: application/json", }) Type getTypeByID(@Param("id") UUID id, @QueryMap(encoded=true) GetTypeByIDQueryParams queryParams); /** * Get a type * Get a type by `id`. * Note, this is equivalent to the other getTypeByID that receives the query parameters as a map, * but this one also exposes the Http response headers * @param id Id of the type (required) * @param queryParams Map of query parameters as name-value pairs *

The following elements may be specified in the query map:

*
    *
  • fields - Fields requested in the returned resource (optional)
  • *
  • include - Include all, deleted, or non-deleted entities. (optional, default to non-deleted)
  • *
* @return Type */ @RequestLine("GET /v1/metadata/types/{id}?fields={fields}&include={include}") @Headers({ "Accept: application/json", }) ApiResponse getTypeByIDWithHttpInfo(@Param("id") UUID id, @QueryMap(encoded=true) GetTypeByIDQueryParams queryParams); /** * A convenience class for generating query parameters for the * getTypeByID method in a fluent style. */ public static class GetTypeByIDQueryParams extends HashMap { public GetTypeByIDQueryParams fields(final String value) { put("fields", EncodingUtils.encode(value)); return this; } public GetTypeByIDQueryParams include(final String value) { put("include", EncodingUtils.encode(value)); return this; } } /** * Get a type by name * Get a type by name. * @param name Name of the type (required) * @param fields Fields requested in the returned resource (optional) * @param include Include all, deleted, or non-deleted entities. (optional, default to non-deleted) * @return Type */ @RequestLine("GET /v1/metadata/types/name/{name}?fields={fields}&include={include}") @Headers({ "Accept: application/json", }) Type getTypeByName(@Param("name") String name, @Param("fields") String fields, @Param("include") String include); /** * Get a type by name * Similar to getTypeByName but it also returns the http response headers . * Get a type by name. * @param name Name of the type (required) * @param fields Fields requested in the returned resource (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/metadata/types/name/{name}?fields={fields}&include={include}") @Headers({ "Accept: application/json", }) ApiResponse getTypeByNameWithHttpInfo(@Param("name") String name, @Param("fields") String fields, @Param("include") String include); /** * Get a type by name * Get a type by name. * Note, this is equivalent to the other getTypeByName 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 GetTypeByNameQueryParams} class that allows for * building up this map in a fluent style. * @param name Name of the type (required) * @param queryParams Map of query parameters as name-value pairs *

The following elements may be specified in the query map:

*
    *
  • fields - Fields requested in the returned resource (optional)
  • *
  • include - Include all, deleted, or non-deleted entities. (optional, default to non-deleted)
  • *
* @return Type */ @RequestLine("GET /v1/metadata/types/name/{name}?fields={fields}&include={include}") @Headers({ "Accept: application/json", }) Type getTypeByName(@Param("name") String name, @QueryMap(encoded=true) GetTypeByNameQueryParams queryParams); /** * Get a type by name * Get a type by name. * Note, this is equivalent to the other getTypeByName that receives the query parameters as a map, * but this one also exposes the Http response headers * @param name Name of the type (required) * @param queryParams Map of query parameters as name-value pairs *

The following elements may be specified in the query map:

*
    *
  • fields - Fields requested in the returned resource (optional)
  • *
  • include - Include all, deleted, or non-deleted entities. (optional, default to non-deleted)
  • *
* @return Type */ @RequestLine("GET /v1/metadata/types/name/{name}?fields={fields}&include={include}") @Headers({ "Accept: application/json", }) ApiResponse getTypeByNameWithHttpInfo(@Param("name") String name, @QueryMap(encoded=true) GetTypeByNameQueryParams queryParams); /** * A convenience class for generating query parameters for the * getTypeByName method in a fluent style. */ public static class GetTypeByNameQueryParams extends HashMap { public GetTypeByNameQueryParams fields(final String value) { put("fields", EncodingUtils.encode(value)); return this; } public GetTypeByNameQueryParams include(final String value) { put("include", EncodingUtils.encode(value)); return this; } } /** * List type versions * Get a list of all the versions of a type identified by `id` * @param id Id of the type (required) * @return EntityHistory */ @RequestLine("GET /v1/metadata/types/{id}/versions") @Headers({ "Accept: application/json", }) EntityHistory listAllTypeVersion(@Param("id") UUID id); /** * List type versions * Similar to listAllTypeVersion but it also returns the http response headers . * Get a list of all the versions of a type identified by `id` * @param id Id of the type (required) * @return A ApiResponse that wraps the response boyd and the http headers. */ @RequestLine("GET /v1/metadata/types/{id}/versions") @Headers({ "Accept: application/json", }) ApiResponse listAllTypeVersionWithHttpInfo(@Param("id") UUID id); /** * List types * Get a list of types. Use cursor-based pagination to limit the number entries in the list using `limit` and `before` or `after` query params. * @param category Filter types by metadata type category. (optional) * @param limit Limit the number types returned. (1 to 1000000, default = 10) (optional, default to 10) * @param before Returns list of types before this cursor (optional) * @param after Returns list of types after this cursor (optional) * @return TypeList */ @RequestLine("GET /v1/metadata/types?category={category}&limit={limit}&before={before}&after={after}") @Headers({ "Accept: application/json", }) TypeList listTypes(@Param("category") String category, @Param("limit") Integer limit, @Param("before") String before, @Param("after") String after); /** * List types * Similar to listTypes but it also returns the http response headers . * Get a list of types. Use cursor-based pagination to limit the number entries in the list using `limit` and `before` or `after` query params. * @param category Filter types by metadata type category. (optional) * @param limit Limit the number types returned. (1 to 1000000, default = 10) (optional, default to 10) * @param before Returns list of types before this cursor (optional) * @param after Returns list of types after this cursor (optional) * @return A ApiResponse that wraps the response boyd and the http headers. */ @RequestLine("GET /v1/metadata/types?category={category}&limit={limit}&before={before}&after={after}") @Headers({ "Accept: application/json", }) ApiResponse listTypesWithHttpInfo(@Param("category") String category, @Param("limit") Integer limit, @Param("before") String before, @Param("after") String after); /** * List types * Get a list of types. Use cursor-based pagination to limit the number entries in the list using `limit` and `before` or `after` query params. * Note, this is equivalent to the other listTypes 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 ListTypesQueryParams} 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:

*
    *
  • category - Filter types by metadata type category. (optional)
  • *
  • limit - Limit the number types returned. (1 to 1000000, default = 10) (optional, default to 10)
  • *
  • before - Returns list of types before this cursor (optional)
  • *
  • after - Returns list of types after this cursor (optional)
  • *
* @return TypeList */ @RequestLine("GET /v1/metadata/types?category={category}&limit={limit}&before={before}&after={after}") @Headers({ "Accept: application/json", }) TypeList listTypes(@QueryMap(encoded=true) ListTypesQueryParams queryParams); /** * List types * Get a list of types. Use cursor-based pagination to limit the number entries in the list using `limit` and `before` or `after` query params. * Note, this is equivalent to the other listTypes 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:

*
    *
  • category - Filter types by metadata type category. (optional)
  • *
  • limit - Limit the number types returned. (1 to 1000000, default = 10) (optional, default to 10)
  • *
  • before - Returns list of types before this cursor (optional)
  • *
  • after - Returns list of types after this cursor (optional)
  • *
* @return TypeList */ @RequestLine("GET /v1/metadata/types?category={category}&limit={limit}&before={before}&after={after}") @Headers({ "Accept: application/json", }) ApiResponse listTypesWithHttpInfo(@QueryMap(encoded=true) ListTypesQueryParams queryParams); /** * A convenience class for generating query parameters for the * listTypes method in a fluent style. */ public static class ListTypesQueryParams extends HashMap { public ListTypesQueryParams category(final String value) { put("category", EncodingUtils.encode(value)); return this; } public ListTypesQueryParams limit(final Integer value) { put("limit", EncodingUtils.encode(value)); return this; } public ListTypesQueryParams before(final String value) { put("before", EncodingUtils.encode(value)); return this; } public ListTypesQueryParams after(final String value) { put("after", EncodingUtils.encode(value)); return this; } } /** * Update a type using name. * Update an existing type using JsonPatch. * @param fqn Name of the type (required) * @param body JsonPatch with array of operations (optional) * JsonPatch RFC * @see Update a type using name. Documentation */ @RequestLine("PATCH /v1/metadata/types/name/{fqn}") @Headers({ "Content-Type: application/json-patch+json", "Accept: application/json", }) void patchType(@Param("fqn") String fqn, Object body); /** * Update a type using name. * Similar to patchType but it also returns the http response headers . * Update an existing type using JsonPatch. * @param fqn Name of the type (required) * @param body JsonPatch with array of operations (optional) * JsonPatch RFC * @see Update a type using name. Documentation */ @RequestLine("PATCH /v1/metadata/types/name/{fqn}") @Headers({ "Content-Type: application/json-patch+json", "Accept: application/json", }) ApiResponse patchTypeWithHttpInfo(@Param("fqn") String fqn, Object body); /** * Update a type * Update an existing type using JsonPatch. * @param id Id of the type (required) * @param body JsonPatch with array of operations (optional) * JsonPatch RFC * @see Update a type Documentation */ @RequestLine("PATCH /v1/metadata/types/{id}") @Headers({ "Content-Type: application/json-patch+json", "Accept: application/json", }) void patchType1(@Param("id") UUID id, Object body); /** * Update a type * Similar to patchType1 but it also returns the http response headers . * Update an existing type using JsonPatch. * @param id Id of the type (required) * @param body JsonPatch with array of operations (optional) * JsonPatch RFC * @see Update a type Documentation */ @RequestLine("PATCH /v1/metadata/types/{id}") @Headers({ "Content-Type: application/json-patch+json", "Accept: application/json", }) ApiResponse patchType1WithHttpInfo(@Param("id") UUID id, Object body); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy