Builder
class Builder
kotlin.Any | |
↳ | android.health.connect.datatypes.FhirResource.Builder |
Builder class for FhirResource
.
Summary
Public constructors | |
---|---|
Builder(other: FhirResource) Constructs a clone of the other |
|
Builder(other: FhirResource.Builder) Constructs a clone of the other |
|
Constructs a new |
Public methods | |
---|---|
FhirResource |
build() Returns a new instance of |
FhirResource.Builder |
Sets the FHIR resource data in JSON representation. |
FhirResource.Builder |
Sets the FHIR resource ID. |
FhirResource.Builder |
Sets the FHIR resource type. |
Public constructors
Builder
Builder(other: FhirResource)
Constructs a clone of the other FhirResource
instance.
Parameters | |
---|---|
other |
FhirResource: This value cannot be null . |
Builder
Builder(other: FhirResource.Builder)
Constructs a clone of the other FhirResource.Builder
.
Parameters | |
---|---|
other |
FhirResource.Builder: This value cannot be null . |
Builder
Builder(
type: Int,
id: String,
data: String)
Constructs a new FhirResource.Builder
instance.
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
if the provided FHIR resource type is not a valid supported type. |
Public methods
build
fun build(): FhirResource
Returns a new instance of FhirResource
with the specified parameters.
Return | |
---|---|
FhirResource |
This value cannot be null . |
setData
fun setData(data: String): FhirResource.Builder
Sets the FHIR resource data in JSON representation.
Parameters | |
---|---|
data |
String: This value cannot be null . |
Return | |
---|---|
FhirResource.Builder |
This value cannot be null . |
setId
fun setId(id: String): FhirResource.Builder
Sets the FHIR resource ID. This is extracted from the "id" field in data
. This is NOT a unique identifier among all FhirResource
s.
Parameters | |
---|---|
id |
String: This value cannot be null . |
Return | |
---|---|
FhirResource.Builder |
This value cannot be null . |
setType
fun setType(type: Int): FhirResource.Builder
Sets the FHIR resource type. This is extracted from the "resourceType" field in data
.
Return | |
---|---|
FhirResource.Builder |
This value cannot be null . |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
if the provided FHIR resource type is not a valid supported type. |