UpsertMedicalResourceRequest.Builder


public static final class UpsertMedicalResourceRequest.Builder
extends Object

java.lang.Object
   ↳ android.health.connect.UpsertMedicalResourceRequest.Builder


Builder class for UpsertMedicalResourceRequest.

Summary

Public constructors

Builder(UpsertMedicalResourceRequest other)

Constructs a clone of the other UpsertMedicalResourceRequest instance.

Builder(UpsertMedicalResourceRequest.Builder other)

Constructs a clone of the other UpsertMedicalResourceRequest.Builder.

Builder(String dataSourceId, FhirVersion fhirVersion, String data)

Constructs a new UpsertMedicalResourceRequest.Builder instance.

Public methods

UpsertMedicalResourceRequest build()

Returns a new instance of UpsertMedicalResourceRequest with the specified parameters.

UpsertMedicalResourceRequest.Builder setData(String data)

Sets the FHIR resource data in JSON format.

UpsertMedicalResourceRequest.Builder setDataSourceId(String dataSourceId)

Sets the unique ID of the existing MedicalDataSource, to represent where the data is coming from.

UpsertMedicalResourceRequest.Builder setFhirVersion(FhirVersion fhirVersion)

Sets the FHIR version being used for data.

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 (UpsertMedicalResourceRequest other)

Constructs a clone of the other UpsertMedicalResourceRequest instance.

Parameters
other UpsertMedicalResourceRequest: This value cannot be null.

Builder

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

Constructs a clone of the other UpsertMedicalResourceRequest.Builder.

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

Builder

Added in U Extensions 16
public Builder (String dataSourceId, 
                FhirVersion fhirVersion, 
                String data)

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.

Throws
IllegalArgumentException if the provided dataSourceId is not a valid ID.

Public methods

build

Added in U Extensions 16
public UpsertMedicalResourceRequest build ()

Returns a new instance of UpsertMedicalResourceRequest with the specified parameters.

Returns
UpsertMedicalResourceRequest This value cannot be null.

setData

Added in U Extensions 16
public UpsertMedicalResourceRequest.Builder setData (String data)

Sets the FHIR resource data in JSON format.

Parameters
data String: This value cannot be null.

Returns
UpsertMedicalResourceRequest.Builder This value cannot be null.

setDataSourceId

Added in U Extensions 16
public UpsertMedicalResourceRequest.Builder setDataSourceId (String dataSourceId)

Sets the unique ID of the existing MedicalDataSource, to represent where the data is coming from.

Parameters
dataSourceId String: This value cannot be null.

Returns
UpsertMedicalResourceRequest.Builder This value cannot be null.

Throws
IllegalArgumentException if the provided dataSourceId is not a valid ID.

setFhirVersion

Added in U Extensions 16
public UpsertMedicalResourceRequest.Builder setFhirVersion (FhirVersion fhirVersion)

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.

Returns
UpsertMedicalResourceRequest.Builder This value cannot be null.