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  | |
| 
      Builder(UpsertMedicalResourceRequest.Builder other)
      Constructs a clone of the other  | |
| 
      Builder(String dataSourceId, FhirVersion fhirVersion, String data)
      Constructs a new  | |
| Public methods | |
|---|---|
| 
        
        
        
        
        
        UpsertMedicalResourceRequest | 
      build()
      Returns a new instance of  | 
| 
        
        
        
        
        
        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  | 
| 
        
        
        
        
        
        UpsertMedicalResourceRequest.Builder | 
      setFhirVersion(FhirVersion fhirVersion)
      Sets the FHIR version being used for  | 
| Inherited methods | |
|---|---|
Public constructors
Builder
public Builder (UpsertMedicalResourceRequest other)
Constructs a clone of the other UpsertMedicalResourceRequest instance.
| Parameters | |
|---|---|
| other | UpsertMedicalResourceRequest: This value cannot benull. | 
Builder
public Builder (UpsertMedicalResourceRequest.Builder other)
Constructs a clone of the other UpsertMedicalResourceRequest.Builder.
| Parameters | |
|---|---|
| other | UpsertMedicalResourceRequest.Builder: This value cannot benull. | 
Builder
public Builder (String dataSourceId, FhirVersion fhirVersion, String data)
Constructs a new UpsertMedicalResourceRequest.Builder instance.
| Parameters | |
|---|---|
| dataSourceId | String: The unique identifier of the existingMedicalDataSource,
     representing where the data comes from.
 This value cannot benull. | 
| fhirVersion | FhirVersion: TheFhirVersionobject that represents the FHIR version being
     used fordata. This has to match the FHIR version of theMedicalDataSource.
 This value cannot benull. | 
| data | String: The FHIR resource data in JSON representation.
 This value cannot benull. | 
| Throws | |
|---|---|
| IllegalArgumentException | if the provided dataSourceIdis not a valid ID. | 
Public methods
build
public UpsertMedicalResourceRequest build ()
Returns a new instance of UpsertMedicalResourceRequest with the specified
 parameters.
| Returns | |
|---|---|
| UpsertMedicalResourceRequest | This value cannot be null. | 
setData
public UpsertMedicalResourceRequest.Builder setData (String data)
Sets the FHIR resource data in JSON format.
| Parameters | |
|---|---|
| data | String: This value cannot benull. | 
| Returns | |
|---|---|
| UpsertMedicalResourceRequest.Builder | This value cannot be null. | 
setDataSourceId
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 benull. | 
| Returns | |
|---|---|
| UpsertMedicalResourceRequest.Builder | This value cannot be null. | 
| Throws | |
|---|---|
| IllegalArgumentException | if the provided dataSourceIdis not a valid ID. | 
setFhirVersion
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 benull. | 
| Returns | |
|---|---|
| UpsertMedicalResourceRequest.Builder | This value cannot be null. | 
