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 CreateMedicalDataSourceRequest instance.

Builder(CreateMedicalDataSourceRequest.Builder other)

Constructs a clone of the other CreateMedicalDataSourceRequest.Builder.

Builder(Uri fhirBaseUri, String displayName, FhirVersion fhirVersion)

Constructs a new CreateMedicalDataSourceRequest.Builder instance.

Public methods

CreateMedicalDataSourceRequest build()

Returns a new instance of CreateMedicalDataSourceRequest with the specified parameters.

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

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

Builder

Added in U Extensions 16
public Builder (CreateMedicalDataSourceRequest other)

Constructs a clone of the other CreateMedicalDataSourceRequest instance.

Parameters
other CreateMedicalDataSourceRequest: This value cannot be null.

Builder

Added in U Extensions 16
public Builder (CreateMedicalDataSourceRequest.Builder other)

Constructs a clone of the other CreateMedicalDataSourceRequest.Builder.

Parameters
other CreateMedicalDataSourceRequest.Builder: This value cannot be null.

Builder

Added in U Extensions 16
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

Added in U Extensions 16
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

Added in U Extensions 16
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

Added in U Extensions 16
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

Added in U Extensions 16
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.