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 Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<DataSource.Builder>
    • clear

      public DataSource.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<DataSource.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<DataSource.Builder>
    • getDefaultInstanceForType

      public DataSource getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public DataSource build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public DataSource buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public DataSource.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<DataSource.Builder>
    • mergeFrom

      public DataSource.Builder mergeFrom(DataSource other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.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:
      getRecordingMethodValue in interface DataSourceOrBuilder
      Returns:
      The enum numeric value on the wire for recordingMethod.
    • setRecordingMethodValue

      public DataSource.Builder setRecordingMethodValue(int value)
       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

      public DataSource.RecordingMethod getRecordingMethod()
       Optional. Captures how the data was recorded.
       
      .google.devicesandservices.health.v4.DataSource.RecordingMethod recording_method = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRecordingMethod in interface DataSourceOrBuilder
      Returns:
      The recordingMethod.
    • setRecordingMethod

      public DataSource.Builder setRecordingMethod(DataSource.RecordingMethod value)
       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

      public DataSource.Builder 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:
      hasDevice in interface DataSourceOrBuilder
      Returns:
      Whether the device field is set.
    • getDevice

      public DataSource.Device 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:
      getDevice in interface DataSourceOrBuilder
      Returns:
      The device.
    • setDevice

      public DataSource.Builder setDevice(DataSource.Device value)
       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

      public DataSource.Builder setDevice(DataSource.Device.Builder builderForValue)
       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

      public DataSource.Builder mergeDevice(DataSource.Device value)
       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

      public DataSource.Builder 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

      public DataSource.Device.Builder 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

      public DataSource.DeviceOrBuilder 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:
      getDeviceOrBuilder in interface DataSourceOrBuilder
    • 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:
      hasApplication in interface DataSourceOrBuilder
      Returns:
      Whether the application field is set.
    • getApplication

      public DataSource.Application 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:
      getApplication in interface DataSourceOrBuilder
      Returns:
      The application.
    • setApplication

      public DataSource.Builder setApplication(DataSource.Application value)
       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

      public DataSource.Builder setApplication(DataSource.Application.Builder builderForValue)
       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

      public DataSource.Builder mergeApplication(DataSource.Application value)
       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

      public DataSource.Builder 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

      public DataSource.Application.Builder 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

      public DataSource.ApplicationOrBuilder 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:
      getApplicationOrBuilder in interface DataSourceOrBuilder
    • 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:
      getPlatformValue in interface DataSourceOrBuilder
      Returns:
      The enum numeric value on the wire for platform.
    • setPlatformValue

      public DataSource.Builder setPlatformValue(int value)
       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

      public DataSource.Platform 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:
      getPlatform in interface DataSourceOrBuilder
      Returns:
      The platform.
    • setPlatform

      public DataSource.Builder setPlatform(DataSource.Platform value)
       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

      public DataSource.Builder 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.