Builder


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

Builder class for GetMedicalDataSourcesRequest.

Summary

Public constructors

Constructs a new GetMedicalDataSourcesRequest.Builder with no filters set.

Constructs a clone of the other GetMedicalDataSourcesRequest instance.

Constructs a clone of the other GetMedicalDataSourcesRequest.Builder.

Public methods
GetMedicalDataSourcesRequest.Builder
addPackageName(packageName: String)

Adds a package name to limit this request to.

GetMedicalDataSourcesRequest

Returns a new instance of GetMedicalDataSourcesRequest with the specified parameters.

GetMedicalDataSourcesRequest.Builder

Clears all package names.

Public constructors

Builder

Builder()

Constructs a new GetMedicalDataSourcesRequest.Builder with no filters set.

Builder

Builder(other: GetMedicalDataSourcesRequest)

Constructs a clone of the other GetMedicalDataSourcesRequest instance.

Parameters
other GetMedicalDataSourcesRequest: This value cannot be null.

Builder

Builder(other: GetMedicalDataSourcesRequest.Builder)

Constructs a clone of the other GetMedicalDataSourcesRequest.Builder.

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

Public methods

addPackageName

fun addPackageName(packageName: String): GetMedicalDataSourcesRequest.Builder

Adds a package name to limit this request to.

If the list of package names is empty, MedicalDataSources for all packages will be requested. Otherwise only those for the added package names are requested.

Parameters
packageName String: This value cannot be null.
Return
GetMedicalDataSourcesRequest.Builder This value cannot be null.
Exceptions
java.lang.IllegalArgumentException if the provided packageName is not valid.

build

fun build(): GetMedicalDataSourcesRequest

Returns a new instance of GetMedicalDataSourcesRequest with the specified parameters.

Return
GetMedicalDataSourcesRequest This value cannot be null.

clearPackageNames

fun clearPackageNames(): GetMedicalDataSourcesRequest.Builder

Clears all package names.

Return
GetMedicalDataSourcesRequest.Builder This value cannot be null.