Class Exercise (0.2.0)

public final class Exercise extends GeneratedMessage implements ExerciseOrBuilder

An exercise that stores information about a physical activity.

Protobuf type google.devicesandservices.health.v4.Exercise

Implements

ExerciseOrBuilder

Static Fields

ACTIVE_DURATION_FIELD_NUMBER

public static final int ACTIVE_DURATION_FIELD_NUMBER
Field Value
Type Description
int

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

EXERCISE_EVENTS_FIELD_NUMBER

public static final int EXERCISE_EVENTS_FIELD_NUMBER
Field Value
Type Description
int

EXERCISE_METADATA_FIELD_NUMBER

public static final int EXERCISE_METADATA_FIELD_NUMBER
Field Value
Type Description
int

EXERCISE_TYPE_FIELD_NUMBER

public static final int EXERCISE_TYPE_FIELD_NUMBER
Field Value
Type Description
int

INTERVAL_FIELD_NUMBER

public static final int INTERVAL_FIELD_NUMBER
Field Value
Type Description
int

METRICS_SUMMARY_FIELD_NUMBER

public static final int METRICS_SUMMARY_FIELD_NUMBER
Field Value
Type Description
int

NOTES_FIELD_NUMBER

public static final int NOTES_FIELD_NUMBER
Field Value
Type Description
int

SPLITS_FIELD_NUMBER

public static final int SPLITS_FIELD_NUMBER
Field Value
Type Description
int

SPLIT_SUMMARIES_FIELD_NUMBER

public static final int SPLIT_SUMMARIES_FIELD_NUMBER
Field Value
Type Description
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Exercise getDefaultInstance()
Returns
Type Description
Exercise

getDescriptor()

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

newBuilder()

public static Exercise.Builder newBuilder()
Returns
Type Description
Exercise.Builder

newBuilder(Exercise prototype)

public static Exercise.Builder newBuilder(Exercise prototype)
Parameter
Name Description
prototype Exercise
Returns
Type Description
Exercise.Builder

parseDelimitedFrom(InputStream input)

public static Exercise parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Exercise
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Exercise parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exercise
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Exercise parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Exercise
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Exercise parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exercise
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Exercise parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Exercise
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Exercise parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exercise
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Exercise parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Exercise
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Exercise parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exercise
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Exercise parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Exercise
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Exercise parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exercise
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Exercise parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Exercise
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Exercise parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exercise
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Exercise> parser()
Returns
Type Description
Parser<Exercise>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getActiveDuration()

public Duration getActiveDuration()

Optional. Duration excluding pauses.

.google.protobuf.Duration active_duration = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Duration

The activeDuration.

getActiveDurationOrBuilder()

public DurationOrBuilder getActiveDurationOrBuilder()

Optional. Duration excluding pauses.

.google.protobuf.Duration active_duration = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DurationOrBuilder

getCreateTime()

public Timestamp getCreateTime()

Output only. Represents the timestamp of the creation of the exercise.

.google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Represents the timestamp of the creation of the exercise.

.google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public Exercise getDefaultInstanceForType()
Returns
Type Description
Exercise

getDisplayName()

public String getDisplayName()

Required. Exercise display name.

string display_name = 12 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. Exercise display name.

string display_name = 12 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for displayName.

getExerciseEvents(int index)

public Exercise.ExerciseEvent getExerciseEvents(int index)

Optional. Exercise events that happen during an exercise, such as pause & restarts.

repeated .google.devicesandservices.health.v4.Exercise.ExerciseEvent exercise_events = 15 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Exercise.ExerciseEvent

getExerciseEventsCount()

public int getExerciseEventsCount()

Optional. Exercise events that happen during an exercise, such as pause & restarts.

repeated .google.devicesandservices.health.v4.Exercise.ExerciseEvent exercise_events = 15 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getExerciseEventsList()

public List<Exercise.ExerciseEvent> getExerciseEventsList()

Optional. Exercise events that happen during an exercise, such as pause & restarts.

repeated .google.devicesandservices.health.v4.Exercise.ExerciseEvent exercise_events = 15 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<ExerciseEvent>

getExerciseEventsOrBuilder(int index)

public Exercise.ExerciseEventOrBuilder getExerciseEventsOrBuilder(int index)

Optional. Exercise events that happen during an exercise, such as pause & restarts.

repeated .google.devicesandservices.health.v4.Exercise.ExerciseEvent exercise_events = 15 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Exercise.ExerciseEventOrBuilder

getExerciseEventsOrBuilderList()

public List<? extends Exercise.ExerciseEventOrBuilder> getExerciseEventsOrBuilderList()

Optional. Exercise events that happen during an exercise, such as pause & restarts.

repeated .google.devicesandservices.health.v4.Exercise.ExerciseEvent exercise_events = 15 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.devicesandservices.health.v4.Exercise.ExerciseEventOrBuilder>

getExerciseMetadata()

public Exercise.ExerciseMetadata getExerciseMetadata()

Optional. Additional exercise metadata.

.google.devicesandservices.health.v4.Exercise.ExerciseMetadata exercise_metadata = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Exercise.ExerciseMetadata

The exerciseMetadata.

getExerciseMetadataOrBuilder()

public Exercise.ExerciseMetadataOrBuilder getExerciseMetadataOrBuilder()

Optional. Additional exercise metadata.

.google.devicesandservices.health.v4.Exercise.ExerciseMetadata exercise_metadata = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Exercise.ExerciseMetadataOrBuilder

getExerciseType()

public Exercise.ExerciseType getExerciseType()

Required. The type of activity performed during an exercise.

.google.devicesandservices.health.v4.Exercise.ExerciseType exercise_type = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Exercise.ExerciseType

The exerciseType.

getExerciseTypeValue()

public int getExerciseTypeValue()

Required. The type of activity performed during an exercise.

.google.devicesandservices.health.v4.Exercise.ExerciseType exercise_type = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for exerciseType.

getInterval()

public SessionTimeInterval getInterval()

Required. Observed exercise interval

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

Returns
Type Description
SessionTimeInterval

The interval.

getIntervalOrBuilder()

public SessionTimeIntervalOrBuilder getIntervalOrBuilder()

Required. Observed exercise interval

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

Returns
Type Description
SessionTimeIntervalOrBuilder

getMetricsSummary()

public MetricsSummary getMetricsSummary()

Required. Summary metrics for this exercise ( )

.google.devicesandservices.health.v4.MetricsSummary metrics_summary = 10 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
MetricsSummary

The metricsSummary.

getMetricsSummaryOrBuilder()

public MetricsSummaryOrBuilder getMetricsSummaryOrBuilder()

Required. Summary metrics for this exercise ( )

.google.devicesandservices.health.v4.MetricsSummary metrics_summary = 10 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
MetricsSummaryOrBuilder

getNotes()

public String getNotes()

Optional. Standard free-form notes captured at manual logging.

string notes = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The notes.

getNotesBytes()

public ByteString getNotesBytes()

Optional. Standard free-form notes captured at manual logging.

string notes = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for notes.

getParserForType()

public Parser<Exercise> getParserForType()
Returns
Type Description
Parser<Exercise>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSplitSummaries(int index)

public Exercise.SplitSummary getSplitSummaries(int index)

Optional. Laps or splits recorded within an exercise. Laps could be split based on distance or other criteria (duration, etc.) Laps should not be overlapping with each other.

repeated .google.devicesandservices.health.v4.Exercise.SplitSummary split_summaries = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Exercise.SplitSummary

getSplitSummariesCount()

public int getSplitSummariesCount()

Optional. Laps or splits recorded within an exercise. Laps could be split based on distance or other criteria (duration, etc.) Laps should not be overlapping with each other.

repeated .google.devicesandservices.health.v4.Exercise.SplitSummary split_summaries = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getSplitSummariesList()

public List<Exercise.SplitSummary> getSplitSummariesList()

Optional. Laps or splits recorded within an exercise. Laps could be split based on distance or other criteria (duration, etc.) Laps should not be overlapping with each other.

repeated .google.devicesandservices.health.v4.Exercise.SplitSummary split_summaries = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<SplitSummary>

getSplitSummariesOrBuilder(int index)

public Exercise.SplitSummaryOrBuilder getSplitSummariesOrBuilder(int index)

Optional. Laps or splits recorded within an exercise. Laps could be split based on distance or other criteria (duration, etc.) Laps should not be overlapping with each other.

repeated .google.devicesandservices.health.v4.Exercise.SplitSummary split_summaries = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Exercise.SplitSummaryOrBuilder

getSplitSummariesOrBuilderList()

public List<? extends Exercise.SplitSummaryOrBuilder> getSplitSummariesOrBuilderList()

Optional. Laps or splits recorded within an exercise. Laps could be split based on distance or other criteria (duration, etc.) Laps should not be overlapping with each other.

repeated .google.devicesandservices.health.v4.Exercise.SplitSummary split_summaries = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.devicesandservices.health.v4.Exercise.SplitSummaryOrBuilder>

getSplits(int index)

public Exercise.SplitSummary getSplits(int index)

Optional. The default split is 1 km or 1 mile.

  • if the movement distance is less than the default, then there are no splits
  • if the movement distance is greater than or equal to the default, then we have splits

repeated .google.devicesandservices.health.v4.Exercise.SplitSummary splits = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Exercise.SplitSummary

getSplitsCount()

public int getSplitsCount()

Optional. The default split is 1 km or 1 mile.

  • if the movement distance is less than the default, then there are no splits
  • if the movement distance is greater than or equal to the default, then we have splits

repeated .google.devicesandservices.health.v4.Exercise.SplitSummary splits = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getSplitsList()

public List<Exercise.SplitSummary> getSplitsList()

Optional. The default split is 1 km or 1 mile.

  • if the movement distance is less than the default, then there are no splits
  • if the movement distance is greater than or equal to the default, then we have splits

repeated .google.devicesandservices.health.v4.Exercise.SplitSummary splits = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<SplitSummary>

getSplitsOrBuilder(int index)

public Exercise.SplitSummaryOrBuilder getSplitsOrBuilder(int index)

Optional. The default split is 1 km or 1 mile.

  • if the movement distance is less than the default, then there are no splits
  • if the movement distance is greater than or equal to the default, then we have splits

repeated .google.devicesandservices.health.v4.Exercise.SplitSummary splits = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Exercise.SplitSummaryOrBuilder

getSplitsOrBuilderList()

public List<? extends Exercise.SplitSummaryOrBuilder> getSplitsOrBuilderList()

Optional. The default split is 1 km or 1 mile.

  • if the movement distance is less than the default, then there are no splits
  • if the movement distance is greater than or equal to the default, then we have splits

repeated .google.devicesandservices.health.v4.Exercise.SplitSummary splits = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.devicesandservices.health.v4.Exercise.SplitSummaryOrBuilder>

getUpdateTime()

public Timestamp getUpdateTime()

Output only. This is the timestamp of the last update to the exercise.

.google.protobuf.Timestamp update_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. This is the timestamp of the last update to the exercise.

.google.protobuf.Timestamp update_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasActiveDuration()

public boolean hasActiveDuration()

Optional. Duration excluding pauses.

.google.protobuf.Duration active_duration = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the activeDuration field is set.

hasCreateTime()

public boolean hasCreateTime()

Output only. Represents the timestamp of the creation of the exercise.

.google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasExerciseMetadata()

public boolean hasExerciseMetadata()

Optional. Additional exercise metadata.

.google.devicesandservices.health.v4.Exercise.ExerciseMetadata exercise_metadata = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the exerciseMetadata field is set.

hasInterval()

public boolean hasInterval()

Required. Observed exercise interval

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

Returns
Type Description
boolean

Whether the interval field is set.

hasMetricsSummary()

public boolean hasMetricsSummary()

Required. Summary metrics for this exercise ( )

.google.devicesandservices.health.v4.MetricsSummary metrics_summary = 10 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the metricsSummary field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. This is the timestamp of the last update to the exercise.

.google.protobuf.Timestamp update_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Exercise.Builder newBuilderForType()
Returns
Type Description
Exercise.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected Exercise.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Exercise.Builder
Overrides

toBuilder()

public Exercise.Builder toBuilder()
Returns
Type Description
Exercise.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException