Builder
class Builder
| kotlin.Any | |
| ↳ | android.health.connect.datatypes.MedicalDataSource.Builder |
Builder class for MedicalDataSource.
Summary
| Public constructors | |
|---|---|
Builder(other: MedicalDataSource)Constructs a clone of the other |
|
Builder(other: MedicalDataSource.Builder)Constructs a clone of the other |
|
Builder(id: String, packageName: String, fhirBaseUri: Uri, displayName: String, fhirVersion: FhirVersion)Constructs a new |
|
| Public methods | |
|---|---|
| MedicalDataSource |
build()Returns a new instance of |
| MedicalDataSource.Builder |
setDisplayName(displayName: String)Sets the display name that describes this data source. |
| MedicalDataSource.Builder |
setFhirBaseUri(fhirBaseUri: Uri)Sets the FHIR base URI of this data source. |
| MedicalDataSource.Builder |
setFhirVersion(fhirVersion: FhirVersion)Sets the FHIR version of |
| MedicalDataSource.Builder |
Sets unique identifier of this data source. |
| MedicalDataSource.Builder |
setLastDataUpdateTime(lastDataUpdateTime: Instant?)Sets the time |
| MedicalDataSource.Builder |
setPackageName(packageName: String)Sets the package name of the contributing package. |
Public constructors
Builder
Builder(other: MedicalDataSource)
Constructs a clone of the other MedicalDataSource instance.
| Parameters | |
|---|---|
other |
MedicalDataSource: This value cannot be null. |
Builder
Builder(other: MedicalDataSource.Builder)
Constructs a clone of the other MedicalDataSource.Builder.
| Parameters | |
|---|---|
other |
MedicalDataSource.Builder: This value cannot be null. |
Builder
Builder(
id: String,
packageName: String,
fhirBaseUri: Uri,
displayName: String,
fhirVersion: FhirVersion)
Constructs a new MedicalDataSource.Builder instance.
| Parameters | |
|---|---|
id |
String: The unique identifier of this data source. This value cannot be null. |
packageName |
String: The package name of the owning app. This value cannot be null. |
fhirBaseUri |
Uri: The FHIR base URI of the data source. This value cannot be null. |
displayName |
String: The display name that describes the data source. This value cannot be null. |
fhirVersion |
FhirVersion: The FHIR version of MedicalResources linked to this source. This value cannot be null. |
Public methods
build
fun build(): MedicalDataSource
Returns a new instance of MedicalDataSource with the specified parameters.
| Return | |
|---|---|
MedicalDataSource |
This value cannot be null. |
setDisplayName
fun setDisplayName(displayName: String): MedicalDataSource.Builder
Sets the display name that describes this data source.
| Parameters | |
|---|---|
displayName |
String: This value cannot be null. |
| Return | |
|---|---|
MedicalDataSource.Builder |
This value cannot be null. |
setFhirBaseUri
fun setFhirBaseUri(fhirBaseUri: Uri): MedicalDataSource.Builder
Sets the FHIR base URI of this data source.
| Parameters | |
|---|---|
fhirBaseUri |
Uri: This value cannot be null. |
| Return | |
|---|---|
MedicalDataSource.Builder |
This value cannot be null. |
setFhirVersion
fun setFhirVersion(fhirVersion: FhirVersion): MedicalDataSource.Builder
Sets the FHIR version of MedicalResources linked to this source.
| Parameters | |
|---|---|
fhirVersion |
FhirVersion: This value cannot be null. |
| Return | |
|---|---|
MedicalDataSource.Builder |
This value cannot be null. |
setId
fun setId(id: String): MedicalDataSource.Builder
Sets unique identifier of this data source.
| Parameters | |
|---|---|
id |
String: This value cannot be null. |
| Return | |
|---|---|
MedicalDataSource.Builder |
This value cannot be null. |
setLastDataUpdateTime
fun setLastDataUpdateTime(lastDataUpdateTime: Instant?): MedicalDataSource.Builder
Sets the time MedicalResources linked to this data source were last updated.
| Parameters | |
|---|---|
lastDataUpdateTime |
Instant?: This value may be null. |
| Return | |
|---|---|
MedicalDataSource.Builder |
This value cannot be null. |
setPackageName
fun setPackageName(packageName: String): MedicalDataSource.Builder
Sets the package name of the contributing package. Auto-populated by the platform at source creation time.
| Parameters | |
|---|---|
packageName |
String: This value cannot be null. |
| Return | |
|---|---|
MedicalDataSource.Builder |
This value cannot be null. |