org.openmetadata.client.api.RolesApi 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.CreateRole;
import org.openmetadata.client.model.EntityHistory;
import org.openmetadata.client.model.RestoreEntity;
import org.openmetadata.client.model.Role;
import org.openmetadata.client.model.RoleList;
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 RolesApi extends ApiClient.Api {
/**
* Update role
* Create or Update a role.
* @param createRole (optional)
* @return Role
*/
@RequestLine("PUT /v1/roles")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
Role createOrUpdateRole(CreateRole createRole);
/**
* Update role
* Similar to createOrUpdateRole
but it also returns the http response headers .
* Create or Update a role.
* @param createRole (optional)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("PUT /v1/roles")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
ApiResponse createOrUpdateRoleWithHttpInfo(CreateRole createRole);
/**
* Create a role
* Create a new role.
* @param createRole (optional)
* @return Role
*/
@RequestLine("POST /v1/roles")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
Role createRole(CreateRole createRole);
/**
* Create a role
* Similar to createRole
but it also returns the http response headers .
* Create a new role.
* @param createRole (optional)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("POST /v1/roles")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
ApiResponse createRoleWithHttpInfo(CreateRole createRole);
/**
* Delete a role
* Delete a role by given `id`.
* @param id Id of the role (required)
* @param hardDelete Hard delete the entity. (Default = `false`) (optional, default to false)
*/
@RequestLine("DELETE /v1/roles/{id}?hardDelete={hardDelete}")
@Headers({
"Accept: application/json",
})
void deleteRole(@Param("id") UUID id, @Param("hardDelete") Boolean hardDelete);
/**
* Delete a role
* Similar to deleteRole
but it also returns the http response headers .
* Delete a role by given `id`.
* @param id Id of the role (required)
* @param hardDelete Hard delete the entity. (Default = `false`) (optional, default to false)
*/
@RequestLine("DELETE /v1/roles/{id}?hardDelete={hardDelete}")
@Headers({
"Accept: application/json",
})
ApiResponse deleteRoleWithHttpInfo(@Param("id") UUID id, @Param("hardDelete") Boolean hardDelete);
/**
* Delete a role
* Delete a role by given `id`.
* Note, this is equivalent to the other deleteRole
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 DeleteRoleQueryParams} class that allows for
* building up this map in a fluent style.
* @param id Id of the role (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/roles/{id}?hardDelete={hardDelete}")
@Headers({
"Accept: application/json",
})
void deleteRole(@Param("id") UUID id, @QueryMap(encoded=true) DeleteRoleQueryParams queryParams);
/**
* Delete a role
* Delete a role by given `id`.
* Note, this is equivalent to the other deleteRole
that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param id Id of the role (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/roles/{id}?hardDelete={hardDelete}")
@Headers({
"Accept: application/json",
})
ApiResponse deleteRoleWithHttpInfo(@Param("id") UUID id, @QueryMap(encoded=true) DeleteRoleQueryParams queryParams);
/**
* A convenience class for generating query parameters for the
* deleteRole
method in a fluent style.
*/
public static class DeleteRoleQueryParams extends HashMap {
public DeleteRoleQueryParams hardDelete(final Boolean value) {
put("hardDelete", EncodingUtils.encode(value));
return this;
}
}
/**
* Delete a role
* Delete a role by given `name`.
* @param name Name of the role (required)
* @param hardDelete Hard delete the entity. (Default = `false`) (optional, default to false)
*/
@RequestLine("DELETE /v1/roles/name/{name}?hardDelete={hardDelete}")
@Headers({
"Accept: application/json",
})
void deleteRoleByName(@Param("name") String name, @Param("hardDelete") Boolean hardDelete);
/**
* Delete a role
* Similar to deleteRoleByName
but it also returns the http response headers .
* Delete a role by given `name`.
* @param name Name of the role (required)
* @param hardDelete Hard delete the entity. (Default = `false`) (optional, default to false)
*/
@RequestLine("DELETE /v1/roles/name/{name}?hardDelete={hardDelete}")
@Headers({
"Accept: application/json",
})
ApiResponse deleteRoleByNameWithHttpInfo(@Param("name") String name, @Param("hardDelete") Boolean hardDelete);
/**
* Delete a role
* Delete a role by given `name`.
* Note, this is equivalent to the other deleteRoleByName
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 DeleteRoleByNameQueryParams} class that allows for
* building up this map in a fluent style.
* @param name Name of the role (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/roles/name/{name}?hardDelete={hardDelete}")
@Headers({
"Accept: application/json",
})
void deleteRoleByName(@Param("name") String name, @QueryMap(encoded=true) DeleteRoleByNameQueryParams queryParams);
/**
* Delete a role
* Delete a role by given `name`.
* Note, this is equivalent to the other deleteRoleByName
that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param name Name of the role (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/roles/name/{name}?hardDelete={hardDelete}")
@Headers({
"Accept: application/json",
})
ApiResponse deleteRoleByNameWithHttpInfo(@Param("name") String name, @QueryMap(encoded=true) DeleteRoleByNameQueryParams queryParams);
/**
* A convenience class for generating query parameters for the
* deleteRoleByName
method in a fluent style.
*/
public static class DeleteRoleByNameQueryParams extends HashMap {
public DeleteRoleByNameQueryParams hardDelete(final Boolean value) {
put("hardDelete", EncodingUtils.encode(value));
return this;
}
}
/**
* Get a role by name
* Get a role by `name`.
* @param name Name of the role (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 Role
*/
@RequestLine("GET /v1/roles/name/{name}?fields={fields}&include={include}")
@Headers({
"Accept: application/json",
})
Role getRoleByFQN(@Param("name") String name, @Param("fields") String fields, @Param("include") String include);
/**
* Get a role by name
* Similar to getRoleByFQN
but it also returns the http response headers .
* Get a role by `name`.
* @param name Name of the role (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/roles/name/{name}?fields={fields}&include={include}")
@Headers({
"Accept: application/json",
})
ApiResponse getRoleByFQNWithHttpInfo(@Param("name") String name, @Param("fields") String fields, @Param("include") String include);
/**
* Get a role by name
* Get a role by `name`.
* Note, this is equivalent to the other getRoleByFQN
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 GetRoleByFQNQueryParams} class that allows for
* building up this map in a fluent style.
* @param name Name of the role (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 Role
*/
@RequestLine("GET /v1/roles/name/{name}?fields={fields}&include={include}")
@Headers({
"Accept: application/json",
})
Role getRoleByFQN(@Param("name") String name, @QueryMap(encoded=true) GetRoleByFQNQueryParams queryParams);
/**
* Get a role by name
* Get a role by `name`.
* Note, this is equivalent to the other getRoleByFQN
that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param name Name of the role (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 Role
*/
@RequestLine("GET /v1/roles/name/{name}?fields={fields}&include={include}")
@Headers({
"Accept: application/json",
})
ApiResponse getRoleByFQNWithHttpInfo(@Param("name") String name, @QueryMap(encoded=true) GetRoleByFQNQueryParams queryParams);
/**
* A convenience class for generating query parameters for the
* getRoleByFQN
method in a fluent style.
*/
public static class GetRoleByFQNQueryParams extends HashMap {
public GetRoleByFQNQueryParams fields(final String value) {
put("fields", EncodingUtils.encode(value));
return this;
}
public GetRoleByFQNQueryParams include(final String value) {
put("include", EncodingUtils.encode(value));
return this;
}
}
/**
* Get a role by id
* Get a role by `id`.
* @param id Id of the role (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 Role
*/
@RequestLine("GET /v1/roles/{id}?fields={fields}&include={include}")
@Headers({
"Accept: application/json",
})
Role getRoleByID(@Param("id") UUID id, @Param("fields") String fields, @Param("include") String include);
/**
* Get a role by id
* Similar to getRoleByID
but it also returns the http response headers .
* Get a role by `id`.
* @param id Id of the role (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/roles/{id}?fields={fields}&include={include}")
@Headers({
"Accept: application/json",
})
ApiResponse getRoleByIDWithHttpInfo(@Param("id") UUID id, @Param("fields") String fields, @Param("include") String include);
/**
* Get a role by id
* Get a role by `id`.
* Note, this is equivalent to the other getRoleByID
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 GetRoleByIDQueryParams} class that allows for
* building up this map in a fluent style.
* @param id Id of the role (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 Role
*/
@RequestLine("GET /v1/roles/{id}?fields={fields}&include={include}")
@Headers({
"Accept: application/json",
})
Role getRoleByID(@Param("id") UUID id, @QueryMap(encoded=true) GetRoleByIDQueryParams queryParams);
/**
* Get a role by id
* Get a role by `id`.
* Note, this is equivalent to the other getRoleByID
that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param id Id of the role (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 Role
*/
@RequestLine("GET /v1/roles/{id}?fields={fields}&include={include}")
@Headers({
"Accept: application/json",
})
ApiResponse getRoleByIDWithHttpInfo(@Param("id") UUID id, @QueryMap(encoded=true) GetRoleByIDQueryParams queryParams);
/**
* A convenience class for generating query parameters for the
* getRoleByID
method in a fluent style.
*/
public static class GetRoleByIDQueryParams extends HashMap {
public GetRoleByIDQueryParams fields(final String value) {
put("fields", EncodingUtils.encode(value));
return this;
}
public GetRoleByIDQueryParams include(final String value) {
put("include", EncodingUtils.encode(value));
return this;
}
}
/**
* Get a version of the role
* Get a version of the role by given `id`
* @param id Id of the role (required)
* @param version Role version number in the form `major`.`minor` (required)
* @return Role
*/
@RequestLine("GET /v1/roles/{id}/versions/{version}")
@Headers({
"Accept: application/json",
})
Role getSpecificRoleVersion(@Param("id") UUID id, @Param("version") String version);
/**
* Get a version of the role
* Similar to getSpecificRoleVersion
but it also returns the http response headers .
* Get a version of the role by given `id`
* @param id Id of the role (required)
* @param version Role version number in the form `major`.`minor` (required)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /v1/roles/{id}/versions/{version}")
@Headers({
"Accept: application/json",
})
ApiResponse getSpecificRoleVersionWithHttpInfo(@Param("id") UUID id, @Param("version") String version);
/**
* List role versions
* Get a list of all the versions of a role identified by `id`
* @param id Id of the role (required)
* @return EntityHistory
*/
@RequestLine("GET /v1/roles/{id}/versions")
@Headers({
"Accept: application/json",
})
EntityHistory listAllRoleVersion(@Param("id") UUID id);
/**
* List role versions
* Similar to listAllRoleVersion
but it also returns the http response headers .
* Get a list of all the versions of a role identified by `id`
* @param id Id of the role (required)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /v1/roles/{id}/versions")
@Headers({
"Accept: application/json",
})
ApiResponse listAllRoleVersionWithHttpInfo(@Param("id") UUID id);
/**
* List roles
* Get a list of roles. Use cursor-based pagination to limit the number of entries in the list using `limit` and `before` or `after` query params.
* @param _default List only default role(s) (optional)
* @param fields Fields requested in the returned resource (optional)
* @param limit Limit the number tables returned. (1 to 1000000, default = 10) (optional, default to 10)
* @param before Returns list of tables before this cursor (optional)
* @param after Returns list of tables after this cursor (optional)
* @param include Include all, deleted, or non-deleted entities. (optional, default to non-deleted)
* @return RoleList
*/
@RequestLine("GET /v1/roles?default={_default}&fields={fields}&limit={limit}&before={before}&after={after}&include={include}")
@Headers({
"Accept: application/json",
})
RoleList listRoles(@Param("_default") Boolean _default, @Param("fields") String fields, @Param("limit") Integer limit, @Param("before") String before, @Param("after") String after, @Param("include") String include);
/**
* List roles
* Similar to listRoles
but it also returns the http response headers .
* Get a list of roles. Use cursor-based pagination to limit the number of entries in the list using `limit` and `before` or `after` query params.
* @param _default List only default role(s) (optional)
* @param fields Fields requested in the returned resource (optional)
* @param limit Limit the number tables returned. (1 to 1000000, default = 10) (optional, default to 10)
* @param before Returns list of tables before this cursor (optional)
* @param after Returns list of tables 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/roles?default={_default}&fields={fields}&limit={limit}&before={before}&after={after}&include={include}")
@Headers({
"Accept: application/json",
})
ApiResponse listRolesWithHttpInfo(@Param("_default") Boolean _default, @Param("fields") String fields, @Param("limit") Integer limit, @Param("before") String before, @Param("after") String after, @Param("include") String include);
/**
* List roles
* Get a list of roles. Use cursor-based pagination to limit the number of entries in the list using `limit` and `before` or `after` query params.
* Note, this is equivalent to the other listRoles
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 ListRolesQueryParams} 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:
*
* - _default - List only default role(s) (optional)
* - fields - Fields requested in the returned resource (optional)
* - limit - Limit the number tables returned. (1 to 1000000, default = 10) (optional, default to 10)
* - before - Returns list of tables before this cursor (optional)
* - after - Returns list of tables after this cursor (optional)
* - include - Include all, deleted, or non-deleted entities. (optional, default to non-deleted)
*
* @return RoleList
*/
@RequestLine("GET /v1/roles?default={_default}&fields={fields}&limit={limit}&before={before}&after={after}&include={include}")
@Headers({
"Accept: application/json",
})
RoleList listRoles(@QueryMap(encoded=true) ListRolesQueryParams queryParams);
/**
* List roles
* Get a list of roles. Use cursor-based pagination to limit the number of entries in the list using `limit` and `before` or `after` query params.
* Note, this is equivalent to the other listRoles
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:
*
* - _default - List only default role(s) (optional)
* - fields - Fields requested in the returned resource (optional)
* - limit - Limit the number tables returned. (1 to 1000000, default = 10) (optional, default to 10)
* - before - Returns list of tables before this cursor (optional)
* - after - Returns list of tables after this cursor (optional)
* - include - Include all, deleted, or non-deleted entities. (optional, default to non-deleted)
*
* @return RoleList
*/
@RequestLine("GET /v1/roles?default={_default}&fields={fields}&limit={limit}&before={before}&after={after}&include={include}")
@Headers({
"Accept: application/json",
})
ApiResponse listRolesWithHttpInfo(@QueryMap(encoded=true) ListRolesQueryParams queryParams);
/**
* A convenience class for generating query parameters for the
* listRoles
method in a fluent style.
*/
public static class ListRolesQueryParams extends HashMap {
public ListRolesQueryParams _default(final Boolean value) {
put("default", EncodingUtils.encode(value));
return this;
}
public ListRolesQueryParams fields(final String value) {
put("fields", EncodingUtils.encode(value));
return this;
}
public ListRolesQueryParams limit(final Integer value) {
put("limit", EncodingUtils.encode(value));
return this;
}
public ListRolesQueryParams before(final String value) {
put("before", EncodingUtils.encode(value));
return this;
}
public ListRolesQueryParams after(final String value) {
put("after", EncodingUtils.encode(value));
return this;
}
public ListRolesQueryParams include(final String value) {
put("include", EncodingUtils.encode(value));
return this;
}
}
/**
* Update a role using name.
* Update an existing role with JsonPatch.
* @param fqn Name of the role (required)
* @param body JsonPatch with array of operations (optional)
* JsonPatch RFC
* @see Update a role using name. Documentation
*/
@RequestLine("PATCH /v1/roles/name/{fqn}")
@Headers({
"Content-Type: application/json-patch+json",
"Accept: application/json",
})
void patchRole(@Param("fqn") String fqn, Object body);
/**
* Update a role using name.
* Similar to patchRole
but it also returns the http response headers .
* Update an existing role with JsonPatch.
* @param fqn Name of the role (required)
* @param body JsonPatch with array of operations (optional)
* JsonPatch RFC
* @see Update a role using name. Documentation
*/
@RequestLine("PATCH /v1/roles/name/{fqn}")
@Headers({
"Content-Type: application/json-patch+json",
"Accept: application/json",
})
ApiResponse patchRoleWithHttpInfo(@Param("fqn") String fqn, Object body);
/**
* Update a role
* Update an existing role with JsonPatch.
* @param id Id of the role (required)
* @param body JsonPatch with array of operations (optional)
* JsonPatch RFC
* @see Update a role Documentation
*/
@RequestLine("PATCH /v1/roles/{id}")
@Headers({
"Content-Type: application/json-patch+json",
"Accept: application/json",
})
void patchRole1(@Param("id") UUID id, Object body);
/**
* Update a role
* Similar to patchRole1
but it also returns the http response headers .
* Update an existing role with JsonPatch.
* @param id Id of the role (required)
* @param body JsonPatch with array of operations (optional)
* JsonPatch RFC
* @see Update a role Documentation
*/
@RequestLine("PATCH /v1/roles/{id}")
@Headers({
"Content-Type: application/json-patch+json",
"Accept: application/json",
})
ApiResponse patchRole1WithHttpInfo(@Param("id") UUID id, Object body);
/**
* Restore a soft deleted role
* Restore a soft deleted role.
* @param restoreEntity (optional)
* @return Role
*/
@RequestLine("PUT /v1/roles/restore")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
Role restore33(RestoreEntity restoreEntity);
/**
* Restore a soft deleted role
* Similar to restore33
but it also returns the http response headers .
* Restore a soft deleted role.
* @param restoreEntity (optional)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("PUT /v1/roles/restore")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
ApiResponse restore33WithHttpInfo(RestoreEntity restoreEntity);
}