CreateMedicalDataSourceRequest.Builder
public
static
final
class
CreateMedicalDataSourceRequest.Builder
extends Object
java.lang.Object | |
↳ | android.health.connect.CreateMedicalDataSourceRequest.Builder |
Builder class for CreateMedicalDataSourceRequest
.
Summary
Public constructors | |
---|---|
Builder(CreateMedicalDataSourceRequest other)
Constructs a clone of the other |
|
Builder(CreateMedicalDataSourceRequest.Builder other)
Constructs a clone of the other |
|
Builder(Uri fhirBaseUri, String displayName, FhirVersion fhirVersion)
Constructs a new |
Public methods | |
---|---|
CreateMedicalDataSourceRequest
|
build()
Returns a new instance of |
CreateMedicalDataSourceRequest.Builder
|
setDisplayName(String displayName)
Sets the display name. |
CreateMedicalDataSourceRequest.Builder
|
setFhirBaseUri(Uri fhirBaseUri)
Sets the FHIR base URI. |
CreateMedicalDataSourceRequest.Builder
|
setFhirVersion(FhirVersion fhirVersion)
Sets the FHIR version of data from this data source. |
Inherited methods | |
---|---|
Public constructors
Builder
public Builder (CreateMedicalDataSourceRequest other)
Constructs a clone of the other CreateMedicalDataSourceRequest
instance.
Parameters | |
---|---|
other |
CreateMedicalDataSourceRequest : This value cannot be null . |
Builder
public Builder (CreateMedicalDataSourceRequest.Builder other)
Constructs a clone of the other CreateMedicalDataSourceRequest.Builder
.
Parameters | |
---|---|
other |
CreateMedicalDataSourceRequest.Builder : This value cannot be null . |
Builder
public Builder (Uri fhirBaseUri, String displayName, 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 base URL. 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
public CreateMedicalDataSourceRequest build ()
Returns a new instance of CreateMedicalDataSourceRequest
with the specified
parameters.
Returns | |
---|---|
CreateMedicalDataSourceRequest |
This value cannot be null . |
Throws | |
---|---|
IllegalArgumentException |
if the mFhirBaseUri or mDisplayName
exceed the character limits or if the mFhirVersion is not supported by Health
Connect. |
setDisplayName
public CreateMedicalDataSourceRequest.Builder setDisplayName (String displayName)
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 . |
Returns | |
---|---|
CreateMedicalDataSourceRequest.Builder |
This value cannot be null . |
setFhirBaseUri
public CreateMedicalDataSourceRequest.Builder setFhirBaseUri (Uri fhirBaseUri)
Sets the FHIR base URI. For data coming from a FHIR server this should be the base URL.
The URI may not exceed 2000 characters.
Parameters | |
---|---|
fhirBaseUri |
Uri : This value cannot be null . |
Returns | |
---|---|
CreateMedicalDataSourceRequest.Builder |
This value cannot be null . |
setFhirVersion
public CreateMedicalDataSourceRequest.Builder setFhirVersion (FhirVersion fhirVersion)
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 . |
Returns | |
---|---|
CreateMedicalDataSourceRequest.Builder |
This value cannot be null . |