Builder


class Builder
kotlin.Any
   ↳ android.health.connect.DeleteMedicalResourcesRequest.Builder

Builder class for DeleteMedicalResourcesRequest.

Summary

Public constructors

Constructs a new DeleteMedicalResourcesRequest.Builder with no filters.

Constructs a clone of the other DeleteMedicalResourcesRequest instance.

Constructs a clone of the other DeleteMedicalResourcesRequest.Builder.

Public methods
DeleteMedicalResourcesRequest.Builder
addDataSourceId(dataSourceId: String)

Adds the data source ID to request to delete.

DeleteMedicalResourcesRequest.Builder
addMedicalResourceType(resourceType: Int)

Adds the medical resource type to request to delete.

DeleteMedicalResourcesRequest

Returns a new instance of DeleteMedicalResourcesRequest with the specified parameters.

DeleteMedicalResourcesRequest.Builder

Clears all data source IDs.

DeleteMedicalResourcesRequest.Builder

Clears all medical resource types.

Public constructors

Builder

Builder()

Constructs a new DeleteMedicalResourcesRequest.Builder with no filters.

Builder

Builder(other: DeleteMedicalResourcesRequest)

Constructs a clone of the other DeleteMedicalResourcesRequest instance.

Parameters
other DeleteMedicalResourcesRequest: This value cannot be null.

Builder

Builder(other: DeleteMedicalResourcesRequest.Builder)

Constructs a clone of the other DeleteMedicalResourcesRequest.Builder.

Parameters
other DeleteMedicalResourcesRequest.Builder: This value cannot be null.

Public methods

addDataSourceId

fun addDataSourceId(dataSourceId: String): DeleteMedicalResourcesRequest.Builder

Adds the data source ID to request to delete. This should be an ID of the existing MedicalDataSource.

If the set of data source IDs is empty, it means resources from any data source should be deleted.

Parameters
dataSourceId String: This value cannot be null.
Return
DeleteMedicalResourcesRequest.Builder This value cannot be null.
Exceptions
java.lang.IllegalArgumentException if the provided dataSourceId is not a valid ID.

build

fun build(): DeleteMedicalResourcesRequest

Returns a new instance of DeleteMedicalResourcesRequest with the specified parameters.

Return
DeleteMedicalResourcesRequest This value cannot be null.
Exceptions
java.lang.IllegalArgumentException if no data source IDs or medical resource types have been added.

clearDataSourceIds

fun clearDataSourceIds(): DeleteMedicalResourcesRequest.Builder

Clears all data source IDs.

Return
DeleteMedicalResourcesRequest.Builder This value cannot be null.

clearMedicalResourceTypes

fun clearMedicalResourceTypes(): DeleteMedicalResourcesRequest.Builder

Clears all medical resource types.

Return
DeleteMedicalResourcesRequest.Builder This value cannot be null.