Class DataSource.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<DataSource.Builder>
com.google.devicesandservices.health.v4.DataSource.Builder
- All Implemented Interfaces:
DataSourceOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- DataSource
public static final class DataSource.Builder
extends com.google.protobuf.GeneratedMessage.Builder<DataSource.Builder>
implements DataSourceOrBuilder
Data Source definition to track the origin of data. Each health data point, regardless of the complexity or data model (whether a simple step count or a detailed sleep session) must retain information about its source of origin (e.g. the device or app that collected it).Protobuf type
google.devicesandservices.health.v4.DataSource-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Output only.Optional.Output only.Optional.Output only.Output only.Output only.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorOptional.Optional.Optional.Output only.intOutput only.Optional.intOptional.booleanOutput only.booleanOptional.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanOutput only.mergeDevice(DataSource.Device value) Optional.mergeFrom(DataSource other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Output only.setApplication(DataSource.Application.Builder builderForValue) Output only.setDevice(DataSource.Device value) Optional.setDevice(DataSource.Device.Builder builderForValue) Optional.setPlatform(DataSource.Platform value) Output only.setPlatformValue(int value) Output only.Optional.setRecordingMethodValue(int value) Optional.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<DataSource.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<DataSource.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<DataSource.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<DataSource.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<DataSource.Builder>
-
mergeFrom
public DataSource.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<DataSource.Builder>- Throws:
IOException
-
getRecordingMethodValue
public int getRecordingMethodValue()Optional. Captures how the data was recorded.
.google.devicesandservices.health.v4.DataSource.RecordingMethod recording_method = 1 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getRecordingMethodValuein interfaceDataSourceOrBuilder- Returns:
- The enum numeric value on the wire for recordingMethod.
-
setRecordingMethodValue
Optional. Captures how the data was recorded.
.google.devicesandservices.health.v4.DataSource.RecordingMethod recording_method = 1 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The enum numeric value on the wire for recordingMethod to set.- Returns:
- This builder for chaining.
-
getRecordingMethod
Optional. Captures how the data was recorded.
.google.devicesandservices.health.v4.DataSource.RecordingMethod recording_method = 1 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getRecordingMethodin interfaceDataSourceOrBuilder- Returns:
- The recordingMethod.
-
setRecordingMethod
Optional. Captures how the data was recorded.
.google.devicesandservices.health.v4.DataSource.RecordingMethod recording_method = 1 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The recordingMethod to set.- Returns:
- This builder for chaining.
-
clearRecordingMethod
Optional. Captures how the data was recorded.
.google.devicesandservices.health.v4.DataSource.RecordingMethod recording_method = 1 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
hasDevice
public boolean hasDevice()Optional. Captures metadata for raw data points originating from devices. We expect this data source to be used for data points written on device sync.
.google.devicesandservices.health.v4.DataSource.Device device = 2 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasDevicein interfaceDataSourceOrBuilder- Returns:
- Whether the device field is set.
-
getDevice
Optional. Captures metadata for raw data points originating from devices. We expect this data source to be used for data points written on device sync.
.google.devicesandservices.health.v4.DataSource.Device device = 2 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getDevicein interfaceDataSourceOrBuilder- Returns:
- The device.
-
setDevice
Optional. Captures metadata for raw data points originating from devices. We expect this data source to be used for data points written on device sync.
.google.devicesandservices.health.v4.DataSource.Device device = 2 [(.google.api.field_behavior) = OPTIONAL]; -
setDevice
Optional. Captures metadata for raw data points originating from devices. We expect this data source to be used for data points written on device sync.
.google.devicesandservices.health.v4.DataSource.Device device = 2 [(.google.api.field_behavior) = OPTIONAL]; -
mergeDevice
Optional. Captures metadata for raw data points originating from devices. We expect this data source to be used for data points written on device sync.
.google.devicesandservices.health.v4.DataSource.Device device = 2 [(.google.api.field_behavior) = OPTIONAL]; -
clearDevice
Optional. Captures metadata for raw data points originating from devices. We expect this data source to be used for data points written on device sync.
.google.devicesandservices.health.v4.DataSource.Device device = 2 [(.google.api.field_behavior) = OPTIONAL]; -
getDeviceBuilder
Optional. Captures metadata for raw data points originating from devices. We expect this data source to be used for data points written on device sync.
.google.devicesandservices.health.v4.DataSource.Device device = 2 [(.google.api.field_behavior) = OPTIONAL]; -
getDeviceOrBuilder
Optional. Captures metadata for raw data points originating from devices. We expect this data source to be used for data points written on device sync.
.google.devicesandservices.health.v4.DataSource.Device device = 2 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getDeviceOrBuilderin interfaceDataSourceOrBuilder
-
hasApplication
public boolean hasApplication()Output only. Captures metadata for the application that provided this data.
.google.devicesandservices.health.v4.DataSource.Application application = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
hasApplicationin interfaceDataSourceOrBuilder- Returns:
- Whether the application field is set.
-
getApplication
Output only. Captures metadata for the application that provided this data.
.google.devicesandservices.health.v4.DataSource.Application application = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getApplicationin interfaceDataSourceOrBuilder- Returns:
- The application.
-
setApplication
Output only. Captures metadata for the application that provided this data.
.google.devicesandservices.health.v4.DataSource.Application application = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
setApplication
Output only. Captures metadata for the application that provided this data.
.google.devicesandservices.health.v4.DataSource.Application application = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
mergeApplication
Output only. Captures metadata for the application that provided this data.
.google.devicesandservices.health.v4.DataSource.Application application = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
clearApplication
Output only. Captures metadata for the application that provided this data.
.google.devicesandservices.health.v4.DataSource.Application application = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getApplicationBuilder
Output only. Captures metadata for the application that provided this data.
.google.devicesandservices.health.v4.DataSource.Application application = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getApplicationOrBuilder
Output only. Captures metadata for the application that provided this data.
.google.devicesandservices.health.v4.DataSource.Application application = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getApplicationOrBuilderin interfaceDataSourceOrBuilder
-
getPlatformValue
public int getPlatformValue()Output only. Captures the platform that uploaded the data.
.google.devicesandservices.health.v4.DataSource.Platform platform = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getPlatformValuein interfaceDataSourceOrBuilder- Returns:
- The enum numeric value on the wire for platform.
-
setPlatformValue
Output only. Captures the platform that uploaded the data.
.google.devicesandservices.health.v4.DataSource.Platform platform = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The enum numeric value on the wire for platform to set.- Returns:
- This builder for chaining.
-
getPlatform
Output only. Captures the platform that uploaded the data.
.google.devicesandservices.health.v4.DataSource.Platform platform = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getPlatformin interfaceDataSourceOrBuilder- Returns:
- The platform.
-
setPlatform
Output only. Captures the platform that uploaded the data.
.google.devicesandservices.health.v4.DataSource.Platform platform = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The platform to set.- Returns:
- This builder for chaining.
-
clearPlatform
Output only. Captures the platform that uploaded the data.
.google.devicesandservices.health.v4.DataSource.Platform platform = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-