Builder
class Builder
| kotlin.Any | |
| ↳ | android.health.connect.UpsertMedicalResourceRequest.Builder |
Builder class for UpsertMedicalResourceRequest.
Summary
| Public constructors | |
|---|---|
Builder(other: UpsertMedicalResourceRequest)Constructs a clone of the other |
|
|
Constructs a clone of the other |
|
Builder(dataSourceId: String, fhirVersion: FhirVersion, data: String)Constructs a new |
|
| Public methods | |
|---|---|
| UpsertMedicalResourceRequest |
build()Returns a new instance of |
| UpsertMedicalResourceRequest.Builder |
Sets the FHIR resource data in JSON format. |
| UpsertMedicalResourceRequest.Builder |
setDataSourceId(dataSourceId: String)Sets the unique ID of the existing |
| UpsertMedicalResourceRequest.Builder |
setFhirVersion(fhirVersion: FhirVersion)Sets the FHIR version being used for |
Public constructors
Builder
Builder(other: UpsertMedicalResourceRequest)
Constructs a clone of the other UpsertMedicalResourceRequest instance.
| Parameters | |
|---|---|
other |
UpsertMedicalResourceRequest: This value cannot be null. |
Builder
Builder(other: UpsertMedicalResourceRequest.Builder)
Constructs a clone of the other UpsertMedicalResourceRequest.Builder.
| Parameters | |
|---|---|
other |
UpsertMedicalResourceRequest.Builder: This value cannot be null. |
Builder
Builder(
dataSourceId: String,
fhirVersion: FhirVersion,
data: String)
Constructs a new UpsertMedicalResourceRequest.Builder instance.
| Parameters | |
|---|---|
dataSourceId |
String: The unique identifier of the existing MedicalDataSource, representing where the data comes from. This value cannot be null. |
fhirVersion |
FhirVersion: The FhirVersion object that represents the FHIR version being used for data. This has to match the FHIR version of the MedicalDataSource. This value cannot be null. |
data |
String: The FHIR resource data in JSON representation. This value cannot be null. |
| Exceptions | |
|---|---|
java.lang.IllegalArgumentException |
if the provided dataSourceId is not a valid ID. |
Public methods
build
fun build(): UpsertMedicalResourceRequest
Returns a new instance of UpsertMedicalResourceRequest with the specified parameters.
| Return | |
|---|---|
UpsertMedicalResourceRequest |
This value cannot be null. |
setData
fun setData(data: String): UpsertMedicalResourceRequest.Builder
Sets the FHIR resource data in JSON format.
| Parameters | |
|---|---|
data |
String: This value cannot be null. |
| Return | |
|---|---|
UpsertMedicalResourceRequest.Builder |
This value cannot be null. |
setDataSourceId
fun setDataSourceId(dataSourceId: String): UpsertMedicalResourceRequest.Builder
Sets the unique ID of the existing MedicalDataSource, to represent where the data is coming from.
| Parameters | |
|---|---|
dataSourceId |
String: This value cannot be null. |
| Return | |
|---|---|
UpsertMedicalResourceRequest.Builder |
This value cannot be null. |
| Exceptions | |
|---|---|
java.lang.IllegalArgumentException |
if the provided dataSourceId is not a valid ID. |
setFhirVersion
fun setFhirVersion(fhirVersion: FhirVersion): UpsertMedicalResourceRequest.Builder
Sets the FHIR version being used for data. For the request to succeed this must match the MedicalDataSource.getFhirVersion() FHIR version} of the MedicalDataSource with the provided dataSourceId.
| Parameters | |
|---|---|
fhirVersion |
FhirVersion: This value cannot be null. |
| Return | |
|---|---|
UpsertMedicalResourceRequest.Builder |
This value cannot be null. |