Builder
class Builder
kotlin.Any | |
↳ | android.health.connect.DeleteMedicalResourcesRequest.Builder |
Builder class for DeleteMedicalResourcesRequest
.
Summary
Public constructors | |
---|---|
Builder() Constructs a new |
|
Builder(other: DeleteMedicalResourcesRequest) Constructs a clone of the other |
|
Constructs a clone of the other |
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 |
build() Returns a new instance of |
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. |
addMedicalResourceType
fun addMedicalResourceType(resourceType: Int): DeleteMedicalResourcesRequest.Builder
Adds the medical resource type to request to delete.
Return | |
---|---|
DeleteMedicalResourcesRequest.Builder |
This value cannot be null . |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
if the provided resourceType is not supported. |
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 . |