Builder
class Builder
kotlin.Any | |
↳ | android.health.connect.CreateMedicalDataSourceRequest.Builder |
Builder class for CreateMedicalDataSourceRequest
.
Summary
Public constructors | |
---|---|
Constructs a clone of the other |
|
Constructs a clone of the other |
|
Builder(fhirBaseUri: Uri, displayName: String, fhirVersion: FhirVersion) Constructs a new |
Public methods | |
---|---|
CreateMedicalDataSourceRequest |
build() Returns a new instance of |
CreateMedicalDataSourceRequest.Builder |
setDisplayName(displayName: String) Sets the display name. |
CreateMedicalDataSourceRequest.Builder |
setFhirBaseUri(fhirBaseUri: Uri) Sets the FHIR base URI. |
CreateMedicalDataSourceRequest.Builder |
setFhirVersion(fhirVersion: FhirVersion) Sets the FHIR version of data from this data source. |
Public constructors
Builder
Builder(other: CreateMedicalDataSourceRequest)
Constructs a clone of the other CreateMedicalDataSourceRequest
instance.
Parameters | |
---|---|
other |
CreateMedicalDataSourceRequest: This value cannot be null . |
Builder
Builder(other: CreateMedicalDataSourceRequest.Builder)
Constructs a clone of the other CreateMedicalDataSourceRequest.Builder
.
Parameters | |
---|---|
other |
CreateMedicalDataSourceRequest.Builder: This value cannot be null . |
Builder
Builder(
fhirBaseUri: Uri,
displayName: String,
fhirVersion: FhirVersion)
Constructs a new CreateMedicalDataSourceRequest.Builder
instance.
Parameters | |
---|---|
fhirBaseUri |
Uri: The FHIR base URI of the data source. For data coming from a FHIR server this should be the FHIR base URL (e.g. `https://example.com/fhir`). If the data is generated by an app without a FHIR URL, this can be populated by a unique and understandable URI defined by the app (e.g. `myapp://..`) that points to the source of the data. We recommend not to use a domain name that you don't control. If your app supports app deep linking, this URI would ideally link to the source data. The maximum length for the URI is 2000 characters. This value cannot be null . |
displayName |
String: The display name that describes the data source. The maximum length for the display name is 90 characters. This must be unique per app. This value cannot be null . |
fhirVersion |
FhirVersion: The FHIR version of the medical data that will be linked to this data source. This has to be a version supported by Health Connect, as documented on the FhirVersion . This value cannot be null . |
Public methods
build
fun build(): CreateMedicalDataSourceRequest
Returns a new instance of CreateMedicalDataSourceRequest
with the specified parameters.
Return | |
---|---|
CreateMedicalDataSourceRequest |
This value cannot be null . |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
if the mFhirBaseUri or mDisplayName exceed the character limits or if the mFhirVersion is not supported by Health Connect. |
setDisplayName
fun setDisplayName(displayName: String): CreateMedicalDataSourceRequest.Builder
Sets the display name. For the request to succeed this must be unique per app.
The display name may not exceed 90 characters.
Parameters | |
---|---|
displayName |
String: This value cannot be null . |
Return | |
---|---|
CreateMedicalDataSourceRequest.Builder |
This value cannot be null . |
setFhirBaseUri
fun setFhirBaseUri(fhirBaseUri: Uri): CreateMedicalDataSourceRequest.Builder
Sets the FHIR base URI. For data coming from a FHIR server this should be the FHIR base URL (e.g. `https://example.com/fhir`).
If the data is generated by an app without a FHIR base URL, this can be populated by a URI defined by the app (e.g. `myapp://..`) that should:
- Be a unique and understandable URI.
- Point to the source of the data. We recommend not to use a domain name that you don't control.
- Ideally allow linking to the data source if your app supports app deep linking to the data.
The URI may not exceed 2000 characters.
Parameters | |
---|---|
fhirBaseUri |
Uri: This value cannot be null . |
Return | |
---|---|
CreateMedicalDataSourceRequest.Builder |
This value cannot be null . |
setFhirVersion
fun setFhirVersion(fhirVersion: FhirVersion): CreateMedicalDataSourceRequest.Builder
Sets the FHIR version of data from this data source.
This has to be a version supported by Health Connect, as documented on the FhirVersion
.
Parameters | |
---|---|
fhirVersion |
FhirVersion: This value cannot be null . |
Return | |
---|---|
CreateMedicalDataSourceRequest.Builder |
This value cannot be null . |