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 DeleteMedicalResourcesRequest.Builder with no filters.

Builder(DeleteMedicalResourcesRequest other)

Constructs a clone of the other DeleteMedicalResourcesRequest instance.

Builder(DeleteMedicalResourcesRequest.Builder other)

Constructs a clone of the other DeleteMedicalResourcesRequest.Builder.

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 with the specified parameters.

DeleteMedicalResourcesRequest.Builder clearDataSourceIds()

Clears all data source IDs.

DeleteMedicalResourcesRequest.Builder clearMedicalResourceTypes()

Clears all medical resource types.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

Builder

Added in U Extensions 16
public Builder ()

Constructs a new DeleteMedicalResourcesRequest.Builder with no filters.

Builder

Added in U Extensions 16
public Builder (DeleteMedicalResourcesRequest other)

Constructs a clone of the other DeleteMedicalResourcesRequest instance.

Parameters
other DeleteMedicalResourcesRequest: This value cannot be null.

Builder

Added in U Extensions 16
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

Added in U Extensions 16
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

Added in U Extensions 16
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

Added in U Extensions 16
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

Added in U Extensions 16
public DeleteMedicalResourcesRequest.Builder clearDataSourceIds ()

Clears all data source IDs.

Returns
DeleteMedicalResourcesRequest.Builder This value cannot be null.

clearMedicalResourceTypes

Added in U Extensions 16
public DeleteMedicalResourcesRequest.Builder clearMedicalResourceTypes ()

Clears all medical resource types.

Returns
DeleteMedicalResourcesRequest.Builder This value cannot be null.