Class Electrocardiogram.Builder (0.2.0)

public static final class Electrocardiogram.Builder extends GeneratedMessage.Builder<Electrocardiogram.Builder> implements ElectrocardiogramOrBuilder

Represents an Electrocardiogram (ECG) measurement session. This data type is based on SaMD feature and any changes to it may require additional review.

Protobuf type google.devicesandservices.health.v4.Electrocardiogram

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllWaveformSamples(Iterable<? extends Integer> values)

public Electrocardiogram.Builder addAllWaveformSamples(Iterable<? extends Integer> values)

Optional. An array of voltage values representing lead I ECG values. Each sample represents voltage difference in ECG graph. The first value in array corresponds to the start of the reading.

repeated sint32 waveform_samples = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends java.lang.Integer>

The waveformSamples to add.

Returns
Type Description
Electrocardiogram.Builder

This builder for chaining.

addWaveformSamples(int value)

public Electrocardiogram.Builder addWaveformSamples(int value)

Optional. An array of voltage values representing lead I ECG values. Each sample represents voltage difference in ECG graph. The first value in array corresponds to the start of the reading.

repeated sint32 waveform_samples = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The waveformSamples to add.

Returns
Type Description
Electrocardiogram.Builder

This builder for chaining.

build()

public Electrocardiogram build()
Returns
Type Description
Electrocardiogram

buildPartial()

public Electrocardiogram buildPartial()
Returns
Type Description
Electrocardiogram

clear()

public Electrocardiogram.Builder clear()
Returns
Type Description
Electrocardiogram.Builder
Overrides

clearBeatsPerMinuteAvg()

public Electrocardiogram.Builder clearBeatsPerMinuteAvg()

Optional. Average heart rate recorded during ECG reading in beats per minute.

optional int64 beats_per_minute_avg = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Electrocardiogram.Builder

This builder for chaining.

clearInterval()

public Electrocardiogram.Builder clearInterval()

Required. Observed interval.

NOTE: Historical ECG data lacks timezone offsets, so start_utc_offset and end_utc_offset will be missing or default to zero. As a result, the civil time fields within this interval will default to UTC. It is recommended to use physical time fields instead for accurate time referencing.

NOTE: The start_time and end_time of the interval are equal, representing the reading time.

.google.devicesandservices.health.v4.SessionTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Electrocardiogram.Builder

clearLeadNumber()

public Electrocardiogram.Builder clearLeadNumber()

Optional. The number of leads used for ECG reading.

optional int32 lead_number = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Electrocardiogram.Builder

This builder for chaining.

clearMedicalDeviceInfo()

public Electrocardiogram.Builder clearMedicalDeviceInfo()

Output only. The meta information for the compatible device used to conduct the measurement.

ECG measurements typically populate firmware_version, feature_version, and device_model.

.google.devicesandservices.health.v4.MedicalDeviceInfo medical_device_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Electrocardiogram.Builder

clearMillivoltsScalingFactor()

public Electrocardiogram.Builder clearMillivoltsScalingFactor()

Optional. The factor by which to divide waveform samples to get voltage in millivolts: millivolts = waveform_sample / millivolts_scaling_factor.

optional int32 millivolts_scaling_factor = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Electrocardiogram.Builder

This builder for chaining.

clearResultClassification()

public Electrocardiogram.Builder clearResultClassification()

Optional. The result classification of the ECG reading.

.google.devicesandservices.health.v4.Electrocardiogram.ResultClassification result_classification = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Electrocardiogram.Builder

This builder for chaining.

clearSamplingFrequencyHertz()

public Electrocardiogram.Builder clearSamplingFrequencyHertz()

Optional. The sampling frequency of waveform samples in hertz.

optional int32 sampling_frequency_hertz = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Electrocardiogram.Builder

This builder for chaining.

clearWaveformSamples()

public Electrocardiogram.Builder clearWaveformSamples()

Optional. An array of voltage values representing lead I ECG values. Each sample represents voltage difference in ECG graph. The first value in array corresponds to the start of the reading.

repeated sint32 waveform_samples = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Electrocardiogram.Builder

This builder for chaining.

getBeatsPerMinuteAvg()

public long getBeatsPerMinuteAvg()

Optional. Average heart rate recorded during ECG reading in beats per minute.

optional int64 beats_per_minute_avg = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
long

The beatsPerMinuteAvg.

getDefaultInstanceForType()

public Electrocardiogram getDefaultInstanceForType()
Returns
Type Description
Electrocardiogram

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getInterval()

public SessionTimeInterval getInterval()

Required. Observed interval.

NOTE: Historical ECG data lacks timezone offsets, so start_utc_offset and end_utc_offset will be missing or default to zero. As a result, the civil time fields within this interval will default to UTC. It is recommended to use physical time fields instead for accurate time referencing.

NOTE: The start_time and end_time of the interval are equal, representing the reading time.

.google.devicesandservices.health.v4.SessionTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
SessionTimeInterval

The interval.

getIntervalBuilder()

public SessionTimeInterval.Builder getIntervalBuilder()

Required. Observed interval.

NOTE: Historical ECG data lacks timezone offsets, so start_utc_offset and end_utc_offset will be missing or default to zero. As a result, the civil time fields within this interval will default to UTC. It is recommended to use physical time fields instead for accurate time referencing.

NOTE: The start_time and end_time of the interval are equal, representing the reading time.

.google.devicesandservices.health.v4.SessionTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
SessionTimeInterval.Builder

getIntervalOrBuilder()

public SessionTimeIntervalOrBuilder getIntervalOrBuilder()

Required. Observed interval.

NOTE: Historical ECG data lacks timezone offsets, so start_utc_offset and end_utc_offset will be missing or default to zero. As a result, the civil time fields within this interval will default to UTC. It is recommended to use physical time fields instead for accurate time referencing.

NOTE: The start_time and end_time of the interval are equal, representing the reading time.

.google.devicesandservices.health.v4.SessionTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
SessionTimeIntervalOrBuilder

getLeadNumber()

public int getLeadNumber()

Optional. The number of leads used for ECG reading.

optional int32 lead_number = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The leadNumber.

getMedicalDeviceInfo()

public MedicalDeviceInfo getMedicalDeviceInfo()

Output only. The meta information for the compatible device used to conduct the measurement.

ECG measurements typically populate firmware_version, feature_version, and device_model.

.google.devicesandservices.health.v4.MedicalDeviceInfo medical_device_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
MedicalDeviceInfo

The medicalDeviceInfo.

getMedicalDeviceInfoBuilder()

public MedicalDeviceInfo.Builder getMedicalDeviceInfoBuilder()

Output only. The meta information for the compatible device used to conduct the measurement.

ECG measurements typically populate firmware_version, feature_version, and device_model.

.google.devicesandservices.health.v4.MedicalDeviceInfo medical_device_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
MedicalDeviceInfo.Builder

getMedicalDeviceInfoOrBuilder()

public MedicalDeviceInfoOrBuilder getMedicalDeviceInfoOrBuilder()

Output only. The meta information for the compatible device used to conduct the measurement.

ECG measurements typically populate firmware_version, feature_version, and device_model.

.google.devicesandservices.health.v4.MedicalDeviceInfo medical_device_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
MedicalDeviceInfoOrBuilder

getMillivoltsScalingFactor()

public int getMillivoltsScalingFactor()

Optional. The factor by which to divide waveform samples to get voltage in millivolts: millivolts = waveform_sample / millivolts_scaling_factor.

optional int32 millivolts_scaling_factor = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The millivoltsScalingFactor.

getResultClassification()

public Electrocardiogram.ResultClassification getResultClassification()

Optional. The result classification of the ECG reading.

.google.devicesandservices.health.v4.Electrocardiogram.ResultClassification result_classification = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Electrocardiogram.ResultClassification

The resultClassification.

getResultClassificationValue()

public int getResultClassificationValue()

Optional. The result classification of the ECG reading.

.google.devicesandservices.health.v4.Electrocardiogram.ResultClassification result_classification = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for resultClassification.

getSamplingFrequencyHertz()

public int getSamplingFrequencyHertz()

Optional. The sampling frequency of waveform samples in hertz.

optional int32 sampling_frequency_hertz = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The samplingFrequencyHertz.

getWaveformSamples(int index)

public int getWaveformSamples(int index)

Optional. An array of voltage values representing lead I ECG values. Each sample represents voltage difference in ECG graph. The first value in array corresponds to the start of the reading.

repeated sint32 waveform_samples = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
int

The waveformSamples at the given index.

getWaveformSamplesCount()

public int getWaveformSamplesCount()

Optional. An array of voltage values representing lead I ECG values. Each sample represents voltage difference in ECG graph. The first value in array corresponds to the start of the reading.

repeated sint32 waveform_samples = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of waveformSamples.

getWaveformSamplesList()

public List<Integer> getWaveformSamplesList()

Optional. An array of voltage values representing lead I ECG values. Each sample represents voltage difference in ECG graph. The first value in array corresponds to the start of the reading.

repeated sint32 waveform_samples = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Integer>

A list containing the waveformSamples.

hasBeatsPerMinuteAvg()

public boolean hasBeatsPerMinuteAvg()

Optional. Average heart rate recorded during ECG reading in beats per minute.

optional int64 beats_per_minute_avg = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the beatsPerMinuteAvg field is set.

hasInterval()

public boolean hasInterval()

Required. Observed interval.

NOTE: Historical ECG data lacks timezone offsets, so start_utc_offset and end_utc_offset will be missing or default to zero. As a result, the civil time fields within this interval will default to UTC. It is recommended to use physical time fields instead for accurate time referencing.

NOTE: The start_time and end_time of the interval are equal, representing the reading time.

.google.devicesandservices.health.v4.SessionTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the interval field is set.

hasLeadNumber()

public boolean hasLeadNumber()

Optional. The number of leads used for ECG reading.

optional int32 lead_number = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the leadNumber field is set.

hasMedicalDeviceInfo()

public boolean hasMedicalDeviceInfo()

Output only. The meta information for the compatible device used to conduct the measurement.

ECG measurements typically populate firmware_version, feature_version, and device_model.

.google.devicesandservices.health.v4.MedicalDeviceInfo medical_device_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the medicalDeviceInfo field is set.

hasMillivoltsScalingFactor()

public boolean hasMillivoltsScalingFactor()

Optional. The factor by which to divide waveform samples to get voltage in millivolts: millivolts = waveform_sample / millivolts_scaling_factor.

optional int32 millivolts_scaling_factor = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the millivoltsScalingFactor field is set.

hasSamplingFrequencyHertz()

public boolean hasSamplingFrequencyHertz()

Optional. The sampling frequency of waveform samples in hertz.

optional int32 sampling_frequency_hertz = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the samplingFrequencyHertz field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Electrocardiogram other)

public Electrocardiogram.Builder mergeFrom(Electrocardiogram other)
Parameter
Name Description
other Electrocardiogram
Returns
Type Description
Electrocardiogram.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Electrocardiogram.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Electrocardiogram.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Electrocardiogram.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Electrocardiogram.Builder
Overrides

mergeInterval(SessionTimeInterval value)

public Electrocardiogram.Builder mergeInterval(SessionTimeInterval value)

Required. Observed interval.

NOTE: Historical ECG data lacks timezone offsets, so start_utc_offset and end_utc_offset will be missing or default to zero. As a result, the civil time fields within this interval will default to UTC. It is recommended to use physical time fields instead for accurate time referencing.

NOTE: The start_time and end_time of the interval are equal, representing the reading time.

.google.devicesandservices.health.v4.SessionTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value SessionTimeInterval
Returns
Type Description
Electrocardiogram.Builder

mergeMedicalDeviceInfo(MedicalDeviceInfo value)

public Electrocardiogram.Builder mergeMedicalDeviceInfo(MedicalDeviceInfo value)

Output only. The meta information for the compatible device used to conduct the measurement.

ECG measurements typically populate firmware_version, feature_version, and device_model.

.google.devicesandservices.health.v4.MedicalDeviceInfo medical_device_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value MedicalDeviceInfo
Returns
Type Description
Electrocardiogram.Builder

setBeatsPerMinuteAvg(long value)

public Electrocardiogram.Builder setBeatsPerMinuteAvg(long value)

Optional. Average heart rate recorded during ECG reading in beats per minute.

optional int64 beats_per_minute_avg = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value long

The beatsPerMinuteAvg to set.

Returns
Type Description
Electrocardiogram.Builder

This builder for chaining.

setInterval(SessionTimeInterval value)

public Electrocardiogram.Builder setInterval(SessionTimeInterval value)

Required. Observed interval.

NOTE: Historical ECG data lacks timezone offsets, so start_utc_offset and end_utc_offset will be missing or default to zero. As a result, the civil time fields within this interval will default to UTC. It is recommended to use physical time fields instead for accurate time referencing.

NOTE: The start_time and end_time of the interval are equal, representing the reading time.

.google.devicesandservices.health.v4.SessionTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value SessionTimeInterval
Returns
Type Description
Electrocardiogram.Builder

setInterval(SessionTimeInterval.Builder builderForValue)

public Electrocardiogram.Builder setInterval(SessionTimeInterval.Builder builderForValue)

Required. Observed interval.

NOTE: Historical ECG data lacks timezone offsets, so start_utc_offset and end_utc_offset will be missing or default to zero. As a result, the civil time fields within this interval will default to UTC. It is recommended to use physical time fields instead for accurate time referencing.

NOTE: The start_time and end_time of the interval are equal, representing the reading time.

.google.devicesandservices.health.v4.SessionTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue SessionTimeInterval.Builder
Returns
Type Description
Electrocardiogram.Builder

setLeadNumber(int value)

public Electrocardiogram.Builder setLeadNumber(int value)

Optional. The number of leads used for ECG reading.

optional int32 lead_number = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The leadNumber to set.

Returns
Type Description
Electrocardiogram.Builder

This builder for chaining.

setMedicalDeviceInfo(MedicalDeviceInfo value)

public Electrocardiogram.Builder setMedicalDeviceInfo(MedicalDeviceInfo value)

Output only. The meta information for the compatible device used to conduct the measurement.

ECG measurements typically populate firmware_version, feature_version, and device_model.

.google.devicesandservices.health.v4.MedicalDeviceInfo medical_device_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value MedicalDeviceInfo
Returns
Type Description
Electrocardiogram.Builder

setMedicalDeviceInfo(MedicalDeviceInfo.Builder builderForValue)

public Electrocardiogram.Builder setMedicalDeviceInfo(MedicalDeviceInfo.Builder builderForValue)

Output only. The meta information for the compatible device used to conduct the measurement.

ECG measurements typically populate firmware_version, feature_version, and device_model.

.google.devicesandservices.health.v4.MedicalDeviceInfo medical_device_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue MedicalDeviceInfo.Builder
Returns
Type Description
Electrocardiogram.Builder

setMillivoltsScalingFactor(int value)

public Electrocardiogram.Builder setMillivoltsScalingFactor(int value)

Optional. The factor by which to divide waveform samples to get voltage in millivolts: millivolts = waveform_sample / millivolts_scaling_factor.

optional int32 millivolts_scaling_factor = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The millivoltsScalingFactor to set.

Returns
Type Description
Electrocardiogram.Builder

This builder for chaining.

setResultClassification(Electrocardiogram.ResultClassification value)

public Electrocardiogram.Builder setResultClassification(Electrocardiogram.ResultClassification value)

Optional. The result classification of the ECG reading.

.google.devicesandservices.health.v4.Electrocardiogram.ResultClassification result_classification = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Electrocardiogram.ResultClassification

The resultClassification to set.

Returns
Type Description
Electrocardiogram.Builder

This builder for chaining.

setResultClassificationValue(int value)

public Electrocardiogram.Builder setResultClassificationValue(int value)

Optional. The result classification of the ECG reading.

.google.devicesandservices.health.v4.Electrocardiogram.ResultClassification result_classification = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The enum numeric value on the wire for resultClassification to set.

Returns
Type Description
Electrocardiogram.Builder

This builder for chaining.

setSamplingFrequencyHertz(int value)

public Electrocardiogram.Builder setSamplingFrequencyHertz(int value)

Optional. The sampling frequency of waveform samples in hertz.

optional int32 sampling_frequency_hertz = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The samplingFrequencyHertz to set.

Returns
Type Description
Electrocardiogram.Builder

This builder for chaining.

setWaveformSamples(int index, int value)

public Electrocardiogram.Builder setWaveformSamples(int index, int value)

Optional. An array of voltage values representing lead I ECG values. Each sample represents voltage difference in ECG graph. The first value in array corresponds to the start of the reading.

repeated sint32 waveform_samples = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value int

The waveformSamples to set.

Returns
Type Description
Electrocardiogram.Builder

This builder for chaining.