MedicalDataSource.Builder
public
static
final
class
MedicalDataSource.Builder
extends Object
| java.lang.Object | |
| ↳ | android.health.connect.datatypes.MedicalDataSource.Builder |
Builder class for MedicalDataSource.
Summary
Public constructors | |
|---|---|
Builder(MedicalDataSource other)
Constructs a clone of the other |
|
Builder(MedicalDataSource.Builder other)
Constructs a clone of the other |
|
Builder(String id, String packageName, Uri fhirBaseUri, String displayName, FhirVersion fhirVersion)
Constructs a new |
|
Public methods | |
|---|---|
MedicalDataSource
|
build()
Returns a new instance of |
MedicalDataSource.Builder
|
setDisplayName(String displayName)
Sets the display name that describes this data source. |
MedicalDataSource.Builder
|
setFhirBaseUri(Uri fhirBaseUri)
Sets the FHIR base URI of this data source. |
MedicalDataSource.Builder
|
setFhirVersion(FhirVersion fhirVersion)
Sets the FHIR version of |
MedicalDataSource.Builder
|
setId(String id)
Sets unique identifier of this data source. |
MedicalDataSource.Builder
|
setLastDataUpdateTime(Instant lastDataUpdateTime)
Sets the time |
MedicalDataSource.Builder
|
setPackageName(String packageName)
Sets the package name of the contributing package. |
Inherited methods | |
|---|---|
Public constructors
Builder
public Builder (MedicalDataSource other)
Constructs a clone of the other MedicalDataSource instance.
| Parameters | |
|---|---|
other |
MedicalDataSource: This value cannot be null. |
Builder
public Builder (MedicalDataSource.Builder other)
Constructs a clone of the other MedicalDataSource.Builder.
| Parameters | |
|---|---|
other |
MedicalDataSource.Builder: This value cannot be null. |
Builder
public Builder (String id, String packageName, Uri fhirBaseUri, String displayName, 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
public MedicalDataSource build ()
Returns a new instance of MedicalDataSource with the specified parameters.
| Returns | |
|---|---|
MedicalDataSource |
This value cannot be null. |
setDisplayName
public MedicalDataSource.Builder setDisplayName (String displayName)
Sets the display name that describes this data source.
| Parameters | |
|---|---|
displayName |
String: This value cannot be null. |
| Returns | |
|---|---|
MedicalDataSource.Builder |
This value cannot be null. |
setFhirBaseUri
public MedicalDataSource.Builder setFhirBaseUri (Uri fhirBaseUri)
Sets the FHIR base URI of this data source.
| Parameters | |
|---|---|
fhirBaseUri |
Uri: This value cannot be null. |
| Returns | |
|---|---|
MedicalDataSource.Builder |
This value cannot be null. |
setFhirVersion
public MedicalDataSource.Builder setFhirVersion (FhirVersion fhirVersion)
Sets the FHIR version of MedicalResources linked to this source.
| Parameters | |
|---|---|
fhirVersion |
FhirVersion: This value cannot be null. |
| Returns | |
|---|---|
MedicalDataSource.Builder |
This value cannot be null. |
setId
public MedicalDataSource.Builder setId (String id)
Sets unique identifier of this data source.
| Parameters | |
|---|---|
id |
String: This value cannot be null. |
| Returns | |
|---|---|
MedicalDataSource.Builder |
This value cannot be null. |
setLastDataUpdateTime
public MedicalDataSource.Builder setLastDataUpdateTime (Instant lastDataUpdateTime)
Sets the time MedicalResources linked to this data source were last updated.
| Parameters | |
|---|---|
lastDataUpdateTime |
Instant: This value may be null. |
| Returns | |
|---|---|
MedicalDataSource.Builder |
This value cannot be null. |
setPackageName
public MedicalDataSource.Builder setPackageName (String packageName)
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. |
| Returns | |
|---|---|
MedicalDataSource.Builder |
This value cannot be null. |