org.openmetadata.client.api.PermissionsApi 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.ResourcePermissionList;
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-03T19:44:33.436780642Z[Etc/UTC]")
public interface PermissionsApi extends ApiClient.Api {
/**
* Get permissions for a set of policies
*
* @param ids List of policy of ids (optional)
* @return ResourcePermissionList
*/
@RequestLine("GET /v1/permissions/policies?ids={ids}")
@Headers({
"Accept: application/json",
})
ResourcePermissionList getPermissionsForPolicies(@Param("ids") List ids);
/**
* Get permissions for a set of policies
* Similar to getPermissionsForPolicies
but it also returns the http response headers .
*
* @param ids List of policy of ids (optional)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /v1/permissions/policies?ids={ids}")
@Headers({
"Accept: application/json",
})
ApiResponse getPermissionsForPoliciesWithHttpInfo(@Param("ids") List ids);
/**
* Get permissions for a set of policies
*
* Note, this is equivalent to the other getPermissionsForPolicies
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 GetPermissionsForPoliciesQueryParams} 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:
*
* - ids - List of policy of ids (optional)
*
* @return ResourcePermissionList
*/
@RequestLine("GET /v1/permissions/policies?ids={ids}")
@Headers({
"Accept: application/json",
})
ResourcePermissionList getPermissionsForPolicies(@QueryMap(encoded=true) GetPermissionsForPoliciesQueryParams queryParams);
/**
* Get permissions for a set of policies
*
* Note, this is equivalent to the other getPermissionsForPolicies
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:
*
* - ids - List of policy of ids (optional)
*
* @return ResourcePermissionList
*/
@RequestLine("GET /v1/permissions/policies?ids={ids}")
@Headers({
"Accept: application/json",
})
ApiResponse getPermissionsForPoliciesWithHttpInfo(@QueryMap(encoded=true) GetPermissionsForPoliciesQueryParams queryParams);
/**
* A convenience class for generating query parameters for the
* getPermissionsForPolicies
method in a fluent style.
*/
public static class GetPermissionsForPoliciesQueryParams extends HashMap {
public GetPermissionsForPoliciesQueryParams ids(final List value) {
put("ids", EncodingUtils.encodeCollection(value, "multi"));
return this;
}
}
/**
* Get permissions for a given entity for a logged in user
*
* @param resource Type of the resource (required)
* @param id Id of the entity (required)
* @param user Permission for user specified in this query param. If not specified, the user is defaulted to the logged in user (optional)
* @return ResourcePermissionList
*/
@RequestLine("GET /v1/permissions/{resource}/{id}?user={user}")
@Headers({
"Accept: application/json",
})
ResourcePermissionList getResourcePermission(@Param("resource") String resource, @Param("id") UUID id, @Param("user") String user);
/**
* Get permissions for a given entity for a logged in user
* Similar to getResourcePermission
but it also returns the http response headers .
*
* @param resource Type of the resource (required)
* @param id Id of the entity (required)
* @param user Permission for user specified in this query param. If not specified, the user is defaulted to the logged in user (optional)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /v1/permissions/{resource}/{id}?user={user}")
@Headers({
"Accept: application/json",
})
ApiResponse getResourcePermissionWithHttpInfo(@Param("resource") String resource, @Param("id") UUID id, @Param("user") String user);
/**
* Get permissions for a given entity for a logged in user
*
* Note, this is equivalent to the other getResourcePermission
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 GetResourcePermissionQueryParams} class that allows for
* building up this map in a fluent style.
* @param resource Type of the resource (required)
* @param id Id of the entity (required)
* @param queryParams Map of query parameters as name-value pairs
* The following elements may be specified in the query map:
*
* - user - Permission for user specified in this query param. If not specified, the user is defaulted to the logged in user (optional)
*
* @return ResourcePermissionList
*/
@RequestLine("GET /v1/permissions/{resource}/{id}?user={user}")
@Headers({
"Accept: application/json",
})
ResourcePermissionList getResourcePermission(@Param("resource") String resource, @Param("id") UUID id, @QueryMap(encoded=true) GetResourcePermissionQueryParams queryParams);
/**
* Get permissions for a given entity for a logged in user
*
* Note, this is equivalent to the other getResourcePermission
that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param resource Type of the resource (required)
* @param id Id of the entity (required)
* @param queryParams Map of query parameters as name-value pairs
* The following elements may be specified in the query map:
*
* - user - Permission for user specified in this query param. If not specified, the user is defaulted to the logged in user (optional)
*
* @return ResourcePermissionList
*/
@RequestLine("GET /v1/permissions/{resource}/{id}?user={user}")
@Headers({
"Accept: application/json",
})
ApiResponse getResourcePermissionWithHttpInfo(@Param("resource") String resource, @Param("id") UUID id, @QueryMap(encoded=true) GetResourcePermissionQueryParams queryParams);
/**
* A convenience class for generating query parameters for the
* getResourcePermission
method in a fluent style.
*/
public static class GetResourcePermissionQueryParams extends HashMap {
public GetResourcePermissionQueryParams user(final String value) {
put("user", EncodingUtils.encode(value));
return this;
}
}
/**
* Get permissions for a given entity name for a logged in user
*
* @param resource Type of the resource (required)
* @param name Name of the entity (required)
* @param user Permission for user specified in this query param. If not specified, the user is defaulted to the logged in user (optional)
* @return ResourcePermissionList
*/
@RequestLine("GET /v1/permissions/{resource}/name/{name}?user={user}")
@Headers({
"Accept: application/json",
})
ResourcePermissionList getResourcePermissionByName(@Param("resource") String resource, @Param("name") String name, @Param("user") String user);
/**
* Get permissions for a given entity name for a logged in user
* Similar to getResourcePermissionByName
but it also returns the http response headers .
*
* @param resource Type of the resource (required)
* @param name Name of the entity (required)
* @param user Permission for user specified in this query param. If not specified, the user is defaulted to the logged in user (optional)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /v1/permissions/{resource}/name/{name}?user={user}")
@Headers({
"Accept: application/json",
})
ApiResponse getResourcePermissionByNameWithHttpInfo(@Param("resource") String resource, @Param("name") String name, @Param("user") String user);
/**
* Get permissions for a given entity name for a logged in user
*
* Note, this is equivalent to the other getResourcePermissionByName
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 GetResourcePermissionByNameQueryParams} class that allows for
* building up this map in a fluent style.
* @param resource Type of the resource (required)
* @param name Name of the entity (required)
* @param queryParams Map of query parameters as name-value pairs
* The following elements may be specified in the query map:
*
* - user - Permission for user specified in this query param. If not specified, the user is defaulted to the logged in user (optional)
*
* @return ResourcePermissionList
*/
@RequestLine("GET /v1/permissions/{resource}/name/{name}?user={user}")
@Headers({
"Accept: application/json",
})
ResourcePermissionList getResourcePermissionByName(@Param("resource") String resource, @Param("name") String name, @QueryMap(encoded=true) GetResourcePermissionByNameQueryParams queryParams);
/**
* Get permissions for a given entity name for a logged in user
*
* Note, this is equivalent to the other getResourcePermissionByName
that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param resource Type of the resource (required)
* @param name Name of the entity (required)
* @param queryParams Map of query parameters as name-value pairs
* The following elements may be specified in the query map:
*
* - user - Permission for user specified in this query param. If not specified, the user is defaulted to the logged in user (optional)
*
* @return ResourcePermissionList
*/
@RequestLine("GET /v1/permissions/{resource}/name/{name}?user={user}")
@Headers({
"Accept: application/json",
})
ApiResponse getResourcePermissionByNameWithHttpInfo(@Param("resource") String resource, @Param("name") String name, @QueryMap(encoded=true) GetResourcePermissionByNameQueryParams queryParams);
/**
* A convenience class for generating query parameters for the
* getResourcePermissionByName
method in a fluent style.
*/
public static class GetResourcePermissionByNameQueryParams extends HashMap {
public GetResourcePermissionByNameQueryParams user(final String value) {
put("user", EncodingUtils.encode(value));
return this;
}
}
/**
* Get permissions for logged in user
*
* @param user Permission for user specified in this query param. If not specified, the user is defaulted to the logged in user (optional)
* @return ResourcePermissionList
*/
@RequestLine("GET /v1/permissions?user={user}")
@Headers({
"Accept: application/json",
})
ResourcePermissionList getResourcePermissions(@Param("user") String user);
/**
* Get permissions for logged in user
* Similar to getResourcePermissions
but it also returns the http response headers .
*
* @param user Permission for user specified in this query param. If not specified, the user is defaulted to the logged in user (optional)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /v1/permissions?user={user}")
@Headers({
"Accept: application/json",
})
ApiResponse getResourcePermissionsWithHttpInfo(@Param("user") String user);
/**
* Get permissions for logged in user
*
* Note, this is equivalent to the other getResourcePermissions
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 GetResourcePermissionsQueryParams} 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:
*
* - user - Permission for user specified in this query param. If not specified, the user is defaulted to the logged in user (optional)
*
* @return ResourcePermissionList
*/
@RequestLine("GET /v1/permissions?user={user}")
@Headers({
"Accept: application/json",
})
ResourcePermissionList getResourcePermissions(@QueryMap(encoded=true) GetResourcePermissionsQueryParams queryParams);
/**
* Get permissions for logged in user
*
* Note, this is equivalent to the other getResourcePermissions
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:
*
* - user - Permission for user specified in this query param. If not specified, the user is defaulted to the logged in user (optional)
*
* @return ResourcePermissionList
*/
@RequestLine("GET /v1/permissions?user={user}")
@Headers({
"Accept: application/json",
})
ApiResponse getResourcePermissionsWithHttpInfo(@QueryMap(encoded=true) GetResourcePermissionsQueryParams queryParams);
/**
* A convenience class for generating query parameters for the
* getResourcePermissions
method in a fluent style.
*/
public static class GetResourcePermissionsQueryParams extends HashMap {
public GetResourcePermissionsQueryParams user(final String value) {
put("user", EncodingUtils.encode(value));
return this;
}
}
/**
* Get permissions a given resource/entity type for logged in user
*
* @param resource Type of the resource (required)
* @param user Permission for user specified in this query param. If not specified, the user is defaulted to the logged in user (optional)
* @return ResourcePermissionList
*/
@RequestLine("GET /v1/permissions/{resource}?user={user}")
@Headers({
"Accept: application/json",
})
ResourcePermissionList getResourceTypePermission(@Param("resource") String resource, @Param("user") String user);
/**
* Get permissions a given resource/entity type for logged in user
* Similar to getResourceTypePermission
but it also returns the http response headers .
*
* @param resource Type of the resource (required)
* @param user Permission for user specified in this query param. If not specified, the user is defaulted to the logged in user (optional)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /v1/permissions/{resource}?user={user}")
@Headers({
"Accept: application/json",
})
ApiResponse getResourceTypePermissionWithHttpInfo(@Param("resource") String resource, @Param("user") String user);
/**
* Get permissions a given resource/entity type for logged in user
*
* Note, this is equivalent to the other getResourceTypePermission
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 GetResourceTypePermissionQueryParams} class that allows for
* building up this map in a fluent style.
* @param resource Type of the resource (required)
* @param queryParams Map of query parameters as name-value pairs
* The following elements may be specified in the query map:
*
* - user - Permission for user specified in this query param. If not specified, the user is defaulted to the logged in user (optional)
*
* @return ResourcePermissionList
*/
@RequestLine("GET /v1/permissions/{resource}?user={user}")
@Headers({
"Accept: application/json",
})
ResourcePermissionList getResourceTypePermission(@Param("resource") String resource, @QueryMap(encoded=true) GetResourceTypePermissionQueryParams queryParams);
/**
* Get permissions a given resource/entity type for logged in user
*
* Note, this is equivalent to the other getResourceTypePermission
that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param resource Type of the resource (required)
* @param queryParams Map of query parameters as name-value pairs
* The following elements may be specified in the query map:
*
* - user - Permission for user specified in this query param. If not specified, the user is defaulted to the logged in user (optional)
*
* @return ResourcePermissionList
*/
@RequestLine("GET /v1/permissions/{resource}?user={user}")
@Headers({
"Accept: application/json",
})
ApiResponse getResourceTypePermissionWithHttpInfo(@Param("resource") String resource, @QueryMap(encoded=true) GetResourceTypePermissionQueryParams queryParams);
/**
* A convenience class for generating query parameters for the
* getResourceTypePermission
method in a fluent style.
*/
public static class GetResourceTypePermissionQueryParams extends HashMap {
public GetResourceTypePermissionQueryParams user(final String value) {
put("user", EncodingUtils.encode(value));
return this;
}
}
}