DeleteMedicalResourcesRequest.Builder
public
static
final
class
DeleteMedicalResourcesRequest.Builder
extends Object
java.lang.Object | |
↳ | android.health.connect.DeleteMedicalResourcesRequest.Builder |
Builder class for DeleteMedicalResourcesRequest
.
Summary
Public constructors | |
---|---|
Builder()
Constructs a new |
|
Builder(DeleteMedicalResourcesRequest other)
Constructs a clone of the other |
|
Builder(DeleteMedicalResourcesRequest.Builder other)
Constructs a clone of the other |
Public methods | |
---|---|
DeleteMedicalResourcesRequest.Builder
|
addDataSourceId(String dataSourceId)
Adds the data source ID to request to delete. |
DeleteMedicalResourcesRequest.Builder
|
addMedicalResourceType(int resourceType)
Adds the medical resource type to request to delete. |
DeleteMedicalResourcesRequest
|
build()
Returns a new instance of |
DeleteMedicalResourcesRequest.Builder
|
clearDataSourceIds()
Clears all data source IDs. |
DeleteMedicalResourcesRequest.Builder
|
clearMedicalResourceTypes()
Clears all medical resource types. |
Inherited methods | |
---|---|
Public constructors
Builder
public Builder (DeleteMedicalResourcesRequest other)
Constructs a clone of the other DeleteMedicalResourcesRequest
instance.
Parameters | |
---|---|
other |
DeleteMedicalResourcesRequest : This value cannot be null . |
Builder
public Builder (DeleteMedicalResourcesRequest.Builder other)
Constructs a clone of the other DeleteMedicalResourcesRequest.Builder
.
Parameters | |
---|---|
other |
DeleteMedicalResourcesRequest.Builder : This value cannot be null . |
Public methods
addDataSourceId
public DeleteMedicalResourcesRequest.Builder addDataSourceId (String dataSourceId)
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 . |
Returns | |
---|---|
DeleteMedicalResourcesRequest.Builder |
This value cannot be null . |
Throws | |
---|---|
IllegalArgumentException |
if the provided dataSourceId is not a valid ID. |
addMedicalResourceType
public DeleteMedicalResourcesRequest.Builder addMedicalResourceType (int resourceType)
Adds the medical resource type to request to delete.
Returns | |
---|---|
DeleteMedicalResourcesRequest.Builder |
This value cannot be null . |
Throws | |
---|---|
IllegalArgumentException |
if the provided resourceType is not supported. |
build
public DeleteMedicalResourcesRequest build ()
Returns a new instance of DeleteMedicalResourcesRequest
with the specified
parameters.
Returns | |
---|---|
DeleteMedicalResourcesRequest |
This value cannot be null . |
Throws | |
---|---|
IllegalArgumentException |
if no data source IDs or medical resource types have been added. |
clearDataSourceIds
public DeleteMedicalResourcesRequest.Builder clearDataSourceIds ()
Clears all data source IDs.
Returns | |
---|---|
DeleteMedicalResourcesRequest.Builder |
This value cannot be null . |
clearMedicalResourceTypes
public DeleteMedicalResourcesRequest.Builder clearMedicalResourceTypes ()
Clears all medical resource types.
Returns | |
---|---|
DeleteMedicalResourcesRequest.Builder |
This value cannot be null . |