Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
// - read more on https://github.com/clinia/api-clients-generation. DO NOT EDIT.
package com.clinia.api;
import com.clinia.ApiClient;
import com.clinia.config.*;
import com.clinia.config.ClientOptions;
import com.clinia.exceptions.*;
import com.clinia.model.common.*;
import com.clinia.model.registry.*;
import com.clinia.utils.*;
import com.fasterxml.jackson.core.type.TypeReference;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import javax.annotation.Nonnull;
public class RegistryClient extends ApiClient {
public RegistryClient(String workspaceId, String apiKey) {
this(workspaceId, apiKey, null);
}
public RegistryClient(String workspaceId, String apiKey, ClientOptions options) {
super(workspaceId, apiKey, "Registry", options, getDefaultHosts(workspaceId));
}
private static List getDefaultHosts(String workspaceId) {
List hosts = new ArrayList<>();
hosts.add(new Host("api." + workspaceId + ".clinia.cloud", EnumSet.of(CallType.READ)));
hosts.add(new Host("api." + workspaceId + ".clinia.cloud", EnumSet.of(CallType.WRITE)));
return hosts;
}
/**
* Bulk create, update, or delete relationships. The request body should contain a list of
* operations.
*
* @param sourceKey The source key. (required)
* @param bulkRelationshipsRequest The request body should contain a list of relationships to
* create, update, or delete. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1BulkResponse bulkRelationships(
@Nonnull String sourceKey,
@Nonnull BulkRelationshipsRequest bulkRelationshipsRequest,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return LaunderThrowable.await(bulkRelationshipsAsync(sourceKey, bulkRelationshipsRequest, requestOptions));
}
/**
* Bulk create, update, or delete relationships. The request body should contain a list of
* operations.
*
* @param sourceKey The source key. (required)
* @param bulkRelationshipsRequest The request body should contain a list of relationships to
* create, update, or delete. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1BulkResponse bulkRelationships(@Nonnull String sourceKey, @Nonnull BulkRelationshipsRequest bulkRelationshipsRequest)
throws CliniaRuntimeException {
return this.bulkRelationships(sourceKey, bulkRelationshipsRequest, null);
}
/**
* (asynchronously) Bulk create, update, or delete relationships. The request body should contain
* a list of operations.
*
* @param sourceKey The source key. (required)
* @param bulkRelationshipsRequest The request body should contain a list of relationships to
* create, update, or delete. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture bulkRelationshipsAsync(
@Nonnull String sourceKey,
@Nonnull BulkRelationshipsRequest bulkRelationshipsRequest,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `bulkRelationships`.");
Parameters.requireNonNull(
bulkRelationshipsRequest,
"Parameter `bulkRelationshipsRequest` is required when calling `bulkRelationships`."
);
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/relationships/bulk", sourceKey)
.setMethod("POST")
.setBody(bulkRelationshipsRequest)
.build();
return executeAsync(request, requestOptions, new TypeReference() {});
}
/**
* (asynchronously) Bulk create, update, or delete relationships. The request body should contain
* a list of operations.
*
* @param sourceKey The source key. (required)
* @param bulkRelationshipsRequest The request body should contain a list of relationships to
* create, update, or delete. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture bulkRelationshipsAsync(
@Nonnull String sourceKey,
@Nonnull BulkRelationshipsRequest bulkRelationshipsRequest
) throws CliniaRuntimeException {
return this.bulkRelationshipsAsync(sourceKey, bulkRelationshipsRequest, null);
}
/**
* Bulk create, update, or delete resources. The request body should contain a list of operations.
*
* @param sourceKey The source key. (required)
* @param bulkResourcesRequest The request body should contain a list of resources to create,
* update, or delete. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1BulkResponse bulkResources(
@Nonnull String sourceKey,
@Nonnull BulkResourcesRequest bulkResourcesRequest,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return LaunderThrowable.await(bulkResourcesAsync(sourceKey, bulkResourcesRequest, requestOptions));
}
/**
* Bulk create, update, or delete resources. The request body should contain a list of operations.
*
* @param sourceKey The source key. (required)
* @param bulkResourcesRequest The request body should contain a list of resources to create,
* update, or delete. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1BulkResponse bulkResources(@Nonnull String sourceKey, @Nonnull BulkResourcesRequest bulkResourcesRequest)
throws CliniaRuntimeException {
return this.bulkResources(sourceKey, bulkResourcesRequest, null);
}
/**
* (asynchronously) Bulk create, update, or delete resources. The request body should contain a
* list of operations.
*
* @param sourceKey The source key. (required)
* @param bulkResourcesRequest The request body should contain a list of resources to create,
* update, or delete. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture bulkResourcesAsync(
@Nonnull String sourceKey,
@Nonnull BulkResourcesRequest bulkResourcesRequest,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `bulkResources`.");
Parameters.requireNonNull(bulkResourcesRequest, "Parameter `bulkResourcesRequest` is required when calling `bulkResources`.");
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/resources/bulk", sourceKey)
.setMethod("POST")
.setBody(bulkResourcesRequest)
.build();
return executeAsync(request, requestOptions, new TypeReference() {});
}
/**
* (asynchronously) Bulk create, update, or delete resources. The request body should contain a
* list of operations.
*
* @param sourceKey The source key. (required)
* @param bulkResourcesRequest The request body should contain a list of resources to create,
* update, or delete. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture bulkResourcesAsync(
@Nonnull String sourceKey,
@Nonnull BulkResourcesRequest bulkResourcesRequest
) throws CliniaRuntimeException {
return this.bulkResourcesAsync(sourceKey, bulkResourcesRequest, null);
}
/**
* Creates a contained resource in the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @param nestedContainsPathEqualStar Path segments of the nested contain resource, with the
* format {containKey}/{id}. These paths segments must end with a {containKey} (odd number)
* since no resource id is provided. (required)
* @param createContainedResourceRequest (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1Resource createContainedResource(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
@Nonnull String nestedContainsPathEqualStar,
@Nonnull CreateContainedResourceRequest createContainedResourceRequest,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return LaunderThrowable.await(
createContainedResourceAsync(
sourceKey,
type,
id,
nestedContainsPathEqualStar,
createContainedResourceRequest,
innerType,
requestOptions
)
);
}
/**
* Creates a contained resource in the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @param nestedContainsPathEqualStar Path segments of the nested contain resource, with the
* format {containKey}/{id}. These paths segments must end with a {containKey} (odd number)
* since no resource id is provided. (required)
* @param createContainedResourceRequest (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1Resource createContainedResource(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
@Nonnull String nestedContainsPathEqualStar,
@Nonnull CreateContainedResourceRequest createContainedResourceRequest,
Class innerType
) throws CliniaRuntimeException {
return this.createContainedResource(sourceKey, type, id, nestedContainsPathEqualStar, createContainedResourceRequest, innerType, null);
}
/**
* (asynchronously) Creates a contained resource in the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @param nestedContainsPathEqualStar Path segments of the nested contain resource, with the
* format {containKey}/{id}. These paths segments must end with a {containKey} (odd number)
* since no resource id is provided. (required)
* @param createContainedResourceRequest (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> createContainedResourceAsync(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
@Nonnull String nestedContainsPathEqualStar,
@Nonnull CreateContainedResourceRequest createContainedResourceRequest,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `createContainedResource`.");
Parameters.requireNonNull(type, "Parameter `type` is required when calling `createContainedResource`.");
Parameters.requireNonNull(id, "Parameter `id` is required when calling `createContainedResource`.");
Parameters.requireNonNull(
nestedContainsPathEqualStar,
"Parameter `nestedContainsPathEqualStar` is required when calling" + " `createContainedResource`."
);
Parameters.requireNonNull(
createContainedResourceRequest,
"Parameter `createContainedResourceRequest` is required when calling" + " `createContainedResource`."
);
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/resources/{type}/{id}/{nestedContainsPath=*}", sourceKey, type, id, nestedContainsPathEqualStar)
.setMethod("POST")
.setBody(createContainedResourceRequest)
.build();
return executeAsync(request, requestOptions, V1Resource.class, innerType);
}
/**
* (asynchronously) Creates a contained resource in the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @param nestedContainsPathEqualStar Path segments of the nested contain resource, with the
* format {containKey}/{id}. These paths segments must end with a {containKey} (odd number)
* since no resource id is provided. (required)
* @param createContainedResourceRequest (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> createContainedResourceAsync(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
@Nonnull String nestedContainsPathEqualStar,
@Nonnull CreateContainedResourceRequest createContainedResourceRequest,
Class innerType
) throws CliniaRuntimeException {
return this.createContainedResourceAsync(
sourceKey,
type,
id,
nestedContainsPathEqualStar,
createContainedResourceRequest,
innerType,
null
);
}
/**
* Create a relationship between two resources in the registry.
*
* @param sourceKey The key of the source. (required)
* @param key (required)
* @param v1Relationship (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1Relationship createRelationship(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull V1Relationship v1Relationship,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return LaunderThrowable.await(createRelationshipAsync(sourceKey, key, v1Relationship, innerType, requestOptions));
}
/**
* Create a relationship between two resources in the registry.
*
* @param sourceKey The key of the source. (required)
* @param key (required)
* @param v1Relationship (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1Relationship createRelationship(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull V1Relationship v1Relationship,
Class innerType
) throws CliniaRuntimeException {
return this.createRelationship(sourceKey, key, v1Relationship, innerType, null);
}
/**
* (asynchronously) Create a relationship between two resources in the registry.
*
* @param sourceKey The key of the source. (required)
* @param key (required)
* @param v1Relationship (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> createRelationshipAsync(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull V1Relationship v1Relationship,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `createRelationship`.");
Parameters.requireNonNull(key, "Parameter `key` is required when calling `createRelationship`.");
Parameters.requireNonNull(v1Relationship, "Parameter `v1Relationship` is required when calling `createRelationship`.");
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/relationships/{key}", sourceKey, key)
.setMethod("POST")
.setBody(v1Relationship)
.build();
return executeAsync(request, requestOptions, V1Relationship.class, innerType);
}
/**
* (asynchronously) Create a relationship between two resources in the registry.
*
* @param sourceKey The key of the source. (required)
* @param key (required)
* @param v1Relationship (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> createRelationshipAsync(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull V1Relationship v1Relationship,
Class innerType
) throws CliniaRuntimeException {
return this.createRelationshipAsync(sourceKey, key, v1Relationship, innerType, null);
}
/**
* Create a resource in the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param createResourceRequest (optional)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1DomainResource createResource(
@Nonnull String sourceKey,
@Nonnull String type,
CreateResourceRequest createResourceRequest,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return LaunderThrowable.await(createResourceAsync(sourceKey, type, createResourceRequest, innerType, requestOptions));
}
/**
* Create a resource in the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param createResourceRequest (optional)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1DomainResource createResource(
@Nonnull String sourceKey,
@Nonnull String type,
CreateResourceRequest createResourceRequest,
Class innerType
) throws CliniaRuntimeException {
return this.createResource(sourceKey, type, createResourceRequest, innerType, null);
}
/**
* Create a resource in the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1DomainResource createResource(
@Nonnull String sourceKey,
@Nonnull String type,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return this.createResource(sourceKey, type, null, innerType, requestOptions);
}
/**
* Create a resource in the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1DomainResource createResource(@Nonnull String sourceKey, @Nonnull String type, Class innerType)
throws CliniaRuntimeException {
return this.createResource(sourceKey, type, null, innerType, null);
}
/**
* (asynchronously) Create a resource in the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param createResourceRequest (optional)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> createResourceAsync(
@Nonnull String sourceKey,
@Nonnull String type,
CreateResourceRequest createResourceRequest,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `createResource`.");
Parameters.requireNonNull(type, "Parameter `type` is required when calling `createResource`.");
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/resources/{type}", sourceKey, type)
.setMethod("POST")
.setBody(createResourceRequest)
.build();
return executeAsync(request, requestOptions, V1DomainResource.class, innerType);
}
/**
* (asynchronously) Create a resource in the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param createResourceRequest (optional)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> createResourceAsync(
@Nonnull String sourceKey,
@Nonnull String type,
CreateResourceRequest createResourceRequest,
Class innerType
) throws CliniaRuntimeException {
return this.createResourceAsync(sourceKey, type, createResourceRequest, innerType, null);
}
/**
* (asynchronously) Create a resource in the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> createResourceAsync(
@Nonnull String sourceKey,
@Nonnull String type,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return this.createResourceAsync(sourceKey, type, null, innerType, requestOptions);
}
/**
* (asynchronously) Create a resource in the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> createResourceAsync(
@Nonnull String sourceKey,
@Nonnull String type,
Class innerType
) throws CliniaRuntimeException {
return this.createResourceAsync(sourceKey, type, null, innerType, null);
}
/**
* Deletes the pipeline of a collection.
*
* @param sourceKey The key of the source. (required)
* @param collectionKey The key of the collection. The collection key is shared with the profile
* key. A collection is a container for resources. It has a root profile that specify the
* schema of resources. It contain also contain an ingestion pipeline that specify how
* resources are ingested. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public void deleteCollectionPipeline(@Nonnull String sourceKey, @Nonnull String collectionKey, RequestOptions requestOptions)
throws CliniaRuntimeException {
LaunderThrowable.await(deleteCollectionPipelineAsync(sourceKey, collectionKey, requestOptions));
return;
}
/**
* Deletes the pipeline of a collection.
*
* @param sourceKey The key of the source. (required)
* @param collectionKey The key of the collection. The collection key is shared with the profile
* key. A collection is a container for resources. It has a root profile that specify the
* schema of resources. It contain also contain an ingestion pipeline that specify how
* resources are ingested. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public void deleteCollectionPipeline(@Nonnull String sourceKey, @Nonnull String collectionKey) throws CliniaRuntimeException {
this.deleteCollectionPipeline(sourceKey, collectionKey, null);
}
/**
* (asynchronously) Deletes the pipeline of a collection.
*
* @param sourceKey The key of the source. (required)
* @param collectionKey The key of the collection. The collection key is shared with the profile
* key. A collection is a container for resources. It has a root profile that specify the
* schema of resources. It contain also contain an ingestion pipeline that specify how
* resources are ingested. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture deleteCollectionPipelineAsync(
@Nonnull String sourceKey,
@Nonnull String collectionKey,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `deleteCollectionPipeline`.");
Parameters.requireNonNull(collectionKey, "Parameter `collectionKey` is required when calling `deleteCollectionPipeline`.");
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/collections/{collectionKey}/pipeline", sourceKey, collectionKey)
.setMethod("DELETE")
.build();
return executeAsync(request, requestOptions, null);
}
/**
* (asynchronously) Deletes the pipeline of a collection.
*
* @param sourceKey The key of the source. (required)
* @param collectionKey The key of the collection. The collection key is shared with the profile
* key. A collection is a container for resources. It has a root profile that specify the
* schema of resources. It contain also contain an ingestion pipeline that specify how
* resources are ingested. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture deleteCollectionPipelineAsync(@Nonnull String sourceKey, @Nonnull String collectionKey)
throws CliniaRuntimeException {
return this.deleteCollectionPipelineAsync(sourceKey, collectionKey, null);
}
/**
* Deletes a contained resource in the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @param nestedContainsPathEqualStar Path segments of the nested contain resource, with the
* format {type}/{id}. These paths segments must come in pairs (even number). (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public void deleteContainedResource(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
@Nonnull String nestedContainsPathEqualStar,
RequestOptions requestOptions
) throws CliniaRuntimeException {
LaunderThrowable.await(deleteContainedResourceAsync(sourceKey, type, id, nestedContainsPathEqualStar, requestOptions));
return;
}
/**
* Deletes a contained resource in the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @param nestedContainsPathEqualStar Path segments of the nested contain resource, with the
* format {type}/{id}. These paths segments must come in pairs (even number). (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public void deleteContainedResource(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
@Nonnull String nestedContainsPathEqualStar
) throws CliniaRuntimeException {
this.deleteContainedResource(sourceKey, type, id, nestedContainsPathEqualStar, null);
}
/**
* (asynchronously) Deletes a contained resource in the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @param nestedContainsPathEqualStar Path segments of the nested contain resource, with the
* format {type}/{id}. These paths segments must come in pairs (even number). (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture deleteContainedResourceAsync(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
@Nonnull String nestedContainsPathEqualStar,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `deleteContainedResource`.");
Parameters.requireNonNull(type, "Parameter `type` is required when calling `deleteContainedResource`.");
Parameters.requireNonNull(id, "Parameter `id` is required when calling `deleteContainedResource`.");
Parameters.requireNonNull(
nestedContainsPathEqualStar,
"Parameter `nestedContainsPathEqualStar` is required when calling" + " `deleteContainedResource`."
);
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/resources/{type}/{id}/{nestedContainsPath=*}", sourceKey, type, id, nestedContainsPathEqualStar)
.setMethod("DELETE")
.build();
return executeAsync(request, requestOptions, null);
}
/**
* (asynchronously) Deletes a contained resource in the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @param nestedContainsPathEqualStar Path segments of the nested contain resource, with the
* format {type}/{id}. These paths segments must come in pairs (even number). (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture deleteContainedResourceAsync(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
@Nonnull String nestedContainsPathEqualStar
) throws CliniaRuntimeException {
return this.deleteContainedResourceAsync(sourceKey, type, id, nestedContainsPathEqualStar, null);
}
/**
* Delete a Profile from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key Key of the profile. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public void deleteProfile(@Nonnull String sourceKey, @Nonnull String key, RequestOptions requestOptions) throws CliniaRuntimeException {
LaunderThrowable.await(deleteProfileAsync(sourceKey, key, requestOptions));
return;
}
/**
* Delete a Profile from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key Key of the profile. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public void deleteProfile(@Nonnull String sourceKey, @Nonnull String key) throws CliniaRuntimeException {
this.deleteProfile(sourceKey, key, null);
}
/**
* (asynchronously) Delete a Profile from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key Key of the profile. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture deleteProfileAsync(@Nonnull String sourceKey, @Nonnull String key, RequestOptions requestOptions)
throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `deleteProfile`.");
Parameters.requireNonNull(key, "Parameter `key` is required when calling `deleteProfile`.");
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/profiles/{key}", sourceKey, key)
.setMethod("DELETE")
.build();
return executeAsync(request, requestOptions, null);
}
/**
* (asynchronously) Delete a Profile from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key Key of the profile. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture deleteProfileAsync(@Nonnull String sourceKey, @Nonnull String key) throws CliniaRuntimeException {
return this.deleteProfileAsync(sourceKey, key, null);
}
/**
* Delete a relationship between two resources in the registry.
*
* @param sourceKey The key of the source. (required)
* @param key Key of the relationship definition. (required)
* @param id Id of the relationship. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public void deleteRelationship(@Nonnull String sourceKey, @Nonnull String key, @Nonnull String id, RequestOptions requestOptions)
throws CliniaRuntimeException {
LaunderThrowable.await(deleteRelationshipAsync(sourceKey, key, id, requestOptions));
return;
}
/**
* Delete a relationship between two resources in the registry.
*
* @param sourceKey The key of the source. (required)
* @param key Key of the relationship definition. (required)
* @param id Id of the relationship. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public void deleteRelationship(@Nonnull String sourceKey, @Nonnull String key, @Nonnull String id) throws CliniaRuntimeException {
this.deleteRelationship(sourceKey, key, id, null);
}
/**
* (asynchronously) Delete a relationship between two resources in the registry.
*
* @param sourceKey The key of the source. (required)
* @param key Key of the relationship definition. (required)
* @param id Id of the relationship. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture deleteRelationshipAsync(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull String id,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `deleteRelationship`.");
Parameters.requireNonNull(key, "Parameter `key` is required when calling `deleteRelationship`.");
Parameters.requireNonNull(id, "Parameter `id` is required when calling `deleteRelationship`.");
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/relationships/{key}/{id}", sourceKey, key, id)
.setMethod("DELETE")
.build();
return executeAsync(request, requestOptions, null);
}
/**
* (asynchronously) Delete a relationship between two resources in the registry.
*
* @param sourceKey The key of the source. (required)
* @param key Key of the relationship definition. (required)
* @param id Id of the relationship. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture deleteRelationshipAsync(@Nonnull String sourceKey, @Nonnull String key, @Nonnull String id)
throws CliniaRuntimeException {
return this.deleteRelationshipAsync(sourceKey, key, id, null);
}
/**
* Delete a relationship definition from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key The key or id of the relationship definition. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public void deleteRelationshipDefinition(@Nonnull String sourceKey, @Nonnull String key, RequestOptions requestOptions)
throws CliniaRuntimeException {
LaunderThrowable.await(deleteRelationshipDefinitionAsync(sourceKey, key, requestOptions));
return;
}
/**
* Delete a relationship definition from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key The key or id of the relationship definition. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public void deleteRelationshipDefinition(@Nonnull String sourceKey, @Nonnull String key) throws CliniaRuntimeException {
this.deleteRelationshipDefinition(sourceKey, key, null);
}
/**
* (asynchronously) Delete a relationship definition from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key The key or id of the relationship definition. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture deleteRelationshipDefinitionAsync(
@Nonnull String sourceKey,
@Nonnull String key,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `deleteRelationshipDefinition`.");
Parameters.requireNonNull(key, "Parameter `key` is required when calling `deleteRelationshipDefinition`.");
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/relationship-definitions/{key}", sourceKey, key)
.setMethod("DELETE")
.build();
return executeAsync(request, requestOptions, null);
}
/**
* (asynchronously) Delete a relationship definition from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key The key or id of the relationship definition. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture deleteRelationshipDefinitionAsync(@Nonnull String sourceKey, @Nonnull String key)
throws CliniaRuntimeException {
return this.deleteRelationshipDefinitionAsync(sourceKey, key, null);
}
/**
* Delete a resource from the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public void deleteResource(@Nonnull String sourceKey, @Nonnull String type, @Nonnull String id, RequestOptions requestOptions)
throws CliniaRuntimeException {
LaunderThrowable.await(deleteResourceAsync(sourceKey, type, id, requestOptions));
return;
}
/**
* Delete a resource from the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public void deleteResource(@Nonnull String sourceKey, @Nonnull String type, @Nonnull String id) throws CliniaRuntimeException {
this.deleteResource(sourceKey, type, id, null);
}
/**
* (asynchronously) Delete a resource from the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture deleteResourceAsync(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `deleteResource`.");
Parameters.requireNonNull(type, "Parameter `type` is required when calling `deleteResource`.");
Parameters.requireNonNull(id, "Parameter `id` is required when calling `deleteResource`.");
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/resources/{type}/{id}", sourceKey, type, id)
.setMethod("DELETE")
.build();
return executeAsync(request, requestOptions, null);
}
/**
* (asynchronously) Delete a resource from the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture deleteResourceAsync(@Nonnull String sourceKey, @Nonnull String type, @Nonnull String id)
throws CliniaRuntimeException {
return this.deleteResourceAsync(sourceKey, type, id, null);
}
/**
* Get the status of a bulk relationship request.
*
* @param sourceKey The source key. (required)
* @param bulkId The bulk id. (required)
* @param withReceipts If set to true, the receipts of the operations will be included in the
* response. Else only the status of the bulk request will be returned. (optional, default to
* true)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1BulkRelationshipResult getBulkRelationshipsResult(
@Nonnull String sourceKey,
@Nonnull String bulkId,
Boolean withReceipts,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return LaunderThrowable.await(getBulkRelationshipsResultAsync(sourceKey, bulkId, withReceipts, requestOptions));
}
/**
* Get the status of a bulk relationship request.
*
* @param sourceKey The source key. (required)
* @param bulkId The bulk id. (required)
* @param withReceipts If set to true, the receipts of the operations will be included in the
* response. Else only the status of the bulk request will be returned. (optional, default to
* true)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1BulkRelationshipResult getBulkRelationshipsResult(@Nonnull String sourceKey, @Nonnull String bulkId, Boolean withReceipts)
throws CliniaRuntimeException {
return this.getBulkRelationshipsResult(sourceKey, bulkId, withReceipts, null);
}
/**
* Get the status of a bulk relationship request.
*
* @param sourceKey The source key. (required)
* @param bulkId The bulk id. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1BulkRelationshipResult getBulkRelationshipsResult(
@Nonnull String sourceKey,
@Nonnull String bulkId,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return this.getBulkRelationshipsResult(sourceKey, bulkId, null, requestOptions);
}
/**
* Get the status of a bulk relationship request.
*
* @param sourceKey The source key. (required)
* @param bulkId The bulk id. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1BulkRelationshipResult getBulkRelationshipsResult(@Nonnull String sourceKey, @Nonnull String bulkId)
throws CliniaRuntimeException {
return this.getBulkRelationshipsResult(sourceKey, bulkId, null, null);
}
/**
* (asynchronously) Get the status of a bulk relationship request.
*
* @param sourceKey The source key. (required)
* @param bulkId The bulk id. (required)
* @param withReceipts If set to true, the receipts of the operations will be included in the
* response. Else only the status of the bulk request will be returned. (optional, default to
* true)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture getBulkRelationshipsResultAsync(
@Nonnull String sourceKey,
@Nonnull String bulkId,
Boolean withReceipts,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `getBulkRelationshipsResult`.");
Parameters.requireNonNull(bulkId, "Parameter `bulkId` is required when calling `getBulkRelationshipsResult`.");
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/relationships/bulk/{bulkId}", sourceKey, bulkId)
.setMethod("GET")
.addQueryParameter("withReceipts", withReceipts)
.build();
return executeAsync(request, requestOptions, new TypeReference() {});
}
/**
* (asynchronously) Get the status of a bulk relationship request.
*
* @param sourceKey The source key. (required)
* @param bulkId The bulk id. (required)
* @param withReceipts If set to true, the receipts of the operations will be included in the
* response. Else only the status of the bulk request will be returned. (optional, default to
* true)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture getBulkRelationshipsResultAsync(
@Nonnull String sourceKey,
@Nonnull String bulkId,
Boolean withReceipts
) throws CliniaRuntimeException {
return this.getBulkRelationshipsResultAsync(sourceKey, bulkId, withReceipts, null);
}
/**
* (asynchronously) Get the status of a bulk relationship request.
*
* @param sourceKey The source key. (required)
* @param bulkId The bulk id. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture getBulkRelationshipsResultAsync(
@Nonnull String sourceKey,
@Nonnull String bulkId,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return this.getBulkRelationshipsResultAsync(sourceKey, bulkId, null, requestOptions);
}
/**
* (asynchronously) Get the status of a bulk relationship request.
*
* @param sourceKey The source key. (required)
* @param bulkId The bulk id. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture getBulkRelationshipsResultAsync(@Nonnull String sourceKey, @Nonnull String bulkId)
throws CliniaRuntimeException {
return this.getBulkRelationshipsResultAsync(sourceKey, bulkId, null, null);
}
/**
* Get the status of a bulk resource request.
*
* @param sourceKey The source key. (required)
* @param bulkId The bulk id. (required)
* @param withReceipts If set to true, the receipts of the operations will be included in the
* response. Else only the status of the bulk request will be returned. (optional, default to
* true)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1BulkResourceResult getBulkResourcesResult(
@Nonnull String sourceKey,
@Nonnull String bulkId,
Boolean withReceipts,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return LaunderThrowable.await(getBulkResourcesResultAsync(sourceKey, bulkId, withReceipts, requestOptions));
}
/**
* Get the status of a bulk resource request.
*
* @param sourceKey The source key. (required)
* @param bulkId The bulk id. (required)
* @param withReceipts If set to true, the receipts of the operations will be included in the
* response. Else only the status of the bulk request will be returned. (optional, default to
* true)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1BulkResourceResult getBulkResourcesResult(@Nonnull String sourceKey, @Nonnull String bulkId, Boolean withReceipts)
throws CliniaRuntimeException {
return this.getBulkResourcesResult(sourceKey, bulkId, withReceipts, null);
}
/**
* Get the status of a bulk resource request.
*
* @param sourceKey The source key. (required)
* @param bulkId The bulk id. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1BulkResourceResult getBulkResourcesResult(@Nonnull String sourceKey, @Nonnull String bulkId, RequestOptions requestOptions)
throws CliniaRuntimeException {
return this.getBulkResourcesResult(sourceKey, bulkId, null, requestOptions);
}
/**
* Get the status of a bulk resource request.
*
* @param sourceKey The source key. (required)
* @param bulkId The bulk id. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1BulkResourceResult getBulkResourcesResult(@Nonnull String sourceKey, @Nonnull String bulkId) throws CliniaRuntimeException {
return this.getBulkResourcesResult(sourceKey, bulkId, null, null);
}
/**
* (asynchronously) Get the status of a bulk resource request.
*
* @param sourceKey The source key. (required)
* @param bulkId The bulk id. (required)
* @param withReceipts If set to true, the receipts of the operations will be included in the
* response. Else only the status of the bulk request will be returned. (optional, default to
* true)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture getBulkResourcesResultAsync(
@Nonnull String sourceKey,
@Nonnull String bulkId,
Boolean withReceipts,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `getBulkResourcesResult`.");
Parameters.requireNonNull(bulkId, "Parameter `bulkId` is required when calling `getBulkResourcesResult`.");
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/resources/bulk/{bulkId}", sourceKey, bulkId)
.setMethod("GET")
.addQueryParameter("withReceipts", withReceipts)
.build();
return executeAsync(request, requestOptions, new TypeReference() {});
}
/**
* (asynchronously) Get the status of a bulk resource request.
*
* @param sourceKey The source key. (required)
* @param bulkId The bulk id. (required)
* @param withReceipts If set to true, the receipts of the operations will be included in the
* response. Else only the status of the bulk request will be returned. (optional, default to
* true)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture getBulkResourcesResultAsync(
@Nonnull String sourceKey,
@Nonnull String bulkId,
Boolean withReceipts
) throws CliniaRuntimeException {
return this.getBulkResourcesResultAsync(sourceKey, bulkId, withReceipts, null);
}
/**
* (asynchronously) Get the status of a bulk resource request.
*
* @param sourceKey The source key. (required)
* @param bulkId The bulk id. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture getBulkResourcesResultAsync(
@Nonnull String sourceKey,
@Nonnull String bulkId,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return this.getBulkResourcesResultAsync(sourceKey, bulkId, null, requestOptions);
}
/**
* (asynchronously) Get the status of a bulk resource request.
*
* @param sourceKey The source key. (required)
* @param bulkId The bulk id. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture getBulkResourcesResultAsync(@Nonnull String sourceKey, @Nonnull String bulkId)
throws CliniaRuntimeException {
return this.getBulkResourcesResultAsync(sourceKey, bulkId, null, null);
}
/**
* Get a collection from the registry.
*
* @param sourceKey The key of the source. (required)
* @param collectionKey The key of the collection. The collection key is shared with the profile
* key. A collection is a container for resources. It has a root profile that specify the
* schema of resources. It contain also contain an ingestion pipeline that specify how
* resources are ingested. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1Collection getCollection(@Nonnull String sourceKey, @Nonnull String collectionKey, RequestOptions requestOptions)
throws CliniaRuntimeException {
return LaunderThrowable.await(getCollectionAsync(sourceKey, collectionKey, requestOptions));
}
/**
* Get a collection from the registry.
*
* @param sourceKey The key of the source. (required)
* @param collectionKey The key of the collection. The collection key is shared with the profile
* key. A collection is a container for resources. It has a root profile that specify the
* schema of resources. It contain also contain an ingestion pipeline that specify how
* resources are ingested. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1Collection getCollection(@Nonnull String sourceKey, @Nonnull String collectionKey) throws CliniaRuntimeException {
return this.getCollection(sourceKey, collectionKey, null);
}
/**
* (asynchronously) Get a collection from the registry.
*
* @param sourceKey The key of the source. (required)
* @param collectionKey The key of the collection. The collection key is shared with the profile
* key. A collection is a container for resources. It has a root profile that specify the
* schema of resources. It contain also contain an ingestion pipeline that specify how
* resources are ingested. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture getCollectionAsync(
@Nonnull String sourceKey,
@Nonnull String collectionKey,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `getCollection`.");
Parameters.requireNonNull(collectionKey, "Parameter `collectionKey` is required when calling `getCollection`.");
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/collections/{collectionKey}", sourceKey, collectionKey)
.setMethod("GET")
.build();
return executeAsync(request, requestOptions, new TypeReference() {});
}
/**
* (asynchronously) Get a collection from the registry.
*
* @param sourceKey The key of the source. (required)
* @param collectionKey The key of the collection. The collection key is shared with the profile
* key. A collection is a container for resources. It has a root profile that specify the
* schema of resources. It contain also contain an ingestion pipeline that specify how
* resources are ingested. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture getCollectionAsync(@Nonnull String sourceKey, @Nonnull String collectionKey)
throws CliniaRuntimeException {
return this.getCollectionAsync(sourceKey, collectionKey, null);
}
/**
* Get a contained resource from the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @param nestedContainsPathEqualStar Path segments of the nested contain resource, with the
* format {containKey}/{id}. These paths segments must come in pairs (even number). (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1DomainResource getContainedResource(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
@Nonnull String nestedContainsPathEqualStar,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return LaunderThrowable.await(getContainedResourceAsync(sourceKey, type, id, nestedContainsPathEqualStar, innerType, requestOptions));
}
/**
* Get a contained resource from the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @param nestedContainsPathEqualStar Path segments of the nested contain resource, with the
* format {containKey}/{id}. These paths segments must come in pairs (even number). (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1DomainResource getContainedResource(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
@Nonnull String nestedContainsPathEqualStar,
Class innerType
) throws CliniaRuntimeException {
return this.getContainedResource(sourceKey, type, id, nestedContainsPathEqualStar, innerType, null);
}
/**
* (asynchronously) Get a contained resource from the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @param nestedContainsPathEqualStar Path segments of the nested contain resource, with the
* format {containKey}/{id}. These paths segments must come in pairs (even number). (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> getContainedResourceAsync(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
@Nonnull String nestedContainsPathEqualStar,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `getContainedResource`.");
Parameters.requireNonNull(type, "Parameter `type` is required when calling `getContainedResource`.");
Parameters.requireNonNull(id, "Parameter `id` is required when calling `getContainedResource`.");
Parameters.requireNonNull(
nestedContainsPathEqualStar,
"Parameter `nestedContainsPathEqualStar` is required when calling `getContainedResource`."
);
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/resources/{type}/{id}/{nestedContainsPath=*}", sourceKey, type, id, nestedContainsPathEqualStar)
.setMethod("GET")
.build();
return executeAsync(request, requestOptions, V1DomainResource.class, innerType);
}
/**
* (asynchronously) Get a contained resource from the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @param nestedContainsPathEqualStar Path segments of the nested contain resource, with the
* format {containKey}/{id}. These paths segments must come in pairs (even number). (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> getContainedResourceAsync(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
@Nonnull String nestedContainsPathEqualStar,
Class innerType
) throws CliniaRuntimeException {
return this.getContainedResourceAsync(sourceKey, type, id, nestedContainsPathEqualStar, innerType, null);
}
/**
* Get a profile from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key The key or id of the profile. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1Profile getProfile(@Nonnull String sourceKey, @Nonnull String key, RequestOptions requestOptions) throws CliniaRuntimeException {
return LaunderThrowable.await(getProfileAsync(sourceKey, key, requestOptions));
}
/**
* Get a profile from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key The key or id of the profile. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1Profile getProfile(@Nonnull String sourceKey, @Nonnull String key) throws CliniaRuntimeException {
return this.getProfile(sourceKey, key, null);
}
/**
* (asynchronously) Get a profile from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key The key or id of the profile. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture getProfileAsync(@Nonnull String sourceKey, @Nonnull String key, RequestOptions requestOptions)
throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `getProfile`.");
Parameters.requireNonNull(key, "Parameter `key` is required when calling `getProfile`.");
HttpRequest request = HttpRequest.builder().setPath("/sources/{sourceKey}/v1/profiles/{key}", sourceKey, key).setMethod("GET").build();
return executeAsync(request, requestOptions, new TypeReference() {});
}
/**
* (asynchronously) Get a profile from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key The key or id of the profile. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture getProfileAsync(@Nonnull String sourceKey, @Nonnull String key) throws CliniaRuntimeException {
return this.getProfileAsync(sourceKey, key, null);
}
/**
* Get a relationship from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key Key of the relationship definition. (required)
* @param id The unique identifier of the relationship with one of the following formats: -
* v1RelationshipID format: `{fromType}.{fromID},{toType}.{toID}` (e.g.
* `patient.123,provider.456`). You can optionally pass in the simpler `{fromID},{toID}` form.
* - Identifier format: `{system}:{value}:{use}` (e.g. `clinia:123:use`). (required)
* @param includes List of resource types to includes with the response. Includes must be valid
* resource types for the given relationship definition. (optional)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1RelationshipWithIncludes getRelationship(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull String id,
List includes,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return LaunderThrowable.await(getRelationshipAsync(sourceKey, key, id, includes, innerType, requestOptions));
}
/**
* Get a relationship from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key Key of the relationship definition. (required)
* @param id The unique identifier of the relationship with one of the following formats: -
* v1RelationshipID format: `{fromType}.{fromID},{toType}.{toID}` (e.g.
* `patient.123,provider.456`). You can optionally pass in the simpler `{fromID},{toID}` form.
* - Identifier format: `{system}:{value}:{use}` (e.g. `clinia:123:use`). (required)
* @param includes List of resource types to includes with the response. Includes must be valid
* resource types for the given relationship definition. (optional)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1RelationshipWithIncludes getRelationship(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull String id,
List includes,
Class innerType
) throws CliniaRuntimeException {
return this.getRelationship(sourceKey, key, id, includes, innerType, null);
}
/**
* Get a relationship from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key Key of the relationship definition. (required)
* @param id The unique identifier of the relationship with one of the following formats: -
* v1RelationshipID format: `{fromType}.{fromID},{toType}.{toID}` (e.g.
* `patient.123,provider.456`). You can optionally pass in the simpler `{fromID},{toID}` form.
* - Identifier format: `{system}:{value}:{use}` (e.g. `clinia:123:use`). (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1RelationshipWithIncludes getRelationship(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull String id,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return this.getRelationship(sourceKey, key, id, null, innerType, requestOptions);
}
/**
* Get a relationship from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key Key of the relationship definition. (required)
* @param id The unique identifier of the relationship with one of the following formats: -
* v1RelationshipID format: `{fromType}.{fromID},{toType}.{toID}` (e.g.
* `patient.123,provider.456`). You can optionally pass in the simpler `{fromID},{toID}` form.
* - Identifier format: `{system}:{value}:{use}` (e.g. `clinia:123:use`). (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1RelationshipWithIncludes getRelationship(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull String id,
Class innerType
) throws CliniaRuntimeException {
return this.getRelationship(sourceKey, key, id, null, innerType, null);
}
/**
* (asynchronously) Get a relationship from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key Key of the relationship definition. (required)
* @param id The unique identifier of the relationship with one of the following formats: -
* v1RelationshipID format: `{fromType}.{fromID},{toType}.{toID}` (e.g.
* `patient.123,provider.456`). You can optionally pass in the simpler `{fromID},{toID}` form.
* - Identifier format: `{system}:{value}:{use}` (e.g. `clinia:123:use`). (required)
* @param includes List of resource types to includes with the response. Includes must be valid
* resource types for the given relationship definition. (optional)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> getRelationshipAsync(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull String id,
List includes,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `getRelationship`.");
Parameters.requireNonNull(key, "Parameter `key` is required when calling `getRelationship`.");
Parameters.requireNonNull(id, "Parameter `id` is required when calling `getRelationship`.");
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/relationships/{key}/{id}", sourceKey, key, id)
.setMethod("GET")
.addQueryParameter("includes", includes)
.build();
return executeAsync(request, requestOptions, V1RelationshipWithIncludes.class, innerType);
}
/**
* (asynchronously) Get a relationship from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key Key of the relationship definition. (required)
* @param id The unique identifier of the relationship with one of the following formats: -
* v1RelationshipID format: `{fromType}.{fromID},{toType}.{toID}` (e.g.
* `patient.123,provider.456`). You can optionally pass in the simpler `{fromID},{toID}` form.
* - Identifier format: `{system}:{value}:{use}` (e.g. `clinia:123:use`). (required)
* @param includes List of resource types to includes with the response. Includes must be valid
* resource types for the given relationship definition. (optional)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> getRelationshipAsync(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull String id,
List includes,
Class innerType
) throws CliniaRuntimeException {
return this.getRelationshipAsync(sourceKey, key, id, includes, innerType, null);
}
/**
* (asynchronously) Get a relationship from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key Key of the relationship definition. (required)
* @param id The unique identifier of the relationship with one of the following formats: -
* v1RelationshipID format: `{fromType}.{fromID},{toType}.{toID}` (e.g.
* `patient.123,provider.456`). You can optionally pass in the simpler `{fromID},{toID}` form.
* - Identifier format: `{system}:{value}:{use}` (e.g. `clinia:123:use`). (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> getRelationshipAsync(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull String id,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return this.getRelationshipAsync(sourceKey, key, id, null, innerType, requestOptions);
}
/**
* (asynchronously) Get a relationship from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key Key of the relationship definition. (required)
* @param id The unique identifier of the relationship with one of the following formats: -
* v1RelationshipID format: `{fromType}.{fromID},{toType}.{toID}` (e.g.
* `patient.123,provider.456`). You can optionally pass in the simpler `{fromID},{toID}` form.
* - Identifier format: `{system}:{value}:{use}` (e.g. `clinia:123:use`). (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> getRelationshipAsync(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull String id,
Class innerType
) throws CliniaRuntimeException {
return this.getRelationshipAsync(sourceKey, key, id, null, innerType, null);
}
/**
* Get a relationship definition from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key The key or the id of the relationship definition. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1RelationshipDefinition getRelationshipDefinition(@Nonnull String sourceKey, @Nonnull String key, RequestOptions requestOptions)
throws CliniaRuntimeException {
return LaunderThrowable.await(getRelationshipDefinitionAsync(sourceKey, key, requestOptions));
}
/**
* Get a relationship definition from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key The key or the id of the relationship definition. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1RelationshipDefinition getRelationshipDefinition(@Nonnull String sourceKey, @Nonnull String key) throws CliniaRuntimeException {
return this.getRelationshipDefinition(sourceKey, key, null);
}
/**
* (asynchronously) Get a relationship definition from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key The key or the id of the relationship definition. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture getRelationshipDefinitionAsync(
@Nonnull String sourceKey,
@Nonnull String key,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `getRelationshipDefinition`.");
Parameters.requireNonNull(key, "Parameter `key` is required when calling `getRelationshipDefinition`.");
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/relationship-definitions/{key}", sourceKey, key)
.setMethod("GET")
.build();
return executeAsync(request, requestOptions, new TypeReference() {});
}
/**
* (asynchronously) Get a relationship definition from the registry.
*
* @param sourceKey The key of the source. (required)
* @param key The key or the id of the relationship definition. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture getRelationshipDefinitionAsync(@Nonnull String sourceKey, @Nonnull String key)
throws CliniaRuntimeException {
return this.getRelationshipDefinitionAsync(sourceKey, key, null);
}
/**
* Get a resource from the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id The resource ID. It can also be an identifier with the following formats
* `{system}:{value}:{use}` (e.g. `clinia:123:use`). (required)
* @param includes List of relationship property key (included resources) to includes with the
* response. Keys must be valid relationship property key for the given resource type.
* (optional)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1DomainResourceWithIncludes getResource(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
List includes,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return LaunderThrowable.await(getResourceAsync(sourceKey, type, id, includes, innerType, requestOptions));
}
/**
* Get a resource from the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id The resource ID. It can also be an identifier with the following formats
* `{system}:{value}:{use}` (e.g. `clinia:123:use`). (required)
* @param includes List of relationship property key (included resources) to includes with the
* response. Keys must be valid relationship property key for the given resource type.
* (optional)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1DomainResourceWithIncludes getResource(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
List includes,
Class innerType
) throws CliniaRuntimeException {
return this.getResource(sourceKey, type, id, includes, innerType, null);
}
/**
* Get a resource from the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id The resource ID. It can also be an identifier with the following formats
* `{system}:{value}:{use}` (e.g. `clinia:123:use`). (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1DomainResourceWithIncludes getResource(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return this.getResource(sourceKey, type, id, null, innerType, requestOptions);
}
/**
* Get a resource from the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id The resource ID. It can also be an identifier with the following formats
* `{system}:{value}:{use}` (e.g. `clinia:123:use`). (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1DomainResourceWithIncludes getResource(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
Class innerType
) throws CliniaRuntimeException {
return this.getResource(sourceKey, type, id, null, innerType, null);
}
/**
* (asynchronously) Get a resource from the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id The resource ID. It can also be an identifier with the following formats
* `{system}:{value}:{use}` (e.g. `clinia:123:use`). (required)
* @param includes List of relationship property key (included resources) to includes with the
* response. Keys must be valid relationship property key for the given resource type.
* (optional)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> getResourceAsync(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
List includes,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `getResource`.");
Parameters.requireNonNull(type, "Parameter `type` is required when calling `getResource`.");
Parameters.requireNonNull(id, "Parameter `id` is required when calling `getResource`.");
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/resources/{type}/{id}", sourceKey, type, id)
.setMethod("GET")
.addQueryParameter("includes", includes)
.build();
return executeAsync(request, requestOptions, V1DomainResourceWithIncludes.class, innerType);
}
/**
* (asynchronously) Get a resource from the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id The resource ID. It can also be an identifier with the following formats
* `{system}:{value}:{use}` (e.g. `clinia:123:use`). (required)
* @param includes List of relationship property key (included resources) to includes with the
* response. Keys must be valid relationship property key for the given resource type.
* (optional)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> getResourceAsync(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
List includes,
Class innerType
) throws CliniaRuntimeException {
return this.getResourceAsync(sourceKey, type, id, includes, innerType, null);
}
/**
* (asynchronously) Get a resource from the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id The resource ID. It can also be an identifier with the following formats
* `{system}:{value}:{use}` (e.g. `clinia:123:use`). (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> getResourceAsync(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return this.getResourceAsync(sourceKey, type, id, null, innerType, requestOptions);
}
/**
* (asynchronously) Get a resource from the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id The resource ID. It can also be an identifier with the following formats
* `{system}:{value}:{use}` (e.g. `clinia:123:use`). (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> getResourceAsync(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
Class innerType
) throws CliniaRuntimeException {
return this.getResourceAsync(sourceKey, type, id, null, innerType, null);
}
/**
* List all available Profiles in the registry.
*
* @param sourceKey The key of the source. (required)
* @param page (optional)
* @param perPage (optional)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public ListProfiles200Response listProfiles(@Nonnull String sourceKey, Integer page, Integer perPage, RequestOptions requestOptions)
throws CliniaRuntimeException {
return LaunderThrowable.await(listProfilesAsync(sourceKey, page, perPage, requestOptions));
}
/**
* List all available Profiles in the registry.
*
* @param sourceKey The key of the source. (required)
* @param page (optional)
* @param perPage (optional)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public ListProfiles200Response listProfiles(@Nonnull String sourceKey, Integer page, Integer perPage) throws CliniaRuntimeException {
return this.listProfiles(sourceKey, page, perPage, null);
}
/**
* List all available Profiles in the registry.
*
* @param sourceKey The key of the source. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public ListProfiles200Response listProfiles(@Nonnull String sourceKey, RequestOptions requestOptions) throws CliniaRuntimeException {
return this.listProfiles(sourceKey, null, null, requestOptions);
}
/**
* List all available Profiles in the registry.
*
* @param sourceKey The key of the source. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public ListProfiles200Response listProfiles(@Nonnull String sourceKey) throws CliniaRuntimeException {
return this.listProfiles(sourceKey, null, null, null);
}
/**
* (asynchronously) List all available Profiles in the registry.
*
* @param sourceKey The key of the source. (required)
* @param page (optional)
* @param perPage (optional)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture listProfilesAsync(
@Nonnull String sourceKey,
Integer page,
Integer perPage,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `listProfiles`.");
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/profiles", sourceKey)
.setMethod("GET")
.addQueryParameter("page", page)
.addQueryParameter("perPage", perPage)
.build();
return executeAsync(request, requestOptions, new TypeReference() {});
}
/**
* (asynchronously) List all available Profiles in the registry.
*
* @param sourceKey The key of the source. (required)
* @param page (optional)
* @param perPage (optional)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture listProfilesAsync(@Nonnull String sourceKey, Integer page, Integer perPage)
throws CliniaRuntimeException {
return this.listProfilesAsync(sourceKey, page, perPage, null);
}
/**
* (asynchronously) List all available Profiles in the registry.
*
* @param sourceKey The key of the source. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture listProfilesAsync(@Nonnull String sourceKey, RequestOptions requestOptions)
throws CliniaRuntimeException {
return this.listProfilesAsync(sourceKey, null, null, requestOptions);
}
/**
* (asynchronously) List all available Profiles in the registry.
*
* @param sourceKey The key of the source. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture listProfilesAsync(@Nonnull String sourceKey) throws CliniaRuntimeException {
return this.listProfilesAsync(sourceKey, null, null, null);
}
/**
* List relationship definitions in the registry.
*
* @param sourceKey The key of the source. (required)
* @param page (optional)
* @param perPage (optional)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public ListRelationshipDefinitions200Response listRelationshipDefinitions(
@Nonnull String sourceKey,
Integer page,
Integer perPage,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return LaunderThrowable.await(listRelationshipDefinitionsAsync(sourceKey, page, perPage, requestOptions));
}
/**
* List relationship definitions in the registry.
*
* @param sourceKey The key of the source. (required)
* @param page (optional)
* @param perPage (optional)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public ListRelationshipDefinitions200Response listRelationshipDefinitions(@Nonnull String sourceKey, Integer page, Integer perPage)
throws CliniaRuntimeException {
return this.listRelationshipDefinitions(sourceKey, page, perPage, null);
}
/**
* List relationship definitions in the registry.
*
* @param sourceKey The key of the source. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public ListRelationshipDefinitions200Response listRelationshipDefinitions(@Nonnull String sourceKey, RequestOptions requestOptions)
throws CliniaRuntimeException {
return this.listRelationshipDefinitions(sourceKey, null, null, requestOptions);
}
/**
* List relationship definitions in the registry.
*
* @param sourceKey The key of the source. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public ListRelationshipDefinitions200Response listRelationshipDefinitions(@Nonnull String sourceKey) throws CliniaRuntimeException {
return this.listRelationshipDefinitions(sourceKey, null, null, null);
}
/**
* (asynchronously) List relationship definitions in the registry.
*
* @param sourceKey The key of the source. (required)
* @param page (optional)
* @param perPage (optional)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture listRelationshipDefinitionsAsync(
@Nonnull String sourceKey,
Integer page,
Integer perPage,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `listRelationshipDefinitions`.");
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/relationship-definitions", sourceKey)
.setMethod("GET")
.addQueryParameter("page", page)
.addQueryParameter("perPage", perPage)
.build();
return executeAsync(request, requestOptions, new TypeReference() {});
}
/**
* (asynchronously) List relationship definitions in the registry.
*
* @param sourceKey The key of the source. (required)
* @param page (optional)
* @param perPage (optional)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture listRelationshipDefinitionsAsync(
@Nonnull String sourceKey,
Integer page,
Integer perPage
) throws CliniaRuntimeException {
return this.listRelationshipDefinitionsAsync(sourceKey, page, perPage, null);
}
/**
* (asynchronously) List relationship definitions in the registry.
*
* @param sourceKey The key of the source. (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture listRelationshipDefinitionsAsync(
@Nonnull String sourceKey,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return this.listRelationshipDefinitionsAsync(sourceKey, null, null, requestOptions);
}
/**
* (asynchronously) List relationship definitions in the registry.
*
* @param sourceKey The key of the source. (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture listRelationshipDefinitionsAsync(@Nonnull String sourceKey)
throws CliniaRuntimeException {
return this.listRelationshipDefinitionsAsync(sourceKey, null, null, null);
}
/**
* Update a relationship between two resources in the registry.
*
* @param sourceKey The key of the source. (required)
* @param key Key of the relationship definition. (required)
* @param id Id of the relationship. (required)
* @param v1PatchOperation (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1Relationship updateRelationship(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull String id,
@Nonnull List v1PatchOperation,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return LaunderThrowable.await(updateRelationshipAsync(sourceKey, key, id, v1PatchOperation, innerType, requestOptions));
}
/**
* Update a relationship between two resources in the registry.
*
* @param sourceKey The key of the source. (required)
* @param key Key of the relationship definition. (required)
* @param id Id of the relationship. (required)
* @param v1PatchOperation (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1Relationship updateRelationship(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull String id,
@Nonnull List v1PatchOperation,
Class innerType
) throws CliniaRuntimeException {
return this.updateRelationship(sourceKey, key, id, v1PatchOperation, innerType, null);
}
/**
* (asynchronously) Update a relationship between two resources in the registry.
*
* @param sourceKey The key of the source. (required)
* @param key Key of the relationship definition. (required)
* @param id Id of the relationship. (required)
* @param v1PatchOperation (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> updateRelationshipAsync(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull String id,
@Nonnull List v1PatchOperation,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `updateRelationship`.");
Parameters.requireNonNull(key, "Parameter `key` is required when calling `updateRelationship`.");
Parameters.requireNonNull(id, "Parameter `id` is required when calling `updateRelationship`.");
Parameters.requireNonNull(v1PatchOperation, "Parameter `v1PatchOperation` is required when calling `updateRelationship`.");
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/relationships/{key}/{id}", sourceKey, key, id)
.setMethod("PATCH")
.setBody(v1PatchOperation)
.build();
return executeAsync(request, requestOptions, V1Relationship.class, innerType);
}
/**
* (asynchronously) Update a relationship between two resources in the registry.
*
* @param sourceKey The key of the source. (required)
* @param key Key of the relationship definition. (required)
* @param id Id of the relationship. (required)
* @param v1PatchOperation (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> updateRelationshipAsync(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull String id,
@Nonnull List v1PatchOperation,
Class innerType
) throws CliniaRuntimeException {
return this.updateRelationshipAsync(sourceKey, key, id, v1PatchOperation, innerType, null);
}
/**
* Upserts a pipeline for a collection. If the pipeline already exists, it will be updated.
*
* @param sourceKey The key of the source. (required)
* @param collectionKey The key of the collection. The collection key is shared with the profile
* key. A collection is a container for resources. It has a root profile that specify the
* schema of resources. It contain also contain an ingestion pipeline that specify how
* resources are ingested. (required)
* @param v1Pipeline (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1Pipeline upsertCollectionPipeline(
@Nonnull String sourceKey,
@Nonnull String collectionKey,
@Nonnull V1Pipeline v1Pipeline,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return LaunderThrowable.await(upsertCollectionPipelineAsync(sourceKey, collectionKey, v1Pipeline, requestOptions));
}
/**
* Upserts a pipeline for a collection. If the pipeline already exists, it will be updated.
*
* @param sourceKey The key of the source. (required)
* @param collectionKey The key of the collection. The collection key is shared with the profile
* key. A collection is a container for resources. It has a root profile that specify the
* schema of resources. It contain also contain an ingestion pipeline that specify how
* resources are ingested. (required)
* @param v1Pipeline (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1Pipeline upsertCollectionPipeline(@Nonnull String sourceKey, @Nonnull String collectionKey, @Nonnull V1Pipeline v1Pipeline)
throws CliniaRuntimeException {
return this.upsertCollectionPipeline(sourceKey, collectionKey, v1Pipeline, null);
}
/**
* (asynchronously) Upserts a pipeline for a collection. If the pipeline already exists, it will
* be updated.
*
* @param sourceKey The key of the source. (required)
* @param collectionKey The key of the collection. The collection key is shared with the profile
* key. A collection is a container for resources. It has a root profile that specify the
* schema of resources. It contain also contain an ingestion pipeline that specify how
* resources are ingested. (required)
* @param v1Pipeline (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture upsertCollectionPipelineAsync(
@Nonnull String sourceKey,
@Nonnull String collectionKey,
@Nonnull V1Pipeline v1Pipeline,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `upsertCollectionPipeline`.");
Parameters.requireNonNull(collectionKey, "Parameter `collectionKey` is required when calling `upsertCollectionPipeline`.");
Parameters.requireNonNull(v1Pipeline, "Parameter `v1Pipeline` is required when calling `upsertCollectionPipeline`.");
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/collections/{collectionKey}/pipeline", sourceKey, collectionKey)
.setMethod("PUT")
.setBody(v1Pipeline)
.build();
return executeAsync(request, requestOptions, new TypeReference() {});
}
/**
* (asynchronously) Upserts a pipeline for a collection. If the pipeline already exists, it will
* be updated.
*
* @param sourceKey The key of the source. (required)
* @param collectionKey The key of the collection. The collection key is shared with the profile
* key. A collection is a container for resources. It has a root profile that specify the
* schema of resources. It contain also contain an ingestion pipeline that specify how
* resources are ingested. (required)
* @param v1Pipeline (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture upsertCollectionPipelineAsync(
@Nonnull String sourceKey,
@Nonnull String collectionKey,
@Nonnull V1Pipeline v1Pipeline
) throws CliniaRuntimeException {
return this.upsertCollectionPipelineAsync(sourceKey, collectionKey, v1Pipeline, null);
}
/**
* Upserts a contained resource in the registry. If the resource already exists, it will be
* updated.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @param nestedContainsPathEqualStar Path segments of the nested contain resource, with the
* format {containKey}/{id}. These paths segments must come in pairs (even number). (required)
* @param upsertContainedResourceRequest (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1DomainResource upsertContainedResource(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
@Nonnull String nestedContainsPathEqualStar,
@Nonnull UpsertContainedResourceRequest upsertContainedResourceRequest,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return LaunderThrowable.await(
upsertContainedResourceAsync(
sourceKey,
type,
id,
nestedContainsPathEqualStar,
upsertContainedResourceRequest,
innerType,
requestOptions
)
);
}
/**
* Upserts a contained resource in the registry. If the resource already exists, it will be
* updated.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @param nestedContainsPathEqualStar Path segments of the nested contain resource, with the
* format {containKey}/{id}. These paths segments must come in pairs (even number). (required)
* @param upsertContainedResourceRequest (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1DomainResource upsertContainedResource(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
@Nonnull String nestedContainsPathEqualStar,
@Nonnull UpsertContainedResourceRequest upsertContainedResourceRequest,
Class innerType
) throws CliniaRuntimeException {
return this.upsertContainedResource(sourceKey, type, id, nestedContainsPathEqualStar, upsertContainedResourceRequest, innerType, null);
}
/**
* (asynchronously) Upserts a contained resource in the registry. If the resource already exists,
* it will be updated.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @param nestedContainsPathEqualStar Path segments of the nested contain resource, with the
* format {containKey}/{id}. These paths segments must come in pairs (even number). (required)
* @param upsertContainedResourceRequest (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> upsertContainedResourceAsync(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
@Nonnull String nestedContainsPathEqualStar,
@Nonnull UpsertContainedResourceRequest upsertContainedResourceRequest,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `upsertContainedResource`.");
Parameters.requireNonNull(type, "Parameter `type` is required when calling `upsertContainedResource`.");
Parameters.requireNonNull(id, "Parameter `id` is required when calling `upsertContainedResource`.");
Parameters.requireNonNull(
nestedContainsPathEqualStar,
"Parameter `nestedContainsPathEqualStar` is required when calling" + " `upsertContainedResource`."
);
Parameters.requireNonNull(
upsertContainedResourceRequest,
"Parameter `upsertContainedResourceRequest` is required when calling" + " `upsertContainedResource`."
);
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/resources/{type}/{id}/{nestedContainsPath=*}", sourceKey, type, id, nestedContainsPathEqualStar)
.setMethod("PUT")
.setBody(upsertContainedResourceRequest)
.build();
return executeAsync(request, requestOptions, V1DomainResource.class, innerType);
}
/**
* (asynchronously) Upserts a contained resource in the registry. If the resource already exists,
* it will be updated.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @param nestedContainsPathEqualStar Path segments of the nested contain resource, with the
* format {containKey}/{id}. These paths segments must come in pairs (even number). (required)
* @param upsertContainedResourceRequest (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> upsertContainedResourceAsync(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
@Nonnull String nestedContainsPathEqualStar,
@Nonnull UpsertContainedResourceRequest upsertContainedResourceRequest,
Class innerType
) throws CliniaRuntimeException {
return this.upsertContainedResourceAsync(
sourceKey,
type,
id,
nestedContainsPathEqualStar,
upsertContainedResourceRequest,
innerType,
null
);
}
/**
* Updating a profile is currently not supported and will return a 501.
*
* @param sourceKey The key of the source. (required)
* @param key The key of the profile. It must follow pattern: `^[a-zA-Z0-9-][\\w-]{0,61}$`.
* (required)
* @param upsertProfileRequest (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1Profile upsertProfile(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull UpsertProfileRequest upsertProfileRequest,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return LaunderThrowable.await(upsertProfileAsync(sourceKey, key, upsertProfileRequest, requestOptions));
}
/**
* Updating a profile is currently not supported and will return a 501.
*
* @param sourceKey The key of the source. (required)
* @param key The key of the profile. It must follow pattern: `^[a-zA-Z0-9-][\\w-]{0,61}$`.
* (required)
* @param upsertProfileRequest (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1Profile upsertProfile(@Nonnull String sourceKey, @Nonnull String key, @Nonnull UpsertProfileRequest upsertProfileRequest)
throws CliniaRuntimeException {
return this.upsertProfile(sourceKey, key, upsertProfileRequest, null);
}
/**
* (asynchronously) Updating a profile is currently not supported and will return a 501.
*
* @param sourceKey The key of the source. (required)
* @param key The key of the profile. It must follow pattern: `^[a-zA-Z0-9-][\\w-]{0,61}$`.
* (required)
* @param upsertProfileRequest (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture upsertProfileAsync(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull UpsertProfileRequest upsertProfileRequest,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `upsertProfile`.");
Parameters.requireNonNull(key, "Parameter `key` is required when calling `upsertProfile`.");
Parameters.requireNonNull(upsertProfileRequest, "Parameter `upsertProfileRequest` is required when calling `upsertProfile`.");
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/profiles/{key}", sourceKey, key)
.setMethod("PUT")
.setBody(upsertProfileRequest)
.build();
return executeAsync(request, requestOptions, new TypeReference() {});
}
/**
* (asynchronously) Updating a profile is currently not supported and will return a 501.
*
* @param sourceKey The key of the source. (required)
* @param key The key of the profile. It must follow pattern: `^[a-zA-Z0-9-][\\w-]{0,61}$`.
* (required)
* @param upsertProfileRequest (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture upsertProfileAsync(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull UpsertProfileRequest upsertProfileRequest
) throws CliniaRuntimeException {
return this.upsertProfileAsync(sourceKey, key, upsertProfileRequest, null);
}
/**
* Updating a relationship definition is currently not supported and will return a 501.
*
* @param sourceKey The key of the source. (required)
* @param key The key of the relationship definition. It must follow pattern:
* `^[a-zA-Z0-9-][\\w-]{0,61}$`. (required)
* @param upsertRelationshipDefinitionRequest (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1RelationshipDefinition upsertRelationshipDefinition(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull UpsertRelationshipDefinitionRequest upsertRelationshipDefinitionRequest,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return LaunderThrowable.await(upsertRelationshipDefinitionAsync(sourceKey, key, upsertRelationshipDefinitionRequest, requestOptions));
}
/**
* Updating a relationship definition is currently not supported and will return a 501.
*
* @param sourceKey The key of the source. (required)
* @param key The key of the relationship definition. It must follow pattern:
* `^[a-zA-Z0-9-][\\w-]{0,61}$`. (required)
* @param upsertRelationshipDefinitionRequest (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1RelationshipDefinition upsertRelationshipDefinition(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull UpsertRelationshipDefinitionRequest upsertRelationshipDefinitionRequest
) throws CliniaRuntimeException {
return this.upsertRelationshipDefinition(sourceKey, key, upsertRelationshipDefinitionRequest, null);
}
/**
* (asynchronously) Updating a relationship definition is currently not supported and will return
* a 501.
*
* @param sourceKey The key of the source. (required)
* @param key The key of the relationship definition. It must follow pattern:
* `^[a-zA-Z0-9-][\\w-]{0,61}$`. (required)
* @param upsertRelationshipDefinitionRequest (required)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture upsertRelationshipDefinitionAsync(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull UpsertRelationshipDefinitionRequest upsertRelationshipDefinitionRequest,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `upsertRelationshipDefinition`.");
Parameters.requireNonNull(key, "Parameter `key` is required when calling `upsertRelationshipDefinition`.");
Parameters.requireNonNull(
upsertRelationshipDefinitionRequest,
"Parameter `upsertRelationshipDefinitionRequest` is required when calling" + " `upsertRelationshipDefinition`."
);
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/relationship-definitions/{key}", sourceKey, key)
.setMethod("PUT")
.setBody(upsertRelationshipDefinitionRequest)
.build();
return executeAsync(request, requestOptions, new TypeReference() {});
}
/**
* (asynchronously) Updating a relationship definition is currently not supported and will return
* a 501.
*
* @param sourceKey The key of the source. (required)
* @param key The key of the relationship definition. It must follow pattern:
* `^[a-zA-Z0-9-][\\w-]{0,61}$`. (required)
* @param upsertRelationshipDefinitionRequest (required)
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture upsertRelationshipDefinitionAsync(
@Nonnull String sourceKey,
@Nonnull String key,
@Nonnull UpsertRelationshipDefinitionRequest upsertRelationshipDefinitionRequest
) throws CliniaRuntimeException {
return this.upsertRelationshipDefinitionAsync(sourceKey, key, upsertRelationshipDefinitionRequest, null);
}
/**
* Upsert a resource in the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @param v1DomainResource (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1DomainResource upsertResource(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
@Nonnull V1DomainResource v1DomainResource,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
return LaunderThrowable.await(upsertResourceAsync(sourceKey, type, id, v1DomainResource, innerType, requestOptions));
}
/**
* Upsert a resource in the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @param v1DomainResource (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public V1DomainResource upsertResource(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
@Nonnull V1DomainResource v1DomainResource,
Class innerType
) throws CliniaRuntimeException {
return this.upsertResource(sourceKey, type, id, v1DomainResource, innerType, null);
}
/**
* (asynchronously) Upsert a resource in the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @param v1DomainResource (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> upsertResourceAsync(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
@Nonnull V1DomainResource v1DomainResource,
Class innerType,
RequestOptions requestOptions
) throws CliniaRuntimeException {
Parameters.requireNonNull(sourceKey, "Parameter `sourceKey` is required when calling `upsertResource`.");
Parameters.requireNonNull(type, "Parameter `type` is required when calling `upsertResource`.");
Parameters.requireNonNull(id, "Parameter `id` is required when calling `upsertResource`.");
Parameters.requireNonNull(v1DomainResource, "Parameter `v1DomainResource` is required when calling `upsertResource`.");
HttpRequest request = HttpRequest
.builder()
.setPath("/sources/{sourceKey}/v1/resources/{type}/{id}", sourceKey, type, id)
.setMethod("PUT")
.setBody(v1DomainResource)
.build();
return executeAsync(request, requestOptions, V1DomainResource.class, innerType);
}
/**
* (asynchronously) Upsert a resource in the registry.
*
* @param sourceKey The key of the source. (required)
* @param type Type of the resource. (required)
* @param id Id of the resource. (required)
* @param v1DomainResource (required)
* @param innerType The class held by the collection, could be your custom class or {@link
* Object}.
* @throws CliniaRuntimeException If it fails to process the API call
*/
public CompletableFuture> upsertResourceAsync(
@Nonnull String sourceKey,
@Nonnull String type,
@Nonnull String id,
@Nonnull V1DomainResource v1DomainResource,
Class innerType
) throws CliniaRuntimeException {
return this.upsertResourceAsync(sourceKey, type, id, v1DomainResource, innerType, null);
}
}